Should this not be stored in the pios_flash_chip_internal structure and then you look it up as

   partition->chip_desc->chip_end ?