diff options
Diffstat (limited to 'include')
31 files changed, 674 insertions, 26 deletions
diff --git a/include/asm-ppc/fsl_law.h b/include/asm-ppc/fsl_law.h new file mode 100644 index 0000000..7cb8840 --- /dev/null +++ b/include/asm-ppc/fsl_law.h @@ -0,0 +1,80 @@ +#ifndef _FSL_LAW_H_ +#define _FSL_LAW_H_ + +#include <asm/io.h> + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define SET_LAW_ENTRY(idx, a, sz, trgt) \ + { .index = idx, .addr = a, .size = sz, .trgt_id = trgt } + +enum law_size { + LAW_SIZE_4K = 0xb, + LAW_SIZE_8K, + LAW_SIZE_16K, + LAW_SIZE_32K, + LAW_SIZE_64K, + LAW_SIZE_128K, + LAW_SIZE_256K, + LAW_SIZE_512K, + LAW_SIZE_1M, + LAW_SIZE_2M, + LAW_SIZE_4M, + LAW_SIZE_8M, + LAW_SIZE_16M, + LAW_SIZE_32M, + LAW_SIZE_64M, + LAW_SIZE_128M, + LAW_SIZE_256M, + LAW_SIZE_512M, + LAW_SIZE_1G, + LAW_SIZE_2G, + LAW_SIZE_4G, + LAW_SIZE_8G, + LAW_SIZE_16G, + LAW_SIZE_32G, +}; + +enum law_trgt_if { + LAW_TRGT_IF_PCI = 0x00, + LAW_TRGT_IF_PCI_2 = 0x01, +#ifndef CONFIG_MPC8641 + LAW_TRGT_IF_PCIE_1 = 0x02, +#endif +#ifndef CONFIG_MPC8572 + LAW_TRGT_IF_PCIE_3 = 0x03, +#endif + LAW_TRGT_IF_LBC = 0x04, + LAW_TRGT_IF_CCSR = 0x08, + LAW_TRGT_IF_DDR_INTRLV = 0x0b, + LAW_TRGT_IF_RIO = 0x0c, + LAW_TRGT_IF_DDR = 0x0f, + LAW_TRGT_IF_DDR_2 = 0x16, /* 2nd controller */ +}; +#define LAW_TRGT_IF_DDR_1 LAW_TRGT_IF_DDR +#define LAW_TRGT_IF_PCI_1 LAW_TRGT_IF_PCI +#define LAW_TRGT_IF_PCIX LAW_TRGT_IF_PCI +#define LAW_TRGT_IF_PCIE_2 LAW_TRGT_IF_PCI_2 + +#ifdef CONFIG_MPC8641 +#define LAW_TRGT_IF_PCIE_1 LAW_TRGT_IF_PCI +#endif + +#ifdef CONFIG_MPC8572 +#define LAW_TRGT_IF_PCIE_3 LAW_TRGT_IF_PCI +#endif + +struct law_entry { + int index; + phys_addr_t addr; + enum law_size size; + enum law_trgt_if trgt_id; +}; + +extern void set_law(u8 idx, phys_addr_t addr, enum law_size sz, enum law_trgt_if id); +extern void disable_law(u8 idx); +extern void init_laws(void); + +/* define in board code */ +extern struct law_entry law_table[]; +extern int num_law_entries; +#endif diff --git a/include/asm-ppc/immap_83xx.h b/include/asm-ppc/immap_83xx.h index 34ea295..5b21539 100644 --- a/include/asm-ppc/immap_83xx.h +++ b/include/asm-ppc/immap_83xx.h @@ -30,6 +30,7 @@ #include <asm/types.h> #include <asm/fsl_i2c.h> +#include <asm/mpc8xxx_spi.h> /* * Local Access Window @@ -384,20 +385,6 @@ typedef struct lbus83xx { } lbus83xx_t; /* - * Serial Peripheral Interface - */ -typedef struct spi83xx { - u32 mode; /* mode register */ - u32 event; /* event register */ - u32 mask; /* mask register */ - u32 com; /* command register */ - u8 res0[0x10]; - u32 tx; /* transmit register */ - u32 rx; /* receive register */ - u8 res1[0xFD8]; -} spi83xx_t; - -/* * DMA/Messaging Unit */ typedef struct dma83xx { @@ -627,7 +614,7 @@ typedef struct immap { u8 res3[0x900]; lbus83xx_t lbus; /* Local Bus Controller Registers */ u8 res4[0x1000]; - spi83xx_t spi; /* Serial Peripheral Interface */ + spi8xxx_t spi; /* Serial Peripheral Interface */ dma83xx_t dma; /* DMA */ pciconf83xx_t pci_conf[2]; /* PCI Software Configuration Registers */ ios83xx_t ios; /* Sequencer */ @@ -661,7 +648,7 @@ typedef struct immap { u8 res2[0x900]; lbus83xx_t lbus; /* Local Bus Controller Registers */ u8 res3[0x1000]; - spi83xx_t spi; /* Serial Peripheral Interface */ + spi8xxx_t spi; /* Serial Peripheral Interface */ dma83xx_t dma; /* DMA */ pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */ u8 res4[0x80]; @@ -696,7 +683,7 @@ typedef struct immap { u8 res2[0x900]; lbus83xx_t lbus; /* Local Bus Controller Registers */ u8 res3[0x1000]; - spi83xx_t spi; /* Serial Peripheral Interface */ + spi8xxx_t spi; /* Serial Peripheral Interface */ dma83xx_t dma; /* DMA */ pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */ u8 res4[0x80]; @@ -741,7 +728,7 @@ typedef struct immap { u8 res2[0x900]; lbus83xx_t lbus; /* Local Bus Controller Registers */ u8 res3[0x1000]; - spi83xx_t spi; /* Serial Peripheral Interface */ + spi8xxx_t spi; /* Serial Peripheral Interface */ dma83xx_t dma; /* DMA */ pciconf83xx_t pci_conf[1]; /* PCI Software Configuration Registers */ u8 res4[0x80]; diff --git a/include/asm-ppc/mmu.h b/include/asm-ppc/mmu.h index 45a4764..ec1ca53 100644 --- a/include/asm-ppc/mmu.h +++ b/include/asm-ppc/mmu.h @@ -418,6 +418,37 @@ extern int write_bat(ppc_bat_t bat, unsigned long upper, unsigned long lower); #define BOOKE_PAGESZ_256GB 14 #define BOOKE_PAGESZ_1TB 15 +#ifdef CONFIG_E500 +#ifndef __ASSEMBLY__ +extern void set_tlb(u8 tlb, u32 epn, u64 rpn, + u8 perms, u8 wimge, + u8 ts, u8 esel, u8 tsize, u8 iprot); +extern void disable_tlb(u8 esel); +extern void invalidate_tlb(u8 tlb); +extern void init_tlbs(void); + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define SET_TLB_ENTRY(_tlb, _epn, _rpn, _perms, _wimge, _ts, _esel, _sz, _iprot) \ + { .tlb = _tlb, .epn = _epn, .rpn = _rpn, .perms = _perms, \ + .wimge = _wimge, .ts = _ts, .esel = _esel, .tsize = _sz, .iprot = _iprot } + +struct fsl_e_tlb_entry { + u8 tlb; + u32 epn; + u64 rpn; + u8 perms; + u8 wimge; + u8 ts; + u8 esel; + u8 tsize; + u8 iprot; +}; + +extern struct fsl_e_tlb_entry tlb_table[]; +extern int num_tlb_entries; +#endif +#endif + #if defined(CONFIG_MPC86xx) #define LAWBAR_BASE_ADDR 0x00FFFFFF #define LAWAR_TRGT_IF 0x01F00000 diff --git a/include/asm-ppc/mpc8xxx_spi.h b/include/asm-ppc/mpc8xxx_spi.h new file mode 100644 index 0000000..48b15e4 --- /dev/null +++ b/include/asm-ppc/mpc8xxx_spi.h @@ -0,0 +1,48 @@ +/* + * Freescale non-CPM SPI Controller + * + * Copyright 2008 Qstreams Networks, Inc. + * + * This software may be used and distributed according to the + * terms of the GNU Public License, Version 2, incorporated + * herein by reference. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * Version 2 as published by the Free Software Foundation. + * + * 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 + */ + +#ifndef _ASM_MPC8XXX_SPI_H_ +#define _ASM_MPC8XXX_SPI_H_ + +#include <asm/types.h> + +#if defined(CONFIG_MPC834X) || \ + defined(CONFIG_MPC8313) || \ + defined(CONFIG_MPC8315) || \ + defined(CONFIG_MPC837X) + +typedef struct spi8xxx { + u8 res0[0x20]; /* 0x0-0x01f reserved */ + u32 mode; /* mode register */ + u32 event; /* event register */ + u32 mask; /* mask register */ + u32 com; /* command register */ + u32 tx; /* transmit register */ + u32 rx; /* receive register */ + u8 res1[0xFC8]; /* fill up to 0x1000 */ +} spi8xxx_t; + +#endif + +#endif /* _ASM_MPC8XXX_SPI_H_ */ diff --git a/include/asm-sh/cpu_sh3.h b/include/asm-sh/cpu_sh3.h new file mode 100644 index 0000000..6db38a2 --- /dev/null +++ b/include/asm-sh/cpu_sh3.h @@ -0,0 +1,42 @@ +/* + * (C) Copyright 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> + * (C) Copyright 2007 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> + * + * 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 + */ + +#ifndef _ASM_CPU_SH3_H_ +#define _ASM_CPU_SH3_H_ + +/* cache control */ +#define CCR_CACHE_STOP 0x00000008 +#define CCR_CACHE_ENABLE 0x00000005 +#define CCR_CACHE_ICI 0x00000008 + +#define CACHE_OC_ADDRESS_ARRAY 0xf0000000 +#define CACHE_OC_WAY_SHIFT 13 +#define CACHE_OC_NUM_ENTRIES 256 +#define CACHE_OC_ENTRY_SHIFT 4 + +#if defined(CONFIG_CPU_SH7710) +#include <asm/cpu_sh7710.h> +#elif defined(CONFIG_CPU_SH7720) +#include <asm/cpu_sh7720.h> +#else +#error "Unknown SH3 variant" +#endif + +#endif /* _ASM_CPU_SH3_H_ */ diff --git a/include/asm-sh/cpu_sh7710.h b/include/asm-sh/cpu_sh7710.h new file mode 100644 index 0000000..e223f1c --- /dev/null +++ b/include/asm-sh/cpu_sh7710.h @@ -0,0 +1,64 @@ +#ifndef _ASM_CPU_SH7710_H_ +#define _ASM_CPU_SH7710_H_ + +#define CACHE_OC_NUM_WAYS 4 +#define CCR_CACHE_INIT 0x0000000D + +/* MMU and Cache control */ +#define MMUCR 0xFFFFFFE0 +#define CCR 0xFFFFFFEC + +/* PFC */ +#define PACR 0xA4050100 +#define PBCR 0xA4050102 +#define PCCR 0xA4050104 +#define PETCR 0xA4050106 + +/* Port Data Registers */ +#define PADR 0xA4050120 +#define PBDR 0xA4050122 +#define PCDR 0xA4050124 + +/* BSC */ +#define CMNCR 0xA4FD0000 +#define CS0BCR 0xA4FD0004 +#define CS2BCR 0xA4FD0008 +#define CS3BCR 0xA4FD000C +#define CS4BCR 0xA4FD0010 +#define CS5ABCR 0xA4FD0014 +#define CS5BBCR 0xA4FD0018 +#define CS6ABCR 0xA4FD001C +#define CS6BBCR 0xA4FD0020 +#define CS0WCR 0xA4FD0024 +#define CS2WCR 0xA4FD0028 +#define CS3WCR 0xA4FD002C +#define CS4WCR 0xA4FD0030 +#define CS5AWCR 0xA4FD0034 +#define CS5BWCR 0xA4FD0038 +#define CS6AWCR 0xA4FD003C +#define CS6BWCR 0xA4FD0040 + +/* SDRAM controller */ +#define SDCR 0xA4FD0044 +#define RTCSR 0xA4FD0048 +#define RTCNT 0xA4FD004C +#define RTCOR 0xA4FD0050 + +/* SCIF */ +#define SCSMR_0 0xA4400000 +#define SCIF0_BASE SCSMR_0 +#define SCSMR_0 0xA4410000 +#define SCIF1_BASE SCSMR_1 + +/* Timer */ +#define TSTR0 0xA412FE92 +#define TSTR TSTR0 +#define TCNT0 0xa412FE98 +#define TCR0 0xa412FE9C + +/* On chip oscillator circuits */ +#define FRQCR 0xA415FF80 +#define WTCNT 0xA415FF84 +#define WTCSR 0xA415FF86 + +#endif /* _ASM_CPU_SH7710_H_ */ diff --git a/include/asm-sh/cpu_sh7720.h b/include/asm-sh/cpu_sh7720.h new file mode 100644 index 0000000..bafb8de --- /dev/null +++ b/include/asm-sh/cpu_sh7720.h @@ -0,0 +1,207 @@ +/* + * (C) Copyright 2007 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> + * + * SH7720 Internal I/O register + * + * 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 + */ + +#ifndef _ASM_CPU_SH7720_H_ +#define _ASM_CPU_SH7720_H_ + +#define CACHE_OC_NUM_WAYS 4 +#define CCR_CACHE_INIT 0x0000000B + +/* EXP */ +#define TRA 0xFFFFFFD0 +#define EXPEVT 0xFFFFFFD4 +#define INTEVT 0xFFFFFFD8 + +/* MMU */ +#define MMUCR 0xFFFFFFE0 +#define PTEH 0xFFFFFFF0 +#define PTEL 0xFFFFFFF4 +#define TTB 0xFFFFFFF8 + +/* CACHE */ +#define CCR 0xFFFFFFEC + +/* INTC */ +#define IPRF 0xA4080000 +#define IPRG 0xA4080002 +#define IPRH 0xA4080004 +#define IPRI 0xA4080006 +#define IPRJ 0xA4080008 +#define IRR5 0xA4080020 +#define IRR6 0xA4080022 +#define IRR7 0xA4080024 +#define IRR8 0xA4080026 +#define IRR9 0xA4080028 +#define IRR0 0xA4140004 +#define IRR1 0xA4140006 +#define IRR2 0xA4140008 +#define IRR3 0xA414000A +#define IRR4 0xA414000C +#define ICR1 0xA4140010 +#define ICR2 0xA4140012 +#define PINTER 0xA4140014 +#define IPRC 0xA4140016 +#define IPRD 0xA4140018 +#define IPRE 0xA414001A +#define ICR0 0xA414FEE0 +#define IPRA 0xA414FEE2 +#define IPRB 0xA414FEE4 + +/* BSC */ +#define BSC_BASE 0xA4FD0000 +#define CMNCR (BSC_BASE + 0x00) +#define CS0BCR (BSC_BASE + 0x04) +#define CS2BCR (BSC_BASE + 0x08) +#define CS3BCR (BSC_BASE + 0x0C) +#define CS4BCR (BSC_BASE + 0x10) +#define CS5ABCR (BSC_BASE + 0x14) +#define CS5BBCR (BSC_BASE + 0x18) +#define CS6ABCR (BSC_BASE + 0x1C) +#define CS6BBCR (BSC_BASE + 0x20) +#define CS0WCR (BSC_BASE + 0x24) +#define CS2WCR (BSC_BASE + 0x28) +#define CS3WCR (BSC_BASE + 0x2C) +#define CS4WCR (BSC_BASE + 0x30) +#define CS5AWCR (BSC_BASE + 0x34) +#define CS5BWCR (BSC_BASE + 0x38) +#define CS6AWCR (BSC_BASE + 0x3C) +#define CS6BWCR (BSC_BASE + 0x40) +#define SDCR (BSC_BASE + 0x44) +#define RTCSR (BSC_BASE + 0x48) +#define RTCNR (BSC_BASE + 0x4C) +#define RTCOR (BSC_BASE + 0x50) +#define SDMR2 (BSC_BASE + 0x4000) +#define SDMR3 (BSC_BASE + 0x5000) + +/* DMAC */ + +/* CPG */ +#define UCLKCR 0xA40A0008 +#define FRQCR 0xA415FF80 + +/* LOW POWER MODE */ + +/* TMU */ +#define TMU_BASE 0xA412FE90 +#define TSTR (TMU_BASE + 0x02) +#define TCOR0 (TMU_BASE + 0x04) +#define TCNT0 (TMU_BASE + 0x08) +#define TCR0 (TMU_BASE + 0x0C) +#define TCOR1 (TMU_BASE + 0x10) +#define TCNT1 (TMU_BASE + 0x14) +#define TCR1 (TMU_BASE + 0x18) +#define TCOR2 (TMU_BASE + 0x1C) +#define TCNT2 (TMU_BASE + 0x20) +#define TCR2 (TMU_BASE + 0x24) + +/* TPU */ +#define TPU_BASE 0xA4480000 +#define TPU_TSTR (TPU_BASE + 0x00) +#define TPU_TCR0 (TPU_BASE + 0x10) +#define TPU_TMDR0 (TPU_BASE + 0x14) +#define TPU_TIOR0 (TPU_BASE + 0x18) +#define TPU_TIER0 (TPU_BASE + 0x1C) +#define TPU_TSR0 (TPU_BASE + 0x20) +#define TPU_TCNT0 (TPU_BASE + 0x24) +#define TPU_TGRA0 (TPU_BASE + 0x28) +#define TPU_TGRB0 (TPU_BASE + 0x2C) +#define TPU_TGRC0 (TPU_BASE + 0x30) +#define TPU_TGRD0 (TPU_BASE + 0x34) +#define TPU_TCR1 (TPU_BASE + 0x50) +#define TPU_TMDR1 (TPU_BASE + 0x54) +#define TPU_TIOR1 (TPU_BASE + 0x58) +#define TPU_TIER1 (TPU_BASE + 0x5C) +#define TPU_TSR1 (TPU_BASE + 0x60) +#define TPU_TCNT1 (TPU_BASE + 0x64) +#define TPU_TGRA1 (TPU_BASE + 0x68) +#define TPU_TGRB1 (TPU_BASE + 0x6C) +#define TPU_TGRC1 (TPU_BASE + 0x70) +#define TPU_TGRD1 (TPU_BASE + 0x74) +#define TPU_TCR2 (TPU_BASE + 0x90) +#define TPU_TMDR2 (TPU_BASE + 0x94) +#define TPU_TIOR2 (TPU_BASE + 0x98) +#define TPU_TIER2 (TPU_BASE + 0x9C) +#define TPU_TSR2 (TPU_BASE + 0xB0) +#define TPU_TCNT2 (TPU_BASE + 0xB4) +#define TPU_TGRA2 (TPU_BASE + 0xB8) +#define TPU_TGRB2 (TPU_BASE + 0xBC) +#define TPU_TGRC2 (TPU_BASE + 0xC0) +#define TPU_TGRD2 (TPU_BASE + 0xC4) +#define TPU_TCR3 (TPU_BASE + 0xD0) +#define TPU_TMDR3 (TPU_BASE + 0xD4) +#define TPU_TIOR3 (TPU_BASE + 0xD8) +#define TPU_TIER3 (TPU_BASE + 0xDC) +#define TPU_TSR3 (TPU_BASE + 0xE0) +#define TPU_TCNT3 (TPU_BASE + 0xE4) +#define TPU_TGRA3 (TPU_BASE + 0xE8) +#define TPU_TGRB3 (TPU_BASE + 0xEC) +#define TPU_TGRC3 (TPU_BASE + 0xF0) +#define TPU_TGRD3 (TPU_BASE + 0xF4) + +/* CMT */ + +/* SIOF */ + +/* SCIF */ +#define SCIF0_BASE 0xA4430000 + +/* SIM */ + +/* IrDA */ + +/* IIC */ + +/* LCDC */ + +/* USBF */ + +/* MMCIF */ + +/* PFC */ +#define PFC_BASE 0xA4050100 +#define PACR (PFC_BASE + 0x00) +#define PBCR (PFC_BASE + 0x02) +#define PCCR (PFC_BASE + 0x04) +#define PDCR (PFC_BASE + 0x06) +#define PECR (PFC_BASE + 0x08) +#define PFCR (PFC_BASE + 0x0A) +#define PGCR (PFC_BASE + 0x0C) +#define PHCR (PFC_BASE + 0x0E) +#define PJCR (PFC_BASE + 0x10) +#define PKCR (PFC_BASE + 0x12) +#define PLCR (PFC_BASE + 0x14) +#define PMCR (PFC_BASE + 0x16) +#define PPCR (PFC_BASE + 0x18) +#define PRCR (PFC_BASE + 0x1A) +#define PSCR (PFC_BASE + 0x1C) +#define PTCR (PFC_BASE + 0x1E) +#define PUCR (PFC_BASE + 0x20) +#define PVCR (PFC_BASE + 0x22) +#define PSELA (PFC_BASE + 0x24) +#define PSELB (PFC_BASE + 0x26) +#define PSELC (PFC_BASE + 0x28) +#define PSELD (PFC_BASE + 0x2A) + +/* I/O Port */ + +/* H-UDI */ + +#endif /* _ASM_CPU_SH7720_H_ */ diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index 03427ad..51fd10b 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h @@ -227,5 +227,32 @@ out: static inline void sync(void) { } + +/* + * Given a physical address and a length, return a virtual address + * that can be used to access the memory range with the caching + * properties specified by "flags". + */ +typedef unsigned long phys_addr_t; + +#define MAP_NOCACHE (0) +#define MAP_WRCOMBINE (0) +#define MAP_WRBACK (0) +#define MAP_WRTHROUGH (0) + +static inline void * +map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) +{ + return (void *)paddr; +} + +/* + * Take down a mapping set up by map_physmem(). + */ +static inline void unmap_physmem(void *vaddr, unsigned long flags) +{ + +} + #endif /* __KERNEL__ */ #endif /* __ASM_SH_IO_H */ diff --git a/include/configs/ATUM8548.h b/include/configs/ATUM8548.h index f7020b4..c14376e 100644 --- a/include/configs/ATUM8548.h +++ b/include/configs/ATUM8548.h @@ -63,6 +63,8 @@ #define CONFIG_MEM_INIT_VALUE 0xDeadBeef #define CONFIG_INTERRUPTS /* enable pci, srio, ddr interrupts */ +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ + #define MPC85xx_DDR_SDRAM_CLK_CNTL /* 85xx has clock control reg */ #define CONFIG_SYS_CLK_FREQ 33000000 diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h index 437a9a5..07f2f30 100644 --- a/include/configs/MPC8349EMDS.h +++ b/include/configs/MPC8349EMDS.h @@ -355,6 +355,15 @@ #define CFG_I2C_OFFSET 0x3000 #define CFG_I2C2_OFFSET 0x3100 +/* SPI */ +#define CONFIG_HARD_SPI /* SPI with hardware support */ +#undef CONFIG_SOFT_SPI /* SPI bit-banged */ + +/* GPIOs. Used as SPI chip selects */ +#define CFG_GPIO1_PRELIM +#define CFG_GPIO1_DIR 0xC0000000 /* SPI CS on 0, LED on 1 */ +#define CFG_GPIO1_DAT 0xC0000000 /* Both are active LOW */ + /* TSEC */ #define CFG_TSEC1_OFFSET 0x24000 #define CFG_TSEC1 (CFG_IMMR+CFG_TSEC1_OFFSET) diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h index afce7fb..5ea7b25 100644 --- a/include/configs/MPC8540ADS.h +++ b/include/configs/MPC8540ADS.h @@ -55,6 +55,7 @@ #define CONFIG_DDR_ECC /* only for ECC DDR module */ #define CONFIG_MEM_INIT_VALUE 0xDeadBeef +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* * sysclk for MPC85xx diff --git a/include/configs/MPC8540EVAL.h b/include/configs/MPC8540EVAL.h index 2868dcb..bf64f27 100644 --- a/include/configs/MPC8540EVAL.h +++ b/include/configs/MPC8540EVAL.h @@ -43,6 +43,8 @@ #undef CONFIG_DDR_ECC /* only for ECC DDR module */ #define CONFIG_DDR_DLL /* possible DLL fix needed */ +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ + /* Using Localbus SDRAM to emulate flash before we can program the flash, * normally you only need a flash-boot image(u-boot.bin),if unsure undef this. * Not availabe for EVAL board diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h index c83382f..7334088 100644 --- a/include/configs/MPC8541CDS.h +++ b/include/configs/MPC8541CDS.h @@ -47,6 +47,7 @@ #define CONFIG_DDR_ECC /* only for ECC DDR module */ #define CONFIG_MEM_INIT_VALUE 0xDeadBeef +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* * When initializing flash, if we cannot find the manufacturer ID, diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h index 5a96db5..a894209 100644 --- a/include/configs/MPC8544DS.h +++ b/include/configs/MPC8544DS.h @@ -42,6 +42,8 @@ #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */ #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ + #define CONFIG_TSEC_ENET /* tsec ethernet support */ #define CONFIG_ENV_OVERWRITE #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h index 90beb25..a3db9f4 100644 --- a/include/configs/MPC8548CDS.h +++ b/include/configs/MPC8548CDS.h @@ -55,6 +55,7 @@ #define CONFIG_MEM_INIT_VALUE 0xDeadBeef #define CONFIG_INTERRUPTS /* enable pci, srio, ddr interrupts */ +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* * When initializing flash, if we cannot find the manufacturer ID, diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h index 76d673c..93877ae 100644 --- a/include/configs/MPC8555CDS.h +++ b/include/configs/MPC8555CDS.h @@ -47,6 +47,7 @@ #define CONFIG_DDR_ECC /* only for ECC DDR module */ #define CONFIG_MEM_INIT_VALUE 0xDeadBeef +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* * When initializing flash, if we cannot find the manufacturer ID, diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h index 5f10555..08884b3 100644 --- a/include/configs/MPC8560ADS.h +++ b/include/configs/MPC8560ADS.h @@ -52,6 +52,7 @@ #define CONFIG_DDR_ECC /* only for ECC DDR module */ #define CONFIG_MEM_INIT_VALUE 0xDeadBeef +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* * sysclk for MPC85xx diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h index 2b089d9..a12d193 100644 --- a/include/configs/MPC8568MDS.h +++ b/include/configs/MPC8568MDS.h @@ -49,6 +49,7 @@ /*#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER*/ /* DDR controller or DMA? */ #define CONFIG_MEM_INIT_VALUE 0xDeadBeef +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* * When initializing flash, if we cannot find the manufacturer ID, diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h index ac4b3e1..a53953c 100644 --- a/include/configs/MPC8610HPCD.h +++ b/include/configs/MPC8610HPCD.h @@ -493,6 +493,7 @@ * Miscellaneous configurable options */ #define CFG_LONGHELP /* undef to save memory */ +#define CONFIG_CMDLINE_EDITING /* Command-line editing */ #define CFG_LOAD_ADDR 0x2000000 /* default load address */ #define CFG_PROMPT "=> " /* Monitor Command Prompt */ diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h index ab875f0..985182f 100644 --- a/include/configs/MPC8641HPCN.h +++ b/include/configs/MPC8641HPCN.h @@ -555,6 +555,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); * Miscellaneous configurable options */ #define CFG_LONGHELP /* undef to save memory */ +#define CONFIG_CMDLINE_EDITING /* Command-line editing */ #define CFG_LOAD_ADDR 0x2000000 /* default load address */ #define CFG_PROMPT "=> " /* Monitor Command Prompt */ diff --git a/include/configs/PM854.h b/include/configs/PM854.h index f0d0399..819bee7 100644 --- a/include/configs/PM854.h +++ b/include/configs/PM854.h @@ -51,6 +51,7 @@ #define CONFIG_DDR_ECC /* only for ECC DDR module */ #define CONFIG_MEM_INIT_VALUE 0xDEADBEEF +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* * sysclk for MPC85xx diff --git a/include/configs/PM856.h b/include/configs/PM856.h index ae2645c..8902f42 100644 --- a/include/configs/PM856.h +++ b/include/configs/PM856.h @@ -51,6 +51,7 @@ #define CONFIG_DDR_2T_TIMING /* Sets the 2T timing bit */ #define CONFIG_MEM_INIT_VALUE 0xDEADBEEF +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* * sysclk for MPC85xx diff --git a/include/configs/SBC8540.h b/include/configs/SBC8540.h index 3ca85b8..2bbfe9a 100644 --- a/include/configs/SBC8540.h +++ b/include/configs/SBC8540.h @@ -56,6 +56,7 @@ #undef CONFIG_PCI /* pci ethernet support */ #undef CONFIG_ETHER_ON_FCC /* cpm FCC ethernet support */ +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ #define CONFIG_ENV_OVERWRITE diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h index f3b1a53..dd0654b 100644 --- a/include/configs/TQM85xx.h +++ b/include/configs/TQM85xx.h @@ -50,6 +50,8 @@ #define CONFIG_CPM2 1 /* has CPM2 */ #endif +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ + /* * sysclk for MPC85xx * diff --git a/include/configs/ms7720se.h b/include/configs/ms7720se.h new file mode 100644 index 0000000..8a94c28 --- /dev/null +++ b/include/configs/ms7720se.h @@ -0,0 +1,134 @@ +/* + * Configuation settings for the Hitachi Solution Engine 7720 + * + * Copyright (C) 2007 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> + * + * 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 + */ + +#ifndef __MS7720SE_H +#define __MS7720SE_H + +#undef DEBUG +#define CONFIG_SH 1 +#define CONFIG_SH3 1 +#define CONFIG_CPU_SH7720 1 +#define CONFIG_MS7720SE 1 + +#define CONFIG_CMD_FLASH +#define CONFIG_CMD_ENV +#define CONFIG_CMD_SDRAM +#define CONFIG_CMD_MEMORY +#define CONFIG_CMD_CACHE +#define CONFIG_CMD_PCMCIA +#define CONFIG_CMD_IDE +#define CONFIG_CMD_EXT2 + +#define CFG_CMD_PCMCIA 0x01 +#define CFG_CMD_IDE 0x02 + +#define CONFIG_COMMANDS ((CONFIG_CMD_DFL | \ + CFG_CMD_IDE|CFG_CMD_PCMCIA) & \ + ~(CFG_CMD_FPGA)) + +#define CONFIG_BAUDRATE 115200 +#define CONFIG_BOOTARGS "console=ttySC0,115200" +#define CONFIG_BOOTFILE /boot/zImage +#define CONFIG_LOADADDR 0x8E000000 + +#define CONFIG_VERSION_VARIABLE +#undef CONFIG_SHOW_BOOT_PROGRESS + +/* MEMORY */ +#define MS7720SE_SDRAM_BASE 0x8C000000 +#define MS7720SE_FLASH_BASE_1 0xA0000000 +#define MS7720SE_FLASH_BANK_SIZE (8 * 1024 * 1024) + +#define CFG_LONGHELP /* undef to save memory */ +#define CFG_PROMPT "=> " /* Monitor Command Prompt */ +#define CFG_CBSIZE 256 /* Buffer size for input from the Console */ +#define CFG_PBSIZE 256 /* Buffer size for Console output */ +#define CFG_MAXARGS 16 /* max args accepted for monitor commands */ +/* Buffer size for Boot Arguments passed to kernel */ +#define CFG_BARGSIZE 512 +/* List of legal baudrate settings for this board */ +#define CFG_BAUDRATE_TABLE { 115200 } + +/* SCIF */ +#define CFG_SCIF_CONSOLE 1 +#define CONFIG_CONS_SCIF0 1 + +#define CFG_MEMTEST_START MS7720SE_SDRAM_BASE +#define CFG_MEMTEST_END (CFG_MEMTEST_START + (60 * 1024 * 1024)) + +#define CFG_SDRAM_BASE MS7720SE_SDRAM_BASE +#define CFG_SDRAM_SIZE (64 * 1024 * 1024) + +#define CFG_LOAD_ADDR (CFG_SDRAM_BASE + 32 * 1024 * 1024) +#define CFG_MONITOR_BASE MS7720SE_FLASH_BASE_1 +#define CFG_MONITOR_LEN (128 * 1024) +#define CFG_MALLOC_LEN (256 * 1024) +#define CFG_GBL_DATA_SIZE 256 +#define CFG_BOOTMAPSZ (8 * 1024 * 1024) + + +/* FLASH */ +#define CFG_FLASH_CFI +#define CFG_FLASH_CFI_DRIVER +#undef CFG_FLASH_QUIET_TEST +#define CFG_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ + +#define CFG_FLASH_BASE MS7720SE_FLASH_BASE_1 + +#define CFG_MAX_FLASH_SECT 150 +#define CFG_MAX_FLASH_BANKS 1 +#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE } + +#define CFG_ENV_IS_IN_FLASH +#define CFG_ENV_SECT_SIZE (64 * 1024) +#define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN) +#define CFG_FLASH_ERASE_TOUT 120000 +#define CFG_FLASH_WRITE_TOUT 500 + +/* Board Clock */ +#define CONFIG_SYS_CLK_FREQ 33333333 +#define TMU_CLK_DIVIDER 4 /* 4 (default), 16, 64, 256 or 1024 */ +#define CFG_HZ (CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER) + +/* PCMCIA */ +#define CONFIG_IDE_PCMCIA 1 +#define CONFIG_MARUBUN_PCCARD 1 +#define CONFIG_PCMCIA_SLOT_A 1 +#define CFG_IDE_MAXDEVICE 1 +#define CFG_MARUBUN_MRSHPC 0xb83fffe0 +#define CFG_MARUBUN_MW1 0xb8400000 +#define CFG_MARUBUN_MW2 0xb8500000 +#define CFG_MARUBUN_IO 0xb8600000 + +#define CFG_PIO_MODE 1 +#define CFG_IDE_MAXBUS 1 +#define CONFIG_DOS_PARTITION 1 +#define CFG_ATA_BASE_ADDR CFG_MARUBUN_IO /* base address */ +#define CFG_ATA_IDE0_OFFSET 0x01F0 /* ide0 offste */ +#define CFG_ATA_DATA_OFFSET 0 /* data reg offset */ +#define CFG_ATA_REG_OFFSET 0 /* reg offset */ +#define CFG_ATA_ALT_OFFSET 0x200 /* alternate register offset */ + +#endif /* __MS7720SE_H */ diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h index c050a06..0a7a904 100644 --- a/include/configs/sbc8548.h +++ b/include/configs/sbc8548.h @@ -56,6 +56,7 @@ #define CONFIG_MEM_INIT_VALUE 0xDeadBeef #define CONFIG_INTERRUPTS /* enable pci, srio, ddr interrupts */ +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ #define MPC85xx_DDR_SDRAM_CLK_CNTL /* 85xx has clock control reg */ diff --git a/include/configs/sbc8560.h b/include/configs/sbc8560.h index b71ba78..f9ede5f 100644 --- a/include/configs/sbc8560.h +++ b/include/configs/sbc8560.h @@ -50,6 +50,7 @@ #undef CONFIG_PCI /* pci ethernet support */ #undef CONFIG_ETHER_ON_FCC /* cpm FCC ethernet support */ +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ #define CONFIG_ENV_OVERWRITE diff --git a/include/configs/stxgp3.h b/include/configs/stxgp3.h index 3baa32c..047e1cf 100644 --- a/include/configs/stxgp3.h +++ b/include/configs/stxgp3.h @@ -51,6 +51,7 @@ #define CONFIG_DDR_DLL /* possible DLL fix needed */ #define CONFIG_DDR_2T_TIMING /* Sets the 2T timing bit */ +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* sysclk for MPC85xx */ diff --git a/include/configs/stxssa.h b/include/configs/stxssa.h index 9457bce..e09dd71 100644 --- a/include/configs/stxssa.h +++ b/include/configs/stxssa.h @@ -51,6 +51,7 @@ #undef CONFIG_DDR_DLL /* possible DLL fix needed */ #define CONFIG_DDR_2T_TIMING /* Sets the 2T timing bit */ +#define CONFIG_FSL_LAW 1 /* Use common FSL init code */ /* sysclk for MPC85xx */ diff --git a/include/mpc512x.h b/include/mpc512x.h index a06b5c6..d1c6fb2 100644 --- a/include/mpc512x.h +++ b/include/mpc512x.h @@ -185,7 +185,7 @@ /* SCFR1 System Clock Frequency Register 1 */ -#define SCFR1_IPS_DIV 0x2 +#define SCFR1_IPS_DIV 0x4 #define SCFR1_IPS_DIV_MASK 0x03800000 #define SCFR1_IPS_DIV_SHIFT 23 diff --git a/include/mpc83xx.h b/include/mpc83xx.h index 39cecf2..df052e3 100644 --- a/include/mpc83xx.h +++ b/include/mpc83xx.h @@ -725,6 +725,7 @@ #define SCCR_USBCM_3 0x00F00000 #elif defined(CONFIG_MPC8313) +/* TSEC1 bits are for TSEC2 as well */ #define SCCR_TSEC1CM 0xc0000000 #define SCCR_TSEC1CM_SHIFT 30 #define SCCR_TSEC1CM_0 0x00000000 @@ -732,13 +733,6 @@ #define SCCR_TSEC1CM_2 0x80000000 #define SCCR_TSEC1CM_3 0xC0000000 -#define SCCR_TSEC2CM 0x30000000 -#define SCCR_TSEC2CM_SHIFT 28 -#define SCCR_TSEC2CM_0 0x00000000 -#define SCCR_TSEC2CM_1 0x10000000 -#define SCCR_TSEC2CM_2 0x20000000 -#define SCCR_TSEC2CM_3 0x30000000 - #define SCCR_TSEC1ON 0x20000000 #define SCCR_TSEC1ON_SHIFT 29 #define SCCR_TSEC2ON 0x10000000 @@ -838,6 +832,8 @@ #define SCCR_PCIEXP2CM_3 0x000c0000 /* All of the four SATA controllers must have the same clock ratio */ +#define SCCR_SATA1CM 0x000000c0 +#define SCCR_SATA1CM_SHIFT 6 #define SCCR_SATACM 0x000000ff #define SCCR_SATACM_SHIFT 0 #define SCCR_SATACM_0 0x00000000 |