aboutsummaryrefslogtreecommitdiff
path: root/core/flash.c
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2015-05-20 11:53:44 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-05-20 14:57:55 +1000
commit947c2ccc0941411ad726a97e301e6d4753c6fde3 (patch)
tree6cd4b2927dc01e152c93b2099574d71eee2df2cc /core/flash.c
parentc1237f53f6ffff46a5711ca55c6f6c6855d3c85b (diff)
downloadskiboot-947c2ccc0941411ad726a97e301e6d4753c6fde3.zip
skiboot-947c2ccc0941411ad726a97e301e6d4753c6fde3.tar.gz
skiboot-947c2ccc0941411ad726a97e301e6d4753c6fde3.tar.bz2
flash: don't report nvram partitions through the device tree
Skiboot parses the ffs header in the nvram and writes a devicetree entry for each partition that ffs returns. Skiboot doesn't need to do this as it exposes access to the entirety of the nvram to linux so any user of the nvram within linux can just read the ffs partition data themselves. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/flash.c')
-rw-r--r--core/flash.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/core/flash.c b/core/flash.c
index 9018ecd..601a9ab 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -177,22 +177,9 @@ static int flash_nvram_probe(struct flash *flash, struct ffs_handle *ffs)
/* core flash support */
-static void flash_add_dt_partition_node(struct dt_node *flash_node, char *name,
- uint32_t start, uint32_t size)
-{
- struct dt_node *part_node;
-
- part_node = dt_new_addr(flash_node, "partition", start);
- dt_add_property_cells(part_node, "reg", start, size);
- if (name && strlen(name))
- dt_add_property_strings(part_node, "label", name);
-}
-
-static struct dt_node *flash_add_dt_node(struct flash *flash, int id,
- struct ffs_handle *ffs)
+static struct dt_node *flash_add_dt_node(struct flash *flash, int id)
{
struct dt_node *flash_node;
- int i;
flash_node = dt_new_addr(opal_node, "flash", id);
dt_add_property_strings(flash_node, "compatible", "ibm,opal-flash");
@@ -205,21 +192,6 @@ static struct dt_node *flash_add_dt_node(struct flash *flash, int id,
dt_add_property_cells(flash_node, "#address-cells", 1);
dt_add_property_cells(flash_node, "#size-cells", 1);
- if (!ffs)
- return flash_node;
-
- for (i = 0; ; i++) {
- uint32_t start, size;
- char *name;
- int rc;
-
- rc = ffs_part_info(ffs, i, &name, &start, NULL, &size, NULL);
- if (rc)
- break;
-
- flash_add_dt_partition_node(flash_node, name, start, size);
- }
-
return flash_node;
}
@@ -295,7 +267,7 @@ int flash_register(struct flash_chip *chip, bool is_system_flash)
ffs = NULL;
}
- node = flash_add_dt_node(flash, i, ffs);
+ node = flash_add_dt_node(flash, i);
if (is_system_flash)
setup_system_flash(flash, node, name, ffs);