From 13f5433f700d4da9f6fdf2a4bb80310133a7c170 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 18 Feb 2008 14:01:56 -0600 Subject: 86xx: Convert sbc8641d to use libfdt. This is the proper fix for a missing closing brace in the function ft_cpu_setup() noticed by joe.hamman embeddedspecialties.com. The ft_cpu_setup() function in mpc8641hpcn.c should have been removed earlier as it was under the obsolete CONFIG_OF_FLAT_TREE, but was missed. Only, the sbc8641d was nominally still using it. It all got ripped out, and the funcality that was in ft_board_setup() was refactored to remove the CPU portions into the new file cpu/mpc86xx/fdt.c instead. Make sbc8641d use this now. Based loosely on an original patch from joe.hamman@embeddedspecialties.com Signed-off-by: Jon Loeliger --- board/freescale/mpc8641hpcn/mpc8641hpcn.c | 18 +++----------- board/sbc8641d/sbc8641d.c | 41 ++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 29 deletions(-) (limited to 'board') diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c index 8278789..ae79143 100644 --- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c +++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c @@ -321,28 +321,16 @@ void pci_init_board(void) } + #if defined(CONFIG_OF_BOARD_SETUP) + void ft_board_setup(void *blob, bd_t *bd) { int node, tmp[2]; const char *path; - fdt_fixup_ethernet(blob, bd); - - do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, - "timebase-frequency", bd->bi_busfreq / 4, 1); - do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, - "bus-frequency", bd->bi_busfreq, 1); - do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, - "clock-frequency", bd->bi_intfreq, 1); - do_fixup_by_prop_u32(blob, "device_type", "soc", 4, - "bus-frequency", bd->bi_busfreq, 1); - - do_fixup_by_compat_u32(blob, "ns16550", - "clock-frequency", bd->bi_busfreq, 1); - - fdt_fixup_memory(blob, bd->bi_memstart, bd->bi_memsize); + ft_cpu_setup(blob, bd); node = fdt_path_offset(blob, "/aliases"); tmp[0] = 0; diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c index 7adc42f..78656e9 100644 --- a/board/sbc8641d/sbc8641d.c +++ b/board/sbc8641d/sbc8641d.c @@ -35,11 +35,8 @@ #include #include #include - -#if defined(CONFIG_OF_FLAT_TREE) -#include -extern void ft_cpu_setup (void *blob, bd_t * bd); -#endif +#include +#include #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER) extern void ddr_enable_ecc (unsigned int dram_size); @@ -341,18 +338,34 @@ void pci_init_board(void) } -#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) -void ft_board_setup (void *blob, bd_t * bd) + +#if defined(CONFIG_OF_BOARD_SETUP) + +void +ft_board_setup (void *blob, bd_t *bd) { - u32 *p; - int len; + int node, tmp[2]; + const char *path; - ft_cpu_setup (blob, bd); + ft_cpu_setup(blob, bd); - p = ft_get_prop (blob, "/memory/reg", &len); - if (p != NULL) { - *p++ = cpu_to_be32 (bd->bi_memstart); - *p = cpu_to_be32 (bd->bi_memsize); + node = fdt_path_offset(blob, "/aliases"); + tmp[0] = 0; + if (node >= 0) { +#ifdef CONFIG_PCI1 + path = fdt_getprop(blob, node, "pci0", NULL); + if (path) { + tmp[1] = pci1_hose.last_busno - pci1_hose.first_busno; + do_fixup_by_path(blob, path, "bus-range", &tmp, 8, 1); + } +#endif +#ifdef CONFIG_PCI2 + path = fdt_getprop(blob, node, "pci1", NULL); + if (path) { + tmp[1] = pci2_hose.last_busno - pci2_hose.first_busno; + do_fixup_by_path(blob, path, "bus-range", &tmp, 8, 1); + } +#endif } } #endif -- cgit v1.1 From 975a083a5ef785c414b35f9c5b8ae25b26b41524 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Tue, 19 Feb 2008 12:31:08 -0600 Subject: 8610HPCD: Fix typos in two PCI setup registers. The two symbols MPC86xx_PORDEVSR_IO_SEL and MPC86xx_PORBMSR_HA were erroneously present as 85xx names and values, leftover from the clone wars. Fix this by removing the 85xx cruft from the 86xx codebase. Signed-off-by: Jon Loeliger --- board/freescale/mpc8610hpcd/mpc8610hpcd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'board') diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c index 264e959..d5a4f0e 100644 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c @@ -280,13 +280,12 @@ void pci_init_board(void) volatile immap_t *immap = (immap_t *) CFG_CCSRBAR; volatile ccsr_gur_t *gur = &immap->im_gur; uint devdisr = gur->devdisr; - uint io_sel = (gur->pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19; - uint host_agent = (gur->porbmsr & MPC85xx_PORBMSR_HA) >> 16; + uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 19; + uint host_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 16; printf( " pci_init_board: devdisr=%x, io_sel=%x, host_agent=%x\n", devdisr, io_sel, host_agent); - #ifdef CONFIG_PCIE1 { volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CFG_PCIE1_ADDR; -- cgit v1.1 From a551cee99ad1d1da20fd23ad265de47448852f56 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Wed, 20 Feb 2008 14:22:26 -0600 Subject: 86xx: Fix GUR PCI config registers properly. Back in commit 975a083a5ef785c414b35f9c5b8ae25b26b41524 where I tried to "8610HPCD: Fix typos in two PCI setup registers", I botched it due to not realizing that 8610 and 8641 had different Global Utility Register defintions, one of which was like 85xx, and the other wasn't. Correct this problem by introducing two symbols, one for each 86xx SoC, but neither of which is named anything like 85xx. My bad. Lovely Wednesday with git bisect. You know. Signed-off-by: Jon Loeliger --- board/freescale/mpc8610hpcd/mpc8610hpcd.c | 6 ++++-- board/freescale/mpc8641hpcn/mpc8641hpcn.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'board') diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c index d5a4f0e..16acbbe 100644 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c @@ -280,8 +280,10 @@ void pci_init_board(void) volatile immap_t *immap = (immap_t *) CFG_CCSRBAR; volatile ccsr_gur_t *gur = &immap->im_gur; uint devdisr = gur->devdisr; - uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 19; - uint host_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 16; + uint io_sel = (gur->pordevsr & MPC8610_PORDEVSR_IO_SEL) + >> MPC8610_PORDEVSR_IO_SEL_SHIFT; + uint host_agent = (gur->porbmsr & MPC8610_PORBMSR_HA) + >> MPC8610_PORBMSR_HA_SHIFT; printf( " pci_init_board: devdisr=%x, io_sel=%x, host_agent=%x\n", devdisr, io_sel, host_agent); diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c index ae79143..0e451dc 100644 --- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c +++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c @@ -206,7 +206,8 @@ void pci_init_board(void) volatile immap_t *immap = (immap_t *) CFG_CCSRBAR; volatile ccsr_gur_t *gur = &immap->im_gur; uint devdisr = gur->devdisr; - uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 16; + uint io_sel = (gur->pordevsr & MPC8641_PORDEVSR_IO_SEL) + >> MPC8641_PORDEVSR_IO_SEL_SHIFT; #ifdef CONFIG_PCI1 { @@ -214,7 +215,8 @@ void pci_init_board(void) extern void fsl_pci_init(struct pci_controller *hose); struct pci_controller *hose = &pci1_hose; #ifdef DEBUG - uint host1_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 17; + uint host1_agent = (gur->porbmsr & MPC8641_PORBMSR_HA) + >> MPC8641_PORBMSR_HA_SHIFT; uint pex1_agent = (host1_agent == 0) || (host1_agent == 1); #endif if ((io_sel == 2 || io_sel == 3 || io_sel == 5 -- cgit v1.1 From beeccf7a5dc5415c202e0132a33c58fc316c2a62 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 17 Feb 2008 16:58:04 +0100 Subject: MIPS: Fix CFG_NO_FLASH support - Fix flash_init call when CFG_NO_FLASH is used - Remove no more needed flash.c for qemu-mips Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- board/qemu-mips/Makefile | 2 +- board/qemu-mips/flash.c | 40 ---------------------------------------- 2 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 board/qemu-mips/flash.c (limited to 'board') diff --git a/board/qemu-mips/Makefile b/board/qemu-mips/Makefile index 23be447..837b6b9 100644 --- a/board/qemu-mips/Makefile +++ b/board/qemu-mips/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS = $(BOARD).o flash.o +COBJS = $(BOARD).o SOBJS = lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/board/qemu-mips/flash.c b/board/qemu-mips/flash.c deleted file mode 100644 index e988272..0000000 --- a/board/qemu-mips/flash.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#include -/*----------------------------------------------------------------------- - * flash_init() - * - * sets up flash_info and returns size of FLASH (bytes) - */ -unsigned long flash_init(void) -{ - printf("Skipping flash_init\n"); - return(0); -} - -int write_buff(void *info, uchar *src, ulong addr, ulong cnt) -{ - printf("write_buff not implemented\n"); - return(-1); -} -- cgit v1.1 From 98ba144ccc912eee90dd42699f023c497ce774c6 Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Mon, 18 Feb 2008 14:35:43 +0900 Subject: Fix GPMC CS2 memory setup at apollon It disables the current map first Signed-off-by: Kyungmin Park --- board/apollon/mem.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'board') diff --git a/board/apollon/mem.c b/board/apollon/mem.c index c0edca5..0211c6a 100644 --- a/board/apollon/mem.c +++ b/board/apollon/mem.c @@ -198,6 +198,8 @@ void gpmc_init(void) sdelay(2000); /* setup cs2 */ + __raw_writel(0x0, GPMC_CONFIG7_2); /* disable current map */ + sdelay(1000); __raw_writel(APOLLON_24XX_GPMC_CONFIG1_0 | mux | mtype | mwidth, GPMC_CONFIG1_2); /* It's same as cs 0 */ -- cgit v1.1 From 79eac2bfb591f2b028ec1735049dc91e4320de4a Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Thu, 21 Feb 2008 18:31:15 +0100 Subject: Fix device tree for mgsuvd board. Rename the "scc" node in "ethernet" for the mgsuvd board. Signed-off-by: Heiko Schocher --- board/mgsuvd/mgsuvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/mgsuvd/mgsuvd.c b/board/mgsuvd/mgsuvd.c index dd7d823..9fd164b 100644 --- a/board/mgsuvd/mgsuvd.c +++ b/board/mgsuvd/mgsuvd.c @@ -193,7 +193,7 @@ void ft_blob_update(void *blob, bd_t *bd) "err:%s\n", fdt_strerror(nodeoffset)); } /* MAC Adresse */ - nodeoffset = fdt_path_offset (blob, "/soc866/cpm/scc"); + nodeoffset = fdt_path_offset (blob, "/soc866/cpm/ethernet"); if (nodeoffset >= 0) { ret = fdt_setprop(blob, nodeoffset, "mac-address", bd->bi_enetaddr, sizeof(uchar) * 6); -- cgit v1.1 From e5084af8ded58453cd07ec1af8b0f29f34122bbc Mon Sep 17 00:00:00 2001 From: Detlev Zundel Date: Fri, 22 Feb 2008 17:21:32 +0100 Subject: Replace deprecated "ramdisk" with "ramdisk_size" kernel parameter. The Linux commit fac8b209b1084bc85748bd54e13d00c1262b220f ("Remove final traces of long-deprecated "ramdisk" kernel parm") makes these changes neccessary. Signed-off-by: Detlev Zundel --- board/cm5200/fwupdate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/cm5200/fwupdate.h b/board/cm5200/fwupdate.h index 4e3f1e1..3bbcbdc 100644 --- a/board/cm5200/fwupdate.h +++ b/board/cm5200/fwupdate.h @@ -39,7 +39,7 @@ #define FW_DIR "nx-fw" #define RESCUE_IMAGE "nxrs.img" #define LOAD_ADDR 0x400000 -#define RS_BOOTARGS "ramdisk=8192K" +#define RS_BOOTARGS "ramdisk_size=8192K" /* Main function for fwupdate */ void cm5200_fwupdate(void); -- cgit v1.1 From b29661fc1151077776454288051bc9a488351ce8 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 24 Feb 2008 15:21:36 +0100 Subject: Coding style cleanup. Prepare v1.3.2-rc2 release candidate Signed-off-by: Wolfgang Denk --- board/netstal/common/nm.h | 1 - board/netstal/common/nm_bsp.c | 1 - 2 files changed, 2 deletions(-) (limited to 'board') diff --git a/board/netstal/common/nm.h b/board/netstal/common/nm.h index 9357f3a..3dff1d6 100644 --- a/board/netstal/common/nm.h +++ b/board/netstal/common/nm.h @@ -42,4 +42,3 @@ void show_sdram_registers(void); #endif long int init_ppc405_sdram(unsigned int dram_size); #endif - diff --git a/board/netstal/common/nm_bsp.c b/board/netstal/common/nm_bsp.c index 89c697c..86f491b 100644 --- a/board/netstal/common/nm_bsp.c +++ b/board/netstal/common/nm_bsp.c @@ -133,4 +133,3 @@ void common_misc_init_r(void) saveenv(); } } - -- cgit v1.1