From f117c0f0731e99a5e468a300a71b34afa337e133 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Mon, 1 Aug 2011 00:23:23 -0500 Subject: fdt: Rename fdt_create_phandle to fdt_set_phandle The old fdt_create_phandle didn't actually create a phandle it just set one. We'll introduce a new helper that actually does creation. Signed-off-by: Kumar Gala Acked-by: Gerald Van Baren --- common/fdt_support.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/fdt_support.c b/common/fdt_support.c index 19b2ef6..8f7323d 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -1196,13 +1196,13 @@ int fdt_alloc_phandle(void *blob) } /* - * fdt_create_phandle: Create a phandle property for the given node + * fdt_set_phandle: Create a phandle property for the given node * * @fdt: ptr to device tree * @nodeoffset: node to update * @phandle: phandle value to set (must be unique) -*/ -int fdt_create_phandle(void *fdt, int nodeoffset, uint32_t phandle) + */ +int fdt_set_phandle(void *fdt, int nodeoffset, uint32_t phandle) { int ret; -- cgit v1.1 From 10aeabd18657edf6d65e45bd4c63a48cc794fef0 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Mon, 1 Aug 2011 00:25:20 -0500 Subject: fdt: Add new fdt_create_phandle helper Add a helper function that will return a phandle value for the given node. If the node doesn't have a phandle already one will be created. Signed-off-by: Kumar Gala Acked-by: Gerald Van Baren --- common/fdt_support.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'common') diff --git a/common/fdt_support.c b/common/fdt_support.c index 8f7323d..46aa842 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -1235,6 +1235,26 @@ int fdt_set_phandle(void *fdt, int nodeoffset, uint32_t phandle) return ret; } +/* + * fdt_create_phandle: Create a phandle property for the given node + * + * @fdt: ptr to device tree + * @nodeoffset: node to update + */ +int fdt_create_phandle(void *fdt, int nodeoffset) +{ + /* see if there is a phandle already */ + int phandle = fdt_get_phandle(fdt, nodeoffset); + + /* if we got 0, means no phandle so create one */ + if (phandle == 0) { + phandle = fdt_alloc_phandle(fdt); + fdt_set_phandle(fdt, nodeoffset, phandle); + } + + return phandle; +} + #if defined(CONFIG_VIDEO) int fdt_add_edid(void *blob, const char *compat, unsigned char *edid_buf) { -- cgit v1.1 From fbb9ecf7493fbd6b8c8af7d52e90c915459f7040 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Fri, 5 Aug 2011 16:15:24 -0500 Subject: powerpc/mp: add support for discontiguous cores Some SOCs have discontiguously-numbered cores, and so we can't determine the valid core numbers via the FRR register any more. We define CPU_TYPE_ENTRY_MASK to specify a discontiguous core mask, and helper functions to process the mask and enumerate over the set of valid cores. Signed-off-by: Timur Tabi Signed-off-by: Kumar Gala --- common/cmd_mp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/cmd_mp.c b/common/cmd_mp.c index f19bf41..b115b59 100644 --- a/common/cmd_mp.c +++ b/common/cmd_mp.c @@ -32,9 +32,8 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return cmd_usage(cmdtp); cpuid = simple_strtoul(argv[1], NULL, 10); - if (cpuid >= cpu_numcores()) { - printf ("Core num: %lu is out of range[0..%d]\n", - cpuid, cpu_numcores() - 1); + if (!is_core_valid(cpuid)) { + printf ("Core num: %lu is not valid\n", cpuid); return 1; } -- cgit v1.1 From d29d17d7badcf90a31e5d6d1d9a82838ea039a42 Mon Sep 17 00:00:00 2001 From: York Sun Date: Fri, 26 Aug 2011 11:32:44 -0700 Subject: powerpc/mpc83xx: Migrate from spd_sdram to unified DDR driver Unified DDR driver is maintained for better performance, robustness and bug fixes. Upgrading to use unified DDR driver for MPC83xx takes advantage of overall improvement. It requires changes for board files to customize platform-dependent parameters. To utilize the unified DDR driver, a board needs to define CONFIG_FSL_DDRx in the header file. No more boards will be accepted without such definition. Note: the workaround for erratum DDR6 for the very old MPC834x Rev 1.0/1.1 and MPC8360 Rev 1.1/1.2 parts is not migrated to unified driver. Signed-off-by: Kim Phillips Signed-off-by: York Sun Signed-off-by: Kumar Gala --- common/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/Makefile b/common/Makefile index 2edbd71..371a0d9 100644 --- a/common/Makefile +++ b/common/Makefile @@ -162,7 +162,13 @@ COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o COBJS-$(CONFIG_YAFFS2) += cmd_yaffs2.o # others -COBJS-$(CONFIG_DDR_SPD) += ddr_spd.o +ifdef CONFIG_DDR_SPD +SPD := y +endif +ifdef CONFIG_SPD_EEPROM +SPD := y +endif +COBJS-$(SPD) += ddr_spd.o COBJS-$(CONFIG_HWCONFIG) += hwconfig.o COBJS-$(CONFIG_CONSOLE_MUX) += iomux.o COBJS-y += flash.o -- cgit v1.1