Please sign in to comment.
scripts/dts: Sort instance IDs by reg addr
Because of how generate defines for instances its possible that we have a name conflict if the instance ID and reg addr space clash. For example on qemu_x86 there are current two 'soc-nv-flash' nodes and one is at reg addr 0, but instance id 1, the other is reg addr 0x1000 and instance id 0. We'd possibly get this conflict: For the 'soc-nv-flash' at 0x1000 (instance 0): (instance define) #define DT_SOC_NV_FLASH_0_BASE_ADDRESS 0x1000 For the 'soc-nv-flash' at 0x0 (instance 1): (address define) #define DT_SOC_NV_FLASH_0_BASE_ADDRESS 0x0 To deal with this we make sure that the lower reg address is instance 0, than things work out ok. To handle this case, if we sort the instance IDs based on reg addr than if we have something at reg addr 0, it will also than be an instand ID 0. The longer term solution will be to deprecated the old defines and remove the conflict between instance ID defines and normal DT defines. Signed-off-by: Kumar Gala <firstname.lastname@example.org>
- Loading branch information...