Searched hist:"09 ce9921a7d8b1ce764656b14b42217bbf4faa38" (Results 1 – 2 of 2) sorted by relevance
| /rk3399_rockchip-uboot/include/ |
| H A D | flash.h | 09ce9921a7d8b1ce764656b14b42217bbf4faa38 Mon Feb 02 22:34:51 UTC 2009 Becky Bruce <beckyb@kernel.crashing.org> flash/cfi_flash: Use virtual sector start address, not phys
include/flash.h was commented to say that the address in flash_info->start was a physical address. However, from u-boot's point of view, and looking at most flash code, it makes more sense for this to be a virtual address. So I corrected the comment to indicate that this was a virtual address.
The only flash driver that was actually treating the address as physical was the mtd/cfi_flash driver. However, this code was using it inconsistently as it actually directly dereferenced the "start" element, while it used map_physmem to get a virtual address in other places. I changed this driver so that the code which initializes the info->start field calls map_physmem to get a virtual address, eliminating the need for further map_physmem calls. The code is now consistent.
The *only* place a physical address should be used is when defining the flash banks list that is used to initialize the flash_info struct, usually found in the board config file.
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Stefan Roese <sr@denx.de>
|
| /rk3399_rockchip-uboot/drivers/mtd/ |
| H A D | cfi_flash.c | 09ce9921a7d8b1ce764656b14b42217bbf4faa38 Mon Feb 02 22:34:51 UTC 2009 Becky Bruce <beckyb@kernel.crashing.org> flash/cfi_flash: Use virtual sector start address, not phys
include/flash.h was commented to say that the address in flash_info->start was a physical address. However, from u-boot's point of view, and looking at most flash code, it makes more sense for this to be a virtual address. So I corrected the comment to indicate that this was a virtual address.
The only flash driver that was actually treating the address as physical was the mtd/cfi_flash driver. However, this code was using it inconsistently as it actually directly dereferenced the "start" element, while it used map_physmem to get a virtual address in other places. I changed this driver so that the code which initializes the info->start field calls map_physmem to get a virtual address, eliminating the need for further map_physmem calls. The code is now consistent.
The *only* place a physical address should be used is when defining the flash banks list that is used to initialize the flash_info struct, usually found in the board config file.
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Stefan Roese <sr@denx.de>
|