Commit 950a392464e616b4590bc4501be46e2d7d162dea
1 parent
aeff6d503b
Exists in
master
and in
54 other branches
Revert merge of git://www.denx.de/git/u-boot-arm, commit 62479b18:
Reverting became necessary after it turned out that the patches in the u-boot-arm repo were modified, and in some cases corrupted. This reverts the following commits: 066bebd6353e33af3adefc3404560871699e9961 7a837b7310166ae8fc8b8d66d7ef01b60a80f9d6 c88ae20580b2b01487b4cdcc8b2a113f551aee36 a147e56f03871bba4f05058d5e04ce7deb010b04 d6674e0e2a6a1f033945f78838566210d3f28c95 8c8463cce44d849e37744749b32d38e1dfb12e50 c98b47ad24b2d91f41c09a3d62d7f70ad84f4b7d 8bf69d81782619187933a605f1a95ee1d069478d 8c16cb0d3b971f46fbe77c072664c0f2dcd4471d a574a73852a527779234e73e17e7597fd8128882 1377b5583a48021d983e1fd565f7d40c89e84d63 1704dc20917b4f71e373e2c888497ee666d40380 Signed-off-by: Wolfgang Denk <wd@denx.de>
Showing 68 changed files with 1348 additions and 5162 deletions Side-by-side Diff
- MAKEALL
- Makefile
- board/imx31_litekit/Makefile
- board/imx31_litekit/config.mk
- board/imx31_litekit/imx31_litekit.c
- board/imx31_litekit/lowlevel_init.S
- board/imx31_litekit/u-boot.lds
- board/imx31_phycore/Makefile
- board/imx31_phycore/config.mk
- board/imx31_phycore/imx31_phycore.c
- board/imx31_phycore/lowlevel_init.S
- board/imx31_phycore/u-boot.lds
- board/mx31ads/Makefile
- board/mx31ads/config.mk
- board/mx31ads/lowlevel_init.S
- board/mx31ads/mx31ads.c
- board/mx31ads/u-boot.lds
- board/prodrive/pmdra/Makefile
- board/prodrive/pmdra/board_init.S
- board/prodrive/pmdra/config.mk
- board/prodrive/pmdra/pmdra.c
- board/prodrive/pmdra/u-boot.lds
- cpu/arm1136/Makefile
- cpu/arm1136/cpu.c
- cpu/arm1136/interrupts.c
- cpu/arm1136/mx31/Makefile
- cpu/arm1136/mx31/generic.c
- cpu/arm1136/mx31/interrupts.c
- cpu/arm1136/mx31/serial.c
- cpu/arm1136/omap24xx/Makefile
- cpu/arm1136/omap24xx/interrupts.c
- cpu/arm1136/omap24xx/start.S
- cpu/arm1136/start.S
- cpu/arm926ejs/davinci/lowlevel_init.S
- cpu/arm926ejs/davinci/nand.c
- cpu/arm926ejs/davinci/timer.c
- drivers/i2c/Makefile
- drivers/i2c/mxc_i2c.c
- drivers/net/Makefile
- drivers/net/smc911x.c
- include/asm-arm/arch-arm1136/bits.h
- include/asm-arm/arch-arm1136/clocks.h
- include/asm-arm/arch-arm1136/i2c.h
- include/asm-arm/arch-arm1136/mem.h
- include/asm-arm/arch-arm1136/mux.h
- include/asm-arm/arch-arm1136/omap2420.h
- include/asm-arm/arch-arm1136/sizes.h
- include/asm-arm/arch-arm1136/sys_info.h
- include/asm-arm/arch-arm1136/sys_proto.h
- include/asm-arm/arch-davinci/hardware.h
- include/asm-arm/arch-mx31/mx31-regs.h
- include/asm-arm/arch-mx31/mx31.h
- include/asm-arm/arch-omap24xx/bits.h
- include/asm-arm/arch-omap24xx/clocks.h
- include/asm-arm/arch-omap24xx/i2c.h
- include/asm-arm/arch-omap24xx/mem.h
- include/asm-arm/arch-omap24xx/mux.h
- include/asm-arm/arch-omap24xx/omap2420.h
- include/asm-arm/arch-omap24xx/sizes.h
- include/asm-arm/arch-omap24xx/sys_info.h
- include/asm-arm/arch-omap24xx/sys_proto.h
- include/configs/davinci_dvevm.h
- include/configs/davinci_schmoogie.h
- include/configs/davinci_sonata.h
- include/configs/imx31_litekit.h
- include/configs/imx31_phycore.h
- include/configs/mx31ads.h
- include/configs/pmdra.h
MAKEALL
... | ... | @@ -490,7 +490,6 @@ |
490 | 490 | davinci_dvevm \ |
491 | 491 | davinci_schmoogie \ |
492 | 492 | davinci_sonata \ |
493 | - pmdra \ | |
494 | 493 | " |
495 | 494 | |
496 | 495 | ######################################################################### |
... | ... | @@ -508,9 +507,6 @@ |
508 | 507 | cp1136 \ |
509 | 508 | omap2420h4 \ |
510 | 509 | apollon \ |
511 | - imx31_litekit \ | |
512 | - imx31_phycore \ | |
513 | - mx31ads \ | |
514 | 510 | " |
515 | 511 | |
516 | 512 | ######################################################################### |
Makefile
... | ... | @@ -2385,9 +2385,6 @@ |
2385 | 2385 | davinci_sonata_config : unconfig |
2386 | 2386 | @$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci |
2387 | 2387 | |
2388 | -pmdra_config : unconfig | |
2389 | - @$(MKCONFIG) $(@:_config=) arm arm926ejs pmdra prodrive davinci | |
2390 | - | |
2391 | 2388 | omap1610inn_config \ |
2392 | 2389 | omap1610inn_cs0boot_config \ |
2393 | 2390 | omap1610inn_cs3boot_config \ |
2394 | 2391 | |
2395 | 2392 | |
... | ... | @@ -2598,22 +2595,13 @@ |
2598 | 2595 | ## ARM1136 Systems |
2599 | 2596 | ######################################################################### |
2600 | 2597 | omap2420h4_config : unconfig |
2601 | - @$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 NULL omap24xx | |
2598 | + @$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 | |
2602 | 2599 | |
2603 | 2600 | apollon_config : unconfig |
2604 | 2601 | @mkdir -p $(obj)include |
2605 | 2602 | @echo "#define CONFIG_ONENAND_U_BOOT" > $(obj)include/config.h |
2606 | - @$(MKCONFIG) $(@:_config=) arm arm1136 apollon NULL omap24xx | |
2603 | + @$(MKCONFIG) $(@:_config=) arm arm1136 apollon | |
2607 | 2604 | @echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk |
2608 | - | |
2609 | -imx31_litekit_config : unconfig | |
2610 | - @$(MKCONFIG) $(@:_config=) arm arm1136 imx31_litekit NULL mx31 | |
2611 | - | |
2612 | -imx31_phycore_config : unconfig | |
2613 | - @$(MKCONFIG) $(@:_config=) arm arm1136 imx31_phycore NULL mx31 | |
2614 | - | |
2615 | -mx31ads_config : unconfig | |
2616 | - @$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads NULL mx31 | |
2617 | 2605 | |
2618 | 2606 | #======================================================================== |
2619 | 2607 | # i386 |
board/imx31_litekit/Makefile
1 | -# | |
2 | -# (C) Copyright 2000-2008 | |
3 | -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | -# | |
5 | -# See file CREDITS for list of people who contributed to this | |
6 | -# project. | |
7 | -# | |
8 | -# This program is free software; you can redistribute it and/or | |
9 | -# modify it under the terms of the GNU General Public License as | |
10 | -# published by the Free Software Foundatio; either version 2 of | |
11 | -# the License, or (at your option) any later version. | |
12 | -# | |
13 | -# This program is distributed in the hope that it will be useful, | |
14 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | -# GNU General Public License for more details. | |
17 | -# | |
18 | -# You should have received a copy of the GNU General Public License | |
19 | -# along with this program; if not, write to the Free Software | |
20 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | -# MA 02111-1307 USA | |
22 | -# | |
23 | - | |
24 | -include $(TOPDIR)/config.mk | |
25 | - | |
26 | -LIB = $(obj)lib$(BOARD).a | |
27 | - | |
28 | -COBJS := imx31_litekit.o | |
29 | -SOBJS := lowlevel_init.o | |
30 | - | |
31 | -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | |
32 | -OBJS := $(addprefix $(obj),$(COBJS)) | |
33 | -SOBJS := $(addprefix $(obj),$(SOBJS)) | |
34 | - | |
35 | -$(LIB): $(obj).depend $(OBJS) $(SOBJS) | |
36 | - $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) | |
37 | - | |
38 | -clean: | |
39 | - rm -f $(SOBJS) $(OBJS) | |
40 | - | |
41 | -distclean: clean | |
42 | - rm -f $(LIB) core *.bak .depend | |
43 | - | |
44 | -####################################################################### | |
45 | -## | |
46 | - | |
47 | -# defines $(obj).depend target | |
48 | -include $(SRCTREE)/rules.mk | |
49 | - | |
50 | -sinclude $(obj).depend |
board/imx31_litekit/config.mk
1 | -TEXT_BASE = 0x87f00000 |
board/imx31_litekit/imx31_litekit.c
1 | -/* | |
2 | - * | |
3 | - * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | - | |
25 | -#include <common.h> | |
26 | -#include <asm/arch/mx31.h> | |
27 | -#include <asm/arch/mx31-regs.h> | |
28 | - | |
29 | -DECLARE_GLOBAL_DATA_PTR; | |
30 | - | |
31 | -int dram_init(void) | |
32 | -{ | |
33 | - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; | |
34 | - gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; | |
35 | - | |
36 | - return 0; | |
37 | -} | |
38 | - | |
39 | -int board_init(void) | |
40 | -{ | |
41 | - __REG(CSCR_U(0)) = 0x0000cf03; /* CS0: Nor Flash */ | |
42 | - __REG(CSCR_L(0)) = 0xa0330d01; | |
43 | - __REG(CSCR_A(0)) = 0x00220800; | |
44 | - | |
45 | - __REG(CSCR_U(4)) = 0x0000dcf6; /* CS4: Network Controller */ | |
46 | - __REG(CSCR_L(4)) = 0x444a4541; | |
47 | - __REG(CSCR_A(4)) = 0x44443302; | |
48 | - | |
49 | - /* setup pins for UART1 */ | |
50 | - mx31_gpio_mux(MUX_RXD1__UART1_RXD_MUX); | |
51 | - mx31_gpio_mux(MUX_TXD1__UART1_TXD_MUX); | |
52 | - mx31_gpio_mux(MUX_RTS1__UART1_RTS_B); | |
53 | - mx31_gpio_mux(MUX_RTS1__UART1_CTS_B); | |
54 | - | |
55 | - gd->bd->bi_arch_number = 447; /* board id for linux */ | |
56 | - gd->bd->bi_boot_params = (0x80000100); /* adress of boot parameters */ | |
57 | - | |
58 | - return 0; | |
59 | -} | |
60 | - | |
61 | -int checkboard(void) | |
62 | -{ | |
63 | - printf("Board: i.MX31 Litekit\n"); | |
64 | - return 0; | |
65 | -} |
board/imx31_litekit/lowlevel_init.S
1 | -/* | |
2 | - * | |
3 | - * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | -#include <asm/arch/mx31-regs.h> | |
25 | - | |
26 | -.macro REG reg, val | |
27 | - ldr r2, =\reg | |
28 | - ldr r3, =\val | |
29 | - str r3, [r2] | |
30 | -.endm | |
31 | - | |
32 | -.macro REG8 reg, val | |
33 | - ldr r2, =\reg | |
34 | - ldr r3, =\val | |
35 | - strb r3, [r2] | |
36 | -.endm | |
37 | - | |
38 | -.macro DELAY loops | |
39 | - ldr r2, =\loops | |
40 | -1: | |
41 | - subs r2, r2, #1 | |
42 | - nop | |
43 | - bcs 1b | |
44 | -.endm | |
45 | - | |
46 | -.globl lowlevel_init | |
47 | -lowlevel_init: | |
48 | - | |
49 | - REG IPU_CONF, IPU_CONF_DI_EN | |
50 | - REG CCM_CCMR, 0x074B0BF5 | |
51 | - | |
52 | - DELAY 0x40000 | |
53 | - | |
54 | - REG CCM_CCMR, 0x074B0BF5 | CCMR_MPE | |
55 | - REG CCM_CCMR, (0x074B0BF5 | CCMR_MPE) & ~CCMR_MDS | |
56 | - | |
57 | - REG CCM_PDR0, PDR0_CSI_PODF(0x1ff) | PDR0_PER_PODF(7) | \ | |
58 | - PDR0_HSP_PODF(2) | PDR0_NFC_PODF(6) | \ | |
59 | - PDR0_IPG_PODF(1) | PDR0_MAX_PODF(2) | \ | |
60 | - PDR0_MCU_PODF(0) | |
61 | - | |
62 | - REG CCM_MPCTL, PLL_PD(0) | PLL_MFD(0x33) | PLL_MFI(7) | \ | |
63 | - PLL_MFN(0x23) | |
64 | - REG CCM_SPCTL, PLL_PD(1) | PLL_MFD(4) | PLL_MFI(12) | PLL_MFN(1) | |
65 | - | |
66 | - REG 0x43FAC26C, 0 /* SDCLK */ | |
67 | - REG 0x43FAC270, 0 /* CAS */ | |
68 | - REG 0x43FAC274, 0 /* RAS */ | |
69 | - REG 0x43FAC27C, 0x1000 /* CS2 CSD0) */ | |
70 | - REG 0x43FAC284, 0 /* DQM3 */ | |
71 | - /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 0x288..0x2DC) */ | |
72 | - REG 0x43FAC288, 0 | |
73 | - REG 0x43FAC28C, 0 | |
74 | - REG 0x43FAC290, 0 | |
75 | - REG 0x43FAC294, 0 | |
76 | - REG 0x43FAC298, 0 | |
77 | - REG 0x43FAC29C, 0 | |
78 | - REG 0x43FAC2A0, 0 | |
79 | - REG 0x43FAC2A4, 0 | |
80 | - REG 0x43FAC2A8, 0 | |
81 | - REG 0x43FAC2AC, 0 | |
82 | - REG 0x43FAC2B0, 0 | |
83 | - REG 0x43FAC2B4, 0 | |
84 | - REG 0x43FAC2B8, 0 | |
85 | - REG 0x43FAC2BC, 0 | |
86 | - REG 0x43FAC2C0, 0 | |
87 | - REG 0x43FAC2C4, 0 | |
88 | - REG 0x43FAC2C8, 0 | |
89 | - REG 0x43FAC2CC, 0 | |
90 | - REG 0x43FAC2D0, 0 | |
91 | - REG 0x43FAC2D4, 0 | |
92 | - REG 0x43FAC2D8, 0 | |
93 | - REG 0x43FAC2DC, 0 | |
94 | - REG 0xB8001010, 0x00000004 | |
95 | - REG 0xB8001004, 0x006ac73a | |
96 | - REG 0xB8001000, 0x92100000 | |
97 | - REG 0x80000f00, 0x12344321 | |
98 | - REG 0xB8001000, 0xa2100000 | |
99 | - REG 0x80000000, 0x12344321 | |
100 | - REG 0x80000000, 0x12344321 | |
101 | - REG 0xB8001000, 0xb2100000 | |
102 | - REG8 0x80000033, 0xda | |
103 | - REG8 0x81000000, 0xff |
board/imx31_litekit/u-boot.lds
1 | -/* | |
2 | - * January 2004 - Changed to support H4 device | |
3 | - * Copyright (c) 2004 Texas Instruments | |
4 | - * | |
5 | - * (C) Copyright 2002 | |
6 | - * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> | |
7 | - * | |
8 | - * See file CREDITS for list of people who contributed to this | |
9 | - * project. | |
10 | - * | |
11 | - * This program is free software; you can redistribute it and/or | |
12 | - * modify it under the terms of the GNU General Public License as | |
13 | - * published by the Free Software Foundation; either version 2 of | |
14 | - * the License, or (at your option) any later version. | |
15 | - * | |
16 | - * This program is distributed in the hope that it will be useful, | |
17 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | - * GNU General Public License for more details. | |
20 | - * | |
21 | - * You should have received a copy of the GNU General Public License | |
22 | - * along with this program; if not, write to the Free Software | |
23 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
24 | - * MA 02111-1307 USA | |
25 | - */ | |
26 | - | |
27 | -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") | |
28 | -OUTPUT_ARCH(arm) | |
29 | -ENTRY(_start) | |
30 | -SECTIONS | |
31 | -{ | |
32 | - . = 0x00000000; | |
33 | - | |
34 | - . = ALIGN(4); | |
35 | - .text : | |
36 | - { | |
37 | - cpu/arm1136/start.o (.text) | |
38 | - *(.text) | |
39 | - } | |
40 | - | |
41 | - . = ALIGN(4); | |
42 | - .rodata : { *(.rodata) } | |
43 | - | |
44 | - . = ALIGN(4); | |
45 | - .data : { *(.data) } | |
46 | - | |
47 | - . = ALIGN(4); | |
48 | - .got : { *(.got) } | |
49 | - | |
50 | - . = .; | |
51 | - __u_boot_cmd_start = .; | |
52 | - .u_boot_cmd : { *(.u_boot_cmd) } | |
53 | - __u_boot_cmd_end = .; | |
54 | - | |
55 | - . = ALIGN(4); | |
56 | - __bss_start = .; | |
57 | - .bss : { *(.bss) } | |
58 | - _end = .; | |
59 | -} |
board/imx31_phycore/Makefile
1 | -# | |
2 | -# (C) Copyright 2000-2008 | |
3 | -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | -# | |
5 | -# See file CREDITS for list of people who contributed to this | |
6 | -# project. | |
7 | -# | |
8 | -# This program is free software; you can redistribute it and/or | |
9 | -# modify it under the terms of the GNU General Public License as | |
10 | -# published by the Free Software Foundatio; either version 2 of | |
11 | -# the License, or (at your option) any later version. | |
12 | -# | |
13 | -# This program is distributed in the hope that it will be useful, | |
14 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | -# GNU General Public License for more details. | |
17 | -# | |
18 | -# You should have received a copy of the GNU General Public License | |
19 | -# along with this program; if not, write to the Free Software | |
20 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | -# MA 02111-1307 USA | |
22 | -# | |
23 | - | |
24 | -include $(TOPDIR)/config.mk | |
25 | - | |
26 | -LIB = $(obj)lib$(BOARD).a | |
27 | - | |
28 | -COBJS := imx31_phycore.o | |
29 | -SOBJS := lowlevel_init.o | |
30 | - | |
31 | -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | |
32 | -OBJS := $(addprefix $(obj),$(COBJS)) | |
33 | -SOBJS := $(addprefix $(obj),$(SOBJS)) | |
34 | - | |
35 | -$(LIB): $(obj).depend $(OBJS) $(SOBJS) | |
36 | - $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) | |
37 | - | |
38 | -clean: | |
39 | - rm -f $(SOBJS) $(OBJS) | |
40 | - | |
41 | -distclean: clean | |
42 | - rm -f $(LIB) core *.bak .depend | |
43 | - | |
44 | -######################################################################### | |
45 | - | |
46 | -# defines $(obj).depend target | |
47 | -include $(SRCTREE)/rules.mk | |
48 | - | |
49 | -sinclude $(obj).depend |
board/imx31_phycore/config.mk
1 | -TEXT_BASE = 0x87f00000 |
board/imx31_phycore/imx31_phycore.c
1 | -/* | |
2 | - * | |
3 | - * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | - | |
25 | -#include <common.h> | |
26 | -#include <asm/arch/mx31.h> | |
27 | -#include <asm/arch/mx31-regs.h> | |
28 | - | |
29 | -DECLARE_GLOBAL_DATA_PTR; | |
30 | - | |
31 | -int dram_init(void) | |
32 | -{ | |
33 | - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; | |
34 | - gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; | |
35 | - | |
36 | - return 0; | |
37 | -} | |
38 | - | |
39 | -int board_init(void) | |
40 | -{ | |
41 | - __REG(CSCR_U(0)) = 0x0000cf03; /* CS0: Nor Flash */ | |
42 | - __REG(CSCR_L(0)) = 0x10000d03; | |
43 | - __REG(CSCR_A(0)) = 0x00720900; | |
44 | - | |
45 | - __REG(CSCR_U(1)) = 0x0000df06; /* CS1: Network Controller */ | |
46 | - __REG(CSCR_L(1)) = 0x444a4541; | |
47 | - __REG(CSCR_A(1)) = 0x44443302; | |
48 | - | |
49 | - __REG(CSCR_U(4)) = 0x0000d843; /* CS4: SRAM */ | |
50 | - __REG(CSCR_L(4)) = 0x22252521; | |
51 | - __REG(CSCR_A(4)) = 0x22220a00; | |
52 | - | |
53 | - /* setup pins for UART1 */ | |
54 | - mx31_gpio_mux(MUX_RXD1__UART1_RXD_MUX); | |
55 | - mx31_gpio_mux(MUX_TXD1__UART1_TXD_MUX); | |
56 | - mx31_gpio_mux(MUX_RTS1__UART1_RTS_B); | |
57 | - mx31_gpio_mux(MUX_RTS1__UART1_CTS_B); | |
58 | - | |
59 | - /* setup pins for I2C2 (for EEPROM, RTC) */ | |
60 | - mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL); | |
61 | - mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SCL); | |
62 | - | |
63 | - gd->bd->bi_arch_number = 447; /* board id for linux */ | |
64 | - gd->bd->bi_boot_params = (0x80000100); /* adress of boot parameters */ | |
65 | - | |
66 | - return 0; | |
67 | -} | |
68 | - | |
69 | -int checkboard(void) | |
70 | -{ | |
71 | - printf("Board: Phytec phyCore i.MX31\n"); | |
72 | - return 0; | |
73 | -} |
board/imx31_phycore/lowlevel_init.S
1 | -/* | |
2 | - * | |
3 | - * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | -#include <asm/arch/mx31-regs.h> | |
25 | - | |
26 | -.macro REG reg, val | |
27 | - ldr r2, =\reg | |
28 | - ldr r3, =\val | |
29 | - str r3, [r2] | |
30 | -.endm | |
31 | - | |
32 | -.macro REG8 reg, val | |
33 | - ldr r2, =\reg | |
34 | - ldr r3, =\val | |
35 | - strb r3, [r2] | |
36 | -.endm | |
37 | - | |
38 | -.macro DELAY loops | |
39 | - ldr r2, =\loops | |
40 | -1: | |
41 | - subs r2, r2, #1 | |
42 | - nop | |
43 | - bcs 1b | |
44 | -.endm | |
45 | - | |
46 | -.globl lowlevel_init | |
47 | -lowlevel_init: | |
48 | - | |
49 | - REG IPU_CONF, IPU_CONF_DI_EN | |
50 | - REG CCM_CCMR, 0x074B0BF5 | |
51 | - | |
52 | - DELAY 0x40000 | |
53 | - | |
54 | - REG CCM_CCMR, 0x074B0BF5 | CCMR_MPE | |
55 | - REG CCM_CCMR, (0x074B0BF5 | CCMR_MPE) & ~CCMR_MDS | |
56 | - | |
57 | - REG CCM_PDR0, PDR0_CSI_PODF(0xff1) | PDR0_PER_PODF(7) | \ | |
58 | - PDR0_HSP_PODF(3) | PDR0_NFC_PODF(5) | \ | |
59 | - PDR0_IPG_PODF(1) | PDR0_MAX_PODF(3) | \ | |
60 | - PDR0_MCU_PODF(0) | |
61 | - | |
62 | - REG CCM_MPCTL, PLL_PD(0) | PLL_MFD(0xe) | PLL_MFI(9) | PLL_MFN(0xd) | |
63 | - | |
64 | - REG CCM_SPCTL, PLL_PD(1) | PLL_MFD(0x43) | PLL_MFI(12) | PLL_MFN(1) | |
65 | - | |
66 | - REG 0x43FAC26C, 0 /* SDCLK */ | |
67 | - REG 0x43FAC270, 0 /* CAS */ | |
68 | - REG 0x43FAC274, 0 /* RAS */ | |
69 | - REG 0x43FAC27C, 0x1000 /* CS2 CSD0) */ | |
70 | - REG 0x43FAC284, 0 /* DQM3 */ | |
71 | - /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 0x288..0x2DC) */ | |
72 | - REG 0x43FAC288, 0 | |
73 | - REG 0x43FAC28C, 0 | |
74 | - REG 0x43FAC290, 0 | |
75 | - REG 0x43FAC294, 0 | |
76 | - REG 0x43FAC298, 0 | |
77 | - REG 0x43FAC29C, 0 | |
78 | - REG 0x43FAC2A0, 0 | |
79 | - REG 0x43FAC2A4, 0 | |
80 | - REG 0x43FAC2A8, 0 | |
81 | - REG 0x43FAC2AC, 0 | |
82 | - REG 0x43FAC2B0, 0 | |
83 | - REG 0x43FAC2B4, 0 | |
84 | - REG 0x43FAC2B8, 0 | |
85 | - REG 0x43FAC2BC, 0 | |
86 | - REG 0x43FAC2C0, 0 | |
87 | - REG 0x43FAC2C4, 0 | |
88 | - REG 0x43FAC2C8, 0 | |
89 | - REG 0x43FAC2CC, 0 | |
90 | - REG 0x43FAC2D0, 0 | |
91 | - REG 0x43FAC2D4, 0 | |
92 | - REG 0x43FAC2D8, 0 | |
93 | - REG 0x43FAC2DC, 0 | |
94 | - REG 0xB8001010, 0x00000004 | |
95 | - REG 0xB8001004, 0x006ac73a | |
96 | - REG 0xB8001000, 0x92100000 | |
97 | - REG 0x80000f00, 0x12344321 | |
98 | - REG 0xB8001000, 0xa2100000 | |
99 | - REG 0x80000000, 0x12344321 | |
100 | - REG 0x80000000, 0x12344321 | |
101 | - REG 0xB8001000, 0xb2100000 | |
102 | - REG8 0x80000033, 0xda | |
103 | - REG8 0x81000000, 0xff | |
104 | - REG 0xB8001000, 0x82226080 | |
105 | - REG 0x80000000, 0xDEADBEEF |
board/imx31_phycore/u-boot.lds
1 | -/* | |
2 | - * January 2004 - Changed to support H4 device | |
3 | - * Copyright (c) 2004 Texas Instruments | |
4 | - * | |
5 | - * (C) Copyright 2002 | |
6 | - * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> | |
7 | - * | |
8 | - * See file CREDITS for list of people who contributed to this | |
9 | - * project. | |
10 | - * | |
11 | - * This program is free software; you can redistribute it and/or | |
12 | - * modify it under the terms of the GNU General Public License as | |
13 | - * published by the Free Software Foundation; either version 2 of | |
14 | - * the License, or (at your option) any later version. | |
15 | - * | |
16 | - * This program is distributed in the hope that it will be useful, | |
17 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | - * GNU General Public License for more details. | |
20 | - * | |
21 | - * You should have received a copy of the GNU General Public License | |
22 | - * along with this program; if not, write to the Free Software | |
23 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
24 | - * MA 02111-1307 USA | |
25 | - */ | |
26 | - | |
27 | -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") | |
28 | -OUTPUT_ARCH(arm) | |
29 | -ENTRY(_start) | |
30 | -SECTIONS | |
31 | -{ | |
32 | - . = 0x00000000; | |
33 | - | |
34 | - . = ALIGN(4); | |
35 | - .text : | |
36 | - { | |
37 | - cpu/arm1136/start.o (.text) | |
38 | - *(.text) | |
39 | - } | |
40 | - | |
41 | - . = ALIGN(4); | |
42 | - .rodata : { *(.rodata) } | |
43 | - | |
44 | - . = ALIGN(4); | |
45 | - .data : { *(.data) } | |
46 | - | |
47 | - . = ALIGN(4); | |
48 | - .got : { *(.got) } | |
49 | - | |
50 | - . = .; | |
51 | - __u_boot_cmd_start = .; | |
52 | - .u_boot_cmd : { *(.u_boot_cmd) } | |
53 | - __u_boot_cmd_end = .; | |
54 | - | |
55 | - . = ALIGN(4); | |
56 | - __bss_start = .; | |
57 | - .bss : { *(.bss) } | |
58 | - _end = .; | |
59 | -} |
board/mx31ads/Makefile
1 | -# | |
2 | -# (C) Copyright 2000-2008 | |
3 | -# Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de> | |
4 | -# | |
5 | -# See file CREDITS for list of people who contributed to this | |
6 | -# project. | |
7 | -# | |
8 | -# This program is free software; you can redistribute it and/or | |
9 | -# modify it under the terms of the GNU General Public License as | |
10 | -# published by the Free Software Foundatio; either version 2 of | |
11 | -# the License, or (at your option) any later version. | |
12 | -# | |
13 | -# This program is distributed in the hope that it will be useful, | |
14 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | -# GNU General Public License for more details. | |
17 | -# | |
18 | -# You should have received a copy of the GNU General Public License | |
19 | -# along with this program; if not, write to the Free Software | |
20 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | -# MA 02111-1307 USA | |
22 | -# | |
23 | -# | |
24 | - | |
25 | -include $(TOPDIR)/config.mk | |
26 | - | |
27 | -LIB = $(obj)lib$(BOARD).a | |
28 | - | |
29 | -COBJS := mx31ads.o | |
30 | -SOBJS := lowlevel_init.o | |
31 | - | |
32 | -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | |
33 | -OBJS := $(addprefix $(obj),$(COBJS)) | |
34 | -SOBJS := $(addprefix $(obj),$(SOBJS)) | |
35 | - | |
36 | -$(LIB): $(obj).depend $(OBJS) $(SOBJS) | |
37 | - $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) | |
38 | - | |
39 | -clean: | |
40 | - rm -f $(SOBJS) $(OBJS) | |
41 | - | |
42 | -distclean: clean | |
43 | - rm -f $(LIB) core *.bak .depend | |
44 | - | |
45 | -######################################################################### | |
46 | - | |
47 | -# defines $(obj).depend target | |
48 | -include $(SRCTREE)/rules.mk | |
49 | - | |
50 | -sinclude $(obj).depend | |
51 | - | |
52 | -######################################################################### |
board/mx31ads/config.mk
1 | -TEXT_BASE = 0x87f00000 |
board/mx31ads/lowlevel_init.S
1 | -/* | |
2 | - * Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de> | |
3 | - * | |
4 | - * This program is free software; you can redistribute it and/or | |
5 | - * modify it under the terms of the GNU General Public License as | |
6 | - * published by the Free Software Foundation; either version 2 of | |
7 | - * the License, or (at your option) any later version. | |
8 | - * | |
9 | - * This program is distributed in the hope that it will be useful, | |
10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | - * GNU General Public License for more details. | |
13 | - * | |
14 | - * You should have received a copy of the GNU General Public License | |
15 | - * along with this program; if not, write to the Free Software | |
16 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
17 | - * MA 02111-1307 USA | |
18 | - */ | |
19 | - | |
20 | -#include <asm/arch/mx31-regs.h> | |
21 | - | |
22 | -.macro REG reg, val | |
23 | - ldr r2, =\reg | |
24 | - ldr r3, =\val | |
25 | - str r3, [r2] | |
26 | -.endm | |
27 | - | |
28 | -.macro REG8 reg, val | |
29 | - ldr r2, =\reg | |
30 | - ldr r3, =\val | |
31 | - strb r3, [r2] | |
32 | -.endm | |
33 | - | |
34 | -.macro DELAY loops | |
35 | - ldr r2, =\loops | |
36 | -1: | |
37 | - subs r2, r2, #1 | |
38 | - nop | |
39 | - bcs 1b | |
40 | -.endm | |
41 | - | |
42 | -/* RedBoot: AIPS setup - Only setup MPROTx registers. | |
43 | - * The PACR default values are good.*/ | |
44 | -.macro init_aips | |
45 | - /* | |
46 | - * Set all MPROTx to be non-bufferable, trusted for R/W, | |
47 | - * not forced to user-mode. | |
48 | - */ | |
49 | - ldr r0, =0x43F00000 | |
50 | - ldr r1, =0x77777777 | |
51 | - str r1, [r0, #0x00] | |
52 | - str r1, [r0, #0x04] | |
53 | - ldr r0, =0x53F00000 | |
54 | - str r1, [r0, #0x00] | |
55 | - str r1, [r0, #0x04] | |
56 | - | |
57 | - /* | |
58 | - * Clear the on and off peripheral modules Supervisor Protect bit | |
59 | - * for SDMA to access them. Did not change the AIPS control registers | |
60 | - * (offset 0x20) access type | |
61 | - */ | |
62 | - ldr r0, =0x43F00000 | |
63 | - ldr r1, =0x0 | |
64 | - str r1, [r0, #0x40] | |
65 | - str r1, [r0, #0x44] | |
66 | - str r1, [r0, #0x48] | |
67 | - str r1, [r0, #0x4C] | |
68 | - ldr r1, [r0, #0x50] | |
69 | - and r1, r1, #0x00FFFFFF | |
70 | - str r1, [r0, #0x50] | |
71 | - | |
72 | - ldr r0, =0x53F00000 | |
73 | - ldr r1, =0x0 | |
74 | - str r1, [r0, #0x40] | |
75 | - str r1, [r0, #0x44] | |
76 | - str r1, [r0, #0x48] | |
77 | - str r1, [r0, #0x4C] | |
78 | - ldr r1, [r0, #0x50] | |
79 | - and r1, r1, #0x00FFFFFF | |
80 | - str r1, [r0, #0x50] | |
81 | -.endm /* init_aips */ | |
82 | - | |
83 | -/* RedBoot: MAX (Multi-Layer AHB Crossbar Switch) setup */ | |
84 | -.macro init_max | |
85 | - ldr r0, =0x43F04000 | |
86 | - /* MPR - priority is M4 > M2 > M3 > M5 > M0 > M1 */ | |
87 | - ldr r1, =0x00302154 | |
88 | - str r1, [r0, #0x000] /* for S0 */ | |
89 | - str r1, [r0, #0x100] /* for S1 */ | |
90 | - str r1, [r0, #0x200] /* for S2 */ | |
91 | - str r1, [r0, #0x300] /* for S3 */ | |
92 | - str r1, [r0, #0x400] /* for S4 */ | |
93 | - /* SGPCR - always park on last master */ | |
94 | - ldr r1, =0x10 | |
95 | - str r1, [r0, #0x010] /* for S0 */ | |
96 | - str r1, [r0, #0x110] /* for S1 */ | |
97 | - str r1, [r0, #0x210] /* for S2 */ | |
98 | - str r1, [r0, #0x310] /* for S3 */ | |
99 | - str r1, [r0, #0x410] /* for S4 */ | |
100 | - /* MGPCR - restore default values */ | |
101 | - ldr r1, =0x0 | |
102 | - str r1, [r0, #0x800] /* for M0 */ | |
103 | - str r1, [r0, #0x900] /* for M1 */ | |
104 | - str r1, [r0, #0xA00] /* for M2 */ | |
105 | - str r1, [r0, #0xB00] /* for M3 */ | |
106 | - str r1, [r0, #0xC00] /* for M4 */ | |
107 | - str r1, [r0, #0xD00] /* for M5 */ | |
108 | -.endm /* init_max */ | |
109 | - | |
110 | -/* RedBoot: M3IF setup */ | |
111 | -.macro init_m3if | |
112 | - /* Configure M3IF registers */ | |
113 | - ldr r1, =0xB8003000 | |
114 | - /* | |
115 | - * M3IF Control Register (M3IFCTL) | |
116 | - * MRRP[0] = L2CC0 not on priority list (0 << 0) = 0x00000000 | |
117 | - * MRRP[1] = L2CC1 not on priority list (0 << 0) = 0x00000000 | |
118 | - * MRRP[2] = MBX not on priority list (0 << 0) = 0x00000000 | |
119 | - * MRRP[3] = MAX1 not on priority list (0 << 0) = 0x00000000 | |
120 | - * MRRP[4] = SDMA not on priority list (0 << 0) = 0x00000000 | |
121 | - * MRRP[5] = MPEG4 not on priority list (0 << 0) = 0x00000000 | |
122 | - * MRRP[6] = IPU1 on priority list (1 << 6) = 0x00000040 | |
123 | - * MRRP[7] = IPU2 not on priority list (0 << 0) = 0x00000000 | |
124 | - * ------------ | |
125 | - * 0x00000040 | |
126 | - */ | |
127 | - ldr r0, =0x00000040 | |
128 | - str r0, [r1] /* M3IF control reg */ | |
129 | -.endm /* init_m3if */ | |
130 | - | |
131 | -/* RedBoot: To support 133MHz DDR */ | |
132 | -.macro init_drive_strength | |
133 | - /* | |
134 | - * Disable maximum drive strength SDRAM/DDR lines by clearing DSE1 bits | |
135 | - * in SW_PAD_CTL registers | |
136 | - */ | |
137 | - | |
138 | - /* SDCLK */ | |
139 | - ldr r1, =0x43FAC200 | |
140 | - ldr r0, [r1, #0x6C] | |
141 | - bic r0, r0, #(1 << 12) | |
142 | - str r0, [r1, #0x6C] | |
143 | - | |
144 | - /* CAS */ | |
145 | - ldr r0, [r1, #0x70] | |
146 | - bic r0, r0, #(1 << 22) | |
147 | - str r0, [r1, #0x70] | |
148 | - | |
149 | - /* RAS */ | |
150 | - ldr r0, [r1, #0x74] | |
151 | - bic r0, r0, #(1 << 2) | |
152 | - str r0, [r1, #0x74] | |
153 | - | |
154 | - /* CS2 (CSD0) */ | |
155 | - ldr r0, [r1, #0x7C] | |
156 | - bic r0, r0, #(1 << 22) | |
157 | - str r0, [r1, #0x7C] | |
158 | - | |
159 | - /* DQM3 */ | |
160 | - ldr r0, [r1, #0x84] | |
161 | - bic r0, r0, #(1 << 22) | |
162 | - str r0, [r1, #0x84] | |
163 | - | |
164 | - /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 (0x288..0x2DC) */ | |
165 | - ldr r2, =22 /* (0x2E0 - 0x288) / 4 = 22 */ | |
166 | -pad_loop: | |
167 | - ldr r0, [r1, #0x88] | |
168 | - bic r0, r0, #(1 << 22) | |
169 | - bic r0, r0, #(1 << 12) | |
170 | - bic r0, r0, #(1 << 2) | |
171 | - str r0, [r1, #0x88] | |
172 | - add r1, r1, #4 | |
173 | - subs r2, r2, #0x1 | |
174 | - bne pad_loop | |
175 | -.endm /* init_drive_strength */ | |
176 | - | |
177 | -/* CPLD on CS4 setup */ | |
178 | -.macro init_cs4 | |
179 | - ldr r0, =WEIM_BASE | |
180 | - ldr r1, =0x0000D843 | |
181 | - str r1, [r0, #0x40] | |
182 | - ldr r1, =0x22252521 | |
183 | - str r1, [r0, #0x44] | |
184 | - ldr r1, =0x22220A00 | |
185 | - str r1, [r0, #0x48] | |
186 | -.endm /* init_cs4 */ | |
187 | - | |
188 | -.globl lowlevel_init | |
189 | -lowlevel_init: | |
190 | - | |
191 | - /* Redboot initializes very early AIPS, what for? | |
192 | - * Then it also initializes Multi-Layer AHB Crossbar Switch, | |
193 | - * M3IF */ | |
194 | - /* Also setup the Peripheral Port Remap register inside the core */ | |
195 | - ldr r0, =0x40000015 /* start from AIPS 2GB region */ | |
196 | - mcr p15, 0, r0, c15, c2, 4 | |
197 | - | |
198 | - init_aips | |
199 | - | |
200 | - init_max | |
201 | - | |
202 | - init_m3if | |
203 | - | |
204 | - init_drive_strength | |
205 | - | |
206 | - init_cs4 | |
207 | - | |
208 | - /* Image Processing Unit: */ | |
209 | - /* Too early to switch display on? */ | |
210 | - /* Switch on Display Interface */ | |
211 | - REG IPU_CONF, IPU_CONF_DI_EN | |
212 | - /* Clock Control Module: */ | |
213 | - /* Use CKIH, MCU PLL off */ | |
214 | - REG CCM_CCMR, 0x074B0BF5 | |
215 | - | |
216 | - DELAY 0x40000 | |
217 | - /* MCU PLL on */ | |
218 | - REG CCM_CCMR, 0x074B0BF5 | CCMR_MPE | |
219 | - /* Switch to MCU PLL */ | |
220 | - REG CCM_CCMR, (0x074B0BF5 | CCMR_MPE) & ~CCMR_MDS | |
221 | - | |
222 | - /* PBC CPLD on CS4 */ | |
223 | - mov r1, #CS4_BASE | |
224 | - ldrh r1, [r1, #0x2] | |
225 | - /* Is 27MHz switch set? */ | |
226 | - ands r1, r1, #0x16 | |
227 | - | |
228 | - /* 532-133-66.5 */ | |
229 | - ldr r0, =CCM_BASE | |
230 | - ldr r1, =0xFF871D58 | |
231 | - /* PDR0 */ | |
232 | - str r1, [r0, #0x4] | |
233 | - ldreq r1, MPCTL_PARAM_532 | |
234 | - ldrne r1, MPCTL_PARAM_532_27 | |
235 | - /* MPCTL */ | |
236 | - str r1, [r0, #0x10] | |
237 | - | |
238 | - /* Set UPLL=240MHz, USB=60MHz */ | |
239 | - ldr r1, =0x49FCFE7F | |
240 | - /* PDR1 */ | |
241 | - str r1, [r0, #0x8] | |
242 | - ldreq r1, UPCTL_PARAM_240 | |
243 | - ldrne r1, UPCTL_PARAM_240_27 | |
244 | - /* UPCTL */ | |
245 | - str r1, [r0, #0x14] | |
246 | - /* default CLKO to 1/8 of the ARM core */ | |
247 | - mov r1, #0x000002C0 | |
248 | - add r1, r1, #0x00000006 | |
249 | - /* COSR */ | |
250 | - str r1, [r0, #0x1c] | |
251 | - | |
252 | - /* RedBoot sets 0x1ff, 7, 3, 5, 1, 3, 0 */ | |
253 | -/* REG CCM_PDR0, PDR0_CSI_PODF(0x1ff) | PDR0_PER_PODF(7) | \ | |
254 | - PDR0_HSP_PODF(2) | PDR0_NFC_PODF(6) | \ | |
255 | - PDR0_IPG_PODF(1) | PDR0_MAX_PODF(2) | \ | |
256 | - PDR0_MCU_PODF(0)*/ | |
257 | - | |
258 | - /* Redboot: 0, 51, 10, 12 / 0, 14, 9, 13 */ | |
259 | -/* REG CCM_MPCTL, PLL_PD(0) | PLL_MFD(0x33) | PLL_MFI(7) | \ | |
260 | - PLL_MFN(0x23)*/ | |
261 | - /* Default: 1, 4, 12, 1 */ | |
262 | - REG CCM_SPCTL, PLL_PD(1) | PLL_MFD(4) | PLL_MFI(12) | PLL_MFN(1) | |
263 | - | |
264 | - /* B8xxxxxx - NAND, 8xxxxxxx - CSD0 RAM */ | |
265 | - REG 0xB8001010, 0x00000004 | |
266 | - REG 0xB8001004, 0x006ac73a | |
267 | - REG 0xB8001000, 0x92100000 | |
268 | - REG 0x80000f00, 0x12344321 | |
269 | - REG 0xB8001000, 0xa2100000 | |
270 | - REG 0x80000000, 0x12344321 | |
271 | - REG 0x80000000, 0x12344321 | |
272 | - REG 0xB8001000, 0xb2100000 | |
273 | - REG8 0x80000033, 0xda | |
274 | - REG8 0x81000000, 0xff | |
275 | - REG 0xB8001000, 0x82226080 | |
276 | - REG 0x80000000, 0xDEADBEEF | |
277 | - REG 0xB8001010, 0x0000000c | |
278 | - | |
279 | - mov pc, lr | |
280 | - | |
281 | -MPCTL_PARAM_532: | |
282 | - .word (((1-1) << 26) + ((52-1) << 16) + (10 << 10) + (12 << 0)) | |
283 | -MPCTL_PARAM_532_27: | |
284 | - .word (((1-1) << 26) + ((15-1) << 16) + (9 << 10) + (13 << 0)) | |
285 | -UPCTL_PARAM_240: | |
286 | - .word (((2-1) << 26) + ((13-1) << 16) + (9 << 10) + (3 << 0)) | |
287 | -UPCTL_PARAM_240_27: | |
288 | - .word (((2-1) << 26) + ((9 -1) << 16) + (8 << 10) + (8 << 0)) |
board/mx31ads/mx31ads.c
1 | -/* | |
2 | - * Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de> | |
3 | - * | |
4 | - * See file CREDITS for list of people who contributed to this | |
5 | - * project. | |
6 | - * | |
7 | - * This program is free software; you can redistribute it and/or | |
8 | - * modify it under the terms of the GNU General Public License as | |
9 | - * published by the Free Software Foundation; either version 2 of | |
10 | - * the License, or (at your option) any later version. | |
11 | - * | |
12 | - * This program is distributed in the hope that it will be useful, | |
13 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | - * GNU General Public License for more details. | |
16 | - * | |
17 | - * You should have received a copy of the GNU General Public License | |
18 | - * along with this program; if not, write to the Free Software | |
19 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
20 | - * MA 02111-1307 USA | |
21 | - */ | |
22 | - | |
23 | -#include <common.h> | |
24 | -#include <asm/io.h> | |
25 | -#include <asm/arch/mx31.h> | |
26 | -#include <asm/arch/mx31-regs.h> | |
27 | - | |
28 | -DECLARE_GLOBAL_DATA_PTR; | |
29 | - | |
30 | -int dram_init(void) | |
31 | -{ | |
32 | - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; | |
33 | - gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; | |
34 | - | |
35 | - return 0; | |
36 | -} | |
37 | - | |
38 | -int board_init(void) | |
39 | -{ | |
40 | - int i; | |
41 | -#if 0 | |
42 | - /* CS0: Nor Flash */ | |
43 | - /* | |
44 | - * These are values from the RedBoot sources by Freescale. However, | |
45 | - * under U-Boot with this configuration 32-bit accesses don't work, | |
46 | - * lower 16 bits of data are read twice for each 32-bit read. | |
47 | - */ | |
48 | - __REG(CSCR_U(0)) = 0x23524E80; | |
49 | - __REG(CSCR_L(0)) = 0x10000D03; /* WRAP bit (1) is suspicious here, but | |
50 | - * disabling it doesn't help either */ | |
51 | - __REG(CSCR_A(0)) = 0x00720900; | |
52 | -#endif | |
53 | - | |
54 | - /* setup pins for UART1 */ | |
55 | - mx31_gpio_mux(MUX_RXD1__UART1_RXD_MUX); | |
56 | - mx31_gpio_mux(MUX_TXD1__UART1_TXD_MUX); | |
57 | - mx31_gpio_mux(MUX_RTS1__UART1_RTS_B); | |
58 | - mx31_gpio_mux(MUX_RTS1__UART1_CTS_B); | |
59 | - | |
60 | - /* PBC setup */ | |
61 | - /* Enable UART transceivers also reset the Ethernet/external UART */ | |
62 | - readw(CS4_BASE + 4); | |
63 | - | |
64 | - writew(0x8023, CS4_BASE + 4); | |
65 | - | |
66 | - /* RedBoot also has an empty loop with 100000 iterations here - | |
67 | - * clock doesn't run yet */ | |
68 | - for (i = 0; i < 100000; i++) | |
69 | - ; | |
70 | - | |
71 | - /* Clear the reset, toggle the LEDs */ | |
72 | - writew(0xDF, CS4_BASE + 6); | |
73 | - | |
74 | - /* clock still doesn't run */ | |
75 | - for (i = 0; i < 100000; i++) | |
76 | - ; | |
77 | - | |
78 | - /* See 1.5.4 in IMX31ADSE_PERI_BUS_CNTRL_CPLD_RM.pdf */ | |
79 | - readb(CS4_BASE + 8); | |
80 | - readb(CS4_BASE + 7); | |
81 | - readb(CS4_BASE + 8); | |
82 | - readb(CS4_BASE + 7); | |
83 | - | |
84 | - gd->bd->bi_arch_number = 447; /* board id for linux */ | |
85 | - gd->bd->bi_boot_params = 0x80000100; /* adress of boot parameters */ | |
86 | - | |
87 | - return 0; | |
88 | -} | |
89 | - | |
90 | -int checkboard(void) | |
91 | -{ | |
92 | - printf("Board: MX31ADS\n"); | |
93 | - return 0; | |
94 | -} |
board/mx31ads/u-boot.lds
1 | -/* | |
2 | - * January 2004 - Changed to support H4 device | |
3 | - * Copyright (c) 2004 Texas Instruments | |
4 | - * | |
5 | - * (C) Copyright 2002 | |
6 | - * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> | |
7 | - * | |
8 | - * See file CREDITS for list of people who contributed to this | |
9 | - * project. | |
10 | - * | |
11 | - * This program is free software; you can redistribute it and/or | |
12 | - * modify it under the terms of the GNU General Public License as | |
13 | - * published by the Free Software Foundation; either version 2 of | |
14 | - * the License, or (at your option) any later version. | |
15 | - * | |
16 | - * This program is distributed in the hope that it will be useful, | |
17 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | - * GNU General Public License for more details. | |
20 | - * | |
21 | - * You should have received a copy of the GNU General Public License | |
22 | - * along with this program; if not, write to the Free Software | |
23 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
24 | - * MA 02111-1307 USA | |
25 | - */ | |
26 | - | |
27 | -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") | |
28 | -OUTPUT_ARCH(arm) | |
29 | -ENTRY(_start) | |
30 | -SECTIONS | |
31 | -{ | |
32 | - . = 0x00000000; | |
33 | - | |
34 | - . = ALIGN(4); | |
35 | - .text : | |
36 | - { | |
37 | - cpu/arm1136/start.o (.text) | |
38 | - *(.text) | |
39 | - } | |
40 | - | |
41 | - . = ALIGN(4); | |
42 | - .rodata : { *(.rodata) } | |
43 | - | |
44 | - . = ALIGN(4); | |
45 | - .data : { *(.data) } | |
46 | - | |
47 | - . = ALIGN(4); | |
48 | - .got : { *(.got) } | |
49 | - | |
50 | - . = .; | |
51 | - __u_boot_cmd_start = .; | |
52 | - .u_boot_cmd : { *(.u_boot_cmd) } | |
53 | - __u_boot_cmd_end = .; | |
54 | - | |
55 | - . = ALIGN(4); | |
56 | - __bss_start = .; | |
57 | - .bss : { *(.bss) } | |
58 | - _end = .; | |
59 | -} |
board/prodrive/pmdra/Makefile
1 | -# | |
2 | -# (C) Copyright 2003-2006 | |
3 | -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | -# | |
5 | -# See file CREDITS for list of people who contributed to this | |
6 | -# project. | |
7 | -# | |
8 | -# This program is free software; you can redistribute it and/or | |
9 | -# modify it under the terms of the GNU General Public License as | |
10 | -# published by the Free Software Foundation; either version 2 of | |
11 | -# the License, or (at your option) any later version. | |
12 | -# | |
13 | -# This program is distributed in the hope that it will be useful, | |
14 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | -# GNU General Public License for more details. | |
17 | -# | |
18 | -# You should have received a copy of the GNU General Public License | |
19 | -# along with this program; if not, write to the Free Software | |
20 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | -# MA 02111-1307 USA | |
22 | -# | |
23 | - | |
24 | -include $(TOPDIR)/config.mk | |
25 | - | |
26 | -LIB = $(obj)lib$(BOARD).a | |
27 | - | |
28 | -COBJS := pmdra.o | |
29 | -SOBJS := board_init.o | |
30 | - | |
31 | -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | |
32 | -OBJS := $(addprefix $(obj),$(COBJS)) | |
33 | -SOBJS := $(addprefix $(obj),$(SOBJS)) | |
34 | - | |
35 | -$(LIB): $(obj).depend $(OBJS) $(SOBJS) | |
36 | - $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) | |
37 | - | |
38 | -clean: | |
39 | - rm -f $(SOBJS) $(OBJS) | |
40 | - | |
41 | -distclean: clean | |
42 | - rm -f $(LIB) core *.bak *~ .depend | |
43 | - | |
44 | -######################################################################### | |
45 | -# This is for $(obj).depend target | |
46 | -include $(SRCTREE)/rules.mk | |
47 | - | |
48 | -sinclude $(obj).depend | |
49 | - | |
50 | -######################################################################### |
board/prodrive/pmdra/board_init.S
1 | -/* | |
2 | - * Copyright (C) 2008 Prodrive B.V. | |
3 | - * | |
4 | - * Board-specific low level initialization code. Called at the very end | |
5 | - * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no | |
6 | - * initialization required. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | -#include <config.h> | |
25 | - | |
26 | -.globl dv_board_init | |
27 | -dv_board_init: | |
28 | - | |
29 | - mov pc, lr |
board/prodrive/pmdra/config.mk
1 | -# | |
2 | -# (C) Copyright 2002 | |
3 | -# Gary Jennejohn, DENX Software Engineering, <gj@denx.de> | |
4 | -# David Mueller, ELSOFT AG, <d.mueller@elsoft.ch> | |
5 | -# | |
6 | -# (C) Copyright 2003 | |
7 | -# Texas Instruments, <www.ti.com> | |
8 | -# Swaminathan <swami.iyer@ti.com> | |
9 | -# | |
10 | -# Davinci EVM board (ARM925EJS) cpu | |
11 | -# see http://www.ti.com/ for more information on Texas Instruments | |
12 | -# | |
13 | -# Davinci EVM has 1 bank of 256 MB DDR RAM | |
14 | -# Physical Address: | |
15 | -# 8000'0000 to 9000'0000 | |
16 | -# | |
17 | -# Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> | |
18 | -# | |
19 | -# Visioneering Corp. Sonata board (ARM926EJS) cpu | |
20 | -# | |
21 | -# Sonata board has 1 bank of 128 MB DDR RAM | |
22 | -# Physical Address: | |
23 | -# 8000'0000 to 8800'0000 | |
24 | -# | |
25 | -# Razorstream, LLC. SCHMOOGIE board (ARM926EJS) cpu | |
26 | -# | |
27 | -# Schmoogie board has 1 bank of 128 MB DDR RAM | |
28 | -# Physical Address: | |
29 | -# 8000'0000 to 8800'0000 | |
30 | -# | |
31 | -# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 | |
32 | -# (mem base + reserved) | |
33 | -# | |
34 | -# we load ourself to 8108 '0000 | |
35 | -# | |
36 | -# | |
37 | - | |
38 | -#Provide at least 16MB spacing between us and the Linux Kernel image | |
39 | -TEXT_BASE = 0x81080000 |
board/prodrive/pmdra/pmdra.c
1 | -/* | |
2 | - * Copyright (C) 2008 Prodrive BV <pv@prodrive.nl> | |
3 | - * | |
4 | - * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> | |
5 | - * | |
6 | - * Parts are shamelessly stolen from various TI sources, original copyright | |
7 | - * follows: | |
8 | - * --------------------------------------------------------------------------- | |
9 | - * | |
10 | - * Copyright (C) 2004 Texas Instruments. | |
11 | - * | |
12 | - * --------------------------------------------------------------------------- | |
13 | - * This program is free software; you can redistribute it and/or modify | |
14 | - * it under the terms of the GNU General Public License as published by | |
15 | - * the Free Software Foundation; either version 2 of the License, or | |
16 | - * (at your option) any later version. | |
17 | - * | |
18 | - * This program is distributed in the hope that it will be useful, | |
19 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | - * GNU General Public License for more details. | |
22 | - * | |
23 | - * You should have received a copy of the GNU General Public License | |
24 | - * along with this program; if not, write to the Free Software | |
25 | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
26 | - * --------------------------------------------------------------------------- | |
27 | - */ | |
28 | - | |
29 | -#include <common.h> | |
30 | -#include <i2c.h> | |
31 | -#include <asm/arch/hardware.h> | |
32 | -#include <asm/arch/emac_defs.h> | |
33 | - | |
34 | -#define MACH_TYPE_DAVINCI_EVM 901 | |
35 | - | |
36 | -DECLARE_GLOBAL_DATA_PTR; | |
37 | - | |
38 | -extern void timer_init(void); | |
39 | -extern int eth_hw_init(void); | |
40 | -extern phy_t phy; | |
41 | - | |
42 | -/* Works on Always On power domain only (no PD argument) */ | |
43 | -void lpsc_on(unsigned int id) | |
44 | -{ | |
45 | - dv_reg_p mdstat, mdctl; | |
46 | - | |
47 | - if (id >= DAVINCI_LPSC_GEM) | |
48 | - return; /* Don't work on DSP Power Domain */ | |
49 | - | |
50 | - mdstat = REG_P(PSC_MDSTAT_BASE + (id * 4)); | |
51 | - mdctl = REG_P(PSC_MDCTL_BASE + (id * 4)); | |
52 | - | |
53 | - while (REG(PSC_PTSTAT) & 0x01) {; } | |
54 | - | |
55 | - if ((*mdstat & 0x1f) == 0x03) | |
56 | - return; /* Already on and enabled */ | |
57 | - | |
58 | - *mdctl |= 0x03; | |
59 | - | |
60 | - /* Special treatment for some modules as for sprue14 p.7.4.2 */ | |
61 | - if ((id == DAVINCI_LPSC_VPSSSLV) || | |
62 | - (id == DAVINCI_LPSC_EMAC) || | |
63 | - (id == DAVINCI_LPSC_EMAC_WRAPPER) || | |
64 | - (id == DAVINCI_LPSC_MDIO) || | |
65 | - (id == DAVINCI_LPSC_USB) || | |
66 | - (id == DAVINCI_LPSC_ATA) || | |
67 | - (id == DAVINCI_LPSC_VLYNQ) || | |
68 | - (id == DAVINCI_LPSC_UHPI) || | |
69 | - (id == DAVINCI_LPSC_DDR_EMIF) || | |
70 | - (id == DAVINCI_LPSC_AEMIF) || | |
71 | - (id == DAVINCI_LPSC_MMC_SD) || | |
72 | - (id == DAVINCI_LPSC_MEMSTICK) || | |
73 | - (id == DAVINCI_LPSC_McBSP) || | |
74 | - (id == DAVINCI_LPSC_GPIO)) | |
75 | - *mdctl |= 0x200; | |
76 | - | |
77 | - REG(PSC_PTCMD) = 0x01; | |
78 | - | |
79 | - while (REG(PSC_PTSTAT) & 0x03) {; } | |
80 | - while ((*mdstat & 0x1f) != 0x03) {; } /* Probably an overkill... */ | |
81 | -} | |
82 | - | |
83 | -void dsp_on(void) | |
84 | -{ | |
85 | - int i; | |
86 | - | |
87 | - if (REG(PSC_PDSTAT1) & 0x1f) | |
88 | - return; /* Already on */ | |
89 | - | |
90 | - REG(PSC_GBLCTL) |= 0x01; | |
91 | - REG(PSC_PDCTL1) |= 0x01; | |
92 | - REG(PSC_PDCTL1) &= ~0x100; | |
93 | - REG(PSC_MDCTL_BASE + (DAVINCI_LPSC_GEM * 4)) |= 0x03; | |
94 | - REG(PSC_MDCTL_BASE + (DAVINCI_LPSC_GEM * 4)) &= 0xfffffeff; | |
95 | - REG(PSC_MDCTL_BASE + (DAVINCI_LPSC_IMCOP * 4)) |= 0x03; | |
96 | - REG(PSC_MDCTL_BASE + (DAVINCI_LPSC_IMCOP * 4)) &= 0xfffffeff; | |
97 | - REG(PSC_PTCMD) = 0x02; | |
98 | - | |
99 | - for (i = 0; i < 100; i++) { | |
100 | - if (REG(PSC_EPCPR) & 0x02) | |
101 | - break; | |
102 | - } | |
103 | - | |
104 | - REG(PSC_CHP_SHRTSW) = 0x01; | |
105 | - REG(PSC_PDCTL1) |= 0x100; | |
106 | - REG(PSC_EPCCR) = 0x02; | |
107 | - | |
108 | - for (i = 0; i < 100; i++) { | |
109 | - if (!(REG(PSC_PTSTAT) & 0x02)) | |
110 | - break; | |
111 | - } | |
112 | - | |
113 | - REG(PSC_GBLCTL) &= ~0x1f; | |
114 | -} | |
115 | - | |
116 | - | |
117 | -int board_init(void) | |
118 | -{ | |
119 | - /* arch number of the board */ | |
120 | - gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_EVM; | |
121 | - | |
122 | - /* address of boot parameters */ | |
123 | - gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR; | |
124 | - | |
125 | - /* Workaround for TMS320DM6446 errata 1.3.22 */ | |
126 | - REG(PSC_SILVER_BULLET) = 0; | |
127 | - | |
128 | - /* Power on required peripherals */ | |
129 | - lpsc_on(DAVINCI_LPSC_EMAC); | |
130 | - lpsc_on(DAVINCI_LPSC_EMAC_WRAPPER); | |
131 | - lpsc_on(DAVINCI_LPSC_MDIO); | |
132 | - lpsc_on(DAVINCI_LPSC_I2C); | |
133 | - lpsc_on(DAVINCI_LPSC_UART0); | |
134 | - lpsc_on(DAVINCI_LPSC_UART2); | |
135 | - lpsc_on(DAVINCI_LPSC_TIMER1); | |
136 | - lpsc_on(DAVINCI_LPSC_GPIO); | |
137 | - | |
138 | - /* Powerup the DSP */ | |
139 | - dsp_on(); | |
140 | - | |
141 | - /* Bringup UART0 and 2 out of reset */ | |
142 | - REG(UART0_PWREMU_MGMT) = 0x00006001; | |
143 | - REG(UART2_PWREMU_MGMT) = 0x00006001; | |
144 | - | |
145 | - /* Enable GIO3.3V cells used for EMAC */ | |
146 | - REG(VDD3P3V_PWDN) = 0; | |
147 | - | |
148 | - /* Enable UART0 and 2 MUX lines */ | |
149 | - REG(PINMUX1) |= 1; | |
150 | - REG(PINMUX1) |= 4; | |
151 | - | |
152 | - /* Enable EMAC and AEMIF pins */ | |
153 | - REG(PINMUX0) = 0x80000c1f; | |
154 | - | |
155 | - /* Enable I2C pin Mux */ | |
156 | - REG(PINMUX1) |= (1 << 7); | |
157 | - | |
158 | - /* Set the Bus Priority Register to appropriate value */ | |
159 | - REG(VBPR) = 0x20; | |
160 | - | |
161 | - timer_init(); | |
162 | - | |
163 | - return(0); | |
164 | -} | |
165 | - | |
166 | -int misc_init_r(void) | |
167 | -{ | |
168 | - int clk = 0; | |
169 | - | |
170 | - clk = ((REG(PLL2_PLLM) + 1) * 27) / ((REG(PLL2_DIV2) & 0x1f) + 1); | |
171 | - | |
172 | - printf("ARM Clock : %dMHz\n", ((REG(PLL1_PLLM) + 1) * 27)/2); | |
173 | - printf("DDR Clock : %dMHz\n", (clk / 2)); | |
174 | - | |
175 | - if (!eth_hw_init()) | |
176 | - printf("ethernet init failed!\n"); | |
177 | - else | |
178 | - printf("ETH PHY : %s\n", phy.name); | |
179 | - | |
180 | - return(0); | |
181 | -} | |
182 | - | |
183 | -int dram_init(void) | |
184 | -{ | |
185 | - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; | |
186 | - gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; | |
187 | - | |
188 | - return(0); | |
189 | -} |
board/prodrive/pmdra/u-boot.lds
1 | -/* | |
2 | - * (C) Copyright 2002 | |
3 | - * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") | |
25 | -OUTPUT_ARCH(arm) | |
26 | -ENTRY(_start) | |
27 | -SECTIONS | |
28 | -{ | |
29 | - . = 0x00000000; | |
30 | - . = ALIGN(4); | |
31 | - .text : | |
32 | - { | |
33 | - cpu/arm926ejs/start.o (.text) | |
34 | - *(.text) | |
35 | - } | |
36 | - . = ALIGN(4); | |
37 | - .rodata : { *(.rodata) } | |
38 | - . = ALIGN(4); | |
39 | - .data : { *(.data) } | |
40 | - . = ALIGN(4); | |
41 | - .got : { *(.got) } | |
42 | - | |
43 | - . = .; | |
44 | - __u_boot_cmd_start = .; | |
45 | - .u_boot_cmd : { *(.u_boot_cmd) } | |
46 | - __u_boot_cmd_end = .; | |
47 | - | |
48 | - . = ALIGN(4); | |
49 | - __bss_start = .; | |
50 | - .bss : { *(.bss) } | |
51 | - _end = .; | |
52 | -} |
cpu/arm1136/Makefile
cpu/arm1136/cpu.c
... | ... | @@ -33,6 +33,9 @@ |
33 | 33 | |
34 | 34 | #include <common.h> |
35 | 35 | #include <command.h> |
36 | +#if !defined(CONFIG_INTEGRATOR) && ! defined(CONFIG_ARCH_CINTEGRATOR) | |
37 | +#include <asm/arch/omap2420.h> | |
38 | +#endif | |
36 | 39 | |
37 | 40 | #ifdef CONFIG_USE_IRQ |
38 | 41 | DECLARE_GLOBAL_DATA_PTR; |
... | ... | @@ -44,10 +47,10 @@ |
44 | 47 | unsigned long value; |
45 | 48 | |
46 | 49 | __asm__ __volatile__( |
47 | - "mrc p15, 0, %0, c1, c0, 0 @ read control reg\n" | |
48 | - : "=r" (value) | |
49 | - : | |
50 | - : "memory"); | |
50 | + "mrc p15, 0, %0, c1, c0, 0 @ read control reg\n" | |
51 | + : "=r" (value) | |
52 | + : | |
53 | + : "memory"); | |
51 | 54 | return value; |
52 | 55 | } |
53 | 56 |
cpu/arm1136/interrupts.c
1 | +/* | |
2 | + * (C) Copyright 2004 | |
3 | + * Texas Instruments | |
4 | + * Richard Woodruff <r-woodruff2@ti.com> | |
5 | + * | |
6 | + * (C) Copyright 2002 | |
7 | + * Sysgo Real-Time Solutions, GmbH <www.elinos.com> | |
8 | + * Marius Groeger <mgroeger@sysgo.de> | |
9 | + * Alex Zuepke <azu@sysgo.de> | |
10 | + * | |
11 | + * (C) Copyright 2002 | |
12 | + * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> | |
13 | + * | |
14 | + * See file CREDITS for list of people who contributed to this | |
15 | + * project. | |
16 | + * | |
17 | + * This program is free software; you can redistribute it and/or | |
18 | + * modify it under the terms of the GNU General Public License as | |
19 | + * published by the Free Software Foundation; either version 2 of | |
20 | + * the License, or (at your option) any later version. | |
21 | + * | |
22 | + * This program is distributed in the hope that it will be useful, | |
23 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | + * GNU General Public License for more details. | |
26 | + * | |
27 | + * You should have received a copy of the GNU General Public License | |
28 | + * along with this program; if not, write to the Free Software | |
29 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
30 | + * MA 02111-1307 USA | |
31 | + */ | |
32 | + | |
33 | +#include <common.h> | |
34 | +#include <asm/arch/bits.h> | |
35 | + | |
36 | +#if !defined(CONFIG_INTEGRATOR) && ! defined(CONFIG_ARCH_CINTEGRATOR) | |
37 | +# include <asm/arch/omap2420.h> | |
38 | +#endif | |
39 | + | |
40 | +#define TIMER_LOAD_VAL 0 | |
41 | + | |
42 | +/* macro to read the 32 bit timer */ | |
43 | +#define READ_TIMER (*(volatile ulong *)(CFG_TIMERBASE+TCRR)) | |
44 | + | |
45 | +#if defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_CINTEGRATOR) | |
46 | +/* Use the IntegratorCP function from board/integratorcp.c */ | |
47 | +#else | |
48 | + | |
49 | +static ulong timestamp; | |
50 | +static ulong lastinc; | |
51 | + | |
52 | +/* nothing really to do with interrupts, just starts up a counter. */ | |
53 | +int interrupt_init (void) | |
54 | +{ | |
55 | + int32_t val; | |
56 | + | |
57 | + /* Start the counter ticking up */ | |
58 | + *((int32_t *) (CFG_TIMERBASE + TLDR)) = TIMER_LOAD_VAL; /* reload value on overflow*/ | |
59 | + val = (CFG_PVT << 2) | BIT5 | BIT1 | BIT0; /* mask to enable timer*/ | |
60 | + *((int32_t *) (CFG_TIMERBASE + TCLR)) = val; /* start timer */ | |
61 | + | |
62 | + reset_timer_masked(); /* init the timestamp and lastinc value */ | |
63 | + | |
64 | + return(0); | |
65 | +} | |
66 | +/* | |
67 | + * timer without interrupts | |
68 | + */ | |
69 | +void reset_timer (void) | |
70 | +{ | |
71 | + reset_timer_masked (); | |
72 | +} | |
73 | + | |
74 | +ulong get_timer (ulong base) | |
75 | +{ | |
76 | + return get_timer_masked () - base; | |
77 | +} | |
78 | + | |
79 | +void set_timer (ulong t) | |
80 | +{ | |
81 | + timestamp = t; | |
82 | +} | |
83 | + | |
84 | +/* delay x useconds AND perserve advance timstamp value */ | |
85 | +void udelay (unsigned long usec) | |
86 | +{ | |
87 | + ulong tmo, tmp; | |
88 | + | |
89 | + if (usec >= 1000) { /* if "big" number, spread normalization to seconds */ | |
90 | + tmo = usec / 1000; /* start to normalize for usec to ticks per sec */ | |
91 | + tmo *= CFG_HZ; /* find number of "ticks" to wait to achieve target */ | |
92 | + tmo /= 1000; /* finish normalize. */ | |
93 | + } else { /* else small number, don't kill it prior to HZ multiply */ | |
94 | + tmo = usec * CFG_HZ; | |
95 | + tmo /= (1000*1000); | |
96 | + } | |
97 | + | |
98 | + tmp = get_timer (0); /* get current timestamp */ | |
99 | + if ( (tmo + tmp + 1) < tmp )/* if setting this forward will roll time stamp */ | |
100 | + reset_timer_masked (); /* reset "advancing" timestamp to 0, set lastinc value */ | |
101 | + else | |
102 | + tmo += tmp; /* else, set advancing stamp wake up time */ | |
103 | + while (get_timer_masked () < tmo)/* loop till event */ | |
104 | + /*NOP*/; | |
105 | +} | |
106 | + | |
107 | +void reset_timer_masked (void) | |
108 | +{ | |
109 | + /* reset time */ | |
110 | + lastinc = READ_TIMER; /* capture current incrementer value time */ | |
111 | + timestamp = 0; /* start "advancing" time stamp from 0 */ | |
112 | +} | |
113 | + | |
114 | +ulong get_timer_masked (void) | |
115 | +{ | |
116 | + ulong now = READ_TIMER; /* current tick value */ | |
117 | + | |
118 | + if (now >= lastinc) /* normal mode (non roll) */ | |
119 | + timestamp += (now - lastinc); /* move stamp fordward with absoulte diff ticks */ | |
120 | + else /* we have rollover of incrementer */ | |
121 | + timestamp += (0xFFFFFFFF - lastinc) + now; | |
122 | + lastinc = now; | |
123 | + return timestamp; | |
124 | +} | |
125 | + | |
126 | +/* waits specified delay value and resets timestamp */ | |
127 | +void udelay_masked (unsigned long usec) | |
128 | +{ | |
129 | + ulong tmo; | |
130 | + ulong endtime; | |
131 | + signed long diff; | |
132 | + | |
133 | + if (usec >= 1000) { /* if "big" number, spread normalization to seconds */ | |
134 | + tmo = usec / 1000; /* start to normalize for usec to ticks per sec */ | |
135 | + tmo *= CFG_HZ; /* find number of "ticks" to wait to achieve target */ | |
136 | + tmo /= 1000; /* finish normalize. */ | |
137 | + } else { /* else small number, don't kill it prior to HZ multiply */ | |
138 | + tmo = usec * CFG_HZ; | |
139 | + tmo /= (1000*1000); | |
140 | + } | |
141 | + endtime = get_timer_masked () + tmo; | |
142 | + | |
143 | + do { | |
144 | + ulong now = get_timer_masked (); | |
145 | + diff = endtime - now; | |
146 | + } while (diff >= 0); | |
147 | +} | |
148 | + | |
149 | +/* | |
150 | + * This function is derived from PowerPC code (read timebase as long long). | |
151 | + * On ARM it just returns the timer value. | |
152 | + */ | |
153 | +unsigned long long get_ticks(void) | |
154 | +{ | |
155 | + return get_timer(0); | |
156 | +} | |
157 | +/* | |
158 | + * This function is derived from PowerPC code (timebase clock frequency). | |
159 | + * On ARM it returns the number of timer ticks per second. | |
160 | + */ | |
161 | +ulong get_tbclk (void) | |
162 | +{ | |
163 | + ulong tbclk; | |
164 | + tbclk = CFG_HZ; | |
165 | + return tbclk; | |
166 | +} | |
167 | +#endif /* !Integrator/CP */ |
cpu/arm1136/mx31/Makefile
1 | -# | |
2 | -# (C) Copyright 2000-2008 | |
3 | -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | -# | |
5 | -# See file CREDITS for list of people who contributed to this | |
6 | -# project. | |
7 | -# | |
8 | -# This program is free software; you can redistribute it and/or | |
9 | -# modify it under the terms of the GNU General Public License as | |
10 | -# published by the Free Software Foundatio; either version 2 of | |
11 | -# the License, or (at your option) any later version. | |
12 | -# | |
13 | -# This program is distributed in the hope that it will be useful, | |
14 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | -# GNU General Public License for more details. | |
17 | -# | |
18 | -# You should have received a copy of the GNU General Public License | |
19 | -# along with this program; if not, write to the Free Software | |
20 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | -# MA 02111-1307 USA | |
22 | -# | |
23 | - | |
24 | -include $(TOPDIR)/config.mk | |
25 | - | |
26 | -LIB = $(obj)lib$(SOC).a | |
27 | - | |
28 | -COBJS = interrupts.o serial.o generic.o | |
29 | - | |
30 | -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | |
31 | -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) | |
32 | - | |
33 | -all: $(obj).depend $(LIB) | |
34 | - | |
35 | -$(LIB): $(OBJS) | |
36 | - $(AR) $(ARFLAGS) $@ $(OBJS) | |
37 | - | |
38 | -####################################################################### | |
39 | -## | |
40 | - | |
41 | -# defines $(obj).depend target | |
42 | -include $(SRCTREE)/rules.mk | |
43 | - | |
44 | -sinclude $(obj).depend |
cpu/arm1136/mx31/generic.c
1 | -/* | |
2 | - * (C) Copyright 2007 | |
3 | - * Sascha Hauer, Pengutronix | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | -#include <common.h> | |
25 | -#include <asm/arch/mx31-regs.h> | |
26 | - | |
27 | -static u32 mx31_decode_pll(u32 reg, u32 infreq) | |
28 | -{ | |
29 | - u32 mfi = (reg >> 10) & 0xf; | |
30 | - u32 mfn = reg & 0x3f; | |
31 | - u32 mfd = (reg >> 16) & 0x3f; | |
32 | - u32 pd = (reg >> 26) & 0xf; | |
33 | - | |
34 | - mfi = mfi <= 5 ? 5 : mfi; | |
35 | - mfd += 1; | |
36 | - pd += 1; | |
37 | - | |
38 | - return ((2 * (infreq >> 10) * (mfi * mfd + mfn)) / | |
39 | - (mfd * pd)) << 10; | |
40 | -} | |
41 | - | |
42 | -u32 mx31_get_mpl_dpdgck_clk(void) | |
43 | -{ | |
44 | - u32 infreq; | |
45 | - | |
46 | - if ((__REG(CCM_CCMR) & CCMR_PRCS_MASK) == CCMR_FPM) | |
47 | - infreq = CONFIG_MX31_CLK32 * 1024; | |
48 | - else | |
49 | - infreq = CONFIG_MX31_HCLK_FREQ; | |
50 | - | |
51 | - return mx31_decode_pll(__REG(CCM_MPCTL), infreq); } | |
52 | - | |
53 | -u32 mx31_get_mcu_main_clk(void) | |
54 | -{ | |
55 | - /* For now we assume mpl_dpdgck_clk == mcu_main_clk | |
56 | - * which should be correct for most boards | |
57 | - */ | |
58 | - return mx31_get_mpl_dpdgck_clk(); | |
59 | -} | |
60 | - | |
61 | -u32 mx31_get_ipg_clk(void) | |
62 | -{ | |
63 | - u32 freq = mx31_get_mcu_main_clk(); | |
64 | - u32 pdr0 = __REG(CCM_PDR0); | |
65 | - | |
66 | - freq /= ((pdr0 >> 3) & 0x7) + 1; | |
67 | - freq /= ((pdr0 >> 6) & 0x3) + 1; | |
68 | - | |
69 | - return freq; | |
70 | -} | |
71 | - | |
72 | -void mx31_dump_clocks(void) | |
73 | -{ | |
74 | - u32 cpufreq = mx31_get_mcu_main_clk(); | |
75 | - printf("mx31 cpu clock: %dMHz\n", cpufreq / 1000000); | |
76 | - printf("ipg clock : %dHz\n", mx31_get_ipg_clk()); | |
77 | -} | |
78 | - | |
79 | -void mx31_gpio_mux(unsigned long mode) | |
80 | -{ | |
81 | - unsigned long reg, shift, tmp; | |
82 | - | |
83 | - reg = IOMUXC_BASE + (mode & 0xfc); | |
84 | - shift = (~mode & 0x3) * 8; | |
85 | - | |
86 | - tmp = __REG(reg); | |
87 | - tmp &= ~(0xff << shift); | |
88 | - tmp |= ((mode >> 8) & 0xff) << shift; | |
89 | - __REG(reg) = tmp; | |
90 | -} | |
91 | - | |
92 | -#if defined(CONFIG_DISPLAY_CPUINFO) | |
93 | -int print_cpuinfo(void) | |
94 | -{ | |
95 | - printf("CPU: Freescale i.MX31 at %d MHz\n", | |
96 | - mx31_get_mcu_main_clk() / 1000000); | |
97 | - return 0; | |
98 | -} | |
99 | -#endif |
cpu/arm1136/mx31/interrupts.c
1 | -/* | |
2 | - * (C) Copyright 2007 | |
3 | - * Sascha Hauer, Pengutronix | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | -#include <common.h> | |
25 | -#include <asm/arch/mx31-regs.h> | |
26 | - | |
27 | -#define TIMER_BASE 0x53f90000 /* General purpose timer 1 */ | |
28 | - | |
29 | -/* General purpose timers registers */ | |
30 | -#define GPTCR __REG(TIMER_BASE) /* Control register */ | |
31 | -#define GPTPR __REG(TIMER_BASE + 0x4) /* Prescaler register */ | |
32 | -#define GPTSR __REG(TIMER_BASE + 0x8) /* Status register */ | |
33 | -#define GPTCNT __REG(TIMER_BASE + 0x24) /* Counter register */ | |
34 | - | |
35 | -/* General purpose timers bitfields */ | |
36 | -#define GPTCR_SWR (1<<15) /* Software reset */ | |
37 | -#define GPTCR_FRR (1<<9) /* Freerun / restart */ | |
38 | -#define GPTCR_CLKSOURCE_32 (4<<6) /* Clock source */ | |
39 | -#define GPTCR_TEN (1) /* Timer enable */ | |
40 | - | |
41 | -/* | |
42 | - * nothing really to do with interrupts, just starts up a counter. | |
43 | - */ | |
44 | -int interrupt_init(void) | |
45 | -{ | |
46 | - int i; | |
47 | - | |
48 | - /* setup GP Timer 1 */ | |
49 | - GPTCR = GPTCR_SWR; | |
50 | - for (i = 0; i < 100; i++) GPTCR = 0; /* We have no udelay by now */ | |
51 | - GPTPR = 0; /* 32Khz */ | |
52 | - /* Freerun Mode, PERCLK1 input */ | |
53 | - GPTCR |= GPTCR_CLKSOURCE_32 | GPTCR_TEN; | |
54 | - | |
55 | - return 0; | |
56 | -} | |
57 | - | |
58 | -void reset_timer_masked(void) | |
59 | -{ | |
60 | - GPTCR = 0; | |
61 | - /* Freerun Mode, PERCLK1 input*/ | |
62 | - GPTCR = GPTCR_CLKSOURCE_32 | GPTCR_TEN; | |
63 | -} | |
64 | - | |
65 | -ulong get_timer_masked(void) | |
66 | -{ | |
67 | - ulong val = GPTCNT; | |
68 | - return val; | |
69 | -} | |
70 | - | |
71 | -ulong get_timer(ulong base) | |
72 | -{ | |
73 | - return get_timer_masked() - base; | |
74 | -} | |
75 | - | |
76 | -void set_timer(ulong t) | |
77 | -{ | |
78 | -} | |
79 | - | |
80 | -/* delay x useconds AND perserve advance timstamp value */ | |
81 | -void udelay(unsigned long usec) | |
82 | -{ | |
83 | - ulong tmo, tmp; | |
84 | - | |
85 | - if (usec >= 1000) { | |
86 | - /* "big" number, spread normalization to seconds */ | |
87 | - /* start to normalize for usec to ticks per sec */ | |
88 | - tmo = usec / 1000; | |
89 | - /* find number of "ticks" to wait to achieve target */ | |
90 | - tmo *= CFG_HZ; | |
91 | - tmo /= 1000; /* finish normalize. */ | |
92 | - } else { | |
93 | - /* else small number, don't kill it prior to HZ multiply */ | |
94 | - tmo = usec * CFG_HZ; | |
95 | - tmo /= (1000*1000); | |
96 | - } | |
97 | - | |
98 | - tmp = get_timer(0); /* get current timestamp */ | |
99 | - if ((tmo + tmp + 1) < tmp) | |
100 | - /* setting this forward will roll time stamp */ | |
101 | - /* reset "advancing" timestamp to 0, set lastinc value */ | |
102 | - reset_timer_masked(); | |
103 | - else | |
104 | - /* else, set advancing stamp wake up time */ | |
105 | - tmo += tmp; | |
106 | - while (get_timer_masked() < tmo)/* loop till event */ | |
107 | - /*NOP*/; | |
108 | -} | |
109 | - | |
110 | -void reset_cpu(ulong addr) | |
111 | -{ | |
112 | - __REG16(WDOG_BASE) = 4; | |
113 | -} |
cpu/arm1136/mx31/serial.c
1 | -/* | |
2 | - * (c) 2007 Sascha Hauer <s.hauer@pengutronix.de> | |
3 | - * | |
4 | - * This program is free software; you can redistribute it and/or modify | |
5 | - * it under the terms of the GNU General Public License as published by | |
6 | - * the Free Software Foundation; either version 2 of the License, or | |
7 | - * (at your option) any later version. | |
8 | - * | |
9 | - * This program is distributed in the hope that it will be useful, | |
10 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | - * GNU General Public License for more details. | |
13 | - * | |
14 | - * You should have received a copy of the GNU General Public License | |
15 | - * along with this program; if not, write to the Free Software | |
16 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
17 | - * | |
18 | - */ | |
19 | - | |
20 | -#include <common.h> | |
21 | - | |
22 | -#if defined CONFIG_MX31_UART | |
23 | - | |
24 | -#include <asm/arch/mx31.h> | |
25 | - | |
26 | -#define __REG(x) (*((volatile u32 *)(x))) | |
27 | - | |
28 | -#ifdef CFG_MX31_UART1 | |
29 | -#define UART_PHYS 0x43f90000 | |
30 | -#elif defined(CFG_MX31_UART2) | |
31 | -#define UART_PHYS 0x43f94000 | |
32 | -#elif defined(CFG_MX31_UART3) | |
33 | -#define UART_PHYS 0x5000c000 | |
34 | -#elif defined(CFG_MX31_UART4) | |
35 | -#define UART_PHYS 0x43fb0000 | |
36 | -#elif defined(CFG_MX31_UART5) | |
37 | -#define UART_PHYS 0x43fb4000 | |
38 | -#else | |
39 | -#error "define CFG_MX31_UARTx to use the mx31 UART driver" | |
40 | -#endif | |
41 | - | |
42 | -/* Register definitions */ | |
43 | -#define URXD 0x0 /* Receiver Register */ | |
44 | -#define UTXD 0x40 /* Transmitter Register */ | |
45 | -#define UCR1 0x80 /* Control Register 1 */ | |
46 | -#define UCR2 0x84 /* Control Register 2 */ | |
47 | -#define UCR3 0x88 /* Control Register 3 */ | |
48 | -#define UCR4 0x8c /* Control Register 4 */ | |
49 | -#define UFCR 0x90 /* FIFO Control Register */ | |
50 | -#define USR1 0x94 /* Status Register 1 */ | |
51 | -#define USR2 0x98 /* Status Register 2 */ | |
52 | -#define UESC 0x9c /* Escape Character Register */ | |
53 | -#define UTIM 0xa0 /* Escape Timer Register */ | |
54 | -#define UBIR 0xa4 /* BRM Incremental Register */ | |
55 | -#define UBMR 0xa8 /* BRM Modulator Register */ | |
56 | -#define UBRC 0xac /* Baud Rate Count Register */ | |
57 | -#define UTS 0xb4 /* UART Test Register (mx31) */ | |
58 | - | |
59 | -/* UART Control Register Bit Fields.*/ | |
60 | -#define URXD_CHARRDY (1<<15) | |
61 | -#define URXD_ERR (1<<14) | |
62 | -#define URXD_OVRRUN (1<<13) | |
63 | -#define URXD_FRMERR (1<<12) | |
64 | -#define URXD_BRK (1<<11) | |
65 | -#define URXD_PRERR (1<<10) | |
66 | -#define UCR1_ADEN (1<<15) /* Auto dectect interrupt */ | |
67 | -#define UCR1_ADBR (1<<14) /* Auto detect baud rate */ | |
68 | -#define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */ | |
69 | -#define UCR1_IDEN (1<<12) /* Idle condition interrupt */ | |
70 | -#define UCR1_RRDYEN (1<<9) /* Recv ready interrupt enable */ | |
71 | -#define UCR1_RDMAEN (1<<8) /* Recv ready DMA enable */ | |
72 | -#define UCR1_IREN (1<<7) /* Infrared interface enable */ | |
73 | -#define UCR1_TXMPTYEN (1<<6) /* Transimitter empty interrupt enable */ | |
74 | -#define UCR1_RTSDEN (1<<5) /* RTS delta interrupt enable */ | |
75 | -#define UCR1_SNDBRK (1<<4) /* Send break */ | |
76 | -#define UCR1_TDMAEN (1<<3) /* Transmitter ready DMA enable */ | |
77 | -#define UCR1_UARTCLKEN (1<<2) /* UART clock enabled */ | |
78 | -#define UCR1_DOZE (1<<1) /* Doze */ | |
79 | -#define UCR1_UARTEN (1<<0) /* UART enabled */ | |
80 | -#define UCR2_ESCI (1<<15) /* Escape seq interrupt enable */ | |
81 | -#define UCR2_IRTS (1<<14) /* Ignore RTS pin */ | |
82 | -#define UCR2_CTSC (1<<13) /* CTS pin control */ | |
83 | -#define UCR2_CTS (1<<12) /* Clear to send */ | |
84 | -#define UCR2_ESCEN (1<<11) /* Escape enable */ | |
85 | -#define UCR2_PREN (1<<8) /* Parity enable */ | |
86 | -#define UCR2_PROE (1<<7) /* Parity odd/even */ | |
87 | -#define UCR2_STPB (1<<6) /* Stop */ | |
88 | -#define UCR2_WS (1<<5) /* Word size */ | |
89 | -#define UCR2_RTSEN (1<<4) /* Request to send interrupt enable */ | |
90 | -#define UCR2_TXEN (1<<2) /* Transmitter enabled */ | |
91 | -#define UCR2_RXEN (1<<1) /* Receiver enabled */ | |
92 | -#define UCR2_SRST (1<<0) /* SW reset */ | |
93 | -#define UCR3_DTREN (1<<13) /* DTR interrupt enable */ | |
94 | -#define UCR3_PARERREN (1<<12) /* Parity enable */ | |
95 | -#define UCR3_FRAERREN (1<<11) /* Frame error interrupt enable */ | |
96 | -#define UCR3_DSR (1<<10) /* Data set ready */ | |
97 | -#define UCR3_DCD (1<<9) /* Data carrier detect */ | |
98 | -#define UCR3_RI (1<<8) /* Ring indicator */ | |
99 | -#define UCR3_TIMEOUTEN (1<<7) /* Timeout interrupt enable */ | |
100 | -#define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */ | |
101 | -#define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */ | |
102 | -#define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */ | |
103 | -#define UCR3_REF25 (1<<3) /* Ref freq 25 MHz */ | |
104 | -#define UCR3_REF30 (1<<2) /* Ref Freq 30 MHz */ | |
105 | -#define UCR3_INVT (1<<1) /* Inverted Infrared transmission */ | |
106 | -#define UCR3_BPEN (1<<0) /* Preset registers enable */ | |
107 | -#define UCR4_CTSTL_32 (32<<10) /* CTS trigger level (32 chars) */ | |
108 | -#define UCR4_INVR (1<<9) /* Inverted infrared reception */ | |
109 | -#define UCR4_ENIRI (1<<8) /* Serial infrared interrupt enable */ | |
110 | -#define UCR4_WKEN (1<<7) /* Wake interrupt enable */ | |
111 | -#define UCR4_REF16 (1<<6) /* Ref freq 16 MHz */ | |
112 | -#define UCR4_IRSC (1<<5) /* IR special case */ | |
113 | -#define UCR4_TCEN (1<<3) /* Transmit complete interrupt enable */ | |
114 | -#define UCR4_BKEN (1<<2) /* Break condition interrupt enable */ | |
115 | -#define UCR4_OREN (1<<1) /* Receiver overrun interrupt enable */ | |
116 | -#define UCR4_DREN (1<<0) /* Recv data ready interrupt enable */ | |
117 | -#define UFCR_RXTL_SHF 0 /* Receiver trigger level shift */ | |
118 | -#define UFCR_RFDIV (7<<7) /* Reference freq divider mask */ | |
119 | -#define UFCR_TXTL_SHF 10 /* Transmitter trigger level shift */ | |
120 | -#define USR1_PARITYERR (1<<15) /* Parity error interrupt flag */ | |
121 | -#define USR1_RTSS (1<<14) /* RTS pin status */ | |
122 | -#define USR1_TRDY (1<<13) /* Transmitter ready interrupt/dma flag */ | |
123 | -#define USR1_RTSD (1<<12) /* RTS delta */ | |
124 | -#define USR1_ESCF (1<<11) /* Escape seq interrupt flag */ | |
125 | -#define USR1_FRAMERR (1<<10) /* Frame error interrupt flag */ | |
126 | -#define USR1_RRDY (1<<9) /* Receiver ready interrupt/dma flag */ | |
127 | -#define USR1_TIMEOUT (1<<7) /* Receive timeout interrupt status */ | |
128 | -#define USR1_RXDS (1<<6) /* Receiver idle interrupt flag */ | |
129 | -#define USR1_AIRINT (1<<5) /* Async IR wake interrupt flag */ | |
130 | -#define USR1_AWAKE (1<<4) /* Aysnc wake interrupt flag */ | |
131 | -#define USR2_ADET (1<<15) /* Auto baud rate detect complete */ | |
132 | -#define USR2_TXFE (1<<14) /* Transmit buffer FIFO empty */ | |
133 | -#define USR2_DTRF (1<<13) /* DTR edge interrupt flag */ | |
134 | -#define USR2_IDLE (1<<12) /* Idle condition */ | |
135 | -#define USR2_IRINT (1<<8) /* Serial infrared interrupt flag */ | |
136 | -#define USR2_WAKE (1<<7) /* Wake */ | |
137 | -#define USR2_RTSF (1<<4) /* RTS edge interrupt flag */ | |
138 | -#define USR2_TXDC (1<<3) /* Transmitter complete */ | |
139 | -#define USR2_BRCD (1<<2) /* Break condition */ | |
140 | -#define USR2_ORE (1<<1) /* Overrun error */ | |
141 | -#define USR2_RDR (1<<0) /* Recv data ready */ | |
142 | -#define UTS_FRCPERR (1<<13) /* Force parity error */ | |
143 | -#define UTS_LOOP (1<<12) /* Loop tx and rx */ | |
144 | -#define UTS_TXEMPTY (1<<6) /* TxFIFO empty */ | |
145 | -#define UTS_RXEMPTY (1<<5) /* RxFIFO empty */ | |
146 | -#define UTS_TXFULL (1<<4) /* TxFIFO full */ | |
147 | -#define UTS_RXFULL (1<<3) /* RxFIFO full */ | |
148 | -#define UTS_SOFTRST (1<<0) /* Software reset */ | |
149 | - | |
150 | -DECLARE_GLOBAL_DATA_PTR; | |
151 | - | |
152 | -void serial_setbrg(void) | |
153 | -{ | |
154 | - u32 clk = mx31_get_ipg_clk(); | |
155 | - | |
156 | - if (!gd->baudrate) | |
157 | - gd->baudrate = CONFIG_BAUDRATE; | |
158 | - | |
159 | - __REG(UART_PHYS + UFCR) = 4 << 7; /* divide input clock by 2 */ | |
160 | - __REG(UART_PHYS + UBIR) = 0xf; | |
161 | - __REG(UART_PHYS + UBMR) = clk / (2 * gd->baudrate); | |
162 | - | |
163 | -} | |
164 | - | |
165 | -int serial_getc(void) | |
166 | -{ | |
167 | - while (__REG(UART_PHYS + UTS) & UTS_RXEMPTY); | |
168 | - return __REG(UART_PHYS + URXD); | |
169 | -} | |
170 | - | |
171 | -void serial_putc(const char c) | |
172 | -{ | |
173 | - __REG(UART_PHYS + UTXD) = c; | |
174 | - | |
175 | - /* wait for transmitter to be ready */ | |
176 | - while (!(__REG(UART_PHYS + UTS) & UTS_TXEMPTY)); | |
177 | - | |
178 | - /* If \n, also do \r */ | |
179 | - if (c == '\n') | |
180 | - serial_putc('\r'); | |
181 | -} | |
182 | - | |
183 | -/* | |
184 | - * Test whether a character is in the RX buffer */ | |
185 | -int serial_tstc(void) | |
186 | -{ | |
187 | - /* If receive fifo is empty, return false */ | |
188 | - if (__REG(UART_PHYS + UTS) & UTS_RXEMPTY) | |
189 | - return 0; | |
190 | - return 1; | |
191 | -} | |
192 | - | |
193 | -void serial_puts(const char *s) | |
194 | -{ | |
195 | - while (*s) { | |
196 | - serial_putc(*s++); | |
197 | - } | |
198 | -} | |
199 | - | |
200 | -/* | |
201 | - * Initialise the serial port with the given baudrate. The settings | |
202 | - * are always 8 data bits, no parity, 1 stop bit, no start bits. | |
203 | - * | |
204 | - */ | |
205 | -int serial_init(void) | |
206 | -{ | |
207 | - __REG(UART_PHYS + UCR1) = 0x0; | |
208 | - __REG(UART_PHYS + UCR2) = 0x0; | |
209 | - | |
210 | - while (!(__REG(UART_PHYS + UCR2) & UCR2_SRST)); | |
211 | - | |
212 | - __REG(UART_PHYS + UCR3) = 0x0704; | |
213 | - __REG(UART_PHYS + UCR4) = 0x8000; | |
214 | - __REG(UART_PHYS + UESC) = 0x002b; | |
215 | - __REG(UART_PHYS + UTIM) = 0x0; | |
216 | - | |
217 | - __REG(UART_PHYS + UTS) = 0x0; | |
218 | - | |
219 | - serial_setbrg(); | |
220 | - | |
221 | - __REG(UART_PHYS + UCR2) = UCR2_WS | UCR2_IRTS | UCR2_RXEN | \ | |
222 | - UCR2_TXEN | UCR2_SRST; | |
223 | - | |
224 | - __REG(UART_PHYS + UCR1) = UCR1_UARTEN; | |
225 | - | |
226 | - return 0; | |
227 | -} | |
228 | - | |
229 | - | |
230 | -#endif /* CONFIG_MX31 */ |
cpu/arm1136/omap24xx/Makefile
1 | -# | |
2 | -# (C) Copyright 2000-2008 | |
3 | -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | -# | |
5 | -# See file CREDITS for list of people who contributed to this | |
6 | -# project. | |
7 | -# | |
8 | -# This program is free software; you can redistribute it and/or | |
9 | -# modify it under the terms of the GNU General Public License as | |
10 | -# published by the Free Software Foundatio; either version 2 of | |
11 | -# the License, or (at your option) any later version. | |
12 | -# | |
13 | -# This program is distributed in the hope that it will be useful, | |
14 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | -# GNU General Public License for more details. | |
17 | -# | |
18 | -# You should have received a copy of the GNU General Public License | |
19 | -# along with this program; if not, write to the Free Software | |
20 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | -# MA 02111-1307 USA | |
22 | -# | |
23 | - | |
24 | -include $(TOPDIR)/config.mk | |
25 | - | |
26 | -LIB = $(obj)lib$(SOC).a | |
27 | - | |
28 | -COBJS = interrupts.o | |
29 | -SOBJS = start.o | |
30 | - | |
31 | -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | |
32 | -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) | |
33 | - | |
34 | -all: $(obj).depend $(LIB) | |
35 | - | |
36 | -$(LIB): $(OBJS) | |
37 | - $(AR) $(ARFLAGS) $@ $(OBJS) | |
38 | - | |
39 | -######################################################################### | |
40 | - | |
41 | -# defines $(obj).depend target | |
42 | -include $(SRCTREE)/rules.mk | |
43 | - | |
44 | -sinclude $(obj).depend | |
45 | - | |
46 | -######################################################################### |
cpu/arm1136/omap24xx/interrupts.c
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments | |
4 | - * Richard Woodruff <r-woodruff2@ti.com> | |
5 | - * | |
6 | - * (C) Copyright 2002 | |
7 | - * Sysgo Real-Time Solutions, GmbH <www.elinos.com> | |
8 | - * Marius Groeger <mgroeger@sysgo.de> | |
9 | - * Alex Zuepke <azu@sysgo.de> | |
10 | - * | |
11 | - * (C) Copyright 2002 | |
12 | - * Gary Jennejohn, DENX Software Engineering, <gj@denx.de> | |
13 | - * | |
14 | - * See file CREDITS for list of people who contributed to this | |
15 | - * project. | |
16 | - * | |
17 | - * This program is free software; you can redistribute it and/or | |
18 | - * modify it under the terms of the GNU General Public License as | |
19 | - * published by the Free Software Foundation; either version 2 of | |
20 | - * the License, or (at your option) any later version. | |
21 | - * | |
22 | - * This program is distributed in the hope that it will be useful, | |
23 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | - * GNU General Public License for more details. | |
26 | - * | |
27 | - * You should have received a copy of the GNU General Public License | |
28 | - * along with this program; if not, write to the Free Software | |
29 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
30 | - * MA 02111-1307 USA | |
31 | - */ | |
32 | - | |
33 | -#include <common.h> | |
34 | -#include <asm/arch/bits.h> | |
35 | -#include <asm/arch/omap2420.h> | |
36 | - | |
37 | -#define TIMER_LOAD_VAL 0 | |
38 | - | |
39 | -/* macro to read the 32 bit timer */ | |
40 | -#define READ_TIMER (*((volatile ulong*)(CFG_TIMERBASE+TCRR))) | |
41 | - | |
42 | -static ulong timestamp; | |
43 | -static ulong lastinc; | |
44 | - | |
45 | -/* | |
46 | - * nothing really to do with interrupts, just starts up a counter. | |
47 | - */ | |
48 | -int interrupt_init(void) | |
49 | -{ | |
50 | - int32_t val; | |
51 | - | |
52 | - /* Start the counter ticking up */ | |
53 | - /* reload value on overflow*/ | |
54 | - *((int32_t *) (CFG_TIMERBASE + TLDR)) = TIMER_LOAD_VAL; | |
55 | - /* mask to enable timer*/ | |
56 | - val = (CFG_PVT << 2) | BIT5 | BIT1 | BIT0; | |
57 | - *((int32_t *) (CFG_TIMERBASE + TCLR)) = val; /* start timer */ | |
58 | - | |
59 | - reset_timer_masked(); /* init the timestamp and lastinc value */ | |
60 | - | |
61 | - return(0); | |
62 | -} | |
63 | -/* | |
64 | - * timer without interrupts | |
65 | - */ | |
66 | -void reset_timer(void) | |
67 | -{ | |
68 | - reset_timer_masked(); | |
69 | -} | |
70 | - | |
71 | -ulong get_timer(ulong base) | |
72 | -{ | |
73 | - return get_timer_masked() - base; | |
74 | -} | |
75 | - | |
76 | -void set_timer(ulong t) | |
77 | -{ | |
78 | - timestamp = t; | |
79 | -} | |
80 | - | |
81 | -/* delay x useconds AND perserve advance timstamp value */ | |
82 | -void udelay(unsigned long usec) | |
83 | -{ | |
84 | - ulong tmo, tmp; | |
85 | - | |
86 | - /* if "big" number, spread normalization to seconds */ | |
87 | - if (usec >= 1000) { | |
88 | - /* start to normalize for usec to ticks per sec */ | |
89 | - tmo = usec / 1000; | |
90 | - /* find number of "ticks" to wait to achieve target */ | |
91 | - tmo *= CFG_HZ; | |
92 | - /* finish normalize. */ | |
93 | - tmo /= 1000; | |
94 | - } else { | |
95 | - /* else small number, don't kill it prior to HZ multiply */ | |
96 | - tmo = usec * CFG_HZ; | |
97 | - tmo /= (1000*1000); | |
98 | - } | |
99 | - /* get current timestamp */ | |
100 | - tmp = get_timer(0); | |
101 | - if ((tmo + tmp + 1) < tmp) | |
102 | - /* setting this forward will roll time stamp */ | |
103 | - /* reset "advancing" timestamp to 0, set lastinc value */ | |
104 | - reset_timer_masked(); | |
105 | - else | |
106 | - /* else, set advancing stamp wake up time */ | |
107 | - tmo += tmp; | |
108 | - while (get_timer_masked() < tmo)/* loop till event */ | |
109 | - /*NOP*/; | |
110 | -} | |
111 | - | |
112 | -void reset_timer_masked(void) | |
113 | -{ | |
114 | - /* reset time */ | |
115 | - /* capture current incrementer value time */ | |
116 | - lastinc = READ_TIMER; | |
117 | - /* start "advancing" time stamp from 0 */ | |
118 | - timestamp = 0; | |
119 | -} | |
120 | - | |
121 | -ulong get_timer_masked(void) | |
122 | -{ | |
123 | - ulong now = READ_TIMER; /* current tick value */ | |
124 | - | |
125 | - /* normal mode (non roll) */ | |
126 | - if (now >= lastinc) | |
127 | - /* move stamp forward with absolute diff ticks */ | |
128 | - timestamp += (now - lastinc); | |
129 | - else | |
130 | - /* we have rollover of incrementer */ | |
131 | - timestamp += (0xFFFFFFFF - lastinc) + now; | |
132 | - lastinc = now; | |
133 | - return timestamp; | |
134 | -} | |
135 | - | |
136 | -/* waits specified delay value and resets timestamp */ | |
137 | -void udelay_masked(unsigned long usec) | |
138 | -{ | |
139 | - ulong tmo; | |
140 | - ulong endtime; | |
141 | - signed long diff; | |
142 | - | |
143 | - if (usec >= 1000) { | |
144 | - /* "big" number, spread normalization to seconds */ | |
145 | - /* start to normalize for usec to ticks per sec */ | |
146 | - tmo = usec / 1000; | |
147 | - /* find number of "ticks" to wait to achieve target */ | |
148 | - tmo *= CFG_HZ; | |
149 | - tmo /= 1000;/* finish normalize. */ | |
150 | - } else { | |
151 | - /* else small number, don't kill it prior to HZ multiply */ | |
152 | - tmo = usec * CFG_HZ; | |
153 | - tmo /= (1000*1000); | |
154 | - } | |
155 | - endtime = get_timer_masked() + tmo; | |
156 | - | |
157 | - do { | |
158 | - ulong now = get_timer_masked(); | |
159 | - diff = endtime - now; | |
160 | - } while (diff >= 0); | |
161 | -} | |
162 | - | |
163 | -/* | |
164 | - * This function is derived from PowerPC code (read timebase as long long). | |
165 | - * On ARM it just returns the timer value. | |
166 | - */ | |
167 | -unsigned long long get_ticks(void) | |
168 | -{ | |
169 | - return get_timer(0); | |
170 | -} | |
171 | -/* | |
172 | - * This function is derived from PowerPC code (timebase clock frequency). | |
173 | - * On ARM it returns the number of timer ticks per second. | |
174 | - */ | |
175 | -ulong get_tbclk(void) | |
176 | -{ | |
177 | - ulong tbclk; | |
178 | - tbclk = CFG_HZ; | |
179 | - return tbclk; | |
180 | -} |
cpu/arm1136/omap24xx/start.S
1 | -/* | |
2 | - * armboot - Startup Code for OMP2420/ARM1136 CPU-core | |
3 | - * | |
4 | - * Copyright (c) 2004 Texas Instruments <r-woodruff2@ti.com> | |
5 | - * | |
6 | - * Copyright (c) 2001 Marius Gr??ger <mag@sysgo.de> | |
7 | - * Copyright (c) 2002 Alex Z??pke <azu@sysgo.de> | |
8 | - * Copyright (c) 2002 Gary Jennejohn <gj@denx.de> | |
9 | - * Copyright (c) 2003 Richard Woodruff <r-woodruff2@ti.com> | |
10 | - * Copyright (c) 2003 Kshitij <kshitij@ti.com> | |
11 | - * | |
12 | - * See file CREDITS for list of people who contributed to this | |
13 | - * project. | |
14 | - * | |
15 | - * This program is free software; you can redistribute it and/or | |
16 | - * modify it under the terms of the GNU General Public License as | |
17 | - * published by the Free Software Foundation; either version 2 of | |
18 | - * the License, or (at your option) any later version. | |
19 | - * | |
20 | - * This program is distributed in the hope that it will be useful, | |
21 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 | - * GNU General Public License for more details. | |
24 | - * | |
25 | - * You should have received a copy of the GNU General Public License | |
26 | - * along with this program; if not, write to the Free Software | |
27 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
28 | - * MA 02111-1307 USA | |
29 | - */ | |
30 | - | |
31 | -#include <asm/arch/omap2420.h> | |
32 | - | |
33 | -.globl reset_cpu | |
34 | -reset_cpu: | |
35 | - ldr r1, rstctl /* get addr for global reset reg */ | |
36 | - mov r3, #0x2 /* full reset pll+mpu */ | |
37 | - str r3, [r1] /* force reset */ | |
38 | - mov r0, r0 | |
39 | -_loop_forever: | |
40 | - b _loop_forever | |
41 | -rstctl: | |
42 | - .word PM_RSTCTRL_WKUP |
cpu/arm1136/start.S
... | ... | @@ -30,6 +30,9 @@ |
30 | 30 | |
31 | 31 | #include <config.h> |
32 | 32 | #include <version.h> |
33 | +#if !defined(CONFIG_INTEGRATOR) && ! defined(CONFIG_ARCH_CINTEGRATOR) | |
34 | +#include <asm/arch/omap2420.h> | |
35 | +#endif | |
33 | 36 | .globl _start |
34 | 37 | _start: b reset |
35 | 38 | #ifdef CONFIG_ONENAND_IPL |
... | ... | @@ -435,5 +438,23 @@ |
435 | 438 | arm1136_cache_flush: |
436 | 439 | mcr p15, 0, r1, c7, c5, 0 @ invalidate I cache |
437 | 440 | mov pc, lr @ back to caller |
441 | + | |
442 | +#if defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_CINTEGRATOR) | |
443 | +/* Use the IntegratorCP function from board/integratorcp/platform.S */ | |
444 | +#else | |
445 | + | |
446 | + .align 5 | |
447 | +.globl reset_cpu | |
448 | +reset_cpu: | |
449 | + ldr r1, rstctl /* get addr for global reset reg */ | |
450 | + mov r3, #0x2 /* full reset pll+mpu */ | |
451 | + str r3, [r1] /* force reset */ | |
452 | + mov r0, r0 | |
453 | +_loop_forever: | |
454 | + b _loop_forever | |
455 | +rstctl: | |
456 | + .word PM_RSTCTRL_WKUP | |
457 | + | |
458 | +#endif | |
438 | 459 | #endif /* CONFIG_ONENAND_IPL */ |
cpu/arm926ejs/davinci/lowlevel_init.S
... | ... | @@ -3,11 +3,6 @@ |
3 | 3 | * |
4 | 4 | * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> |
5 | 5 | * |
6 | - * Copyright (C) 2008 Prodrive BV <pv@prodrive.nl> | |
7 | - * Changed: | |
8 | - * Made board specific defines such as DDR timing and PLL | |
9 | - * dividers. These should be set in the board config file | |
10 | - * | |
11 | 6 | * Partially based on TI sources, original copyrights follow: |
12 | 7 | */ |
13 | 8 | |
14 | 9 | |
15 | 10 | |
... | ... | @@ -161,17 +156,17 @@ |
161 | 156 | |
162 | 157 | /* Program the PLL Multiplier */ |
163 | 158 | ldr r6, PLL2_PLLM |
164 | - mov r2, $CFG_DAVINCI_PLL2_PLLM | |
159 | + mov r2, $0x17 /* 162 MHz */ | |
165 | 160 | str r2, [r6] |
166 | 161 | |
167 | 162 | /* Program the PLL2 Divisor Value */ |
168 | 163 | ldr r6, PLL2_DIV2 |
169 | - mov r3, $CFG_DAVINCI_PLL2_DIV2 | |
164 | + mov r3, $0x01 | |
170 | 165 | str r3, [r6] |
171 | 166 | |
172 | 167 | /* Program the PLL2 Divisor Value */ |
173 | 168 | ldr r6, PLL2_DIV1 |
174 | - mov r4, $CFG_DAVINCI_PLL2_DIV1 | |
169 | + mov r4, $0x0b /* 54 MHz */ | |
175 | 170 | str r4, [r6] |
176 | 171 | |
177 | 172 | /* PLL2 DIV2 MMR */ |
... | ... | @@ -278,7 +273,7 @@ |
278 | 273 | bne checkDDRStatClkStop |
279 | 274 | |
280 | 275 | /*------------------------------------------------------* |
281 | - * Program DDR2 MMRs * | |
276 | + * Program DDR2 MMRs for 162MHz Setting * | |
282 | 277 | *------------------------------------------------------*/ |
283 | 278 | |
284 | 279 | /* Program PHY Control Register */ |
285 | 280 | |
... | ... | @@ -293,12 +288,12 @@ |
293 | 288 | |
294 | 289 | /* Program SDRAM TIM-0 Config Register */ |
295 | 290 | ldr r6, SDTIM0 |
296 | - ldr r7, SDTIM0_VAL | |
291 | + ldr r7, SDTIM0_VAL_162MHz | |
297 | 292 | str r7, [r6] |
298 | 293 | |
299 | 294 | /* Program SDRAM TIM-1 Config Register */ |
300 | 295 | ldr r6, SDTIM1 |
301 | - ldr r7, SDTIM1_VAL | |
296 | + ldr r7, SDTIM1_VAL_162MHz | |
302 | 297 | str r7, [r6] |
303 | 298 | |
304 | 299 | /* Program the SDRAM Bank Config Control Register */ |
... | ... | @@ -440,7 +435,7 @@ |
440 | 435 | |
441 | 436 | /* Program the PLL Multiplier */ |
442 | 437 | ldr r6, PLL1_PLLM |
443 | - mov r3, $CFG_DAVINCI_PLL1_PLLM | |
438 | + mov r3, $0x15 /* For 594MHz */ | |
444 | 439 | str r3, [r6] |
445 | 440 | |
446 | 441 | /* Wait for PLL to Reset Properly */ |
... | ... | @@ -472,7 +467,7 @@ |
472 | 467 | nop |
473 | 468 | |
474 | 469 | /*------------------------------------------------------* |
475 | - * AEMIF configuration for NAND/NOR Flash * | |
470 | + * AEMIF configuration for NOR Flash (double check) * | |
476 | 471 | *------------------------------------------------------*/ |
477 | 472 | ldr r0, _PINMUX0 |
478 | 473 | ldr r1, _DEV_SETTING |
... | ... | @@ -484,12 +479,6 @@ |
484 | 479 | orr r2, r2, r1 |
485 | 480 | str r2, [r0] |
486 | 481 | |
487 | - ldr r0, ACFG2 | |
488 | - ldr r1, ACFG2_VAL | |
489 | - ldr r2, [r0] | |
490 | - and r1, r2, r1 | |
491 | - str r1, [r0] | |
492 | - | |
493 | 482 | ldr r0, ACFG3 |
494 | 483 | ldr r1, ACFG3_VAL |
495 | 484 | ldr r2, [r0] |
... | ... | @@ -508,12 +497,6 @@ |
508 | 497 | and r1, r2, r1 |
509 | 498 | str r1, [r0] |
510 | 499 | |
511 | - ldr r0, NANDFCR | |
512 | - ldr r1, NANDFCR_VAL | |
513 | - ldr r2, [r0] | |
514 | - and r1, r2, r1 | |
515 | - str r1, [r0] | |
516 | - | |
517 | 500 | /*--------------------------------------* |
518 | 501 | * VTP manual Calibration * |
519 | 502 | *--------------------------------------*/ |
520 | 503 | |
521 | 504 | |
522 | 505 | |
523 | 506 | |
... | ... | @@ -577,36 +560,24 @@ |
577 | 560 | .word 0x01c40004 /* Device Configuration Registers */ |
578 | 561 | |
579 | 562 | _DEV_SETTING: |
580 | - .word CFG_DAVINCI_PINMUX_0 | |
563 | + .word 0x00000c1f | |
581 | 564 | |
582 | 565 | WAITCFG: |
583 | 566 | .word 0x01e00004 |
584 | 567 | WAITCFG_VAL: |
585 | - .word CFG_DAVINCI_WAITCFG | |
586 | -ACFG2: | |
587 | - .word 0x01e00010 | |
588 | -ACFG2_VAL: | |
589 | - .word CFG_DAVINCI_ACFG2 | |
568 | + .word 0 | |
590 | 569 | ACFG3: |
591 | 570 | .word 0x01e00014 |
592 | 571 | ACFG3_VAL: |
593 | - .word CFG_DAVINCI_ACFG3 | |
572 | + .word 0x3ffffffd | |
594 | 573 | ACFG4: |
595 | 574 | .word 0x01e00018 |
596 | 575 | ACFG4_VAL: |
597 | - .word CFG_DAVINCI_ACFG4 | |
576 | + .word 0x3ffffffd | |
598 | 577 | ACFG5: |
599 | 578 | .word 0x01e0001c |
600 | 579 | ACFG5_VAL: |
601 | - .word CFG_DAVINCI_ACFG5 | |
602 | -NANDFCR: | |
603 | - .word 0x01e00060 | |
604 | -NANDFCR_VAL: | |
605 | -#ifdef CFG_DAVINCI_NANDCE | |
606 | - .word (1 << (CFG_DAVINCI_NANDCE - 2)) | |
607 | -#else | |
608 | - .word 0x00000000 | |
609 | -#endif | |
580 | + .word 0x3ffffffd | |
610 | 581 | |
611 | 582 | MDCTL_DDR2: |
612 | 583 | .word 0x01c41a34 |
613 | 584 | |
614 | 585 | |
615 | 586 | |
616 | 587 | |
617 | 588 | |
... | ... | @@ -628,27 +599,33 @@ |
628 | 599 | PSC_GEM_FLAG_CLEAR: |
629 | 600 | .word 0xfffffeff |
630 | 601 | |
631 | -/* DDR2 MMR & CONFIGURATION VALUES */ | |
602 | +/* DDR2 MMR & CONFIGURATION VALUES, 162 MHZ clock */ | |
632 | 603 | DDRCTL: |
633 | 604 | .word 0x200000e4 |
634 | 605 | DDRCTL_VAL: |
635 | - .word CFG_DAVINCI_DDRCTL | |
606 | + .word 0x50006405 | |
636 | 607 | SDREF: |
637 | 608 | .word 0x2000000c |
638 | 609 | SDREF_VAL: |
639 | - .word CFG_DAVINCI_SDREF | |
610 | + .word 0x000005c3 | |
640 | 611 | SDCFG: |
641 | 612 | .word 0x20000008 |
642 | 613 | SDCFG_VAL: |
643 | - .word CFG_DAVINCI_SDCFG | |
614 | +#ifdef DDR_4BANKS | |
615 | + .word 0x00178622 | |
616 | +#elif defined DDR_8BANKS | |
617 | + .word 0x00178632 | |
618 | +#else | |
619 | +#error "Unknown DDR configuration!!!" | |
620 | +#endif | |
644 | 621 | SDTIM0: |
645 | 622 | .word 0x20000010 |
646 | -SDTIM0_VAL: | |
647 | - .word CFG_DAVINCI_SDTIM0 | |
623 | +SDTIM0_VAL_162MHz: | |
624 | + .word 0x28923211 | |
648 | 625 | SDTIM1: |
649 | 626 | .word 0x20000014 |
650 | -SDTIM1_VAL: | |
651 | - .word CFG_DAVINCI_SDTIM1 | |
627 | +SDTIM1_VAL_162MHz: | |
628 | + .word 0x0016c722 | |
652 | 629 | VTPIOCR: |
653 | 630 | .word 0x200000f0 /* VTP IO Control register */ |
654 | 631 | DDRVTPR: |
... | ... | @@ -722,7 +699,7 @@ |
722 | 699 | MMARG_BRF0: |
723 | 700 | .word 0x01c42010 /* BRF margin mode 0 (R/W)*/ |
724 | 701 | MMARG_BRF0_VAL: |
725 | - .word CFG_DAVINCI_MMARG_BRF0 | |
702 | + .word 0x00444400 | |
726 | 703 | |
727 | 704 | DDR2_START_ADDR: |
728 | 705 | .word 0x80000000 |
cpu/arm926ejs/davinci/nand.c
... | ... | @@ -117,7 +117,7 @@ |
117 | 117 | dummy = emif_addr->NANDF3ECC; |
118 | 118 | dummy = emif_addr->NANDF4ECC; |
119 | 119 | |
120 | - emif_addr->NANDFCR |= (1 << (CFG_DAVINCI_NANDCE + 6)); | |
120 | + emif_addr->NANDFCR |= (1 << 8); | |
121 | 121 | } |
122 | 122 | |
123 | 123 | static u_int32_t nand_davinci_readecc(struct mtd_info *mtd, u_int32_t region) |
... | ... | @@ -147,7 +147,7 @@ |
147 | 147 | |
148 | 148 | n = (this->eccmode == NAND_ECC_HW12_2048) ? 4 : 1; |
149 | 149 | |
150 | - region = (CFG_DAVINCI_NANDCE - 1); | |
150 | + region = 1; | |
151 | 151 | while (n--) { |
152 | 152 | tmp = nand_davinci_readecc(mtd, region); |
153 | 153 | *ecc_code++ = tmp; |
... | ... | @@ -311,9 +311,40 @@ |
311 | 311 | |
312 | 312 | static void nand_flash_init(void) |
313 | 313 | { |
314 | - /* All EMIF initialization is done in lowlevel_init.S | |
315 | - * and config values are in the board config files | |
316 | - */ | |
314 | + u_int32_t acfg1 = 0x3ffffffc; | |
315 | + u_int32_t acfg2 = 0x3ffffffc; | |
316 | + u_int32_t acfg3 = 0x3ffffffc; | |
317 | + u_int32_t acfg4 = 0x3ffffffc; | |
318 | + emifregs emif_regs; | |
319 | + | |
320 | + /*------------------------------------------------------------------* | |
321 | + * NAND FLASH CHIP TIMEOUT @ 459 MHz * | |
322 | + * * | |
323 | + * AEMIF.CLK freq = PLL1/6 = 459/6 = 76.5 MHz * | |
324 | + * AEMIF.CLK period = 1/76.5 MHz = 13.1 ns * | |
325 | + * * | |
326 | + *------------------------------------------------------------------*/ | |
327 | + acfg1 = 0 | |
328 | + | (0 << 31 ) /* selectStrobe */ | |
329 | + | (0 << 30 ) /* extWait */ | |
330 | + | (1 << 26 ) /* writeSetup 10 ns */ | |
331 | + | (3 << 20 ) /* writeStrobe 40 ns */ | |
332 | + | (1 << 17 ) /* writeHold 10 ns */ | |
333 | + | (1 << 13 ) /* readSetup 10 ns */ | |
334 | + | (5 << 7 ) /* readStrobe 60 ns */ | |
335 | + | (1 << 4 ) /* readHold 10 ns */ | |
336 | + | (3 << 2 ) /* turnAround ?? ns */ | |
337 | + | (0 << 0 ) /* asyncSize 8-bit bus */ | |
338 | + ; | |
339 | + | |
340 | + emif_regs = (emifregs)DAVINCI_ASYNC_EMIF_CNTRL_BASE; | |
341 | + | |
342 | + emif_regs->AWCCR |= 0x10000000; | |
343 | + emif_regs->AB1CR = acfg1; /* 0x08244128 */; | |
344 | + emif_regs->AB2CR = acfg2; | |
345 | + emif_regs->AB3CR = acfg3; | |
346 | + emif_regs->AB4CR = acfg4; | |
347 | + emif_regs->NANDFCR = 0x00000101; | |
317 | 348 | } |
318 | 349 | |
319 | 350 | int board_nand_init(struct nand_chip *nand) |
cpu/arm926ejs/davinci/timer.c
... | ... | @@ -42,9 +42,9 @@ |
42 | 42 | |
43 | 43 | typedef volatile struct { |
44 | 44 | u_int32_t pid12; |
45 | - u_int32_t emumgt; | |
46 | - u_int32_t na1; | |
47 | - u_int32_t na2; | |
45 | + u_int32_t emumgt_clksped; | |
46 | + u_int32_t gpint_en; | |
47 | + u_int32_t gpdir_dat; | |
48 | 48 | u_int32_t tim12; |
49 | 49 | u_int32_t tim34; |
50 | 50 | u_int32_t prd12; |
51 | 51 | |
52 | 52 | |
... | ... | @@ -52,13 +52,22 @@ |
52 | 52 | u_int32_t tcr; |
53 | 53 | u_int32_t tgcr; |
54 | 54 | u_int32_t wdtcr; |
55 | + u_int32_t tlgc; | |
56 | + u_int32_t tlmr; | |
55 | 57 | } davinci_timer; |
56 | 58 | |
57 | 59 | davinci_timer *timer = (davinci_timer *)CFG_TIMERBASE; |
58 | 60 | |
59 | 61 | #define TIMER_LOAD_VAL (CFG_HZ_CLOCK / CFG_HZ) |
60 | -#define TIM_CLK_DIV 16 | |
62 | +#define READ_TIMER timer->tim34 | |
61 | 63 | |
64 | +/* | |
65 | + * Timer runs with CFG_HZ_CLOCK, currently 27MHz. To avoid wrap | |
66 | + * around of timestamp already after min ~159s, divide it, e.g. by 16. | |
67 | + * timestamp will then wrap around all min ~42min | |
68 | + */ | |
69 | +#define DIV(x) ((x) >> 4) | |
70 | + | |
62 | 71 | static ulong timestamp; |
63 | 72 | static ulong lastinc; |
64 | 73 | |
65 | 74 | |
66 | 75 | |
67 | 76 | |
68 | 77 | |
69 | 78 | |
70 | 79 | |
71 | 80 | |
72 | 81 | |
73 | 82 | |
74 | 83 | |
... | ... | @@ -67,50 +76,63 @@ |
67 | 76 | /* We are using timer34 in unchained 32-bit mode, full speed */ |
68 | 77 | timer->tcr = 0x0; |
69 | 78 | timer->tgcr = 0x0; |
70 | - timer->tgcr = 0x06 | ((TIM_CLK_DIV - 1) << 8); | |
79 | + timer->tgcr = 0x06; | |
71 | 80 | timer->tim34 = 0x0; |
72 | 81 | timer->prd34 = TIMER_LOAD_VAL; |
73 | 82 | lastinc = 0; |
83 | + timer->tcr = 0x80 << 16; | |
74 | 84 | timestamp = 0; |
75 | - timer->tcr = 2 << 22; | |
76 | 85 | |
77 | 86 | return(0); |
78 | 87 | } |
79 | 88 | |
80 | 89 | void reset_timer(void) |
81 | 90 | { |
82 | - timer->tcr = 0x0; | |
83 | - timer->tim34 = 0; | |
84 | - lastinc = 0; | |
91 | + reset_timer_masked(); | |
92 | +} | |
93 | + | |
94 | +ulong get_timer(ulong base) | |
95 | +{ | |
96 | + return(get_timer_masked() - base); | |
97 | +} | |
98 | + | |
99 | +void set_timer(ulong t) | |
100 | +{ | |
101 | + timestamp = t; | |
102 | +} | |
103 | + | |
104 | +void udelay(unsigned long usec) | |
105 | +{ | |
106 | + udelay_masked(usec); | |
107 | +} | |
108 | + | |
109 | +void reset_timer_masked(void) | |
110 | +{ | |
111 | + lastinc = DIV(READ_TIMER); | |
85 | 112 | timestamp = 0; |
86 | - timer->tcr = 2 << 22; | |
87 | 113 | } |
88 | 114 | |
89 | -static ulong get_timer_raw(void) | |
115 | +ulong get_timer_raw(void) | |
90 | 116 | { |
91 | - ulong now = timer->tim34; | |
117 | + ulong now = DIV(READ_TIMER); | |
92 | 118 | |
93 | 119 | if (now >= lastinc) { |
94 | 120 | /* normal mode */ |
95 | 121 | timestamp += now - lastinc; |
96 | 122 | } else { |
97 | 123 | /* overflow ... */ |
98 | - timestamp += now + TIMER_LOAD_VAL - lastinc; | |
124 | + timestamp += now + DIV(TIMER_LOAD_VAL) - lastinc; | |
99 | 125 | } |
100 | 126 | lastinc = now; |
101 | 127 | return timestamp; |
102 | 128 | } |
103 | 129 | |
104 | -ulong get_timer(ulong base) | |
130 | +ulong get_timer_masked(void) | |
105 | 131 | { |
106 | - return((get_timer_raw() / (TIMER_LOAD_VAL / TIM_CLK_DIV)) - base); } | |
107 | - | |
108 | -void set_timer(ulong t) | |
109 | -{ | |
110 | - timestamp = t; | |
132 | + return(get_timer_raw() / DIV(TIMER_LOAD_VAL)); | |
111 | 133 | } |
112 | 134 | |
113 | -void udelay(unsigned long usec) | |
135 | +void udelay_masked(unsigned long usec) | |
114 | 136 | { |
115 | 137 | ulong tmo; |
116 | 138 | ulong endtime; |
... | ... | @@ -118,7 +140,7 @@ |
118 | 140 | |
119 | 141 | tmo = CFG_HZ_CLOCK / 1000; |
120 | 142 | tmo *= usec; |
121 | - tmo /= (1000 * TIM_CLK_DIV); | |
143 | + tmo /= 1000; | |
122 | 144 | |
123 | 145 | endtime = get_timer_raw() + tmo; |
124 | 146 | |
... | ... | @@ -143,6 +165,9 @@ |
143 | 165 | */ |
144 | 166 | ulong get_tbclk(void) |
145 | 167 | { |
146 | - return CFG_HZ; | |
168 | + ulong tbclk; | |
169 | + | |
170 | + tbclk = CFG_HZ; | |
171 | + return(tbclk); | |
147 | 172 | } |
drivers/i2c/Makefile
drivers/i2c/mxc_i2c.c
1 | -/* | |
2 | - * i2c driver for Freescale mx31 | |
3 | - * | |
4 | - * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | |
5 | - * | |
6 | - * See file CREDITS for list of people who contributed to this | |
7 | - * project. | |
8 | - * | |
9 | - * This program is free software; you can redistribute it and/or | |
10 | - * modify it under the terms of the GNU General Public License as | |
11 | - * published by the Free Software Foundation; either version 2 of | |
12 | - * the License, or (at your option) any later version. | |
13 | - * | |
14 | - * This program is distributed in the hope that it will be useful, | |
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | - * GNU General Public License for more details. | |
18 | - * | |
19 | - * You should have received a copy of the GNU General Public License | |
20 | - * along with this program; if not, write to the Free Software | |
21 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | - * MA 02111-1307 USA | |
23 | - */ | |
24 | - | |
25 | -#include <common.h> | |
26 | - | |
27 | -#if defined(CONFIG_HARD_I2C) && defined(CONFIG_I2C_MXC) | |
28 | - | |
29 | -#include <asm/arch/mx31.h> | |
30 | -#include <asm/arch/mx31-regs.h> | |
31 | - | |
32 | -#define IADR 0x00 | |
33 | -#define IFDR 0x04 | |
34 | -#define I2CR 0x08 | |
35 | -#define I2SR 0x0c | |
36 | -#define I2DR 0x10 | |
37 | - | |
38 | -#define I2CR_IEN (1 << 7) | |
39 | -#define I2CR_IIEN (1 << 6) | |
40 | -#define I2CR_MSTA (1 << 5) | |
41 | -#define I2CR_MTX (1 << 4) | |
42 | -#define I2CR_TX_NO_AK (1 << 3) | |
43 | -#define I2CR_RSTA (1 << 2) | |
44 | - | |
45 | -#define I2SR_ICF (1 << 7) | |
46 | -#define I2SR_IBB (1 << 5) | |
47 | -#define I2SR_IIF (1 << 1) | |
48 | -#define I2SR_RX_NO_AK (1 << 0) | |
49 | - | |
50 | -#ifdef CFG_I2C_MX31_PORT1 | |
51 | -#define I2C_BASE 0x43f80000 | |
52 | -#elif defined(CFG_I2C_MX31_PORT2) | |
53 | -#define I2C_BASE 0x43f98000 | |
54 | -#elif defined(CFG_I2C_MX31_PORT3) | |
55 | -#define I2C_BASE 0x43f84000 | |
56 | -#else | |
57 | -#error "define CFG_I2C_MX31_PORTx to use the mx31 I2C driver" | |
58 | -#endif | |
59 | - | |
60 | -#ifdef DEBUG | |
61 | -#define DPRINTF(args...) printf(args) | |
62 | -#else | |
63 | -#define DPRINTF(args...) | |
64 | -#endif | |
65 | - | |
66 | -static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144, | |
67 | - 160, 192, 240, 288, 320, 384, 480, 576, 640, 768, 960, | |
68 | - 1152, 1280, 1536, 1920, 2304, 2560, 3072, 3840}; | |
69 | - | |
70 | -void i2c_init(int speed, int unused) | |
71 | -{ | |
72 | - int freq = mx31_get_ipg_clk(); | |
73 | - int i; | |
74 | - | |
75 | - for (i = 0; i < 0x1f; i++) | |
76 | - if (freq / div[i] <= speed) | |
77 | - break; | |
78 | - | |
79 | - DPRINTF("%s: speed: %d\n", __FUNCTION__, speed); | |
80 | - | |
81 | - __REG16(I2C_BASE + I2CR) = 0; /* Reset module */ | |
82 | - __REG16(I2C_BASE + IFDR) = i; | |
83 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN; | |
84 | - __REG16(I2C_BASE + I2SR) = 0; | |
85 | -} | |
86 | - | |
87 | -static int wait_busy(void) | |
88 | -{ | |
89 | - int timeout = 10000; | |
90 | - | |
91 | - while (!(__REG16(I2C_BASE + I2SR) & I2SR_IIF) && --timeout) | |
92 | - udelay(1); | |
93 | - __REG16(I2C_BASE + I2SR) = 0; /* clear interrupt */ | |
94 | - | |
95 | - return timeout; | |
96 | -} | |
97 | - | |
98 | -static int tx_byte(u8 byte) | |
99 | -{ | |
100 | - __REG16(I2C_BASE + I2DR) = byte; | |
101 | - | |
102 | - if (!wait_busy() || __REG16(I2C_BASE + I2SR) & I2SR_RX_NO_AK) | |
103 | - return -1; | |
104 | - return 0; | |
105 | -} | |
106 | - | |
107 | -static int rx_byte(void) | |
108 | -{ | |
109 | - if (!wait_busy()) | |
110 | - return -1; | |
111 | - | |
112 | - return __REG16(I2C_BASE + I2DR); | |
113 | -} | |
114 | - | |
115 | -int i2c_probe(uchar chip) | |
116 | -{ | |
117 | - int ret; | |
118 | - | |
119 | - __REG16(I2C_BASE + I2CR) = 0; /* Reset module */ | |
120 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN; | |
121 | - | |
122 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN | I2CR_MSTA | I2CR_MTX; | |
123 | - ret = tx_byte(chip << 1); | |
124 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN | I2CR_MTX; | |
125 | - | |
126 | - return ret; | |
127 | -} | |
128 | - | |
129 | -static int i2c_addr(uchar chip, uint addr, int alen) | |
130 | -{ | |
131 | - __REG16(I2C_BASE + I2SR) = 0; /* clear interrupt */ | |
132 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN | I2CR_MSTA | I2CR_MTX; | |
133 | - | |
134 | - if (tx_byte(chip << 1)) | |
135 | - return -1; | |
136 | - | |
137 | - while (alen--) | |
138 | - if (tx_byte((addr >> (alen * 8)) & 0xff)) | |
139 | - return -1; | |
140 | - return 0; | |
141 | -} | |
142 | - | |
143 | -int i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len) | |
144 | -{ | |
145 | - int timeout = 10000; | |
146 | - int ret; | |
147 | - | |
148 | - DPRINTF("%s chip: 0x%02x addr: 0x%04x alen: %d len: +%d\n", \ | |
149 | - __FUNCTION__, chip, addr, alen, len); | |
150 | - | |
151 | - if (i2c_addr(chip, addr, alen)) { | |
152 | - printf("i2c_addr failed\n"); | |
153 | - return -1; | |
154 | - } | |
155 | - | |
156 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN | I2CR_MSTA | \ | |
157 | - I2CR_MTX | I2CR_RSTA; | |
158 | - | |
159 | - if (tx_byte(chip << 1 | 1)) | |
160 | - return -1; | |
161 | - | |
162 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN | I2CR_MSTA | ((len == 1) \ | |
163 | - ? I2CR_TX_NO_AK : 0); | |
164 | - | |
165 | - ret = __REG16(I2C_BASE + I2DR); | |
166 | - | |
167 | - while (len--) { | |
168 | - if ((ret = rx_byte()) < 0) | |
169 | - return -1; | |
170 | - *buf++ = ret; | |
171 | - if (len <= 1) | |
172 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN | \ | |
173 | - I2CR_MSTA | I2CR_TX_NO_AK; | |
174 | - } | |
175 | - | |
176 | - wait_busy(); | |
177 | - | |
178 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN; | |
179 | - | |
180 | - while (__REG16(I2C_BASE + I2SR) & I2SR_IBB && --timeout) | |
181 | - udelay(1); | |
182 | - | |
183 | - return 0; | |
184 | -} | |
185 | - | |
186 | -int i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len) | |
187 | -{ | |
188 | - int timeout = 10000; | |
189 | - DPRINTF("%s chip: 0x%02x addr: 0x%04x alen: %d len: %d\n", \ | |
190 | - __FUNCTION__, chip, addr, alen, len); | |
191 | - | |
192 | - if (i2c_addr(chip, addr, alen)) | |
193 | - return -1; | |
194 | - | |
195 | - while (len--) | |
196 | - if (tx_byte(*buf++)) | |
197 | - return -1; | |
198 | - | |
199 | - __REG16(I2C_BASE + I2CR) = I2CR_IEN; | |
200 | - | |
201 | - while (__REG16(I2C_BASE + I2SR) & I2SR_IBB && --timeout) | |
202 | - udelay(1); | |
203 | - | |
204 | - return 0; | |
205 | -} | |
206 | - | |
207 | -#endif /* CONFIG_HARD_I2C */ |
drivers/net/Makefile
drivers/net/smc911x.c
1 | -/* | |
2 | - * SMSC LAN9[12]1[567] Network driver | |
3 | - * | |
4 | - * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | |
5 | - * | |
6 | - * See file CREDITS for list of people who contributed to this | |
7 | - * project. | |
8 | - * | |
9 | - * This program is free software; you can redistribute it and/or | |
10 | - * modify it under the terms of the GNU General Public License as | |
11 | - * published by the Free Software Foundation; either version 2 of | |
12 | - * the License, or (at your option) any later version. | |
13 | - * | |
14 | - * This program is distributed in the hope that it will be useful, | |
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | - * GNU General Public License for more details. | |
18 | - * | |
19 | - * You should have received a copy of the GNU General Public License | |
20 | - * along with this program; if not, write to the Free Software | |
21 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | - * MA 02111-1307 USA | |
23 | - */ | |
24 | - | |
25 | -#include <common.h> | |
26 | - | |
27 | -#ifdef CONFIG_DRIVER_SMC911X | |
28 | - | |
29 | -#include <command.h> | |
30 | -#include <net.h> | |
31 | -#include <miiphy.h> | |
32 | - | |
33 | -#define mdelay(n) udelay((n)*1000) | |
34 | - | |
35 | -#define __REG(x) (*((volatile u32 *)(x))) | |
36 | - | |
37 | -/* Below are the register offsets and bit definitions | |
38 | - * of the Lan911x memory space | |
39 | - */ | |
40 | -#define RX_DATA_FIFO __REG(CONFIG_DRIVER_SMC911X_BASE + 0x00) | |
41 | - | |
42 | -#define TX_DATA_FIFO __REG(CONFIG_DRIVER_SMC911X_BASE + 0x20) | |
43 | -#define TX_CMD_A_INT_ON_COMP (0x80000000) | |
44 | -#define TX_CMD_A_INT_BUF_END_ALGN (0x03000000) | |
45 | -#define TX_CMD_A_INT_4_BYTE_ALGN (0x00000000) | |
46 | -#define TX_CMD_A_INT_16_BYTE_ALGN (0x01000000) | |
47 | -#define TX_CMD_A_INT_32_BYTE_ALGN (0x02000000) | |
48 | -#define TX_CMD_A_INT_DATA_OFFSET (0x001F0000) | |
49 | -#define TX_CMD_A_INT_FIRST_SEG (0x00002000) | |
50 | -#define TX_CMD_A_INT_LAST_SEG (0x00001000) | |
51 | -#define TX_CMD_A_BUF_SIZE (0x000007FF) | |
52 | -#define TX_CMD_B_PKT_TAG (0xFFFF0000) | |
53 | -#define TX_CMD_B_ADD_CRC_DISABLE (0x00002000) | |
54 | -#define TX_CMD_B_DISABLE_PADDING (0x00001000) | |
55 | -#define TX_CMD_B_PKT_BYTE_LENGTH (0x000007FF) | |
56 | - | |
57 | -#define RX_STATUS_FIFO __REG(CONFIG_DRIVER_SMC911X_BASE + 0x40) | |
58 | -#define RX_STS_PKT_LEN (0x3FFF0000) | |
59 | -#define RX_STS_ES (0x00008000) | |
60 | -#define RX_STS_BCST (0x00002000) | |
61 | -#define RX_STS_LEN_ERR (0x00001000) | |
62 | -#define RX_STS_RUNT_ERR (0x00000800) | |
63 | -#define RX_STS_MCAST (0x00000400) | |
64 | -#define RX_STS_TOO_LONG (0x00000080) | |
65 | -#define RX_STS_COLL (0x00000040) | |
66 | -#define RX_STS_ETH_TYPE (0x00000020) | |
67 | -#define RX_STS_WDOG_TMT (0x00000010) | |
68 | -#define RX_STS_MII_ERR (0x00000008) | |
69 | -#define RX_STS_DRIBBLING (0x00000004) | |
70 | -#define RX_STS_CRC_ERR (0x00000002) | |
71 | -#define RX_STATUS_FIFO_PEEK __REG(CONFIG_DRIVER_SMC911X_BASE + 0x44) | |
72 | -#define TX_STATUS_FIFO __REG(CONFIG_DRIVER_SMC911X_BASE + 0x48) | |
73 | -#define TX_STS_TAG (0xFFFF0000) | |
74 | -#define TX_STS_ES (0x00008000) | |
75 | -#define TX_STS_LOC (0x00000800) | |
76 | -#define TX_STS_NO_CARR (0x00000400) | |
77 | -#define TX_STS_LATE_COLL (0x00000200) | |
78 | -#define TX_STS_MANY_COLL (0x00000100) | |
79 | -#define TX_STS_COLL_CNT (0x00000078) | |
80 | -#define TX_STS_MANY_DEFER (0x00000004) | |
81 | -#define TX_STS_UNDERRUN (0x00000002) | |
82 | -#define TX_STS_DEFERRED (0x00000001) | |
83 | -#define TX_STATUS_FIFO_PEEK __REG(CONFIG_DRIVER_SMC911X_BASE + 0x4C) | |
84 | -#define ID_REV __REG(CONFIG_DRIVER_SMC911X_BASE + 0x50) | |
85 | -#define ID_REV_CHIP_ID (0xFFFF0000) /* RO */ | |
86 | -#define ID_REV_REV_ID (0x0000FFFF) /* RO */ | |
87 | - | |
88 | -#define INT_CFG __REG(CONFIG_DRIVER_SMC911X_BASE + 0x54) | |
89 | -#define INT_CFG_INT_DEAS (0xFF000000) /* R/W */ | |
90 | -#define INT_CFG_INT_DEAS_CLR (0x00004000) | |
91 | -#define INT_CFG_INT_DEAS_STS (0x00002000) | |
92 | -#define INT_CFG_IRQ_INT (0x00001000) /* RO */ | |
93 | -#define INT_CFG_IRQ_EN (0x00000100) /* R/W */ | |
94 | -#define INT_CFG_IRQ_POL (0x00000010) /* R/W */ | |
95 | - /* Not Affected by SW Reset */ | |
96 | -#define INT_CFG_IRQ_TYPE (0x00000001) /* R/W */ | |
97 | - /* Not Affected by SW Reset */ | |
98 | - | |
99 | -#define INT_STS __REG(CONFIG_DRIVER_SMC911X_BASE + 0x58) | |
100 | -#define INT_STS_SW_INT (0x80000000) /* R/WC */ | |
101 | -#define INT_STS_TXSTOP_INT (0x02000000) /* R/WC */ | |
102 | -#define INT_STS_RXSTOP_INT (0x01000000) /* R/WC */ | |
103 | -#define INT_STS_RXDFH_INT (0x00800000) /* R/WC */ | |
104 | -#define INT_STS_RXDF_INT (0x00400000) /* R/WC */ | |
105 | -#define INT_STS_TX_IOC (0x00200000) /* R/WC */ | |
106 | -#define INT_STS_RXD_INT (0x00100000) /* R/WC */ | |
107 | -#define INT_STS_GPT_INT (0x00080000) /* R/WC */ | |
108 | -#define INT_STS_PHY_INT (0x00040000) /* RO */ | |
109 | -#define INT_STS_PME_INT (0x00020000) /* R/WC */ | |
110 | -#define INT_STS_TXSO (0x00010000) /* R/WC */ | |
111 | -#define INT_STS_RWT (0x00008000) /* R/WC */ | |
112 | -#define INT_STS_RXE (0x00004000) /* R/WC */ | |
113 | -#define INT_STS_TXE (0x00002000) /* R/WC */ | |
114 | -/*#define INT_STS_ERX (0x00001000)*/ /* R/WC */ | |
115 | -#define INT_STS_TDFU (0x00000800) /* R/WC */ | |
116 | -#define INT_STS_TDFO (0x00000400) /* R/WC */ | |
117 | -#define INT_STS_TDFA (0x00000200) /* R/WC */ | |
118 | -#define INT_STS_TSFF (0x00000100) /* R/WC */ | |
119 | -#define INT_STS_TSFL (0x00000080) /* R/WC */ | |
120 | -/*#define INT_STS_RXDF (0x00000040)*/ /* R/WC */ | |
121 | -#define INT_STS_RDFO (0x00000040) /* R/WC */ | |
122 | -#define INT_STS_RDFL (0x00000020) /* R/WC */ | |
123 | -#define INT_STS_RSFF (0x00000010) /* R/WC */ | |
124 | -#define INT_STS_RSFL (0x00000008) /* R/WC */ | |
125 | -#define INT_STS_GPIO2_INT (0x00000004) /* R/WC */ | |
126 | -#define INT_STS_GPIO1_INT (0x00000002) /* R/WC */ | |
127 | -#define INT_STS_GPIO0_INT (0x00000001) /* R/WC */ | |
128 | -#define INT_EN __REG(CONFIG_DRIVER_SMC911X_BASE + 0x5C) | |
129 | -#define INT_EN_SW_INT_EN (0x80000000) /* R/W */ | |
130 | -#define INT_EN_TXSTOP_INT_EN (0x02000000) /* R/W */ | |
131 | -#define INT_EN_RXSTOP_INT_EN (0x01000000) /* R/W */ | |
132 | -#define INT_EN_RXDFH_INT_EN (0x00800000) /* R/W */ | |
133 | -/*#define INT_EN_RXDF_INT_EN (0x00400000)*/ /* R/W */ | |
134 | -#define INT_EN_TIOC_INT_EN (0x00200000) /* R/W */ | |
135 | -#define INT_EN_RXD_INT_EN (0x00100000) /* R/W */ | |
136 | -#define INT_EN_GPT_INT_EN (0x00080000) /* R/W */ | |
137 | -#define INT_EN_PHY_INT_EN (0x00040000) /* R/W */ | |
138 | -#define INT_EN_PME_INT_EN (0x00020000) /* R/W */ | |
139 | -#define INT_EN_TXSO_EN (0x00010000) /* R/W */ | |
140 | -#define INT_EN_RWT_EN (0x00008000) /* R/W */ | |
141 | -#define INT_EN_RXE_EN (0x00004000) /* R/W */ | |
142 | -#define INT_EN_TXE_EN (0x00002000) /* R/W */ | |
143 | -/*#define INT_EN_ERX_EN (0x00001000)*/ /* R/W */ | |
144 | -#define INT_EN_TDFU_EN (0x00000800) /* R/W */ | |
145 | -#define INT_EN_TDFO_EN (0x00000400) /* R/W */ | |
146 | -#define INT_EN_TDFA_EN (0x00000200) /* R/W */ | |
147 | -#define INT_EN_TSFF_EN (0x00000100) /* R/W */ | |
148 | -#define INT_EN_TSFL_EN (0x00000080) /* R/W */ | |
149 | -/*#define INT_EN_RXDF_EN (0x00000040)*/ /* R/W */ | |
150 | -#define INT_EN_RDFO_EN (0x00000040) /* R/W */ | |
151 | -#define INT_EN_RDFL_EN (0x00000020) /* R/W */ | |
152 | -#define INT_EN_RSFF_EN (0x00000010) /* R/W */ | |
153 | -#define INT_EN_RSFL_EN (0x00000008) /* R/W */ | |
154 | -#define INT_EN_GPIO2_INT (0x00000004) /* R/W */ | |
155 | -#define INT_EN_GPIO1_INT (0x00000002) /* R/W */ | |
156 | -#define INT_EN_GPIO0_INT (0x00000001) /* R/W */ | |
157 | - | |
158 | -#define BYTE_TEST __REG(CONFIG_DRIVER_SMC911X_BASE + 0x64) | |
159 | -#define FIFO_INT __REG(CONFIG_DRIVER_SMC911X_BASE + 0x68) | |
160 | -#define FIFO_INT_TX_AVAIL_LEVEL (0xFF000000) /* R/W */ | |
161 | -#define FIFO_INT_TX_STS_LEVEL (0x00FF0000) /* R/W */ | |
162 | -#define FIFO_INT_RX_AVAIL_LEVEL (0x0000FF00) /* R/W */ | |
163 | -#define FIFO_INT_RX_STS_LEVEL (0x000000FF) /* R/W */ | |
164 | - | |
165 | -#define RX_CFG __REG(CONFIG_DRIVER_SMC911X_BASE + 0x6C) | |
166 | -#define RX_CFG_RX_END_ALGN (0xC0000000) /* R/W */ | |
167 | -#define RX_CFG_RX_END_ALGN4 (0x00000000) /* R/W */ | |
168 | -#define RX_CFG_RX_END_ALGN16 (0x40000000) /* R/W */ | |
169 | -#define RX_CFG_RX_END_ALGN32 (0x80000000) /* R/W */ | |
170 | -#define RX_CFG_RX_DMA_CNT (0x0FFF0000) /* R/W */ | |
171 | -#define RX_CFG_RX_DUMP (0x00008000) /* R/W */ | |
172 | -#define RX_CFG_RXDOFF (0x00001F00) /* R/W */ | |
173 | -/*#define RX_CFG_RXBAD (0x00000001)*/ /* R/W */ | |
174 | - | |
175 | -#define TX_CFG __REG(CONFIG_DRIVER_SMC911X_BASE + 0x70) | |
176 | -/*#define TX_CFG_TX_DMA_LVL (0xE0000000)*/ /* R/W */ | |
177 | -/*#define TX_CFG_TX_DMA_CNT (0x0FFF0000)*/ /* R/W */ | |
178 | - /* Self Clearing */ | |
179 | -#define TX_CFG_TXS_DUMP (0x00008000) | |
180 | - /* Self Clearing */ | |
181 | -#define TX_CFG_TXD_DUMP (0x00004000) | |
182 | - /* Self Clearing */ | |
183 | -#define TX_CFG_TXSAO (0x00000004) /* R/W */ | |
184 | -#define TX_CFG_TX_ON (0x00000002) /* R/W */ | |
185 | -#define TX_CFG_STOP_TX (0x00000001) | |
186 | - /* Self Clearing */ | |
187 | - | |
188 | -#define HW_CFG __REG(CONFIG_DRIVER_SMC911X_BASE + 0x74) | |
189 | -#define HW_CFG_TTM (0x00200000) /* R/W */ | |
190 | -#define HW_CFG_SF (0x00100000) /* R/W */ | |
191 | -#define HW_CFG_TX_FIF_SZ (0x000F0000) /* R/W */ | |
192 | -#define HW_CFG_TR (0x00003000) /* R/W */ | |
193 | -#define HW_CFG_PHY_CLK_SEL (0x00000060) /* R/W */ | |
194 | -#define HW_CFG_PHY_CLK_SEL_INT_PHY (0x00000000) /* R/W */ | |
195 | -#define HW_CFG_PHY_CLK_SEL_EXT_PHY (0x00000020) /* R/W */ | |
196 | -#define HW_CFG_PHY_CLK_SEL_CLK_DIS (0x00000040) /* R/W */ | |
197 | -#define HW_CFG_SMI_SEL (0x00000010) /* R/W */ | |
198 | -#define HW_CFG_EXT_PHY_DET (0x00000008) /* RO */ | |
199 | -#define HW_CFG_EXT_PHY_EN (0x00000004) /* R/W */ | |
200 | -#define HW_CFG_32_16_BIT_MODE (0x00000004) /* RO */ | |
201 | -#define HW_CFG_SRST_TO (0x00000002) /* RO */ | |
202 | -#define HW_CFG_SRST (0x00000001) | |
203 | - /* Self Clearing */ | |
204 | - | |
205 | -#define RX_DP_CTRL __REG(CONFIG_DRIVER_SMC911X_BASE + 0x78) | |
206 | -#define RX_DP_CTRL_RX_FFWD (0x80000000) /* R/W */ | |
207 | -#define RX_DP_CTRL_FFWD_BUSY (0x80000000) /* RO */ | |
208 | - | |
209 | -#define RX_FIFO_INF __REG(CONFIG_DRIVER_SMC911X_BASE + 0x7C) | |
210 | -#define RX_FIFO_INF_RXSUSED (0x00FF0000) /* RO */ | |
211 | -#define RX_FIFO_INF_RXDUSED (0x0000FFFF) /* RO */ | |
212 | - | |
213 | -#define TX_FIFO_INF __REG(CONFIG_DRIVER_SMC911X_BASE + 0x80) | |
214 | -#define TX_FIFO_INF_TSUSED (0x00FF0000) /* RO */ | |
215 | -#define TX_FIFO_INF_TDFREE (0x0000FFFF) /* RO */ | |
216 | - | |
217 | -#define PMT_CTRL __REG(CONFIG_DRIVER_SMC911X_BASE + 0x84) | |
218 | -#define PMT_CTRL_PM_MODE (0x00003000) | |
219 | - /* Self Clearing */ | |
220 | -#define PMT_CTRL_PHY_RST (0x00000400) | |
221 | - /* Self Clearing */ | |
222 | -#define PMT_CTRL_WOL_EN (0x00000200) /* R/W */ | |
223 | -#define PMT_CTRL_ED_EN (0x00000100) /* R/W */ | |
224 | -#define PMT_CTRL_PME_TYPE (0x00000040) /* R/W */ | |
225 | - /* Not Affected by SW Reset */ | |
226 | -#define PMT_CTRL_WUPS (0x00000030) /* R/WC */ | |
227 | -#define PMT_CTRL_WUPS_NOWAKE (0x00000000) /* R/WC */ | |
228 | -#define PMT_CTRL_WUPS_ED (0x00000010) /* R/WC */ | |
229 | -#define PMT_CTRL_WUPS_WOL (0x00000020) /* R/WC */ | |
230 | -#define PMT_CTRL_WUPS_MULTI (0x00000030) /* R/WC */ | |
231 | -#define PMT_CTRL_PME_IND (0x00000008) /* R/W */ | |
232 | -#define PMT_CTRL_PME_POL (0x00000004) /* R/W */ | |
233 | -#define PMT_CTRL_PME_EN (0x00000002) /* R/W */ | |
234 | - /* Not Affected by SW Reset */ | |
235 | -#define PMT_CTRL_READY (0x00000001) /* RO */ | |
236 | - | |
237 | -#define GPIO_CFG __REG(CONFIG_DRIVER_SMC911X_BASE + 0x88) | |
238 | -#define GPIO_CFG_LED3_EN (0x40000000) /* R/W */ | |
239 | -#define GPIO_CFG_LED2_EN (0x20000000) /* R/W */ | |
240 | -#define GPIO_CFG_LED1_EN (0x10000000) /* R/W */ | |
241 | -#define GPIO_CFG_GPIO2_INT_POL (0x04000000) /* R/W */ | |
242 | -#define GPIO_CFG_GPIO1_INT_POL (0x02000000) /* R/W */ | |
243 | -#define GPIO_CFG_GPIO0_INT_POL (0x01000000) /* R/W */ | |
244 | -#define GPIO_CFG_EEPR_EN (0x00700000) /* R/W */ | |
245 | -#define GPIO_CFG_GPIOBUF2 (0x00040000) /* R/W */ | |
246 | -#define GPIO_CFG_GPIOBUF1 (0x00020000) /* R/W */ | |
247 | -#define GPIO_CFG_GPIOBUF0 (0x00010000) /* R/W */ | |
248 | -#define GPIO_CFG_GPIODIR2 (0x00000400) /* R/W */ | |
249 | -#define GPIO_CFG_GPIODIR1 (0x00000200) /* R/W */ | |
250 | -#define GPIO_CFG_GPIODIR0 (0x00000100) /* R/W */ | |
251 | -#define GPIO_CFG_GPIOD4 (0x00000010) /* R/W */ | |
252 | -#define GPIO_CFG_GPIOD3 (0x00000008) /* R/W */ | |
253 | -#define GPIO_CFG_GPIOD2 (0x00000004) /* R/W */ | |
254 | -#define GPIO_CFG_GPIOD1 (0x00000002) /* R/W */ | |
255 | -#define GPIO_CFG_GPIOD0 (0x00000001) /* R/W */ | |
256 | - | |
257 | -#define GPT_CFG __REG(CONFIG_DRIVER_SMC911X_BASE + 0x8C) | |
258 | -#define GPT_CFG_TIMER_EN (0x20000000) /* R/W */ | |
259 | -#define GPT_CFG_GPT_LOAD (0x0000FFFF) /* R/W */ | |
260 | - | |
261 | -#define GPT_CNT __REG(CONFIG_DRIVER_SMC911X_BASE + 0x90) | |
262 | -#define GPT_CNT_GPT_CNT (0x0000FFFF) /* RO */ | |
263 | - | |
264 | -#define ENDIAN __REG(CONFIG_DRIVER_SMC911X_BASE + 0x98) | |
265 | -#define FREE_RUN __REG(CONFIG_DRIVER_SMC911X_BASE + 0x9C) | |
266 | -#define RX_DROP __REG(CONFIG_DRIVER_SMC911X_BASE + 0xA0) | |
267 | -#define MAC_CSR_CMD __REG(CONFIG_DRIVER_SMC911X_BASE + 0xA4) | |
268 | -#define MAC_CSR_CMD_CSR_BUSY (0x80000000) | |
269 | - /* Self Clearing */ | |
270 | -#define MAC_CSR_CMD_R_NOT_W (0x40000000) /* R/W */ | |
271 | -#define MAC_CSR_CMD_CSR_ADDR (0x000000FF) /* R/W */ | |
272 | - | |
273 | -#define MAC_CSR_DATA __REG(CONFIG_DRIVER_SMC911X_BASE + 0xA8) | |
274 | -#define AFC_CFG __REG(CONFIG_DRIVER_SMC911X_BASE + 0xAC) | |
275 | -#define AFC_CFG_AFC_HI (0x00FF0000) /* R/W */ | |
276 | -#define AFC_CFG_AFC_LO (0x0000FF00) /* R/W */ | |
277 | -#define AFC_CFG_BACK_DUR (0x000000F0) /* R/W */ | |
278 | -#define AFC_CFG_FCMULT (0x00000008) /* R/W */ | |
279 | -#define AFC_CFG_FCBRD (0x00000004) /* R/W */ | |
280 | -#define AFC_CFG_FCADD (0x00000002) /* R/W */ | |
281 | -#define AFC_CFG_FCANY (0x00000001) /* R/W */ | |
282 | - | |
283 | -#define E2P_CMD __REG(CONFIG_DRIVER_SMC911X_BASE + 0xB0) | |
284 | -#define E2P_CMD_EPC_BUSY (0x80000000) | |
285 | - /* Self Clearing */ | |
286 | -#define E2P_CMD_EPC_CMD (0x70000000) /* R/W */ | |
287 | -#define E2P_CMD_EPC_CMD_READ (0x00000000) /* R/W */ | |
288 | -#define E2P_CMD_EPC_CMD_EWDS (0x10000000) /* R/W */ | |
289 | -#define E2P_CMD_EPC_CMD_EWEN (0x20000000) /* R/W */ | |
290 | -#define E2P_CMD_EPC_CMD_WRITE (0x30000000) /* R/W */ | |
291 | -#define E2P_CMD_EPC_CMD_WRAL (0x40000000) /* R/W */ | |
292 | -#define E2P_CMD_EPC_CMD_ERASE (0x50000000) /* R/W */ | |
293 | -#define E2P_CMD_EPC_CMD_ERAL (0x60000000) /* R/W */ | |
294 | -#define E2P_CMD_EPC_CMD_RELOAD (0x70000000) /* R/W */ | |
295 | -#define E2P_CMD_EPC_TIMEOUT (0x00000200) /* RO */ | |
296 | -#define E2P_CMD_MAC_ADDR_LOADED (0x00000100) /* RO */ | |
297 | -#define E2P_CMD_EPC_ADDR (0x000000FF) /* R/W */ | |
298 | - | |
299 | -#define E2P_DATA __REG(CONFIG_DRIVER_SMC911X_BASE + 0xB4) | |
300 | -#define E2P_DATA_EEPROM_DATA (0x000000FF) /* R/W */ | |
301 | -/* end of LAN register offsets and bit definitions */ | |
302 | - | |
303 | -/* MAC Control and Status registers */ | |
304 | -#define MAC_CR (0x01) /* R/W */ | |
305 | - | |
306 | -/* MAC_CR - MAC Control Register */ | |
307 | -#define MAC_CR_RXALL (0x80000000) | |
308 | -/* TODO: delete this bit? It is not described in the data sheet. */ | |
309 | -#define MAC_CR_HBDIS (0x10000000) | |
310 | -#define MAC_CR_RCVOWN (0x00800000) | |
311 | -#define MAC_CR_LOOPBK (0x00200000) | |
312 | -#define MAC_CR_FDPX (0x00100000) | |
313 | -#define MAC_CR_MCPAS (0x00080000) | |
314 | -#define MAC_CR_PRMS (0x00040000) | |
315 | -#define MAC_CR_INVFILT (0x00020000) | |
316 | -#define MAC_CR_PASSBAD (0x00010000) | |
317 | -#define MAC_CR_HFILT (0x00008000) | |
318 | -#define MAC_CR_HPFILT (0x00002000) | |
319 | -#define MAC_CR_LCOLL (0x00001000) | |
320 | -#define MAC_CR_BCAST (0x00000800) | |
321 | -#define MAC_CR_DISRTY (0x00000400) | |
322 | -#define MAC_CR_PADSTR (0x00000100) | |
323 | -#define MAC_CR_BOLMT_MASK (0x000000C0) | |
324 | -#define MAC_CR_DFCHK (0x00000020) | |
325 | -#define MAC_CR_TXEN (0x00000008) | |
326 | -#define MAC_CR_RXEN (0x00000004) | |
327 | - | |
328 | -#define ADDRH (0x02) /* R/W mask 0x0000FFFFUL */ | |
329 | -#define ADDRL (0x03) /* R/W mask 0xFFFFFFFFUL */ | |
330 | -#define HASHH (0x04) /* R/W */ | |
331 | -#define HASHL (0x05) /* R/W */ | |
332 | - | |
333 | -#define MII_ACC (0x06) /* R/W */ | |
334 | -#define MII_ACC_PHY_ADDR (0x0000F800) | |
335 | -#define MII_ACC_MIIRINDA (0x000007C0) | |
336 | -#define MII_ACC_MII_WRITE (0x00000002) | |
337 | -#define MII_ACC_MII_BUSY (0x00000001) | |
338 | - | |
339 | -#define MII_DATA (0x07) /* R/W mask 0x0000FFFFUL */ | |
340 | - | |
341 | -#define FLOW (0x08) /* R/W */ | |
342 | -#define FLOW_FCPT (0xFFFF0000) | |
343 | -#define FLOW_FCPASS (0x00000004) | |
344 | -#define FLOW_FCEN (0x00000002) | |
345 | -#define FLOW_FCBSY (0x00000001) | |
346 | - | |
347 | -#define VLAN1 (0x09) /* R/W mask 0x0000FFFFUL */ | |
348 | -#define VLAN1_VTI1 (0x0000ffff) | |
349 | - | |
350 | -#define VLAN2 (0x0A) /* R/W mask 0x0000FFFFUL */ | |
351 | -#define VLAN2_VTI2 (0x0000ffff) | |
352 | - | |
353 | -#define WUFF (0x0B) /* WO */ | |
354 | - | |
355 | -#define WUCSR (0x0C) /* R/W */ | |
356 | -#define WUCSR_GUE (0x00000200) | |
357 | -#define WUCSR_WUFR (0x00000040) | |
358 | -#define WUCSR_MPR (0x00000020) | |
359 | -#define WUCSR_WAKE_EN (0x00000004) | |
360 | -#define WUCSR_MPEN (0x00000002) | |
361 | - | |
362 | -/* Chip ID values */ | |
363 | -#define CHIP_9115 0x115 | |
364 | -#define CHIP_9116 0x116 | |
365 | -#define CHIP_9117 0x117 | |
366 | -#define CHIP_9118 0x118 | |
367 | -#define CHIP_9215 0x115a | |
368 | -#define CHIP_9216 0x116a | |
369 | -#define CHIP_9217 0x117a | |
370 | -#define CHIP_9218 0x118a | |
371 | - | |
372 | -struct chip_id { | |
373 | - u16 id; | |
374 | - char *name; | |
375 | -}; | |
376 | - | |
377 | -static const struct chip_id chip_ids[] = { | |
378 | - { CHIP_9115, "LAN9115" }, | |
379 | - { CHIP_9116, "LAN9116" }, | |
380 | - { CHIP_9117, "LAN9117" }, | |
381 | - { CHIP_9118, "LAN9118" }, | |
382 | - { CHIP_9215, "LAN9215" }, | |
383 | - { CHIP_9216, "LAN9216" }, | |
384 | - { CHIP_9217, "LAN9217" }, | |
385 | - { CHIP_9218, "LAN9218" }, | |
386 | - { 0, NULL }, | |
387 | -}; | |
388 | - | |
389 | -#define DRIVERNAME "smc911x" | |
390 | - | |
391 | -u32 smc911x_get_mac_csr(u8 reg) | |
392 | -{ | |
393 | - while (MAC_CSR_CMD & MAC_CSR_CMD_CSR_BUSY); | |
394 | - MAC_CSR_CMD = MAC_CSR_CMD_CSR_BUSY | MAC_CSR_CMD_R_NOT_W | reg; | |
395 | - while (MAC_CSR_CMD & MAC_CSR_CMD_CSR_BUSY); | |
396 | - | |
397 | - return MAC_CSR_DATA; | |
398 | -} | |
399 | - | |
400 | -void smc911x_set_mac_csr(u8 reg, u32 data) | |
401 | -{ | |
402 | - while (MAC_CSR_CMD & MAC_CSR_CMD_CSR_BUSY); | |
403 | - MAC_CSR_DATA = data; | |
404 | - MAC_CSR_CMD = MAC_CSR_CMD_CSR_BUSY | reg; | |
405 | - while (MAC_CSR_CMD & MAC_CSR_CMD_CSR_BUSY); } | |
406 | - | |
407 | -static int smx911x_handle_mac_address(bd_t *bd) | |
408 | -{ | |
409 | - unsigned long addrh, addrl; | |
410 | - unsigned char *m = bd->bi_enetaddr; | |
411 | - | |
412 | - /* if the environment has a valid mac address then use it */ | |
413 | - if ((m[0] | m[1] | m[2] | m[3] | m[4] | m[5])) { | |
414 | - addrl = m[0] | m[1] << 8 | m[2] << 16 | m[3] << 24; | |
415 | - addrh = m[4] | m[5] << 8; | |
416 | - smc911x_set_mac_csr(ADDRH, addrh); | |
417 | - smc911x_set_mac_csr(ADDRL, addrl); | |
418 | - } else { | |
419 | - /* if not, try to get one from the eeprom */ | |
420 | - addrh = smc911x_get_mac_csr(ADDRH); | |
421 | - addrl = smc911x_get_mac_csr(ADDRL); | |
422 | - | |
423 | - m[0] = (addrl) & 0xff; | |
424 | - m[1] = (addrl >> 8) & 0xff; | |
425 | - m[2] = (addrl >> 16) & 0xff; | |
426 | - m[3] = (addrl >> 24) & 0xff; | |
427 | - m[4] = (addrh) & 0xff; | |
428 | - m[5] = (addrh >> 8) & 0xff; | |
429 | - | |
430 | - /* we get 0xff when there is no eeprom connected */ | |
431 | - if ((m[0] & m[1] & m[2] & m[3] & m[4] & m[5]) == 0xff) { | |
432 | - printf(DRIVERNAME ": no valid mac address " | |
433 | - "in environment " | |
434 | - "and no eeprom found\n"); | |
435 | - return -1; | |
436 | - } | |
437 | - } | |
438 | - | |
439 | - printf(DRIVERNAME ": MAC %02x:%02x:%02x:%02x:%02x:%02x\n", | |
440 | - m[0], m[1], m[2], m[3], m[4], m[5]); | |
441 | - | |
442 | - return 0; | |
443 | -} | |
444 | - | |
445 | -static int smc911x_miiphy_read(u8 phy, u8 reg, u16 *val) | |
446 | -{ | |
447 | - while (smc911x_get_mac_csr(MII_ACC) & MII_ACC_MII_BUSY); | |
448 | - | |
449 | - smc911x_set_mac_csr(MII_ACC, phy << 11 | reg << 6 | MII_ACC_MII_BUSY); | |
450 | - | |
451 | - while (smc911x_get_mac_csr(MII_ACC) & MII_ACC_MII_BUSY); | |
452 | - | |
453 | - *val = smc911x_get_mac_csr(MII_DATA); | |
454 | - | |
455 | - return 0; | |
456 | -} | |
457 | - | |
458 | -static int smc911x_miiphy_write(u8 phy, u8 reg, u16 val) | |
459 | -{ | |
460 | - while (smc911x_get_mac_csr(MII_ACC) & MII_ACC_MII_BUSY); | |
461 | - | |
462 | - smc911x_set_mac_csr(MII_DATA, val); | |
463 | - smc911x_set_mac_csr(MII_ACC, | |
464 | - phy << 11 | reg << 6 | MII_ACC_MII_BUSY | MII_ACC_MII_WRITE); | |
465 | - | |
466 | - while (smc911x_get_mac_csr(MII_ACC) & MII_ACC_MII_BUSY); | |
467 | - return 0; | |
468 | -} | |
469 | - | |
470 | -static int smc911x_phy_reset(void) | |
471 | -{ | |
472 | - u32 reg; | |
473 | - | |
474 | - reg = PMT_CTRL; | |
475 | - reg &= ~0xfffff030; | |
476 | - reg |= PMT_CTRL_PHY_RST; | |
477 | - PMT_CTRL = reg; | |
478 | - | |
479 | - mdelay(100); | |
480 | - | |
481 | - return 0; | |
482 | -} | |
483 | - | |
484 | -static void smc911x_phy_configure(void) | |
485 | -{ | |
486 | - int timeout; | |
487 | - u16 status; | |
488 | - | |
489 | - smc911x_phy_reset(); | |
490 | - | |
491 | - smc911x_miiphy_write(1, PHY_BMCR, PHY_BMCR_RESET); | |
492 | - mdelay(1); | |
493 | - smc911x_miiphy_write(1, PHY_ANAR, 0x01e1); | |
494 | - smc911x_miiphy_write(1, PHY_BMCR, PHY_BMCR_AUTON | PHY_BMCR_RST_NEG); | |
495 | - | |
496 | - timeout = 5000; | |
497 | - do { | |
498 | - mdelay(1); | |
499 | - if ((timeout--) == 0) | |
500 | - goto err_out; | |
501 | - | |
502 | - if (smc911x_miiphy_read(1, PHY_BMSR, &status) != 0) | |
503 | - goto err_out; | |
504 | - } while (!(status & PHY_BMSR_LS)); | |
505 | - | |
506 | - printf(DRIVERNAME ": phy initialized\n"); | |
507 | - | |
508 | - return; | |
509 | - | |
510 | -err_out: | |
511 | - printf(DRIVERNAME ": autonegotiation timed out\n"); } | |
512 | - | |
513 | -static void smc911x_reset(void) | |
514 | -{ | |
515 | - int timeout; | |
516 | - | |
517 | - /* Take out of PM setting first */ | |
518 | - if (PMT_CTRL & PMT_CTRL_READY) { | |
519 | - /* Write to the bytetest will take out of powerdown */ | |
520 | - BYTE_TEST = 0x0; | |
521 | - | |
522 | - timeout = 10; | |
523 | - | |
524 | - while (timeout-- && !(PMT_CTRL & PMT_CTRL_READY)) | |
525 | - udelay(10); | |
526 | - if (!timeout) { | |
527 | - printf(DRIVERNAME | |
528 | - ": timeout waiting for PM restore\n"); | |
529 | - return; | |
530 | - } | |
531 | - } | |
532 | - | |
533 | - /* Disable interrupts */ | |
534 | - INT_EN = 0; | |
535 | - | |
536 | - HW_CFG = HW_CFG_SRST; | |
537 | - | |
538 | - timeout = 1000; | |
539 | - while (timeout-- && E2P_CMD & E2P_CMD_EPC_BUSY) | |
540 | - udelay(10); | |
541 | - | |
542 | - if (!timeout) { | |
543 | - printf(DRIVERNAME ": reset timeout\n"); | |
544 | - return; | |
545 | - } | |
546 | - | |
547 | - /* Reset the FIFO level and flow control settings */ | |
548 | - smc911x_set_mac_csr(FLOW, FLOW_FCPT | FLOW_FCEN); | |
549 | - AFC_CFG = 0x0050287F; | |
550 | - | |
551 | - /* Set to LED outputs */ | |
552 | - GPIO_CFG = 0x70070000; | |
553 | -} | |
554 | - | |
555 | -static void smc911x_enable(void) | |
556 | -{ | |
557 | - /* Enable TX */ | |
558 | - HW_CFG = 8 << 16 | HW_CFG_SF; | |
559 | - | |
560 | - GPT_CFG = GPT_CFG_TIMER_EN | 10000; | |
561 | - | |
562 | - TX_CFG = TX_CFG_TX_ON; | |
563 | - | |
564 | - /* no padding to start of packets */ | |
565 | - RX_CFG = 0; | |
566 | - | |
567 | - smc911x_set_mac_csr(MAC_CR, MAC_CR_TXEN | MAC_CR_RXEN | MAC_CR_HBDIS); | |
568 | - | |
569 | -} | |
570 | - | |
571 | -int eth_init(bd_t *bd) | |
572 | -{ | |
573 | - unsigned long val, i; | |
574 | - | |
575 | - printf(DRIVERNAME ": initializing\n"); | |
576 | - | |
577 | - val = BYTE_TEST; | |
578 | - if (val != 0x87654321) { | |
579 | - printf(DRIVERNAME ": Invalid chip endian 0x08%x\n", val); | |
580 | - goto err_out; | |
581 | - } | |
582 | - | |
583 | - val = ID_REV >> 16; | |
584 | - for (i = 0; chip_ids[i].id != 0; i++) { | |
585 | - if (chip_ids[i].id == val) | |
586 | - break; | |
587 | - } | |
588 | - if (!chip_ids[i].id) { | |
589 | - printf(DRIVERNAME ": Unknown chip ID %04x\n", val); | |
590 | - goto err_out; | |
591 | - } | |
592 | - | |
593 | - printf(DRIVERNAME ": detected %s controller\n", chip_ids[i].name); | |
594 | - | |
595 | - smc911x_reset(); | |
596 | - | |
597 | - /* Configure the PHY, initialize the link state */ | |
598 | - smc911x_phy_configure(); | |
599 | - | |
600 | - if (smx911x_handle_mac_address(bd)) | |
601 | - goto err_out; | |
602 | - | |
603 | - /* Turn on Tx + Rx */ | |
604 | - smc911x_enable(); | |
605 | - | |
606 | - return 0; | |
607 | - | |
608 | -err_out: | |
609 | - return -1; | |
610 | -} | |
611 | - | |
612 | -int eth_send(volatile void *packet, int length) | |
613 | -{ | |
614 | - u32 *data = (u32 *)packet; | |
615 | - u32 tmplen; | |
616 | - u32 status; | |
617 | - | |
618 | - TX_DATA_FIFO = TX_CMD_A_INT_FIRST_SEG | TX_CMD_A_INT_LAST_SEG | length; | |
619 | - TX_DATA_FIFO = length; | |
620 | - | |
621 | - tmplen = (length + 3) / 4; | |
622 | - | |
623 | - while (tmplen--) | |
624 | - TX_DATA_FIFO = *data++; | |
625 | - | |
626 | - /* wait for transmission */ | |
627 | - while (!((TX_FIFO_INF & TX_FIFO_INF_TSUSED) >> 16)); | |
628 | - | |
629 | - /* get status. Ignore 'no carrier' error, it has no meaning for | |
630 | - * full duplex operation | |
631 | - */ | |
632 | - status = TX_STATUS_FIFO & (TX_STS_LOC | TX_STS_LATE_COLL | | |
633 | - TX_STS_MANY_COLL | TX_STS_MANY_DEFER | TX_STS_UNDERRUN); | |
634 | - | |
635 | - if (!status) | |
636 | - return 0; | |
637 | - | |
638 | - printf(DRIVERNAME ": failed to send packet: %s%s%s%s%s\n", | |
639 | - status & TX_STS_LOC ? "TX_STS_LOC " : "", | |
640 | - status & TX_STS_LATE_COLL ? "TX_STS_LATE_COLL " : "", | |
641 | - status & TX_STS_MANY_COLL ? "TX_STS_MANY_COLL " : "", | |
642 | - status & TX_STS_MANY_DEFER ? "TX_STS_MANY_DEFER " : "", | |
643 | - status & TX_STS_UNDERRUN ? "TX_STS_UNDERRUN" : ""); | |
644 | - | |
645 | - return -1; | |
646 | -} | |
647 | - | |
648 | -void eth_halt(void) | |
649 | -{ | |
650 | - smc911x_reset(); | |
651 | -} | |
652 | - | |
653 | -int eth_rx(void) | |
654 | -{ | |
655 | - u32 *data = (u32 *)NetRxPackets[0]; | |
656 | - u32 pktlen, tmplen; | |
657 | - u32 status; | |
658 | - | |
659 | - if ((RX_FIFO_INF & RX_FIFO_INF_RXSUSED) >> 16) { | |
660 | - status = RX_STATUS_FIFO; | |
661 | - pktlen = (status & RX_STS_PKT_LEN) >> 16; | |
662 | - | |
663 | - RX_CFG = 0; | |
664 | - | |
665 | - tmplen = (pktlen + 2 + 3) / 4; | |
666 | - while (tmplen--) | |
667 | - *data++ = RX_DATA_FIFO; | |
668 | - | |
669 | - if (status & RX_STS_ES) | |
670 | - printf(DRIVERNAME | |
671 | - ": dropped bad packet. Status: 0x%08x\n", | |
672 | - status); | |
673 | - else | |
674 | - NetReceive(NetRxPackets[0], pktlen); | |
675 | - } | |
676 | - | |
677 | - return 0; | |
678 | -} | |
679 | - | |
680 | -#endif /* CONFIG_DRIVER_SMC911X */ |
include/asm-arm/arch-arm1136/bits.h
1 | +/* bits.h | |
2 | + * Copyright (c) 2004 Texas Instruments | |
3 | + * | |
4 | + * This package is free software; you can redistribute it and/or | |
5 | + * modify it under the terms of the license found in the file | |
6 | + * named COPYING that should have accompanied this file. | |
7 | + * | |
8 | + * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
9 | + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
10 | + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
11 | + */ | |
12 | +#ifndef __bits_h | |
13 | +#define __bits_h 1 | |
14 | + | |
15 | +#define BIT0 (1<<0) | |
16 | +#define BIT1 (1<<1) | |
17 | +#define BIT2 (1<<2) | |
18 | +#define BIT3 (1<<3) | |
19 | +#define BIT4 (1<<4) | |
20 | +#define BIT5 (1<<5) | |
21 | +#define BIT6 (1<<6) | |
22 | +#define BIT7 (1<<7) | |
23 | +#define BIT8 (1<<8) | |
24 | +#define BIT9 (1<<9) | |
25 | +#define BIT10 (1<<10) | |
26 | +#define BIT11 (1<<11) | |
27 | +#define BIT12 (1<<12) | |
28 | +#define BIT13 (1<<13) | |
29 | +#define BIT14 (1<<14) | |
30 | +#define BIT15 (1<<15) | |
31 | +#define BIT16 (1<<16) | |
32 | +#define BIT17 (1<<17) | |
33 | +#define BIT18 (1<<18) | |
34 | +#define BIT19 (1<<19) | |
35 | +#define BIT20 (1<<20) | |
36 | +#define BIT21 (1<<21) | |
37 | +#define BIT22 (1<<22) | |
38 | +#define BIT23 (1<<23) | |
39 | +#define BIT24 (1<<24) | |
40 | +#define BIT25 (1<<25) | |
41 | +#define BIT26 (1<<26) | |
42 | +#define BIT27 (1<<27) | |
43 | +#define BIT28 (1<<28) | |
44 | +#define BIT29 (1<<29) | |
45 | +#define BIT30 (1<<30) | |
46 | +#define BIT31 (1<<31) | |
47 | + | |
48 | +#endif |
include/asm-arm/arch-arm1136/clocks.h
1 | +/* | |
2 | + * (C) Copyright 2004 | |
3 | + * Texas Instruments, <www.ti.com> | |
4 | + * Richard Woodruff <r-woodruff2@ti.com> | |
5 | + * | |
6 | + * This program is free software; you can redistribute it and/or | |
7 | + * modify it under the terms of the GNU General Public License as | |
8 | + * published by the Free Software Foundation; either version 2 of | |
9 | + * the License, or (at your option) any later version. | |
10 | + * | |
11 | + * This program is distributed in the hope that it will be useful, | |
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the | |
14 | + * GNU General Public License for more details. | |
15 | + * | |
16 | + * You should have received a copy of the GNU General Public License | |
17 | + * along with this program; if not, write to the Free Software | |
18 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
19 | + * MA 02111-1307 USA | |
20 | + */ | |
21 | +#ifndef _OMAP24XX_CLOCKS_H_ | |
22 | +#define _OMAP24XX_CLOCKS_H_ | |
23 | + | |
24 | +#define COMMIT_DIVIDERS 0x1 | |
25 | + | |
26 | +#define MODE_BYPASS_FAST 0x2 | |
27 | +#define APLL_LOCK 0xc | |
28 | +#ifdef CONFIG_APTIX | |
29 | +#define DPLL_LOCK 0x1 /* stay in bypass mode */ | |
30 | +#else | |
31 | +#define DPLL_LOCK 0x3 /* DPLL lock */ | |
32 | +#endif | |
33 | + | |
34 | +/****************************************************************************; | |
35 | +; PRCM Scheme II | |
36 | +; | |
37 | +; Enable clocks and DPLL for: | |
38 | +; DPLL=300, DPLLout=600 M=1,N=50 CM_CLKSEL1_PLL[21:8] 12/2*50 | |
39 | +; Core=600 (core domain) DPLLx2 CM_CLKSEL2_PLL[1:0] | |
40 | +; MPUF=300 (mpu domain) 2 CM_CLKSEL_MPU[4:0] | |
41 | +; DSPF=200 (dsp domain) 3 CM_CLKSEL_DSP[4:0] | |
42 | +; DSPI=100 6 CM_CLKSEL_DSP[6:5] | |
43 | +; DSP_S bypass CM_CLKSEL_DSP[7] | |
44 | +; IVAF=200 (dsp domain) 3 CM_CLKSEL_DSP[12:8] | |
45 | +; IVAF=100 auto | |
46 | +; IVAI auto | |
47 | +; IVA_MPU auto | |
48 | +; IVA_S bypass CM_CLKSEL_DSP[13] | |
49 | +; GFXF=50 (gfx domain) 12 CM_CLKSEL_FGX[2:0] | |
50 | +; SSI_SSRF=200 3 CM_CLKSEL1_CORE[24:20] | |
51 | +; SSI_SSTF=100 auto | |
52 | +; L3=100Mhz (sdram) 6 CM_CLKSEL1_CORE[4:0] | |
53 | +; L4=100Mhz 6 | |
54 | +; C_L4_USB=50 12 CM_CLKSEL1_CORE[6:5] | |
55 | +***************************************************************************/ | |
56 | +#define II_DPLL_OUT_X2 0x2 /* x2 core out */ | |
57 | +#define II_MPU_DIV 0x2 /* mpu = core/2 */ | |
58 | +#define II_DSP_DIV 0x343 /* dsp & iva divider */ | |
59 | +#define II_GFX_DIV 0x2 | |
60 | +#define II_BUS_DIV 0x04601026 | |
61 | +#define II_DPLL_300 0x01832100 | |
62 | + | |
63 | +/****************************************************************************; | |
64 | +; PRCM Scheme III | |
65 | +; | |
66 | +; Enable clocks and DPLL for: | |
67 | +; DPLL=266, DPLLout=532 M=5+1,N=133 CM_CLKSEL1_PLL[21:8] 12/6*133=266 | |
68 | +; Core=532 (core domain) DPLLx2 CM_CLKSEL2_PLL[1:0] | |
69 | +; MPUF=266 (mpu domain) /2 CM_CLKSEL_MPU[4:0] | |
70 | +; DSPF=177.3 (dsp domain) /3 CM_CLKSEL_DSP[4:0] | |
71 | +; DSPI=88.67 /6 CM_CLKSEL_DSP[6:5] | |
72 | +; DSP_S ACTIVATED CM_CLKSEL_DSP[7] | |
73 | +; IVAF=88.67 (dsp domain) /3 CM_CLKSEL_DSP[12:8] | |
74 | +; IVAF=88.67 auto | |
75 | +; IVAI auto | |
76 | +; IVA_MPU auto | |
77 | +; IVA_S ACTIVATED CM_CLKSEL_DSP[13] | |
78 | +; GFXF=66.5 (gfx domain) /8 CM_CLKSEL_FGX[2:0]: | |
79 | +; SSI_SSRF=177.3 /3 CM_CLKSEL1_CORE[24:20] | |
80 | +; SSI_SSTF=88.67 auto | |
81 | +; L3=133Mhz (sdram) /4 CM_CLKSEL1_CORE[4:0] | |
82 | +; L4=66.5Mhz /8 | |
83 | +; C_L4_USB=33.25 /16 CM_CLKSEL1_CORE[6:5] | |
84 | +***************************************************************************/ | |
85 | +#define III_DPLL_OUT_X2 0x2 /* x2 core out */ | |
86 | +#define III_MPU_DIV 0x2 /* mpu = core/2 */ | |
87 | +#define III_DSP_DIV 0x23C3 /* dsp & iva divider sych enabled*/ | |
88 | +#define III_GFX_DIV 0x2 | |
89 | +#define III_BUS_DIV 0x08301044 | |
90 | +#define III_DPLL_266 0x01885500 | |
91 | + | |
92 | +/* set defaults for boot up */ | |
93 | +#ifdef PRCM_CONFIG_II | |
94 | +# define DPLL_OUT II_DPLL_OUT_X2 | |
95 | +# define MPU_DIV II_MPU_DIV | |
96 | +# define DSP_DIV II_DSP_DIV | |
97 | +# define GFX_DIV II_GFX_DIV | |
98 | +# define BUS_DIV II_BUS_DIV | |
99 | +# define DPLL_VAL II_DPLL_300 | |
100 | +#elif PRCM_CONFIG_III | |
101 | +# define DPLL_OUT III_DPLL_OUT_X2 | |
102 | +# define MPU_DIV III_MPU_DIV | |
103 | +# define DSP_DIV III_DSP_DIV | |
104 | +# define GFX_DIV III_GFX_DIV | |
105 | +# define BUS_DIV III_BUS_DIV | |
106 | +# define DPLL_VAL III_DPLL_266 | |
107 | +#endif | |
108 | + | |
109 | +/* lock delay time out */ | |
110 | +#define LDELAY 12000000 | |
111 | + | |
112 | +#endif |
include/asm-arm/arch-arm1136/i2c.h
1 | +/* | |
2 | + * (C) Copyright 2004 | |
3 | + * Texas Instruments, <www.ti.com> | |
4 | + * | |
5 | + * See file CREDITS for list of people who contributed to this | |
6 | + * project. | |
7 | + * | |
8 | + * This program is free software; you can redistribute it and/or | |
9 | + * modify it under the terms of the GNU General Public License as | |
10 | + * published by the Free Software Foundation; either version 2 of | |
11 | + * the License, or (at your option) any later version. | |
12 | + * | |
13 | + * This program is distributed in the hope that it will be useful, | |
14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + * GNU General Public License for more details. | |
17 | + * | |
18 | + * You should have received a copy of the GNU General Public License | |
19 | + * along with this program; if not, write to the Free Software | |
20 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | + * MA 02111-1307 USA | |
22 | + */ | |
23 | +#ifndef _OMAP24XX_I2C_H_ | |
24 | +#define _OMAP24XX_I2C_H_ | |
25 | + | |
26 | +#define I2C_BASE 0x48070000 | |
27 | +#define I2C_BASE2 0x48072000 /* nothing hooked up on h4 */ | |
28 | + | |
29 | +#define I2C_REV (I2C_BASE + 0x00) | |
30 | +#define I2C_IE (I2C_BASE + 0x04) | |
31 | +#define I2C_STAT (I2C_BASE + 0x08) | |
32 | +#define I2C_IV (I2C_BASE + 0x0c) | |
33 | +#define I2C_BUF (I2C_BASE + 0x14) | |
34 | +#define I2C_CNT (I2C_BASE + 0x18) | |
35 | +#define I2C_DATA (I2C_BASE + 0x1c) | |
36 | +#define I2C_SYSC (I2C_BASE + 0x20) | |
37 | +#define I2C_CON (I2C_BASE + 0x24) | |
38 | +#define I2C_OA (I2C_BASE + 0x28) | |
39 | +#define I2C_SA (I2C_BASE + 0x2c) | |
40 | +#define I2C_PSC (I2C_BASE + 0x30) | |
41 | +#define I2C_SCLL (I2C_BASE + 0x34) | |
42 | +#define I2C_SCLH (I2C_BASE + 0x38) | |
43 | +#define I2C_SYSTEST (I2C_BASE + 0x3c) | |
44 | + | |
45 | +/* I2C masks */ | |
46 | + | |
47 | +/* I2C Interrupt Enable Register (I2C_IE): */ | |
48 | +#define I2C_IE_GC_IE (1 << 5) | |
49 | +#define I2C_IE_XRDY_IE (1 << 4) /* Transmit data ready interrupt enable */ | |
50 | +#define I2C_IE_RRDY_IE (1 << 3) /* Receive data ready interrupt enable */ | |
51 | +#define I2C_IE_ARDY_IE (1 << 2) /* Register access ready interrupt enable */ | |
52 | +#define I2C_IE_NACK_IE (1 << 1) /* No acknowledgment interrupt enable */ | |
53 | +#define I2C_IE_AL_IE (1 << 0) /* Arbitration lost interrupt enable */ | |
54 | + | |
55 | +/* I2C Status Register (I2C_STAT): */ | |
56 | + | |
57 | +#define I2C_STAT_SBD (1 << 15) /* Single byte data */ | |
58 | +#define I2C_STAT_BB (1 << 12) /* Bus busy */ | |
59 | +#define I2C_STAT_ROVR (1 << 11) /* Receive overrun */ | |
60 | +#define I2C_STAT_XUDF (1 << 10) /* Transmit underflow */ | |
61 | +#define I2C_STAT_AAS (1 << 9) /* Address as slave */ | |
62 | +#define I2C_STAT_GC (1 << 5) | |
63 | +#define I2C_STAT_XRDY (1 << 4) /* Transmit data ready */ | |
64 | +#define I2C_STAT_RRDY (1 << 3) /* Receive data ready */ | |
65 | +#define I2C_STAT_ARDY (1 << 2) /* Register access ready */ | |
66 | +#define I2C_STAT_NACK (1 << 1) /* No acknowledgment interrupt enable */ | |
67 | +#define I2C_STAT_AL (1 << 0) /* Arbitration lost interrupt enable */ | |
68 | + | |
69 | + | |
70 | +/* I2C Interrupt Code Register (I2C_INTCODE): */ | |
71 | + | |
72 | +#define I2C_INTCODE_MASK 7 | |
73 | +#define I2C_INTCODE_NONE 0 | |
74 | +#define I2C_INTCODE_AL 1 /* Arbitration lost */ | |
75 | +#define I2C_INTCODE_NAK 2 /* No acknowledgement/general call */ | |
76 | +#define I2C_INTCODE_ARDY 3 /* Register access ready */ | |
77 | +#define I2C_INTCODE_RRDY 4 /* Rcv data ready */ | |
78 | +#define I2C_INTCODE_XRDY 5 /* Xmit data ready */ | |
79 | + | |
80 | +/* I2C Buffer Configuration Register (I2C_BUF): */ | |
81 | + | |
82 | +#define I2C_BUF_RDMA_EN (1 << 15) /* Receive DMA channel enable */ | |
83 | +#define I2C_BUF_XDMA_EN (1 << 7) /* Transmit DMA channel enable */ | |
84 | + | |
85 | +/* I2C Configuration Register (I2C_CON): */ | |
86 | + | |
87 | +#define I2C_CON_EN (1 << 15) /* I2C module enable */ | |
88 | +#define I2C_CON_BE (1 << 14) /* Big endian mode */ | |
89 | +#define I2C_CON_STB (1 << 11) /* Start byte mode (master mode only) */ | |
90 | +#define I2C_CON_MST (1 << 10) /* Master/slave mode */ | |
91 | +#define I2C_CON_TRX (1 << 9) /* Transmitter/receiver mode (master mode only) */ | |
92 | +#define I2C_CON_XA (1 << 8) /* Expand address */ | |
93 | +#define I2C_CON_STP (1 << 1) /* Stop condition (master mode only) */ | |
94 | +#define I2C_CON_STT (1 << 0) /* Start condition (master mode only) */ | |
95 | + | |
96 | +/* I2C System Test Register (I2C_SYSTEST): */ | |
97 | + | |
98 | +#define I2C_SYSTEST_ST_EN (1 << 15) /* System test enable */ | |
99 | +#define I2C_SYSTEST_FREE (1 << 14) /* Free running mode (on breakpoint) */ | |
100 | +#define I2C_SYSTEST_TMODE_MASK (3 << 12) /* Test mode select */ | |
101 | +#define I2C_SYSTEST_TMODE_SHIFT (12) /* Test mode select */ | |
102 | +#define I2C_SYSTEST_SCL_I (1 << 3) /* SCL line sense input value */ | |
103 | +#define I2C_SYSTEST_SCL_O (1 << 2) /* SCL line drive output value */ | |
104 | +#define I2C_SYSTEST_SDA_I (1 << 1) /* SDA line sense input value */ | |
105 | +#define I2C_SYSTEST_SDA_O (1 << 0) /* SDA line drive output value */ | |
106 | + | |
107 | +#endif |
include/asm-arm/arch-arm1136/mem.h
1 | +/* | |
2 | + * (C) Copyright 2004 | |
3 | + * Texas Instruments, <www.ti.com> | |
4 | + * Richard Woodruff <r-woodruff2@ti.com> | |
5 | + * | |
6 | + * See file CREDITS for list of people who contributed to this | |
7 | + * project. | |
8 | + * | |
9 | + * This program is free software; you can redistribute it and/or | |
10 | + * modify it under the terms of the GNU General Public License as | |
11 | + * published by the Free Software Foundation; either version 2 of | |
12 | + * the License, or (at your option) any later version. | |
13 | + * | |
14 | + * This program is distributed in the hope that it will be useful, | |
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + * GNU General Public License for more details. | |
18 | + * | |
19 | + * You should have received a copy of the GNU General Public License | |
20 | + * along with this program; if not, write to the Free Software | |
21 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | + * MA 02111-1307 USA | |
23 | + */ | |
24 | + | |
25 | +#ifndef _OMAP24XX_MEM_H_ | |
26 | +#define _OMAP24XX_MEM_H_ | |
27 | + | |
28 | +#define SDRC_CS0_OSET 0x0 | |
29 | +#define SDRC_CS1_OSET 0x30 /* mirror CS1 regs appear offset 0x30 from CS0 */ | |
30 | + | |
31 | +#ifndef __ASSEMBLY__ | |
32 | +/* struct's for holding data tables for current boards, they are getting used | |
33 | + early in init when NO global access are there */ | |
34 | +struct sdrc_data_s { | |
35 | + u32 sdrc_sharing; | |
36 | + u32 sdrc_mdcfg_0_ddr; | |
37 | + u32 sdrc_mdcfg_0_sdr; | |
38 | + u32 sdrc_actim_ctrla_0; | |
39 | + u32 sdrc_actim_ctrlb_0; | |
40 | + u32 sdrc_rfr_ctrl; | |
41 | + u32 sdrc_mr_0_ddr; | |
42 | + u32 sdrc_mr_0_sdr; | |
43 | + u32 sdrc_dllab_ctrl; | |
44 | +} /*__attribute__ ((packed))*/; | |
45 | +typedef struct sdrc_data_s sdrc_data_t; | |
46 | + | |
47 | +typedef enum { | |
48 | + STACKED = 0, | |
49 | + IP_DDR = 1, | |
50 | + COMBO_DDR = 2, | |
51 | + IP_SDR = 3, | |
52 | +} mem_t; | |
53 | + | |
54 | +#endif | |
55 | + | |
56 | +/* Slower full frequency range default timings for x32 operation*/ | |
57 | +#define H4_2420_SDRC_SHARING 0x00000100 | |
58 | +#define H4_2420_SDRC_MDCFG_0_SDR 0x00D04010 /* discrete sdr module */ | |
59 | +#define H4_2420_SDRC_MR_0_SDR 0x00000031 | |
60 | +#define H4_2420_SDRC_MDCFG_0_DDR 0x01702011 /* descrite ddr module */ | |
61 | +#define H4_2420_COMBO_MDCFG_0_DDR 0x00801011 /* combo module */ | |
62 | +#define H4_2420_SDRC_MR_0_DDR 0x00000032 | |
63 | + | |
64 | +#define H4_2422_SDRC_SHARING 0x00004b00 | |
65 | +#define H4_2422_SDRC_MDCFG_0_DDR 0x00801011 /* stacked ddr on 2422 */ | |
66 | +#define H4_2422_SDRC_MR_0_DDR 0x00000032 | |
67 | + | |
68 | +/* ES1 work around timings */ | |
69 | +#define H4_242x_SDRC_ACTIM_CTRLA_0_ES1 0x9bead909 /* 165Mhz for use with 100/133 */ | |
70 | +#define H4_242x_SDRC_ACTIM_CTRLB_0_ES1 0x00000020 | |
71 | +#define H4_242x_SDRC_RFR_CTRL_ES1 0x00002401 /* use over refresh for ES1 */ | |
72 | + | |
73 | +/* optimized timings good for current shipping parts */ | |
74 | +#define H4_242X_SDRC_ACTIM_CTRLA_0_100MHz 0x5A59B485 | |
75 | +#define H4_242X_SDRC_ACTIM_CTRLB_0_100MHz 0x0000000e | |
76 | +#define H4_242X_SDRC_ACTIM_CTRLA_0_133MHz 0x8BA6E6C8 /* temp warn 0 settings */ | |
77 | +#define H4_242X_SDRC_ACTIM_CTRLB_0_133MHz 0x00000010 /* temp warn 0 settings */ | |
78 | +#define H4_242X_SDRC_RFR_CTRL_100MHz 0x0002da01 | |
79 | +#define H4_242X_SDRC_RFR_CTRL_133MHz 0x0003de01 | |
80 | +#define H4_242x_SDRC_DLLAB_CTRL_100MHz 0x0000980E /* 72deg, allow DPLLout*1 to work (combo)*/ | |
81 | +#define H4_242x_SDRC_DLLAB_CTRL_133MHz 0x0000690E /* 72deg, for ES2 */ | |
82 | + | |
83 | +#ifdef PRCM_CONFIG_II | |
84 | +# define H4_2420_SDRC_ACTIM_CTRLA_0 H4_242X_SDRC_ACTIM_CTRLA_0_100MHz | |
85 | +# define H4_2420_SDRC_ACTIM_CTRLB_0 H4_242X_SDRC_ACTIM_CTRLB_0_100MHz | |
86 | +# define H4_2420_SDRC_RFR_CTRL H4_242X_SDRC_RFR_CTRL_100MHz | |
87 | +# define H4_2420_SDRC_DLLAB_CTRL H4_242x_SDRC_DLLAB_CTRL_100MHz | |
88 | +# define H4_2422_SDRC_ACTIM_CTRLA_0 H4_242X_SDRC_ACTIM_CTRLA_0_100MHz | |
89 | +# define H4_2422_SDRC_ACTIM_CTRLB_0 H4_242X_SDRC_ACTIM_CTRLB_0_100MHz | |
90 | +# define H4_2422_SDRC_RFR_CTRL H4_242X_SDRC_RFR_CTRL_100MHz | |
91 | +# define H4_2422_SDRC_DLLAB_CTRL H4_242x_SDRC_DLLAB_CTRL_100MHz | |
92 | +#elif PRCM_CONFIG_III | |
93 | +# define H4_2420_SDRC_ACTIM_CTRLA_0 H4_242X_SDRC_ACTIM_CTRLA_0_133MHz | |
94 | +# define H4_2420_SDRC_ACTIM_CTRLB_0 H4_242X_SDRC_ACTIM_CTRLB_0_133MHz | |
95 | +# define H4_2420_SDRC_RFR_CTRL H4_242X_SDRC_RFR_CTRL_133MHz | |
96 | +# define H4_2420_SDRC_DLLAB_CTRL H4_242x_SDRC_DLLAB_CTRL_133MHz | |
97 | +# define H4_2422_SDRC_ACTIM_CTRLA_0 H4_242X_SDRC_ACTIM_CTRLA_0_100MHz | |
98 | +# define H4_2422_SDRC_ACTIM_CTRLB_0 H4_242X_SDRC_ACTIM_CTRLB_0_100MHz | |
99 | +# define H4_2422_SDRC_RFR_CTRL H4_242X_SDRC_RFR_CTRL_100MHz | |
100 | +# define H4_2422_SDRC_DLLAB_CTRL H4_242x_SDRC_DLLAB_CTRL_100MHz | |
101 | +#endif | |
102 | + | |
103 | + | |
104 | +/* GPMC settings */ | |
105 | +#ifdef PRCM_CONFIG_II /* L3 at 100MHz */ | |
106 | +# ifdef CFG_NAND_BOOT | |
107 | +# define H4_24XX_GPMC_CONFIG1_0 0x0 | |
108 | +# define H4_24XX_GPMC_CONFIG2_0 0x00141400 | |
109 | +# define H4_24XX_GPMC_CONFIG3_0 0x00141400 | |
110 | +# define H4_24XX_GPMC_CONFIG4_0 0x0F010F01 | |
111 | +# define H4_24XX_GPMC_CONFIG5_0 0x010C1414 | |
112 | +# define H4_24XX_GPMC_CONFIG6_0 0x00000A80 | |
113 | +# else /* else NOR */ | |
114 | +# define H4_24XX_GPMC_CONFIG1_0 0x3 | |
115 | +# define H4_24XX_GPMC_CONFIG2_0 0x000f0f01 | |
116 | +# define H4_24XX_GPMC_CONFIG3_0 0x00050502 | |
117 | +# define H4_24XX_GPMC_CONFIG4_0 0x0C060C06 | |
118 | +# define H4_24XX_GPMC_CONFIG5_0 0x01131F1F | |
119 | +# endif /* endif CFG_NAND_BOOT */ | |
120 | +# define H4_24XX_GPMC_CONFIG7_0 (0x00000C40|(H4_CS0_BASE >> 24)) | |
121 | +# define H4_24XX_GPMC_CONFIG1_1 0x00011000 | |
122 | +# define H4_24XX_GPMC_CONFIG2_1 0x001F1F00 | |
123 | +# define H4_24XX_GPMC_CONFIG3_1 0x00080802 | |
124 | +# define H4_24XX_GPMC_CONFIG4_1 0x1C091C09 | |
125 | +# define H4_24XX_GPMC_CONFIG5_1 0x031A1F1F | |
126 | +# define H4_24XX_GPMC_CONFIG6_1 0x000003C2 | |
127 | +# define H4_24XX_GPMC_CONFIG7_1 (0x00000F40|(H4_CS1_BASE >> 24)) | |
128 | +#endif /* endif PRCM_CONFIG_II */ | |
129 | + | |
130 | +#ifdef PRCM_CONFIG_III /* L3 at 133MHz */ | |
131 | +# ifdef CFG_NAND_BOOT | |
132 | +# define H4_24XX_GPMC_CONFIG1_0 0x0 | |
133 | +# define H4_24XX_GPMC_CONFIG2_0 0x00141400 | |
134 | +# define H4_24XX_GPMC_CONFIG3_0 0x00141400 | |
135 | +# define H4_24XX_GPMC_CONFIG4_0 0x0F010F01 | |
136 | +# define H4_24XX_GPMC_CONFIG5_0 0x010C1414 | |
137 | +# define H4_24XX_GPMC_CONFIG6_0 0x00000A80 | |
138 | +# else /* NOR boot */ | |
139 | +# define H4_24XX_GPMC_CONFIG1_0 0x3 | |
140 | +# define H4_24XX_GPMC_CONFIG2_0 0x00151501 | |
141 | +# define H4_24XX_GPMC_CONFIG3_0 0x00060602 | |
142 | +# define H4_24XX_GPMC_CONFIG4_0 0x10081008 | |
143 | +# define H4_24XX_GPMC_CONFIG5_0 0x01131F1F | |
144 | +# define H4_24XX_GPMC_CONFIG6_0 0x000004c4 | |
145 | +# endif /* endif CFG_NAND_BOOT */ | |
146 | +# define H4_24XX_GPMC_CONFIG7_0 (0x00000C40|(H4_CS0_BASE >> 24)) | |
147 | +# define H4_24XX_GPMC_CONFIG1_1 0x00011000 | |
148 | +# define H4_24XX_GPMC_CONFIG2_1 0x001f1f01 | |
149 | +# define H4_24XX_GPMC_CONFIG3_1 0x00080803 | |
150 | +# define H4_24XX_GPMC_CONFIG4_1 0x1C091C09 | |
151 | +# define H4_24XX_GPMC_CONFIG5_1 0x041f1F1F | |
152 | +# define H4_24XX_GPMC_CONFIG6_1 0x000004C4 | |
153 | +# define H4_24XX_GPMC_CONFIG7_1 (0x00000F40|(H4_CS1_BASE >> 24)) | |
154 | +#endif /* endif CFG_PRCM_III */ | |
155 | + | |
156 | +#endif /* endif _OMAP24XX_MEM_H_ */ |
include/asm-arm/arch-arm1136/mux.h
1 | +/* | |
2 | + * (C) Copyright 2004 | |
3 | + * Texas Instruments, <www.ti.com> | |
4 | + * Richard Woodruff <r-woodruff2@ti.com> | |
5 | + * | |
6 | + * This program is free software; you can redistribute it and/or | |
7 | + * modify it under the terms of the GNU General Public License as | |
8 | + * published by the Free Software Foundation; either version 2 of | |
9 | + * the License, or (at your option) any later version. | |
10 | + * | |
11 | + * This program is distributed in the hope that it will be useful, | |
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + * GNU General Public License for more details. | |
15 | + * | |
16 | + * You should have received a copy of the GNU General Public License | |
17 | + * along with this program; if not, write to the Free Software | |
18 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
19 | + * MA 02111-1307 USA | |
20 | + */ | |
21 | +#ifndef _OMAP2420_MUX_H_ | |
22 | +#define _OMAP2420_MUX_H_ | |
23 | + | |
24 | +#ifndef __ASSEMBLY__ | |
25 | +typedef unsigned char uint8; | |
26 | +typedef unsigned int uint32; | |
27 | + | |
28 | +void muxSetupSDRC(void); | |
29 | +void muxSetupGPMC(void); | |
30 | +void muxSetupUsb0(void); | |
31 | +void muxSetupUsbHost(void); | |
32 | +void muxSetupUart3(void); | |
33 | +void muxSetupI2C1(void); | |
34 | +void muxSetupUART1(void); | |
35 | +void muxSetupLCD(void); | |
36 | +void muxSetupCamera(void); | |
37 | +void muxSetupMMCSD(void) ; | |
38 | +void muxSetupTouchScreen(void) ; | |
39 | +void muxSetupHDQ(void); | |
40 | +#endif | |
41 | + | |
42 | +#define USB_OTG_CTRL ((volatile uint32 *)0x4805E30C) | |
43 | + | |
44 | +/* Pin Muxing registers used for HDQ (Smart battery) */ | |
45 | +#define CONTROL_PADCONF_HDQ_SIO ((volatile unsigned char *)0x48000115) | |
46 | + | |
47 | +/* Pin Muxing registers used for GPMC */ | |
48 | +#define CONTROL_PADCONF_GPMC_D2_BYTE0 ((volatile unsigned char *)0x48000088) | |
49 | +#define CONTROL_PADCONF_GPMC_D2_BYTE1 ((volatile unsigned char *)0x48000089) | |
50 | +#define CONTROL_PADCONF_GPMC_D2_BYTE2 ((volatile unsigned char *)0x4800008A) | |
51 | +#define CONTROL_PADCONF_GPMC_D2_BYTE3 ((volatile unsigned char *)0x4800008B) | |
52 | + | |
53 | +#define CONTROL_PADCONF_GPMC_NCS0_BYTE0 ((volatile unsigned char *)0x4800008C) | |
54 | +#define CONTROL_PADCONF_GPMC_NCS0_BYTE1 ((volatile unsigned char *)0x4800008D) | |
55 | +#define CONTROL_PADCONF_GPMC_NCS0_BYTE2 ((volatile unsigned char *)0x4800008E) | |
56 | +#define CONTROL_PADCONF_GPMC_NCS0_BYTE3 ((volatile unsigned char *)0x4800008F) | |
57 | +#define CONTROL_PADCONF_GPMC_NCS0_BYTE4 (0x48000090) | |
58 | +#define CONTROL_PADCONF_GPMC_NCS0_BYTE5 (0x48000091) | |
59 | +#define CONTROL_PADCONF_GPMC_NCS0_BYTE6 (0x48000092) | |
60 | +#define CONTROL_PADCONF_GPMC_NCS0_BYTE7 (0x48000093) | |
61 | + | |
62 | +/* Pin Muxing registers used for SDRC */ | |
63 | +#define CONTROL_PADCONF_SDRC_NCS0_BYTE0 ((volatile unsigned char *)0x480000A0) | |
64 | +#define CONTROL_PADCONF_SDRC_NCS0_BYTE1 ((volatile unsigned char *)0x480000A1) | |
65 | +#define CONTROL_PADCONF_SDRC_NCS0_BYTE2 ((volatile unsigned char *)0x480000A2) | |
66 | +#define CONTROL_PADCONF_SDRC_NCS0_BYTE3 ((volatile unsigned char *)0x480000A3) | |
67 | + | |
68 | +#define CONTROL_PADCONF_SDRC_A14_BYTE0 ((volatile unsigned char *)0x48000030) | |
69 | +#define CONTROL_PADCONF_SDRC_A14_BYTE1 ((volatile unsigned char *)0x48000031) | |
70 | +#define CONTROL_PADCONF_SDRC_A14_BYTE2 ((volatile unsigned char *)0x48000032) | |
71 | +#define CONTROL_PADCONF_SDRC_A14_BYTE3 ((volatile unsigned char *)0x48000033) | |
72 | + | |
73 | +/* Pin Muxing registers used for Touch Screen (SPI) */ | |
74 | +#define CONTROL_PADCONF_SPI1_CLK ((volatile unsigned char *)0x480000FF) | |
75 | +#define CONTROL_PADCONF_SPI1_SIMO ((volatile unsigned char *)0x48000100) | |
76 | +#define CONTROL_PADCONF_SPI1_SOMI ((volatile unsigned char *)0x48000101) | |
77 | +#define CONTROL_PADCONF_SPI1_NCS0 ((volatile unsigned char *)0x48000102) | |
78 | +#define CONTROL_PADCONF_SPI1_NCS1 (0x48000103) | |
79 | + | |
80 | +#define CONTROL_PADCONF_MCBSP1_FSR ((volatile unsigned char *)0x4800010B) | |
81 | + | |
82 | +/* Pin Muxing registers used for MMCSD */ | |
83 | +#define CONTROL_PADCONF_MMC_CLKI ((volatile unsigned char *)0x480000FE) | |
84 | +#define CONTROL_PADCONF_MMC_CLKO ((volatile unsigned char *)0x480000F3) | |
85 | +#define CONTROL_PADCONF_MMC_CMD ((volatile unsigned char *)0x480000F4) | |
86 | +#define CONTROL_PADCONF_MMC_DAT0 ((volatile unsigned char *)0x480000F5) | |
87 | +#define CONTROL_PADCONF_MMC_DAT1 ((volatile unsigned char *)0x480000F6) | |
88 | +#define CONTROL_PADCONF_MMC_DAT2 ((volatile unsigned char *)0x480000F7) | |
89 | +#define CONTROL_PADCONF_MMC_DAT3 ((volatile unsigned char *)0x480000F8) | |
90 | +#define CONTROL_PADCONF_MMC_DAT_DIR0 ((volatile unsigned char *)0x480000F9) | |
91 | +#define CONTROL_PADCONF_MMC_DAT_DIR1 ((volatile unsigned char *)0x480000FA) | |
92 | +#define CONTROL_PADCONF_MMC_DAT_DIR2 ((volatile unsigned char *)0x480000FB) | |
93 | +#define CONTROL_PADCONF_MMC_DAT_DIR3 ((volatile unsigned char *)0x480000FC) | |
94 | +#define CONTROL_PADCONF_MMC_CMD_DIR ((volatile unsigned char *)0x480000FD) | |
95 | + | |
96 | +#define CONTROL_PADCONF_SDRC_A14 ((volatile unsigned char *)0x48000030) | |
97 | +#define CONTROL_PADCONF_SDRC_A13 ((volatile unsigned char *)0x48000031) | |
98 | + | |
99 | +/* Pin Muxing registers used for CAMERA */ | |
100 | +#define CONTROL_PADCONF_SYS_NRESWARM ((volatile unsigned char *)0x4800012B) | |
101 | + | |
102 | +#define CONTROL_PADCONF_CAM_XCLK ((volatile unsigned char *)0x480000DC) | |
103 | +#define CONTROL_PADCONF_CAM_LCLK ((volatile unsigned char *)0x480000DB) | |
104 | +#define CONTROL_PADCONF_CAM_VS ((volatile unsigned char *)0x480000DA) | |
105 | +#define CONTROL_PADCONF_CAM_HS ((volatile unsigned char *)0x480000D9) | |
106 | +#define CONTROL_PADCONF_CAM_D0 ((volatile unsigned char *)0x480000D8) | |
107 | +#define CONTROL_PADCONF_CAM_D1 ((volatile unsigned char *)0x480000D7) | |
108 | +#define CONTROL_PADCONF_CAM_D2 ((volatile unsigned char *)0x480000D6) | |
109 | +#define CONTROL_PADCONF_CAM_D3 ((volatile unsigned char *)0x480000D5) | |
110 | +#define CONTROL_PADCONF_CAM_D4 ((volatile unsigned char *)0x480000D4) | |
111 | +#define CONTROL_PADCONF_CAM_D5 ((volatile unsigned char *)0x480000D3) | |
112 | +#define CONTROL_PADCONF_CAM_D6 ((volatile unsigned char *)0x480000D2) | |
113 | +#define CONTROL_PADCONF_CAM_D7 ((volatile unsigned char *)0x480000D1) | |
114 | +#define CONTROL_PADCONF_CAM_D8 ((volatile unsigned char *)0x480000D0) | |
115 | +#define CONTROL_PADCONF_CAM_D9 ((volatile unsigned char *)0x480000CF) | |
116 | + | |
117 | +/* Pin Muxing registers used for LCD */ | |
118 | +#define CONTROL_PADCONF_DSS_D0 ((volatile unsigned char *)0x480000B3) | |
119 | +#define CONTROL_PADCONF_DSS_D1 ((volatile unsigned char *)0x480000B4) | |
120 | +#define CONTROL_PADCONF_DSS_D2 ((volatile unsigned char *)0x480000B5) | |
121 | +#define CONTROL_PADCONF_DSS_D3 ((volatile unsigned char *)0x480000B6) | |
122 | +#define CONTROL_PADCONF_DSS_D4 ((volatile unsigned char *)0x480000B7) | |
123 | +#define CONTROL_PADCONF_DSS_D5 ((volatile unsigned char *)0x480000B8) | |
124 | +#define CONTROL_PADCONF_DSS_D6 ((volatile unsigned char *)0x480000B9) | |
125 | +#define CONTROL_PADCONF_DSS_D7 ((volatile unsigned char *)0x480000BA) | |
126 | +#define CONTROL_PADCONF_DSS_D8 ((volatile unsigned char *)0x480000BB) | |
127 | +#define CONTROL_PADCONF_DSS_D9 ((volatile unsigned char *)0x480000BC) | |
128 | +#define CONTROL_PADCONF_DSS_D10 ((volatile unsigned char *)0x480000BD) | |
129 | +#define CONTROL_PADCONF_DSS_D11 ((volatile unsigned char *)0x480000BE) | |
130 | +#define CONTROL_PADCONF_DSS_D12 ((volatile unsigned char *)0x480000BF) | |
131 | +#define CONTROL_PADCONF_DSS_D13 ((volatile unsigned char *)0x480000C0) | |
132 | +#define CONTROL_PADCONF_DSS_D14 ((volatile unsigned char *)0x480000C1) | |
133 | +#define CONTROL_PADCONF_DSS_D15 ((volatile unsigned char *)0x480000C2) | |
134 | +#define CONTROL_PADCONF_DSS_D16 ((volatile unsigned char *)0x480000C3) | |
135 | +#define CONTROL_PADCONF_DSS_D17 ((volatile unsigned char *)0x480000C4) | |
136 | +#define CONTROL_PADCONF_DSS_PCLK ((volatile unsigned char *)0x480000CB) | |
137 | +#define CONTROL_PADCONF_DSS_VSYNC ((volatile unsigned char *)0x480000CC) | |
138 | +#define CONTROL_PADCONF_DSS_HSYNC ((volatile unsigned char *)0x480000CD) | |
139 | +#define CONTROL_PADCONF_DSS_ACBIAS ((volatile unsigned char *)0x480000CE) | |
140 | + | |
141 | +/* Pin Muxing registers used for UART1 */ | |
142 | +#define CONTROL_PADCONF_UART1_CTS ((volatile unsigned char *)0x480000C5) | |
143 | +#define CONTROL_PADCONF_UART1_RTS ((volatile unsigned char *)0x480000C6) | |
144 | +#define CONTROL_PADCONF_UART1_TX ((volatile unsigned char *)0x480000C7) | |
145 | +#define CONTROL_PADCONF_UART1_RX ((volatile unsigned char *)0x480000C8) | |
146 | + | |
147 | +/* Pin Muxing registers used for I2C1 */ | |
148 | +#define CONTROL_PADCONF_I2C1_SCL ((volatile unsigned char *)0x48000111) | |
149 | +#define CONTROL_PADCONF_I2C1_SDA ((volatile unsigned char *)0x48000112) | |
150 | + | |
151 | +/* Pin Muxing registres used for USB0. */ | |
152 | +#define CONTROL_PADCONF_USB0_PUEN ((volatile uint8 *)0x4800011D) | |
153 | +#define CONTROL_PADCONF_USB0_VP ((volatile uint8 *)0x4800011E) | |
154 | +#define CONTROL_PADCONF_USB0_VM ((volatile uint8 *)0x4800011F) | |
155 | +#define CONTROL_PADCONF_USB0_RCV ((volatile uint8 *)0x48000120) | |
156 | +#define CONTROL_PADCONF_USB0_TXEN ((volatile uint8 *)0x48000121) | |
157 | +#define CONTROL_PADCONF_USB0_SE0 ((volatile uint8 *)0x48000122) | |
158 | +#define CONTROL_PADCONF_USB0_DAT ((volatile uint8 *)0x48000123) | |
159 | + | |
160 | +/* Pin Muxing registres used for USB1. */ | |
161 | +#define CONTROL_PADCONF_USB1_RCV (0x480000EB) | |
162 | +#define CONTROL_PADCONF_USB1_TXEN (0x480000EC) | |
163 | + | |
164 | +/* Pin Muxing registers used for UART3/IRDA */ | |
165 | +#define CONTROL_PADCONF_UART3_TX_IRTX ((volatile uint8 *)0x48000118) | |
166 | +#define CONTROL_PADCONF_UART3_RX_IRRX ((volatile uint8 *)0x48000119) | |
167 | + | |
168 | +/* Pin Muxing registers used for GPIO */ | |
169 | +#define CONTROL_PADCONF_GPIO69 (0x480000ED) | |
170 | +#define CONTROL_PADCONF_GPIO70 (0x480000EE) | |
171 | +#define CONTROL_PADCONF_GPIO102 (0x48000116) | |
172 | +#define CONTROL_PADCONF_GPIO103 (0x48000117) | |
173 | +#define CONTROL_PADCONF_GPIO104 (0x48000118) | |
174 | +#define CONTROL_PADCONF_GPIO105 (0x48000119) | |
175 | + | |
176 | +#endif |
include/asm-arm/arch-arm1136/omap2420.h
1 | +/* | |
2 | + * (C) Copyright 2004 | |
3 | + * Texas Instruments, <www.ti.com> | |
4 | + * Richard Woodruff <r-woodruff2@ti.com> | |
5 | + * | |
6 | + * See file CREDITS for list of people who contributed to this | |
7 | + * project. | |
8 | + * | |
9 | + * This program is free software; you can redistribute it and/or | |
10 | + * modify it under the terms of the GNU General Public License as | |
11 | + * published by the Free Software Foundation; either version 2 of | |
12 | + * the License, or (at your option) any later version. | |
13 | + * | |
14 | + * This program is distributed in the hope that it will be useful, | |
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + * GNU General Public License for more details. | |
18 | + * | |
19 | + * You should have received a copy of the GNU General Public License | |
20 | + * along with this program; if not, write to the Free Software | |
21 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | + * MA 02111-1307 USA | |
23 | + */ | |
24 | + | |
25 | +#ifndef _OMAP2420_SYS_H_ | |
26 | +#define _OMAP2420_SYS_H_ | |
27 | + | |
28 | +#include <asm/arch/sizes.h> | |
29 | + | |
30 | +/* | |
31 | + * 2420 specific Section | |
32 | + */ | |
33 | + | |
34 | +/* L3 Firewall */ | |
35 | +#define A_REQINFOPERM0 0x68005048 | |
36 | +#define A_READPERM0 0x68005050 | |
37 | +#define A_WRITEPERM0 0x68005058 | |
38 | +/* #define GP_DEVICE (BIT8|BIT9) FIXME -- commented out to make compile -- FIXME */ | |
39 | + | |
40 | +/* L3 Firewall */ | |
41 | +#define A_REQINFOPERM0 0x68005048 | |
42 | +#define A_READPERM0 0x68005050 | |
43 | +#define A_WRITEPERM0 0x68005058 | |
44 | + | |
45 | +/* CONTROL */ | |
46 | +#define OMAP2420_CTRL_BASE (0x48000000) | |
47 | +#define CONTROL_STATUS (OMAP2420_CTRL_BASE + 0x2F8) | |
48 | + | |
49 | +/* device type */ | |
50 | +#define TST_DEVICE 0x0 | |
51 | +#define EMU_DEVICE 0x1 | |
52 | +#define HS_DEVICE 0x2 | |
53 | +#define GP_DEVICE 0x3 | |
54 | + | |
55 | +/* TAP information */ | |
56 | +#define OMAP2420_TAP_BASE (0x48014000) | |
57 | +#define TAP_IDCODE_REG (OMAP2420_TAP_BASE+0x204) | |
58 | +#define PRODUCTION_ID (OMAP2420_TAP_BASE+0x208) | |
59 | + | |
60 | +/* GPMC */ | |
61 | +#define OMAP2420_GPMC_BASE (0x6800A000) | |
62 | +#define GPMC_SYSCONFIG (OMAP2420_GPMC_BASE+0x10) | |
63 | +#define GPMC_IRQENABLE (OMAP2420_GPMC_BASE+0x1C) | |
64 | +#define GPMC_TIMEOUT_CONTROL (OMAP2420_GPMC_BASE+0x40) | |
65 | +#define GPMC_CONFIG (OMAP2420_GPMC_BASE+0x50) | |
66 | +#define GPMC_CONFIG1_0 (OMAP2420_GPMC_BASE+0x60) | |
67 | +#define GPMC_CONFIG2_0 (OMAP2420_GPMC_BASE+0x64) | |
68 | +#define GPMC_CONFIG3_0 (OMAP2420_GPMC_BASE+0x68) | |
69 | +#define GPMC_CONFIG4_0 (OMAP2420_GPMC_BASE+0x6C) | |
70 | +#define GPMC_CONFIG5_0 (OMAP2420_GPMC_BASE+0x70) | |
71 | +#define GPMC_CONFIG6_0 (OMAP2420_GPMC_BASE+0x74) | |
72 | +#define GPMC_CONFIG7_0 (OMAP2420_GPMC_BASE+0x78) | |
73 | +#define GPMC_CONFIG1_1 (OMAP2420_GPMC_BASE+0x90) | |
74 | +#define GPMC_CONFIG2_1 (OMAP2420_GPMC_BASE+0x94) | |
75 | +#define GPMC_CONFIG3_1 (OMAP2420_GPMC_BASE+0x98) | |
76 | +#define GPMC_CONFIG4_1 (OMAP2420_GPMC_BASE+0x9C) | |
77 | +#define GPMC_CONFIG5_1 (OMAP2420_GPMC_BASE+0xA0) | |
78 | +#define GPMC_CONFIG6_1 (OMAP2420_GPMC_BASE+0xA4) | |
79 | +#define GPMC_CONFIG7_1 (OMAP2420_GPMC_BASE+0xA8) | |
80 | +#define GPMC_CONFIG1_2 (OMAP2420_GPMC_BASE+0xC0) | |
81 | +#define GPMC_CONFIG2_2 (OMAP2420_GPMC_BASE+0xC4) | |
82 | +#define GPMC_CONFIG3_2 (OMAP2420_GPMC_BASE+0xC8) | |
83 | +#define GPMC_CONFIG4_2 (OMAP2420_GPMC_BASE+0xCC) | |
84 | +#define GPMC_CONFIG5_2 (OMAP2420_GPMC_BASE+0xD0) | |
85 | +#define GPMC_CONFIG6_2 (OMAP2420_GPMC_BASE+0xD4) | |
86 | +#define GPMC_CONFIG7_2 (OMAP2420_GPMC_BASE+0xD8) | |
87 | +#define GPMC_CONFIG1_3 (OMAP2420_GPMC_BASE+0xF0) | |
88 | +#define GPMC_CONFIG2_3 (OMAP2420_GPMC_BASE+0xF4) | |
89 | +#define GPMC_CONFIG3_3 (OMAP2420_GPMC_BASE+0xF8) | |
90 | +#define GPMC_CONFIG4_3 (OMAP2420_GPMC_BASE+0xFC) | |
91 | +#define GPMC_CONFIG5_3 (OMAP2420_GPMC_BASE+0x100) | |
92 | +#define GPMC_CONFIG6_3 (OMAP2420_GPMC_BASE+0x104) | |
93 | +#define GPMC_CONFIG7_3 (OMAP2420_GPMC_BASE+0x108) | |
94 | + | |
95 | +/* SMS */ | |
96 | +#define OMAP2420_SMS_BASE 0x68008000 | |
97 | +#define SMS_SYSCONFIG (OMAP2420_SMS_BASE+0x10) | |
98 | +#define SMS_CLASS_ARB0 (OMAP2420_SMS_BASE+0xD0) | |
99 | +# define BURSTCOMPLETE_GROUP7 BIT31 | |
100 | + | |
101 | +/* SDRC */ | |
102 | +#define OMAP2420_SDRC_BASE 0x68009000 | |
103 | +#define SDRC_SYSCONFIG (OMAP2420_SDRC_BASE+0x10) | |
104 | +#define SDRC_STATUS (OMAP2420_SDRC_BASE+0x14) | |
105 | +#define SDRC_CS_CFG (OMAP2420_SDRC_BASE+0x40) | |
106 | +#define SDRC_SHARING (OMAP2420_SDRC_BASE+0x44) | |
107 | +#define SDRC_DLLA_CTRL (OMAP2420_SDRC_BASE+0x60) | |
108 | +#define SDRC_DLLB_CTRL (OMAP2420_SDRC_BASE+0x68) | |
109 | +#define SDRC_POWER (OMAP2420_SDRC_BASE+0x70) | |
110 | +#define SDRC_MCFG_0 (OMAP2420_SDRC_BASE+0x80) | |
111 | +#define SDRC_MR_0 (OMAP2420_SDRC_BASE+0x84) | |
112 | +#define SDRC_ACTIM_CTRLA_0 (OMAP2420_SDRC_BASE+0x9C) | |
113 | +#define SDRC_ACTIM_CTRLB_0 (OMAP2420_SDRC_BASE+0xA0) | |
114 | +#define SDRC_ACTIM_CTRLA_1 (OMAP2420_SDRC_BASE+0xC4) | |
115 | +#define SDRC_ACTIM_CTRLB_1 (OMAP2420_SDRC_BASE+0xC8) | |
116 | +#define SDRC_RFR_CTRL (OMAP2420_SDRC_BASE+0xA4) | |
117 | +#define SDRC_MANUAL_0 (OMAP2420_SDRC_BASE+0xA8) | |
118 | +#define OMAP2420_SDRC_CS0 0x80000000 | |
119 | +#define OMAP2420_SDRC_CS1 0xA0000000 | |
120 | +#define CMD_NOP 0x0 | |
121 | +#define CMD_PRECHARGE 0x1 | |
122 | +#define CMD_AUTOREFRESH 0x2 | |
123 | +#define CMD_ENTR_PWRDOWN 0x3 | |
124 | +#define CMD_EXIT_PWRDOWN 0x4 | |
125 | +#define CMD_ENTR_SRFRSH 0x5 | |
126 | +#define CMD_CKE_HIGH 0x6 | |
127 | +#define CMD_CKE_LOW 0x7 | |
128 | +#define SOFTRESET BIT1 | |
129 | +#define SMART_IDLE (0x2 << 3) | |
130 | +#define REF_ON_IDLE (0x1 << 6) | |
131 | + | |
132 | + | |
133 | +/* UART */ | |
134 | +#define OMAP2420_UART1 0x4806A000 | |
135 | +#define OMAP2420_UART2 0x4806C000 | |
136 | +#define OMAP2420_UART3 0x4806E000 | |
137 | + | |
138 | +/* General Purpose Timers */ | |
139 | +#define OMAP2420_GPT1 0x48028000 | |
140 | +#define OMAP2420_GPT2 0x4802A000 | |
141 | +#define OMAP2420_GPT3 0x48078000 | |
142 | +#define OMAP2420_GPT4 0x4807A000 | |
143 | +#define OMAP2420_GPT5 0x4807C000 | |
144 | +#define OMAP2420_GPT6 0x4807E000 | |
145 | +#define OMAP2420_GPT7 0x48080000 | |
146 | +#define OMAP2420_GPT8 0x48082000 | |
147 | +#define OMAP2420_GPT9 0x48084000 | |
148 | +#define OMAP2420_GPT10 0x48086000 | |
149 | +#define OMAP2420_GPT11 0x48088000 | |
150 | +#define OMAP2420_GPT12 0x4808A000 | |
151 | + | |
152 | +/* timer regs offsets (32 bit regs) */ | |
153 | +#define TIDR 0x0 /* r */ | |
154 | +#define TIOCP_CFG 0x10 /* rw */ | |
155 | +#define TISTAT 0x14 /* r */ | |
156 | +#define TISR 0x18 /* rw */ | |
157 | +#define TIER 0x1C /* rw */ | |
158 | +#define TWER 0x20 /* rw */ | |
159 | +#define TCLR 0x24 /* rw */ | |
160 | +#define TCRR 0x28 /* rw */ | |
161 | +#define TLDR 0x2C /* rw */ | |
162 | +#define TTGR 0x30 /* rw */ | |
163 | +#define TWPS 0x34 /* r */ | |
164 | +#define TMAR 0x38 /* rw */ | |
165 | +#define TCAR1 0x3c /* r */ | |
166 | +#define TSICR 0x40 /* rw */ | |
167 | +#define TCAR2 0x44 /* r */ | |
168 | + | |
169 | +/* WatchDog Timers (1 secure, 3 GP) */ | |
170 | +#define WD1_BASE 0x48020000 | |
171 | +#define WD2_BASE 0x48022000 | |
172 | +#define WD3_BASE 0x48024000 | |
173 | +#define WD4_BASE 0x48026000 | |
174 | +#define WWPS 0x34 /* r */ | |
175 | +#define WSPR 0x48 /* rw */ | |
176 | +#define WD_UNLOCK1 0xAAAA | |
177 | +#define WD_UNLOCK2 0x5555 | |
178 | + | |
179 | +/* PRCM */ | |
180 | +#define OMAP2420_CM_BASE 0x48008000 | |
181 | +#define PRCM_CLKCFG_CTRL (OMAP2420_CM_BASE+0x080) | |
182 | +#define CM_CLKSEL_MPU (OMAP2420_CM_BASE+0x140) | |
183 | +#define CM_FCLKEN1_CORE (OMAP2420_CM_BASE+0x200) | |
184 | +#define CM_FCLKEN2_CORE (OMAP2420_CM_BASE+0x204) | |
185 | +#define CM_ICLKEN1_CORE (OMAP2420_CM_BASE+0x210) | |
186 | +#define CM_ICLKEN2_CORE (OMAP2420_CM_BASE+0x214) | |
187 | +#define CM_CLKSEL1_CORE (OMAP2420_CM_BASE+0x240) | |
188 | +#define CM_CLKSEL_WKUP (OMAP2420_CM_BASE+0x440) | |
189 | +#define CM_CLKSEL2_CORE (OMAP2420_CM_BASE+0x244) | |
190 | +#define CM_CLKSEL_GFX (OMAP2420_CM_BASE+0x340) | |
191 | +#define PM_RSTCTRL_WKUP (OMAP2420_CM_BASE+0x450) | |
192 | +#define CM_CLKEN_PLL (OMAP2420_CM_BASE+0x500) | |
193 | +#define CM_IDLEST_CKGEN (OMAP2420_CM_BASE+0x520) | |
194 | +#define CM_CLKSEL1_PLL (OMAP2420_CM_BASE+0x540) | |
195 | +#define CM_CLKSEL2_PLL (OMAP2420_CM_BASE+0x544) | |
196 | +#define CM_CLKSEL_DSP (OMAP2420_CM_BASE+0x840) | |
197 | + | |
198 | +/* | |
199 | + * H4 specific Section | |
200 | + */ | |
201 | + | |
202 | +/* | |
203 | + * The 2420's chip selects are programmable. The mask ROM | |
204 | + * does configure CS0 to 0x08000000 before dispatch. So, if | |
205 | + * you want your code to live below that address, you have to | |
206 | + * be prepared to jump though hoops, to reset the base address. | |
207 | + */ | |
208 | +#if defined(CONFIG_OMAP2420H4) | |
209 | +/* GPMC */ | |
210 | +#ifdef CONFIG_VIRTIO_A /* Pre version B */ | |
211 | +# define H4_CS0_BASE 0x08000000 /* flash (64 Meg aligned) */ | |
212 | +# define H4_CS1_BASE 0x04000000 /* debug board */ | |
213 | +# define H4_CS2_BASE 0x0A000000 /* wifi board */ | |
214 | +#else | |
215 | +# define H4_CS0_BASE 0x04000000 /* flash (64 Meg aligned) */ | |
216 | +# define H4_CS1_BASE 0x08000000 /* debug board */ | |
217 | +# define H4_CS2_BASE 0x0A000000 /* wifi board */ | |
218 | +#endif | |
219 | + | |
220 | +/* base address for indirect vectors (internal boot mode) */ | |
221 | +#define SRAM_OFFSET0 0x40000000 | |
222 | +#define SRAM_OFFSET1 0x00200000 | |
223 | +#define SRAM_OFFSET2 0x0000F800 | |
224 | +#define SRAM_VECT_CODE (SRAM_OFFSET0|SRAM_OFFSET1|SRAM_OFFSET2) | |
225 | + | |
226 | +/* FPGA on Debug board.*/ | |
227 | +#define ETH_CONTROL_REG (H4_CS1_BASE+0x30b) | |
228 | +#define LAN_RESET_REGISTER (H4_CS1_BASE+0x1c) | |
229 | +#endif /* endif CONFIG_2420H4 */ | |
230 | + | |
231 | +#if defined(CONFIG_APOLLON) | |
232 | +#define APOLLON_CS0_BASE 0x00000000 /* OneNAND */ | |
233 | +#define APOLLON_CS1_BASE 0x08000000 /* ethernet */ | |
234 | +#define APOLLON_CS2_BASE 0x10000000 /* OneNAND */ | |
235 | +#define APOLLON_CS3_BASE 0x18000000 /* NOR */ | |
236 | + | |
237 | +#define ETH_CONTROL_REG (APOLLON_CS1_BASE + 0x30b) | |
238 | +#define LAN_RESET_REGISTER (APOLLON_CS1_BASE + 0x1c) | |
239 | +#endif /* endif CONFIG_APOLLON */ | |
240 | + | |
241 | +/* Common */ | |
242 | +#define LOW_LEVEL_SRAM_STACK 0x4020FFFC | |
243 | + | |
244 | +#define PERIFERAL_PORT_BASE 0x480FE003 | |
245 | + | |
246 | +#endif |
include/asm-arm/arch-arm1136/sizes.h
1 | +/* | |
2 | + * This program is free software; you can redistribute it and/or modify | |
3 | + * it under the terms of the GNU General Public License as published by | |
4 | + * the Free Software Foundation; either version 2 of the License, or | |
5 | + * (at your option) any later version. | |
6 | + * | |
7 | + * This program is distributed in the hope that it will be useful, | |
8 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | + * GNU General Public License for more details. | |
11 | + * | |
12 | + * You should have received a copy of the GNU General Public License | |
13 | + * along with this program; if not, write to the Free Software | |
14 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
15 | + */ | |
16 | +/* Size defintions | |
17 | + * Copyright (C) ARM Limited 1998. All rights reserved. | |
18 | + */ | |
19 | + | |
20 | +#ifndef __sizes_h | |
21 | +#define __sizes_h 1 | |
22 | + | |
23 | +/* handy sizes */ | |
24 | +#define SZ_1K 0x00000400 | |
25 | +#define SZ_4K 0x00001000 | |
26 | +#define SZ_8K 0x00002000 | |
27 | +#define SZ_16K 0x00004000 | |
28 | +#define SZ_32K 0x00008000 | |
29 | +#define SZ_64K 0x00010000 | |
30 | +#define SZ_128K 0x00020000 | |
31 | +#define SZ_256K 0x00040000 | |
32 | +#define SZ_512K 0x00080000 | |
33 | + | |
34 | +#define SZ_1M 0x00100000 | |
35 | +#define SZ_2M 0x00200000 | |
36 | +#define SZ_4M 0x00400000 | |
37 | +#define SZ_8M 0x00800000 | |
38 | +#define SZ_16M 0x01000000 | |
39 | +#define SZ_31M 0x01F00000 | |
40 | +#define SZ_32M 0x02000000 | |
41 | +#define SZ_64M 0x04000000 | |
42 | +#define SZ_128M 0x08000000 | |
43 | +#define SZ_256M 0x10000000 | |
44 | +#define SZ_512M 0x20000000 | |
45 | + | |
46 | +#define SZ_1G 0x40000000 | |
47 | +#define SZ_2G 0x80000000 | |
48 | + | |
49 | +#endif /* __sizes_h */ |
include/asm-arm/arch-arm1136/sys_info.h
1 | +/* | |
2 | + * (C) Copyright 2004 | |
3 | + * Texas Instruments, <www.ti.com> | |
4 | + * Richard Woodruff <r-woodruff2@ti.com> | |
5 | + * | |
6 | + * See file CREDITS for list of people who contributed to this | |
7 | + * project. | |
8 | + * | |
9 | + * This program is free software; you can redistribute it and/or | |
10 | + * modify it under the terms of the GNU General Public License as | |
11 | + * published by the Free Software Foundation; either version 2 of | |
12 | + * the License, or (at your option) any later version. | |
13 | + * | |
14 | + * This program is distributed in the hope that it will be useful, | |
15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | + * GNU General Public License for more details. | |
18 | + * | |
19 | + * You should have received a copy of the GNU General Public License | |
20 | + * along with this program; if not, write to the Free Software | |
21 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | + * MA 02111-1307 USA | |
23 | + */ | |
24 | + | |
25 | +#ifndef _OMAP24XX_SYS_INFO_H_ | |
26 | +#define _OMAP24XX_SYS_INFO_H_ | |
27 | + | |
28 | +typedef struct h4_system_data { | |
29 | + /* base board info */ | |
30 | + u32 base_b_rev; /* rev from base board i2c */ | |
31 | + /* cpu board info */ | |
32 | + u32 cpu_b_rev; /* rev from cpu board i2c */ | |
33 | + u32 cpu_b_mux; /* mux type on daughter board */ | |
34 | + u32 cpu_b_ddr_type; /* mem type */ | |
35 | + u32 cpu_b_ddr_speed; /* ddr speed rating */ | |
36 | + u32 cpu_b_switches; /* boot ctrl switch settings */ | |
37 | + /* cpu info */ | |
38 | + u32 cpu_type; /* type of cpu; 2420, 2422, 2430,...*/ | |
39 | + u32 cpu_rev; /* rev of given cpu; ES1, ES2,...*/ | |
40 | +} h4_sys_data; | |
41 | + | |
42 | +#define XDR_POP 5 /* package on package part */ | |
43 | +#define SDR_DISCRETE 4 /* 128M memory SDR module*/ | |
44 | +#define DDR_STACKED 3 /* stacked part on 2422 */ | |
45 | +#define DDR_COMBO 2 /* combo part on cpu daughter card (menalaeus) */ | |
46 | +#define DDR_DISCRETE 1 /* 2x16 parts on daughter card */ | |
47 | + | |
48 | +#define DDR_100 100 /* type found on most mem d-boards */ | |
49 | +#define DDR_111 111 /* some combo parts */ | |
50 | +#define DDR_133 133 /* most combo, some mem d-boards */ | |
51 | +#define DDR_165 165 /* future parts */ | |
52 | + | |
53 | +#define CPU_2420 0x2420 | |
54 | +#define CPU_2422 0x2422 /* 2420 + 64M stacked */ | |
55 | +#define CPU_2423 0x2423 /* 2420 + 96M stacked */ | |
56 | + | |
57 | +#define CPU_2422_ES1 1 | |
58 | +#define CPU_2422_ES2 2 | |
59 | +#define CPU_2420_ES1 1 | |
60 | +#define CPU_2420_ES2 2 | |
61 | +#define CPU_2420_2422_ES1 1 | |
62 | + | |
63 | +#define CPU_2420_CHIPID 0x0B5D9000 | |
64 | +#define CPU_24XX_ID_MASK 0x0FFFF000 | |
65 | +#define CPU_242X_REV_MASK 0xF0000000 | |
66 | +#define CPU_242X_PID_MASK 0x000F0000 | |
67 | + | |
68 | +#define BOARD_H4_MENELAUS 1 | |
69 | +#define BOARD_H4_SDP 2 | |
70 | + | |
71 | +#define GPMC_MUXED 1 | |
72 | +#define GPMC_NONMUXED 0 | |
73 | + | |
74 | +#define TYPE_NAND 0x800 /* bit pos for nand in gpmc reg */ | |
75 | +#define TYPE_NOR 0x000 | |
76 | + | |
77 | +#define WIDTH_8BIT 0x0000 | |
78 | +#define WIDTH_16BIT 0x1000 /* bit pos for 16 bit in gpmc */ | |
79 | + | |
80 | +#define I2C_MENELAUS 0x72 /* i2c id for companion chip */ | |
81 | + | |
82 | +#endif |
include/asm-arm/arch-arm1136/sys_proto.h
1 | +/* | |
2 | + * (C) Copyright 2004 | |
3 | + * Texas Instruments, <www.ti.com> | |
4 | + * Richard Woodruff <r-woodruff2@ti.com> | |
5 | + * | |
6 | + * This program is free software; you can redistribute it and/or | |
7 | + * modify it under the terms of the GNU General Public License as | |
8 | + * published by the Free Software Foundation; either version 2 of | |
9 | + * the License, or (at your option) any later version. | |
10 | + * | |
11 | + * This program is distributed in the hope that it will be useful, | |
12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the | |
14 | + * GNU General Public License for more details. | |
15 | + * | |
16 | + * You should have received a copy of the GNU General Public License | |
17 | + * along with this program; if not, write to the Free Software | |
18 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
19 | + * MA 02111-1307 USA | |
20 | + */ | |
21 | +#ifndef _OMAP24XX_SYS_PROTO_H_ | |
22 | +#define _OMAP24XX_SYS_PROTO_H_ | |
23 | + | |
24 | +void prcm_init(void); | |
25 | +void memif_init(void); | |
26 | +void sdrc_init(void); | |
27 | +void do_sdrc_init(u32,u32); | |
28 | +void gpmc_init(void); | |
29 | + | |
30 | +void ether_init(void); | |
31 | +void watchdog_init(void); | |
32 | +void set_muxconf_regs(void); | |
33 | +void peripheral_enable(void); | |
34 | + | |
35 | +u32 get_cpu_type(void); | |
36 | +u32 get_cpu_rev(void); | |
37 | +u32 get_mem_type(void); | |
38 | +u32 get_sysboot_value(void); | |
39 | +u32 get_gpmc0_base(void); | |
40 | +u32 is_gpmc_muxed(void); | |
41 | +u32 get_gpmc0_type(void); | |
42 | +u32 get_gpmc0_width(void); | |
43 | +u32 wait_on_value(u32 read_bit_mask, u32 match_value, u32 read_addr, u32 bound); | |
44 | +u32 get_board_type(void); | |
45 | +void display_board_info(u32); | |
46 | +void update_mux(u32,u32); | |
47 | +u32 get_sdr_cs_size(u32 offset); | |
48 | + | |
49 | +u32 running_in_sdram(void); | |
50 | +u32 running_in_sram(void); | |
51 | +u32 running_in_flash(void); | |
52 | +u32 running_from_internal_boot(void); | |
53 | +u32 get_device_type(void); | |
54 | +#endif |
include/asm-arm/arch-davinci/hardware.h
include/asm-arm/arch-mx31/mx31-regs.h
1 | -/* | |
2 | - * | |
3 | - * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | -#ifndef __ASM_ARCH_MX31_REGS_H | |
25 | -#define __ASM_ARCH_MX31_REGS_H | |
26 | - | |
27 | -#define __REG(x) (*((volatile u32 *)(x))) | |
28 | -#define __REG16(x) (*((volatile u16 *)(x))) | |
29 | -#define __REG8(x) (*((volatile u8 *)(x))) | |
30 | - | |
31 | -#define CCM_BASE 0x53f80000 | |
32 | -#define CCM_CCMR (CCM_BASE + 0x00) | |
33 | -#define CCM_PDR0 (CCM_BASE + 0x04) | |
34 | -#define CCM_PDR1 (CCM_BASE + 0x08) | |
35 | -#define CCM_RCSR (CCM_BASE + 0x0c) | |
36 | -#define CCM_MPCTL (CCM_BASE + 0x10) | |
37 | -#define CCM_UPCTL (CCM_BASE + 0x10) | |
38 | -#define CCM_SPCTL (CCM_BASE + 0x18) | |
39 | -#define CCM_COSR (CCM_BASE + 0x1C) | |
40 | - | |
41 | -#define CCMR_MDS (1 << 7) | |
42 | -#define CCMR_SBYCS (1 << 4) | |
43 | -#define CCMR_MPE (1 << 3) | |
44 | -#define CCMR_PRCS_MASK (3 << 1) | |
45 | -#define CCMR_FPM (1 << 1) | |
46 | -#define CCMR_CKIH (2 << 1) | |
47 | - | |
48 | -#define PDR0_CSI_PODF(x) (((x) & 0x1ff) << 23) | |
49 | -#define PDR0_PER_PODF(x) (((x) & 0x1f) << 16) | |
50 | -#define PDR0_HSP_PODF(x) (((x) & 0x7) << 11) | |
51 | -#define PDR0_NFC_PODF(x) (((x) & 0x7) << 8) | |
52 | -#define PDR0_IPG_PODF(x) (((x) & 0x3) << 6) | |
53 | -#define PDR0_MAX_PODF(x) (((x) & 0x7) << 3) | |
54 | -#define PDR0_MCU_PODF(x) ((x) & 0x7) | |
55 | - | |
56 | -#define PLL_PD(x) (((x) & 0xf) << 26) | |
57 | -#define PLL_MFD(x) (((x) & 0x3ff) << 16) | |
58 | -#define PLL_MFI(x) (((x) & 0xf) << 10) | |
59 | -#define PLL_MFN(x) (((x) & 0x3ff) << 0) | |
60 | - | |
61 | -#define WEIM_BASE 0xb8002000 | |
62 | -#define CSCR_U(x) (WEIM_BASE + (x) * 0x10) | |
63 | -#define CSCR_L(x) (WEIM_BASE + 4 + (x) * 0x10) | |
64 | -#define CSCR_A(x) (WEIM_BASE + 8 + (x) * 0x10) | |
65 | - | |
66 | -#define IOMUXC_BASE 0x43FAC000 | |
67 | -#define IOMUXC_GPR (IOMUXC_BASE + 0x8) | |
68 | -#define IOMUXC_SW_MUX_CTL(x) (IOMUXC_BASE + 0xc + (x) * 4) | |
69 | -#define IOMUXC_SW_PAD_CTL(x) (IOMUXC_BASE + 0x154 + (x) * 4) | |
70 | - | |
71 | -#define IPU_BASE 0x53fc0000 | |
72 | -#define IPU_CONF IPU_BASE | |
73 | - | |
74 | -#define IPU_CONF_PXL_ENDIAN (1<<8) | |
75 | -#define IPU_CONF_DU_EN (1<<7) | |
76 | -#define IPU_CONF_DI_EN (1<<6) | |
77 | -#define IPU_CONF_ADC_EN (1<<5) | |
78 | -#define IPU_CONF_SDC_EN (1<<4) | |
79 | -#define IPU_CONF_PF_EN (1<<3) | |
80 | -#define IPU_CONF_ROT_EN (1<<2) | |
81 | -#define IPU_CONF_IC_EN (1<<1) | |
82 | -#define IPU_CONF_SCI_EN (1<<0) | |
83 | - | |
84 | -#define WDOG_BASE 0x53FDC000 | |
85 | - | |
86 | -/* | |
87 | - * Signal Multiplexing (IOMUX) | |
88 | - */ | |
89 | - | |
90 | -/* bits in the SW_MUX_CTL registers */ | |
91 | -#define MUX_CTL_OUT_GPIO_DR (0 << 4) | |
92 | -#define MUX_CTL_OUT_FUNC (1 << 4) | |
93 | -#define MUX_CTL_OUT_ALT1 (2 << 4) | |
94 | -#define MUX_CTL_OUT_ALT2 (3 << 4) | |
95 | -#define MUX_CTL_OUT_ALT3 (4 << 4) | |
96 | -#define MUX_CTL_OUT_ALT4 (5 << 4) | |
97 | -#define MUX_CTL_OUT_ALT5 (6 << 4) | |
98 | -#define MUX_CTL_OUT_ALT6 (7 << 4) | |
99 | -#define MUX_CTL_IN_NONE (0 << 0) | |
100 | -#define MUX_CTL_IN_GPIO (1 << 0) | |
101 | -#define MUX_CTL_IN_FUNC (2 << 0) | |
102 | -#define MUX_CTL_IN_ALT1 (4 << 0) | |
103 | -#define MUX_CTL_IN_ALT2 (8 << 0) | |
104 | - | |
105 | -#define MUX_CTL_FUNC (MUX_CTL_OUT_FUNC | MUX_CTL_IN_FUNC) | |
106 | -#define MUX_CTL_ALT1 (MUX_CTL_OUT_ALT1 | MUX_CTL_IN_ALT1) | |
107 | -#define MUX_CTL_ALT2 (MUX_CTL_OUT_ALT2 | MUX_CTL_IN_ALT2) | |
108 | -#define MUX_CTL_GPIO (MUX_CTL_OUT_GPIO_DR | MUX_CTL_IN_GPIO) | |
109 | - | |
110 | -/* Register offsets based on IOMUXC_BASE */ | |
111 | -/* 0x00 .. 0x7b */ | |
112 | -#define MUX_CTL_RTS1 0x7c | |
113 | -#define MUX_CTL_CTS1 0x7d | |
114 | -#define MUX_CTL_DTR_DCE1 0x7e | |
115 | -#define MUX_CTL_DSR_DCE1 0x7f | |
116 | -#define MUX_CTL_CSPI2_SCLK 0x80 | |
117 | -#define MUX_CTL_CSPI2_SPI_RDY 0x81 | |
118 | -#define MUX_CTL_RXD1 0x82 | |
119 | -#define MUX_CTL_TXD1 0x83 | |
120 | -#define MUX_CTL_CSPI2_MISO 0x84 | |
121 | -/* 0x85 .. 0x8a */ | |
122 | -#define MUX_CTL_CSPI2_MOSI 0x8b | |
123 | - | |
124 | -/* The modes a specific pin can be in | |
125 | - * these macros can be used in mx31_gpio_mux() and have the form | |
126 | - * MUX_[contact name]__[pin function] | |
127 | - */ | |
128 | -#define MUX_RXD1__UART1_RXD_MUX ((MUX_CTL_FUNC << 8) | MUX_CTL_RXD1) | |
129 | -#define MUX_TXD1__UART1_TXD_MUX ((MUX_CTL_FUNC << 8) | MUX_CTL_TXD1) | |
130 | -#define MUX_RTS1__UART1_RTS_B ((MUX_CTL_FUNC << 8) | MUX_CTL_RTS1) | |
131 | -#define MUX_RTS1__UART1_CTS_B ((MUX_CTL_FUNC << 8) | MUX_CTL_CTS1) | |
132 | - | |
133 | -#define MUX_CSPI2_MOSI__I2C2_SCL ((MUX_CTL_ALT1 << 8) | MUX_CTL_CSPI2_MOSI) | |
134 | -#define MUX_CSPI2_MISO__I2C2_SCL ((MUX_CTL_ALT1 << 8) | MUX_CTL_CSPI2_MISO) | |
135 | - | |
136 | -/* | |
137 | - * Memory regions and CS | |
138 | - */ | |
139 | -#define IPU_MEM_BASE 0x70000000 | |
140 | -#define CSD0_BASE 0x80000000 | |
141 | -#define CSD1_BASE 0x90000000 | |
142 | -#define CS0_BASE 0xA0000000 | |
143 | -#define CS1_BASE 0xA8000000 | |
144 | -#define CS2_BASE 0xB0000000 | |
145 | -#define CS3_BASE 0xB2000000 | |
146 | -#define CS4_BASE 0xB4000000 | |
147 | -#define CS4_PSRAM_BASE 0xB5000000 | |
148 | -#define CS5_BASE 0xB6000000 | |
149 | -#define PCMCIA_MEM_BASE 0xC0000000 | |
150 | - | |
151 | -#endif /* __ASM_ARCH_MX31_REGS_H */ |
include/asm-arm/arch-mx31/mx31.h
1 | -/* | |
2 | - * | |
3 | - * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | - | |
24 | -#ifndef __ASM_ARCH_MX31_H | |
25 | -#define __ASM_ARCH_MX31_H | |
26 | - | |
27 | -u32 mx31_get_mpl_dpdgck_clk(void); | |
28 | -u32 mx31_get_mcu_main_clk(void); | |
29 | -u32 mx31_get_ipg_clk(void); | |
30 | -void mx31_gpio_mux(unsigned long mode); | |
31 | - | |
32 | -#endif /* __ASM_ARCH_MX31_H */ |
include/asm-arm/arch-omap24xx/bits.h
1 | -/* bits.h | |
2 | - * Copyright (c) 2004 Texas Instruments | |
3 | - * | |
4 | - * This package is free software; you can redistribute it and/or | |
5 | - * modify it under the terms of the license found in the file | |
6 | - * named COPYING that should have accompanied this file. | |
7 | - * | |
8 | - * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
9 | - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
10 | - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
11 | - */ | |
12 | -#ifndef __bits_h | |
13 | -#define __bits_h 1 | |
14 | - | |
15 | -#define BIT0 (1<<0) | |
16 | -#define BIT1 (1<<1) | |
17 | -#define BIT2 (1<<2) | |
18 | -#define BIT3 (1<<3) | |
19 | -#define BIT4 (1<<4) | |
20 | -#define BIT5 (1<<5) | |
21 | -#define BIT6 (1<<6) | |
22 | -#define BIT7 (1<<7) | |
23 | -#define BIT8 (1<<8) | |
24 | -#define BIT9 (1<<9) | |
25 | -#define BIT10 (1<<10) | |
26 | -#define BIT11 (1<<11) | |
27 | -#define BIT12 (1<<12) | |
28 | -#define BIT13 (1<<13) | |
29 | -#define BIT14 (1<<14) | |
30 | -#define BIT15 (1<<15) | |
31 | -#define BIT16 (1<<16) | |
32 | -#define BIT17 (1<<17) | |
33 | -#define BIT18 (1<<18) | |
34 | -#define BIT19 (1<<19) | |
35 | -#define BIT20 (1<<20) | |
36 | -#define BIT21 (1<<21) | |
37 | -#define BIT22 (1<<22) | |
38 | -#define BIT23 (1<<23) | |
39 | -#define BIT24 (1<<24) | |
40 | -#define BIT25 (1<<25) | |
41 | -#define BIT26 (1<<26) | |
42 | -#define BIT27 (1<<27) | |
43 | -#define BIT28 (1<<28) | |
44 | -#define BIT29 (1<<29) | |
45 | -#define BIT30 (1<<30) | |
46 | -#define BIT31 (1<<31) | |
47 | - | |
48 | -#endif |
include/asm-arm/arch-omap24xx/clocks.h
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments, <www.ti.com> | |
4 | - * Richard Woodruff <r-woodruff2@ti.com> | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License as | |
8 | - * published by the Free Software Foundation; either version 2 of | |
9 | - * the License, or (at your option) any later version. | |
10 | - * | |
11 | - * This program is distributed in the hope that it will be useful, | |
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the | |
14 | - * GNU General Public License for more details. | |
15 | - * | |
16 | - * You should have received a copy of the GNU General Public License | |
17 | - * along with this program; if not, write to the Free Software | |
18 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
19 | - * MA 02111-1307 USA | |
20 | - */ | |
21 | -#ifndef _OMAP24XX_CLOCKS_H_ | |
22 | -#define _OMAP24XX_CLOCKS_H_ | |
23 | - | |
24 | -#define COMMIT_DIVIDERS 0x1 | |
25 | - | |
26 | -#define MODE_BYPASS_FAST 0x2 | |
27 | -#define APLL_LOCK 0xc | |
28 | -#ifdef CONFIG_APTIX | |
29 | -#define DPLL_LOCK 0x1 /* stay in bypass mode */ | |
30 | -#else | |
31 | -#define DPLL_LOCK 0x3 /* DPLL lock */ | |
32 | -#endif | |
33 | - | |
34 | -/****************************************************************************; | |
35 | -; PRCM Scheme II | |
36 | -; | |
37 | -; Enable clocks and DPLL for: | |
38 | -; DPLL=300, DPLLout=600 M=1,N=50 CM_CLKSEL1_PLL[21:8] 12/2*50 | |
39 | -; Core=600 (core domain) DPLLx2 CM_CLKSEL2_PLL[1:0] | |
40 | -; MPUF=300 (mpu domain) 2 CM_CLKSEL_MPU[4:0] | |
41 | -; DSPF=200 (dsp domain) 3 CM_CLKSEL_DSP[4:0] | |
42 | -; DSPI=100 6 CM_CLKSEL_DSP[6:5] | |
43 | -; DSP_S bypass CM_CLKSEL_DSP[7] | |
44 | -; IVAF=200 (dsp domain) 3 CM_CLKSEL_DSP[12:8] | |
45 | -; IVAF=100 auto | |
46 | -; IVAI auto | |
47 | -; IVA_MPU auto | |
48 | -; IVA_S bypass CM_CLKSEL_DSP[13] | |
49 | -; GFXF=50 (gfx domain) 12 CM_CLKSEL_FGX[2:0] | |
50 | -; SSI_SSRF=200 3 CM_CLKSEL1_CORE[24:20] | |
51 | -; SSI_SSTF=100 auto | |
52 | -; L3=100Mhz (sdram) 6 CM_CLKSEL1_CORE[4:0] | |
53 | -; L4=100Mhz 6 | |
54 | -; C_L4_USB=50 12 CM_CLKSEL1_CORE[6:5] | |
55 | -***************************************************************************/ | |
56 | -#define II_DPLL_OUT_X2 0x2 /* x2 core out */ | |
57 | -#define II_MPU_DIV 0x2 /* mpu = core/2 */ | |
58 | -#define II_DSP_DIV 0x343 /* dsp & iva divider */ | |
59 | -#define II_GFX_DIV 0x2 | |
60 | -#define II_BUS_DIV 0x04601026 | |
61 | -#define II_DPLL_300 0x01832100 | |
62 | - | |
63 | -/****************************************************************************; | |
64 | -; PRCM Scheme III | |
65 | -; | |
66 | -; Enable clocks and DPLL for: | |
67 | -; DPLL=266, DPLLout=532 M=5+1,N=133 CM_CLKSEL1_PLL[21:8] 12/6*133=266 | |
68 | -; Core=532 (core domain) DPLLx2 CM_CLKSEL2_PLL[1:0] | |
69 | -; MPUF=266 (mpu domain) /2 CM_CLKSEL_MPU[4:0] | |
70 | -; DSPF=177.3 (dsp domain) /3 CM_CLKSEL_DSP[4:0] | |
71 | -; DSPI=88.67 /6 CM_CLKSEL_DSP[6:5] | |
72 | -; DSP_S ACTIVATED CM_CLKSEL_DSP[7] | |
73 | -; IVAF=88.67 (dsp domain) /3 CM_CLKSEL_DSP[12:8] | |
74 | -; IVAF=88.67 auto | |
75 | -; IVAI auto | |
76 | -; IVA_MPU auto | |
77 | -; IVA_S ACTIVATED CM_CLKSEL_DSP[13] | |
78 | -; GFXF=66.5 (gfx domain) /8 CM_CLKSEL_FGX[2:0]: | |
79 | -; SSI_SSRF=177.3 /3 CM_CLKSEL1_CORE[24:20] | |
80 | -; SSI_SSTF=88.67 auto | |
81 | -; L3=133Mhz (sdram) /4 CM_CLKSEL1_CORE[4:0] | |
82 | -; L4=66.5Mhz /8 | |
83 | -; C_L4_USB=33.25 /16 CM_CLKSEL1_CORE[6:5] | |
84 | -***************************************************************************/ | |
85 | -#define III_DPLL_OUT_X2 0x2 /* x2 core out */ | |
86 | -#define III_MPU_DIV 0x2 /* mpu = core/2 */ | |
87 | -#define III_DSP_DIV 0x23C3 /* dsp & iva divider sych enabled*/ | |
88 | -#define III_GFX_DIV 0x2 | |
89 | -#define III_BUS_DIV 0x08301044 | |
90 | -#define III_DPLL_266 0x01885500 | |
91 | - | |
92 | -/* set defaults for boot up */ | |
93 | -#ifdef PRCM_CONFIG_II | |
94 | -# define DPLL_OUT II_DPLL_OUT_X2 | |
95 | -# define MPU_DIV II_MPU_DIV | |
96 | -# define DSP_DIV II_DSP_DIV | |
97 | -# define GFX_DIV II_GFX_DIV | |
98 | -# define BUS_DIV II_BUS_DIV | |
99 | -# define DPLL_VAL II_DPLL_300 | |
100 | -#elif PRCM_CONFIG_III | |
101 | -# define DPLL_OUT III_DPLL_OUT_X2 | |
102 | -# define MPU_DIV III_MPU_DIV | |
103 | -# define DSP_DIV III_DSP_DIV | |
104 | -# define GFX_DIV III_GFX_DIV | |
105 | -# define BUS_DIV III_BUS_DIV | |
106 | -# define DPLL_VAL III_DPLL_266 | |
107 | -#endif | |
108 | - | |
109 | -/* lock delay time out */ | |
110 | -#define LDELAY 12000000 | |
111 | - | |
112 | -#endif |
include/asm-arm/arch-omap24xx/i2c.h
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments, <www.ti.com> | |
4 | - * | |
5 | - * See file CREDITS for list of people who contributed to this | |
6 | - * project. | |
7 | - * | |
8 | - * This program is free software; you can redistribute it and/or | |
9 | - * modify it under the terms of the GNU General Public License as | |
10 | - * published by the Free Software Foundation; either version 2 of | |
11 | - * the License, or (at your option) any later version. | |
12 | - * | |
13 | - * This program is distributed in the hope that it will be useful, | |
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | - * GNU General Public License for more details. | |
17 | - * | |
18 | - * You should have received a copy of the GNU General Public License | |
19 | - * along with this program; if not, write to the Free Software | |
20 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | - * MA 02111-1307 USA | |
22 | - */ | |
23 | -#ifndef _OMAP24XX_I2C_H_ | |
24 | -#define _OMAP24XX_I2C_H_ | |
25 | - | |
26 | -#define I2C_BASE 0x48070000 | |
27 | -#define I2C_BASE2 0x48072000 /* nothing hooked up on h4 */ | |
28 | - | |
29 | -#define I2C_REV (I2C_BASE + 0x00) | |
30 | -#define I2C_IE (I2C_BASE + 0x04) | |
31 | -#define I2C_STAT (I2C_BASE + 0x08) | |
32 | -#define I2C_IV (I2C_BASE + 0x0c) | |
33 | -#define I2C_BUF (I2C_BASE + 0x14) | |
34 | -#define I2C_CNT (I2C_BASE + 0x18) | |
35 | -#define I2C_DATA (I2C_BASE + 0x1c) | |
36 | -#define I2C_SYSC (I2C_BASE + 0x20) | |
37 | -#define I2C_CON (I2C_BASE + 0x24) | |
38 | -#define I2C_OA (I2C_BASE + 0x28) | |
39 | -#define I2C_SA (I2C_BASE + 0x2c) | |
40 | -#define I2C_PSC (I2C_BASE + 0x30) | |
41 | -#define I2C_SCLL (I2C_BASE + 0x34) | |
42 | -#define I2C_SCLH (I2C_BASE + 0x38) | |
43 | -#define I2C_SYSTEST (I2C_BASE + 0x3c) | |
44 | - | |
45 | -/* I2C masks */ | |
46 | - | |
47 | -/* I2C Interrupt Enable Register (I2C_IE): */ | |
48 | -#define I2C_IE_GC_IE (1 << 5) | |
49 | -#define I2C_IE_XRDY_IE (1 << 4) /* Transmit data ready interrupt enable */ | |
50 | -#define I2C_IE_RRDY_IE (1 << 3) /* Receive data ready interrupt enable */ | |
51 | -#define I2C_IE_ARDY_IE (1 << 2) /* Register access ready interrupt enable */ | |
52 | -#define I2C_IE_NACK_IE (1 << 1) /* No acknowledgment interrupt enable */ | |
53 | -#define I2C_IE_AL_IE (1 << 0) /* Arbitration lost interrupt enable */ | |
54 | - | |
55 | -/* I2C Status Register (I2C_STAT): */ | |
56 | - | |
57 | -#define I2C_STAT_SBD (1 << 15) /* Single byte data */ | |
58 | -#define I2C_STAT_BB (1 << 12) /* Bus busy */ | |
59 | -#define I2C_STAT_ROVR (1 << 11) /* Receive overrun */ | |
60 | -#define I2C_STAT_XUDF (1 << 10) /* Transmit underflow */ | |
61 | -#define I2C_STAT_AAS (1 << 9) /* Address as slave */ | |
62 | -#define I2C_STAT_GC (1 << 5) | |
63 | -#define I2C_STAT_XRDY (1 << 4) /* Transmit data ready */ | |
64 | -#define I2C_STAT_RRDY (1 << 3) /* Receive data ready */ | |
65 | -#define I2C_STAT_ARDY (1 << 2) /* Register access ready */ | |
66 | -#define I2C_STAT_NACK (1 << 1) /* No acknowledgment interrupt enable */ | |
67 | -#define I2C_STAT_AL (1 << 0) /* Arbitration lost interrupt enable */ | |
68 | - | |
69 | - | |
70 | -/* I2C Interrupt Code Register (I2C_INTCODE): */ | |
71 | - | |
72 | -#define I2C_INTCODE_MASK 7 | |
73 | -#define I2C_INTCODE_NONE 0 | |
74 | -#define I2C_INTCODE_AL 1 /* Arbitration lost */ | |
75 | -#define I2C_INTCODE_NAK 2 /* No acknowledgement/general call */ | |
76 | -#define I2C_INTCODE_ARDY 3 /* Register access ready */ | |
77 | -#define I2C_INTCODE_RRDY 4 /* Rcv data ready */ | |
78 | -#define I2C_INTCODE_XRDY 5 /* Xmit data ready */ | |
79 | - | |
80 | -/* I2C Buffer Configuration Register (I2C_BUF): */ | |
81 | - | |
82 | -#define I2C_BUF_RDMA_EN (1 << 15) /* Receive DMA channel enable */ | |
83 | -#define I2C_BUF_XDMA_EN (1 << 7) /* Transmit DMA channel enable */ | |
84 | - | |
85 | -/* I2C Configuration Register (I2C_CON): */ | |
86 | - | |
87 | -#define I2C_CON_EN (1 << 15) /* I2C module enable */ | |
88 | -#define I2C_CON_BE (1 << 14) /* Big endian mode */ | |
89 | -#define I2C_CON_STB (1 << 11) /* Start byte mode (master mode only) */ | |
90 | -#define I2C_CON_MST (1 << 10) /* Master/slave mode */ | |
91 | -#define I2C_CON_TRX (1 << 9) /* Transmitter/receiver mode (master mode only) */ | |
92 | -#define I2C_CON_XA (1 << 8) /* Expand address */ | |
93 | -#define I2C_CON_STP (1 << 1) /* Stop condition (master mode only) */ | |
94 | -#define I2C_CON_STT (1 << 0) /* Start condition (master mode only) */ | |
95 | - | |
96 | -/* I2C System Test Register (I2C_SYSTEST): */ | |
97 | - | |
98 | -#define I2C_SYSTEST_ST_EN (1 << 15) /* System test enable */ | |
99 | -#define I2C_SYSTEST_FREE (1 << 14) /* Free running mode (on breakpoint) */ | |
100 | -#define I2C_SYSTEST_TMODE_MASK (3 << 12) /* Test mode select */ | |
101 | -#define I2C_SYSTEST_TMODE_SHIFT (12) /* Test mode select */ | |
102 | -#define I2C_SYSTEST_SCL_I (1 << 3) /* SCL line sense input value */ | |
103 | -#define I2C_SYSTEST_SCL_O (1 << 2) /* SCL line drive output value */ | |
104 | -#define I2C_SYSTEST_SDA_I (1 << 1) /* SDA line sense input value */ | |
105 | -#define I2C_SYSTEST_SDA_O (1 << 0) /* SDA line drive output value */ | |
106 | - | |
107 | -#endif |
include/asm-arm/arch-omap24xx/mem.h
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments, <www.ti.com> | |
4 | - * Richard Woodruff <r-woodruff2@ti.com> | |
5 | - * | |
6 | - * See file CREDITS for list of people who contributed to this | |
7 | - * project. | |
8 | - * | |
9 | - * This program is free software; you can redistribute it and/or | |
10 | - * modify it under the terms of the GNU General Public License as | |
11 | - * published by the Free Software Foundation; either version 2 of | |
12 | - * the License, or (at your option) any later version. | |
13 | - * | |
14 | - * This program is distributed in the hope that it will be useful, | |
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | - * GNU General Public License for more details. | |
18 | - * | |
19 | - * You should have received a copy of the GNU General Public License | |
20 | - * along with this program; if not, write to the Free Software | |
21 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | - * MA 02111-1307 USA | |
23 | - */ | |
24 | - | |
25 | -#ifndef _OMAP24XX_MEM_H_ | |
26 | -#define _OMAP24XX_MEM_H_ | |
27 | - | |
28 | -#define SDRC_CS0_OSET 0x0 | |
29 | -#define SDRC_CS1_OSET 0x30 /* mirror CS1 regs appear offset 0x30 from CS0 */ | |
30 | - | |
31 | -#ifndef __ASSEMBLY__ | |
32 | -/* struct's for holding data tables for current boards, they are getting used | |
33 | - early in init when NO global access are there */ | |
34 | -struct sdrc_data_s { | |
35 | - u32 sdrc_sharing; | |
36 | - u32 sdrc_mdcfg_0_ddr; | |
37 | - u32 sdrc_mdcfg_0_sdr; | |
38 | - u32 sdrc_actim_ctrla_0; | |
39 | - u32 sdrc_actim_ctrlb_0; | |
40 | - u32 sdrc_rfr_ctrl; | |
41 | - u32 sdrc_mr_0_ddr; | |
42 | - u32 sdrc_mr_0_sdr; | |
43 | - u32 sdrc_dllab_ctrl; | |
44 | -} /*__attribute__ ((packed))*/; | |
45 | -typedef struct sdrc_data_s sdrc_data_t; | |
46 | - | |
47 | -typedef enum { | |
48 | - STACKED = 0, | |
49 | - IP_DDR = 1, | |
50 | - COMBO_DDR = 2, | |
51 | - IP_SDR = 3, | |
52 | -} mem_t; | |
53 | - | |
54 | -#endif | |
55 | - | |
56 | -/* Slower full frequency range default timings for x32 operation*/ | |
57 | -#define H4_2420_SDRC_SHARING 0x00000100 | |
58 | -#define H4_2420_SDRC_MDCFG_0_SDR 0x00D04010 /* discrete sdr module */ | |
59 | -#define H4_2420_SDRC_MR_0_SDR 0x00000031 | |
60 | -#define H4_2420_SDRC_MDCFG_0_DDR 0x01702011 /* descrite ddr module */ | |
61 | -#define H4_2420_COMBO_MDCFG_0_DDR 0x00801011 /* combo module */ | |
62 | -#define H4_2420_SDRC_MR_0_DDR 0x00000032 | |
63 | - | |
64 | -#define H4_2422_SDRC_SHARING 0x00004b00 | |
65 | -#define H4_2422_SDRC_MDCFG_0_DDR 0x00801011 /* stacked ddr on 2422 */ | |
66 | -#define H4_2422_SDRC_MR_0_DDR 0x00000032 | |
67 | - | |
68 | -/* ES1 work around timings */ | |
69 | -#define H4_242x_SDRC_ACTIM_CTRLA_0_ES1 0x9bead909 /* 165Mhz for use with 100/133 */ | |
70 | -#define H4_242x_SDRC_ACTIM_CTRLB_0_ES1 0x00000020 | |
71 | -#define H4_242x_SDRC_RFR_CTRL_ES1 0x00002401 /* use over refresh for ES1 */ | |
72 | - | |
73 | -/* optimized timings good for current shipping parts */ | |
74 | -#define H4_242X_SDRC_ACTIM_CTRLA_0_100MHz 0x5A59B485 | |
75 | -#define H4_242X_SDRC_ACTIM_CTRLB_0_100MHz 0x0000000e | |
76 | -#define H4_242X_SDRC_ACTIM_CTRLA_0_133MHz 0x8BA6E6C8 /* temp warn 0 settings */ | |
77 | -#define H4_242X_SDRC_ACTIM_CTRLB_0_133MHz 0x00000010 /* temp warn 0 settings */ | |
78 | -#define H4_242X_SDRC_RFR_CTRL_100MHz 0x0002da01 | |
79 | -#define H4_242X_SDRC_RFR_CTRL_133MHz 0x0003de01 | |
80 | -#define H4_242x_SDRC_DLLAB_CTRL_100MHz 0x0000980E /* 72deg, allow DPLLout*1 to work (combo)*/ | |
81 | -#define H4_242x_SDRC_DLLAB_CTRL_133MHz 0x0000690E /* 72deg, for ES2 */ | |
82 | - | |
83 | -#ifdef PRCM_CONFIG_II | |
84 | -# define H4_2420_SDRC_ACTIM_CTRLA_0 H4_242X_SDRC_ACTIM_CTRLA_0_100MHz | |
85 | -# define H4_2420_SDRC_ACTIM_CTRLB_0 H4_242X_SDRC_ACTIM_CTRLB_0_100MHz | |
86 | -# define H4_2420_SDRC_RFR_CTRL H4_242X_SDRC_RFR_CTRL_100MHz | |
87 | -# define H4_2420_SDRC_DLLAB_CTRL H4_242x_SDRC_DLLAB_CTRL_100MHz | |
88 | -# define H4_2422_SDRC_ACTIM_CTRLA_0 H4_242X_SDRC_ACTIM_CTRLA_0_100MHz | |
89 | -# define H4_2422_SDRC_ACTIM_CTRLB_0 H4_242X_SDRC_ACTIM_CTRLB_0_100MHz | |
90 | -# define H4_2422_SDRC_RFR_CTRL H4_242X_SDRC_RFR_CTRL_100MHz | |
91 | -# define H4_2422_SDRC_DLLAB_CTRL H4_242x_SDRC_DLLAB_CTRL_100MHz | |
92 | -#elif PRCM_CONFIG_III | |
93 | -# define H4_2420_SDRC_ACTIM_CTRLA_0 H4_242X_SDRC_ACTIM_CTRLA_0_133MHz | |
94 | -# define H4_2420_SDRC_ACTIM_CTRLB_0 H4_242X_SDRC_ACTIM_CTRLB_0_133MHz | |
95 | -# define H4_2420_SDRC_RFR_CTRL H4_242X_SDRC_RFR_CTRL_133MHz | |
96 | -# define H4_2420_SDRC_DLLAB_CTRL H4_242x_SDRC_DLLAB_CTRL_133MHz | |
97 | -# define H4_2422_SDRC_ACTIM_CTRLA_0 H4_242X_SDRC_ACTIM_CTRLA_0_100MHz | |
98 | -# define H4_2422_SDRC_ACTIM_CTRLB_0 H4_242X_SDRC_ACTIM_CTRLB_0_100MHz | |
99 | -# define H4_2422_SDRC_RFR_CTRL H4_242X_SDRC_RFR_CTRL_100MHz | |
100 | -# define H4_2422_SDRC_DLLAB_CTRL H4_242x_SDRC_DLLAB_CTRL_100MHz | |
101 | -#endif | |
102 | - | |
103 | - | |
104 | -/* GPMC settings */ | |
105 | -#ifdef PRCM_CONFIG_II /* L3 at 100MHz */ | |
106 | -# ifdef CFG_NAND_BOOT | |
107 | -# define H4_24XX_GPMC_CONFIG1_0 0x0 | |
108 | -# define H4_24XX_GPMC_CONFIG2_0 0x00141400 | |
109 | -# define H4_24XX_GPMC_CONFIG3_0 0x00141400 | |
110 | -# define H4_24XX_GPMC_CONFIG4_0 0x0F010F01 | |
111 | -# define H4_24XX_GPMC_CONFIG5_0 0x010C1414 | |
112 | -# define H4_24XX_GPMC_CONFIG6_0 0x00000A80 | |
113 | -# else /* else NOR */ | |
114 | -# define H4_24XX_GPMC_CONFIG1_0 0x3 | |
115 | -# define H4_24XX_GPMC_CONFIG2_0 0x000f0f01 | |
116 | -# define H4_24XX_GPMC_CONFIG3_0 0x00050502 | |
117 | -# define H4_24XX_GPMC_CONFIG4_0 0x0C060C06 | |
118 | -# define H4_24XX_GPMC_CONFIG5_0 0x01131F1F | |
119 | -# endif /* endif CFG_NAND_BOOT */ | |
120 | -# define H4_24XX_GPMC_CONFIG7_0 (0x00000C40|(H4_CS0_BASE >> 24)) | |
121 | -# define H4_24XX_GPMC_CONFIG1_1 0x00011000 | |
122 | -# define H4_24XX_GPMC_CONFIG2_1 0x001F1F00 | |
123 | -# define H4_24XX_GPMC_CONFIG3_1 0x00080802 | |
124 | -# define H4_24XX_GPMC_CONFIG4_1 0x1C091C09 | |
125 | -# define H4_24XX_GPMC_CONFIG5_1 0x031A1F1F | |
126 | -# define H4_24XX_GPMC_CONFIG6_1 0x000003C2 | |
127 | -# define H4_24XX_GPMC_CONFIG7_1 (0x00000F40|(H4_CS1_BASE >> 24)) | |
128 | -#endif /* endif PRCM_CONFIG_II */ | |
129 | - | |
130 | -#ifdef PRCM_CONFIG_III /* L3 at 133MHz */ | |
131 | -# ifdef CFG_NAND_BOOT | |
132 | -# define H4_24XX_GPMC_CONFIG1_0 0x0 | |
133 | -# define H4_24XX_GPMC_CONFIG2_0 0x00141400 | |
134 | -# define H4_24XX_GPMC_CONFIG3_0 0x00141400 | |
135 | -# define H4_24XX_GPMC_CONFIG4_0 0x0F010F01 | |
136 | -# define H4_24XX_GPMC_CONFIG5_0 0x010C1414 | |
137 | -# define H4_24XX_GPMC_CONFIG6_0 0x00000A80 | |
138 | -# else /* NOR boot */ | |
139 | -# define H4_24XX_GPMC_CONFIG1_0 0x3 | |
140 | -# define H4_24XX_GPMC_CONFIG2_0 0x00151501 | |
141 | -# define H4_24XX_GPMC_CONFIG3_0 0x00060602 | |
142 | -# define H4_24XX_GPMC_CONFIG4_0 0x10081008 | |
143 | -# define H4_24XX_GPMC_CONFIG5_0 0x01131F1F | |
144 | -# define H4_24XX_GPMC_CONFIG6_0 0x000004c4 | |
145 | -# endif /* endif CFG_NAND_BOOT */ | |
146 | -# define H4_24XX_GPMC_CONFIG7_0 (0x00000C40|(H4_CS0_BASE >> 24)) | |
147 | -# define H4_24XX_GPMC_CONFIG1_1 0x00011000 | |
148 | -# define H4_24XX_GPMC_CONFIG2_1 0x001f1f01 | |
149 | -# define H4_24XX_GPMC_CONFIG3_1 0x00080803 | |
150 | -# define H4_24XX_GPMC_CONFIG4_1 0x1C091C09 | |
151 | -# define H4_24XX_GPMC_CONFIG5_1 0x041f1F1F | |
152 | -# define H4_24XX_GPMC_CONFIG6_1 0x000004C4 | |
153 | -# define H4_24XX_GPMC_CONFIG7_1 (0x00000F40|(H4_CS1_BASE >> 24)) | |
154 | -#endif /* endif CFG_PRCM_III */ | |
155 | - | |
156 | -#endif /* endif _OMAP24XX_MEM_H_ */ |
include/asm-arm/arch-omap24xx/mux.h
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments, <www.ti.com> | |
4 | - * Richard Woodruff <r-woodruff2@ti.com> | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License as | |
8 | - * published by the Free Software Foundation; either version 2 of | |
9 | - * the License, or (at your option) any later version. | |
10 | - * | |
11 | - * This program is distributed in the hope that it will be useful, | |
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | - * GNU General Public License for more details. | |
15 | - * | |
16 | - * You should have received a copy of the GNU General Public License | |
17 | - * along with this program; if not, write to the Free Software | |
18 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
19 | - * MA 02111-1307 USA | |
20 | - */ | |
21 | -#ifndef _OMAP2420_MUX_H_ | |
22 | -#define _OMAP2420_MUX_H_ | |
23 | - | |
24 | -#ifndef __ASSEMBLY__ | |
25 | -typedef unsigned char uint8; | |
26 | -typedef unsigned int uint32; | |
27 | - | |
28 | -void muxSetupSDRC(void); | |
29 | -void muxSetupGPMC(void); | |
30 | -void muxSetupUsb0(void); | |
31 | -void muxSetupUsbHost(void); | |
32 | -void muxSetupUart3(void); | |
33 | -void muxSetupI2C1(void); | |
34 | -void muxSetupUART1(void); | |
35 | -void muxSetupLCD(void); | |
36 | -void muxSetupCamera(void); | |
37 | -void muxSetupMMCSD(void) ; | |
38 | -void muxSetupTouchScreen(void) ; | |
39 | -void muxSetupHDQ(void); | |
40 | -#endif | |
41 | - | |
42 | -#define USB_OTG_CTRL ((volatile uint32 *)0x4805E30C) | |
43 | - | |
44 | -/* Pin Muxing registers used for HDQ (Smart battery) */ | |
45 | -#define CONTROL_PADCONF_HDQ_SIO ((volatile unsigned char *)0x48000115) | |
46 | - | |
47 | -/* Pin Muxing registers used for GPMC */ | |
48 | -#define CONTROL_PADCONF_GPMC_D2_BYTE0 ((volatile unsigned char *)0x48000088) | |
49 | -#define CONTROL_PADCONF_GPMC_D2_BYTE1 ((volatile unsigned char *)0x48000089) | |
50 | -#define CONTROL_PADCONF_GPMC_D2_BYTE2 ((volatile unsigned char *)0x4800008A) | |
51 | -#define CONTROL_PADCONF_GPMC_D2_BYTE3 ((volatile unsigned char *)0x4800008B) | |
52 | - | |
53 | -#define CONTROL_PADCONF_GPMC_NCS0_BYTE0 ((volatile unsigned char *)0x4800008C) | |
54 | -#define CONTROL_PADCONF_GPMC_NCS0_BYTE1 ((volatile unsigned char *)0x4800008D) | |
55 | -#define CONTROL_PADCONF_GPMC_NCS0_BYTE2 ((volatile unsigned char *)0x4800008E) | |
56 | -#define CONTROL_PADCONF_GPMC_NCS0_BYTE3 ((volatile unsigned char *)0x4800008F) | |
57 | -#define CONTROL_PADCONF_GPMC_NCS0_BYTE4 (0x48000090) | |
58 | -#define CONTROL_PADCONF_GPMC_NCS0_BYTE5 (0x48000091) | |
59 | -#define CONTROL_PADCONF_GPMC_NCS0_BYTE6 (0x48000092) | |
60 | -#define CONTROL_PADCONF_GPMC_NCS0_BYTE7 (0x48000093) | |
61 | - | |
62 | -/* Pin Muxing registers used for SDRC */ | |
63 | -#define CONTROL_PADCONF_SDRC_NCS0_BYTE0 ((volatile unsigned char *)0x480000A0) | |
64 | -#define CONTROL_PADCONF_SDRC_NCS0_BYTE1 ((volatile unsigned char *)0x480000A1) | |
65 | -#define CONTROL_PADCONF_SDRC_NCS0_BYTE2 ((volatile unsigned char *)0x480000A2) | |
66 | -#define CONTROL_PADCONF_SDRC_NCS0_BYTE3 ((volatile unsigned char *)0x480000A3) | |
67 | - | |
68 | -#define CONTROL_PADCONF_SDRC_A14_BYTE0 ((volatile unsigned char *)0x48000030) | |
69 | -#define CONTROL_PADCONF_SDRC_A14_BYTE1 ((volatile unsigned char *)0x48000031) | |
70 | -#define CONTROL_PADCONF_SDRC_A14_BYTE2 ((volatile unsigned char *)0x48000032) | |
71 | -#define CONTROL_PADCONF_SDRC_A14_BYTE3 ((volatile unsigned char *)0x48000033) | |
72 | - | |
73 | -/* Pin Muxing registers used for Touch Screen (SPI) */ | |
74 | -#define CONTROL_PADCONF_SPI1_CLK ((volatile unsigned char *)0x480000FF) | |
75 | -#define CONTROL_PADCONF_SPI1_SIMO ((volatile unsigned char *)0x48000100) | |
76 | -#define CONTROL_PADCONF_SPI1_SOMI ((volatile unsigned char *)0x48000101) | |
77 | -#define CONTROL_PADCONF_SPI1_NCS0 ((volatile unsigned char *)0x48000102) | |
78 | -#define CONTROL_PADCONF_SPI1_NCS1 (0x48000103) | |
79 | - | |
80 | -#define CONTROL_PADCONF_MCBSP1_FSR ((volatile unsigned char *)0x4800010B) | |
81 | - | |
82 | -/* Pin Muxing registers used for MMCSD */ | |
83 | -#define CONTROL_PADCONF_MMC_CLKI ((volatile unsigned char *)0x480000FE) | |
84 | -#define CONTROL_PADCONF_MMC_CLKO ((volatile unsigned char *)0x480000F3) | |
85 | -#define CONTROL_PADCONF_MMC_CMD ((volatile unsigned char *)0x480000F4) | |
86 | -#define CONTROL_PADCONF_MMC_DAT0 ((volatile unsigned char *)0x480000F5) | |
87 | -#define CONTROL_PADCONF_MMC_DAT1 ((volatile unsigned char *)0x480000F6) | |
88 | -#define CONTROL_PADCONF_MMC_DAT2 ((volatile unsigned char *)0x480000F7) | |
89 | -#define CONTROL_PADCONF_MMC_DAT3 ((volatile unsigned char *)0x480000F8) | |
90 | -#define CONTROL_PADCONF_MMC_DAT_DIR0 ((volatile unsigned char *)0x480000F9) | |
91 | -#define CONTROL_PADCONF_MMC_DAT_DIR1 ((volatile unsigned char *)0x480000FA) | |
92 | -#define CONTROL_PADCONF_MMC_DAT_DIR2 ((volatile unsigned char *)0x480000FB) | |
93 | -#define CONTROL_PADCONF_MMC_DAT_DIR3 ((volatile unsigned char *)0x480000FC) | |
94 | -#define CONTROL_PADCONF_MMC_CMD_DIR ((volatile unsigned char *)0x480000FD) | |
95 | - | |
96 | -#define CONTROL_PADCONF_SDRC_A14 ((volatile unsigned char *)0x48000030) | |
97 | -#define CONTROL_PADCONF_SDRC_A13 ((volatile unsigned char *)0x48000031) | |
98 | - | |
99 | -/* Pin Muxing registers used for CAMERA */ | |
100 | -#define CONTROL_PADCONF_SYS_NRESWARM ((volatile unsigned char *)0x4800012B) | |
101 | - | |
102 | -#define CONTROL_PADCONF_CAM_XCLK ((volatile unsigned char *)0x480000DC) | |
103 | -#define CONTROL_PADCONF_CAM_LCLK ((volatile unsigned char *)0x480000DB) | |
104 | -#define CONTROL_PADCONF_CAM_VS ((volatile unsigned char *)0x480000DA) | |
105 | -#define CONTROL_PADCONF_CAM_HS ((volatile unsigned char *)0x480000D9) | |
106 | -#define CONTROL_PADCONF_CAM_D0 ((volatile unsigned char *)0x480000D8) | |
107 | -#define CONTROL_PADCONF_CAM_D1 ((volatile unsigned char *)0x480000D7) | |
108 | -#define CONTROL_PADCONF_CAM_D2 ((volatile unsigned char *)0x480000D6) | |
109 | -#define CONTROL_PADCONF_CAM_D3 ((volatile unsigned char *)0x480000D5) | |
110 | -#define CONTROL_PADCONF_CAM_D4 ((volatile unsigned char *)0x480000D4) | |
111 | -#define CONTROL_PADCONF_CAM_D5 ((volatile unsigned char *)0x480000D3) | |
112 | -#define CONTROL_PADCONF_CAM_D6 ((volatile unsigned char *)0x480000D2) | |
113 | -#define CONTROL_PADCONF_CAM_D7 ((volatile unsigned char *)0x480000D1) | |
114 | -#define CONTROL_PADCONF_CAM_D8 ((volatile unsigned char *)0x480000D0) | |
115 | -#define CONTROL_PADCONF_CAM_D9 ((volatile unsigned char *)0x480000CF) | |
116 | - | |
117 | -/* Pin Muxing registers used for LCD */ | |
118 | -#define CONTROL_PADCONF_DSS_D0 ((volatile unsigned char *)0x480000B3) | |
119 | -#define CONTROL_PADCONF_DSS_D1 ((volatile unsigned char *)0x480000B4) | |
120 | -#define CONTROL_PADCONF_DSS_D2 ((volatile unsigned char *)0x480000B5) | |
121 | -#define CONTROL_PADCONF_DSS_D3 ((volatile unsigned char *)0x480000B6) | |
122 | -#define CONTROL_PADCONF_DSS_D4 ((volatile unsigned char *)0x480000B7) | |
123 | -#define CONTROL_PADCONF_DSS_D5 ((volatile unsigned char *)0x480000B8) | |
124 | -#define CONTROL_PADCONF_DSS_D6 ((volatile unsigned char *)0x480000B9) | |
125 | -#define CONTROL_PADCONF_DSS_D7 ((volatile unsigned char *)0x480000BA) | |
126 | -#define CONTROL_PADCONF_DSS_D8 ((volatile unsigned char *)0x480000BB) | |
127 | -#define CONTROL_PADCONF_DSS_D9 ((volatile unsigned char *)0x480000BC) | |
128 | -#define CONTROL_PADCONF_DSS_D10 ((volatile unsigned char *)0x480000BD) | |
129 | -#define CONTROL_PADCONF_DSS_D11 ((volatile unsigned char *)0x480000BE) | |
130 | -#define CONTROL_PADCONF_DSS_D12 ((volatile unsigned char *)0x480000BF) | |
131 | -#define CONTROL_PADCONF_DSS_D13 ((volatile unsigned char *)0x480000C0) | |
132 | -#define CONTROL_PADCONF_DSS_D14 ((volatile unsigned char *)0x480000C1) | |
133 | -#define CONTROL_PADCONF_DSS_D15 ((volatile unsigned char *)0x480000C2) | |
134 | -#define CONTROL_PADCONF_DSS_D16 ((volatile unsigned char *)0x480000C3) | |
135 | -#define CONTROL_PADCONF_DSS_D17 ((volatile unsigned char *)0x480000C4) | |
136 | -#define CONTROL_PADCONF_DSS_PCLK ((volatile unsigned char *)0x480000CB) | |
137 | -#define CONTROL_PADCONF_DSS_VSYNC ((volatile unsigned char *)0x480000CC) | |
138 | -#define CONTROL_PADCONF_DSS_HSYNC ((volatile unsigned char *)0x480000CD) | |
139 | -#define CONTROL_PADCONF_DSS_ACBIAS ((volatile unsigned char *)0x480000CE) | |
140 | - | |
141 | -/* Pin Muxing registers used for UART1 */ | |
142 | -#define CONTROL_PADCONF_UART1_CTS ((volatile unsigned char *)0x480000C5) | |
143 | -#define CONTROL_PADCONF_UART1_RTS ((volatile unsigned char *)0x480000C6) | |
144 | -#define CONTROL_PADCONF_UART1_TX ((volatile unsigned char *)0x480000C7) | |
145 | -#define CONTROL_PADCONF_UART1_RX ((volatile unsigned char *)0x480000C8) | |
146 | - | |
147 | -/* Pin Muxing registers used for I2C1 */ | |
148 | -#define CONTROL_PADCONF_I2C1_SCL ((volatile unsigned char *)0x48000111) | |
149 | -#define CONTROL_PADCONF_I2C1_SDA ((volatile unsigned char *)0x48000112) | |
150 | - | |
151 | -/* Pin Muxing registres used for USB0. */ | |
152 | -#define CONTROL_PADCONF_USB0_PUEN ((volatile uint8 *)0x4800011D) | |
153 | -#define CONTROL_PADCONF_USB0_VP ((volatile uint8 *)0x4800011E) | |
154 | -#define CONTROL_PADCONF_USB0_VM ((volatile uint8 *)0x4800011F) | |
155 | -#define CONTROL_PADCONF_USB0_RCV ((volatile uint8 *)0x48000120) | |
156 | -#define CONTROL_PADCONF_USB0_TXEN ((volatile uint8 *)0x48000121) | |
157 | -#define CONTROL_PADCONF_USB0_SE0 ((volatile uint8 *)0x48000122) | |
158 | -#define CONTROL_PADCONF_USB0_DAT ((volatile uint8 *)0x48000123) | |
159 | - | |
160 | -/* Pin Muxing registres used for USB1. */ | |
161 | -#define CONTROL_PADCONF_USB1_RCV (0x480000EB) | |
162 | -#define CONTROL_PADCONF_USB1_TXEN (0x480000EC) | |
163 | - | |
164 | -/* Pin Muxing registers used for UART3/IRDA */ | |
165 | -#define CONTROL_PADCONF_UART3_TX_IRTX ((volatile uint8 *)0x48000118) | |
166 | -#define CONTROL_PADCONF_UART3_RX_IRRX ((volatile uint8 *)0x48000119) | |
167 | - | |
168 | -/* Pin Muxing registers used for GPIO */ | |
169 | -#define CONTROL_PADCONF_GPIO69 (0x480000ED) | |
170 | -#define CONTROL_PADCONF_GPIO70 (0x480000EE) | |
171 | -#define CONTROL_PADCONF_GPIO102 (0x48000116) | |
172 | -#define CONTROL_PADCONF_GPIO103 (0x48000117) | |
173 | -#define CONTROL_PADCONF_GPIO104 (0x48000118) | |
174 | -#define CONTROL_PADCONF_GPIO105 (0x48000119) | |
175 | - | |
176 | -#endif |
include/asm-arm/arch-omap24xx/omap2420.h
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments, <www.ti.com> | |
4 | - * Richard Woodruff <r-woodruff2@ti.com> | |
5 | - * | |
6 | - * See file CREDITS for list of people who contributed to this | |
7 | - * project. | |
8 | - * | |
9 | - * This program is free software; you can redistribute it and/or | |
10 | - * modify it under the terms of the GNU General Public License as | |
11 | - * published by the Free Software Foundation; either version 2 of | |
12 | - * the License, or (at your option) any later version. | |
13 | - * | |
14 | - * This program is distributed in the hope that it will be useful, | |
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | - * GNU General Public License for more details. | |
18 | - * | |
19 | - * You should have received a copy of the GNU General Public License | |
20 | - * along with this program; if not, write to the Free Software | |
21 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | - * MA 02111-1307 USA | |
23 | - */ | |
24 | - | |
25 | -#ifndef _OMAP2420_SYS_H_ | |
26 | -#define _OMAP2420_SYS_H_ | |
27 | - | |
28 | -#include <asm/arch/sizes.h> | |
29 | - | |
30 | -/* | |
31 | - * 2420 specific Section | |
32 | - */ | |
33 | - | |
34 | -/* L3 Firewall */ | |
35 | -#define A_REQINFOPERM0 0x68005048 | |
36 | -#define A_READPERM0 0x68005050 | |
37 | -#define A_WRITEPERM0 0x68005058 | |
38 | -/* #define GP_DEVICE (BIT8|BIT9) FIXME -- commented out to make compile -- FIXME */ | |
39 | - | |
40 | -/* L3 Firewall */ | |
41 | -#define A_REQINFOPERM0 0x68005048 | |
42 | -#define A_READPERM0 0x68005050 | |
43 | -#define A_WRITEPERM0 0x68005058 | |
44 | - | |
45 | -/* CONTROL */ | |
46 | -#define OMAP2420_CTRL_BASE (0x48000000) | |
47 | -#define CONTROL_STATUS (OMAP2420_CTRL_BASE + 0x2F8) | |
48 | - | |
49 | -/* device type */ | |
50 | -#define TST_DEVICE 0x0 | |
51 | -#define EMU_DEVICE 0x1 | |
52 | -#define HS_DEVICE 0x2 | |
53 | -#define GP_DEVICE 0x3 | |
54 | - | |
55 | -/* TAP information */ | |
56 | -#define OMAP2420_TAP_BASE (0x48014000) | |
57 | -#define TAP_IDCODE_REG (OMAP2420_TAP_BASE+0x204) | |
58 | -#define PRODUCTION_ID (OMAP2420_TAP_BASE+0x208) | |
59 | - | |
60 | -/* GPMC */ | |
61 | -#define OMAP2420_GPMC_BASE (0x6800A000) | |
62 | -#define GPMC_SYSCONFIG (OMAP2420_GPMC_BASE+0x10) | |
63 | -#define GPMC_IRQENABLE (OMAP2420_GPMC_BASE+0x1C) | |
64 | -#define GPMC_TIMEOUT_CONTROL (OMAP2420_GPMC_BASE+0x40) | |
65 | -#define GPMC_CONFIG (OMAP2420_GPMC_BASE+0x50) | |
66 | -#define GPMC_CONFIG1_0 (OMAP2420_GPMC_BASE+0x60) | |
67 | -#define GPMC_CONFIG2_0 (OMAP2420_GPMC_BASE+0x64) | |
68 | -#define GPMC_CONFIG3_0 (OMAP2420_GPMC_BASE+0x68) | |
69 | -#define GPMC_CONFIG4_0 (OMAP2420_GPMC_BASE+0x6C) | |
70 | -#define GPMC_CONFIG5_0 (OMAP2420_GPMC_BASE+0x70) | |
71 | -#define GPMC_CONFIG6_0 (OMAP2420_GPMC_BASE+0x74) | |
72 | -#define GPMC_CONFIG7_0 (OMAP2420_GPMC_BASE+0x78) | |
73 | -#define GPMC_CONFIG1_1 (OMAP2420_GPMC_BASE+0x90) | |
74 | -#define GPMC_CONFIG2_1 (OMAP2420_GPMC_BASE+0x94) | |
75 | -#define GPMC_CONFIG3_1 (OMAP2420_GPMC_BASE+0x98) | |
76 | -#define GPMC_CONFIG4_1 (OMAP2420_GPMC_BASE+0x9C) | |
77 | -#define GPMC_CONFIG5_1 (OMAP2420_GPMC_BASE+0xA0) | |
78 | -#define GPMC_CONFIG6_1 (OMAP2420_GPMC_BASE+0xA4) | |
79 | -#define GPMC_CONFIG7_1 (OMAP2420_GPMC_BASE+0xA8) | |
80 | -#define GPMC_CONFIG1_2 (OMAP2420_GPMC_BASE+0xC0) | |
81 | -#define GPMC_CONFIG2_2 (OMAP2420_GPMC_BASE+0xC4) | |
82 | -#define GPMC_CONFIG3_2 (OMAP2420_GPMC_BASE+0xC8) | |
83 | -#define GPMC_CONFIG4_2 (OMAP2420_GPMC_BASE+0xCC) | |
84 | -#define GPMC_CONFIG5_2 (OMAP2420_GPMC_BASE+0xD0) | |
85 | -#define GPMC_CONFIG6_2 (OMAP2420_GPMC_BASE+0xD4) | |
86 | -#define GPMC_CONFIG7_2 (OMAP2420_GPMC_BASE+0xD8) | |
87 | -#define GPMC_CONFIG1_3 (OMAP2420_GPMC_BASE+0xF0) | |
88 | -#define GPMC_CONFIG2_3 (OMAP2420_GPMC_BASE+0xF4) | |
89 | -#define GPMC_CONFIG3_3 (OMAP2420_GPMC_BASE+0xF8) | |
90 | -#define GPMC_CONFIG4_3 (OMAP2420_GPMC_BASE+0xFC) | |
91 | -#define GPMC_CONFIG5_3 (OMAP2420_GPMC_BASE+0x100) | |
92 | -#define GPMC_CONFIG6_3 (OMAP2420_GPMC_BASE+0x104) | |
93 | -#define GPMC_CONFIG7_3 (OMAP2420_GPMC_BASE+0x108) | |
94 | - | |
95 | -/* SMS */ | |
96 | -#define OMAP2420_SMS_BASE 0x68008000 | |
97 | -#define SMS_SYSCONFIG (OMAP2420_SMS_BASE+0x10) | |
98 | -#define SMS_CLASS_ARB0 (OMAP2420_SMS_BASE+0xD0) | |
99 | -# define BURSTCOMPLETE_GROUP7 BIT31 | |
100 | - | |
101 | -/* SDRC */ | |
102 | -#define OMAP2420_SDRC_BASE 0x68009000 | |
103 | -#define SDRC_SYSCONFIG (OMAP2420_SDRC_BASE+0x10) | |
104 | -#define SDRC_STATUS (OMAP2420_SDRC_BASE+0x14) | |
105 | -#define SDRC_CS_CFG (OMAP2420_SDRC_BASE+0x40) | |
106 | -#define SDRC_SHARING (OMAP2420_SDRC_BASE+0x44) | |
107 | -#define SDRC_DLLA_CTRL (OMAP2420_SDRC_BASE+0x60) | |
108 | -#define SDRC_DLLB_CTRL (OMAP2420_SDRC_BASE+0x68) | |
109 | -#define SDRC_POWER (OMAP2420_SDRC_BASE+0x70) | |
110 | -#define SDRC_MCFG_0 (OMAP2420_SDRC_BASE+0x80) | |
111 | -#define SDRC_MR_0 (OMAP2420_SDRC_BASE+0x84) | |
112 | -#define SDRC_ACTIM_CTRLA_0 (OMAP2420_SDRC_BASE+0x9C) | |
113 | -#define SDRC_ACTIM_CTRLB_0 (OMAP2420_SDRC_BASE+0xA0) | |
114 | -#define SDRC_ACTIM_CTRLA_1 (OMAP2420_SDRC_BASE+0xC4) | |
115 | -#define SDRC_ACTIM_CTRLB_1 (OMAP2420_SDRC_BASE+0xC8) | |
116 | -#define SDRC_RFR_CTRL (OMAP2420_SDRC_BASE+0xA4) | |
117 | -#define SDRC_MANUAL_0 (OMAP2420_SDRC_BASE+0xA8) | |
118 | -#define OMAP2420_SDRC_CS0 0x80000000 | |
119 | -#define OMAP2420_SDRC_CS1 0xA0000000 | |
120 | -#define CMD_NOP 0x0 | |
121 | -#define CMD_PRECHARGE 0x1 | |
122 | -#define CMD_AUTOREFRESH 0x2 | |
123 | -#define CMD_ENTR_PWRDOWN 0x3 | |
124 | -#define CMD_EXIT_PWRDOWN 0x4 | |
125 | -#define CMD_ENTR_SRFRSH 0x5 | |
126 | -#define CMD_CKE_HIGH 0x6 | |
127 | -#define CMD_CKE_LOW 0x7 | |
128 | -#define SOFTRESET BIT1 | |
129 | -#define SMART_IDLE (0x2 << 3) | |
130 | -#define REF_ON_IDLE (0x1 << 6) | |
131 | - | |
132 | - | |
133 | -/* UART */ | |
134 | -#define OMAP2420_UART1 0x4806A000 | |
135 | -#define OMAP2420_UART2 0x4806C000 | |
136 | -#define OMAP2420_UART3 0x4806E000 | |
137 | - | |
138 | -/* General Purpose Timers */ | |
139 | -#define OMAP2420_GPT1 0x48028000 | |
140 | -#define OMAP2420_GPT2 0x4802A000 | |
141 | -#define OMAP2420_GPT3 0x48078000 | |
142 | -#define OMAP2420_GPT4 0x4807A000 | |
143 | -#define OMAP2420_GPT5 0x4807C000 | |
144 | -#define OMAP2420_GPT6 0x4807E000 | |
145 | -#define OMAP2420_GPT7 0x48080000 | |
146 | -#define OMAP2420_GPT8 0x48082000 | |
147 | -#define OMAP2420_GPT9 0x48084000 | |
148 | -#define OMAP2420_GPT10 0x48086000 | |
149 | -#define OMAP2420_GPT11 0x48088000 | |
150 | -#define OMAP2420_GPT12 0x4808A000 | |
151 | - | |
152 | -/* timer regs offsets (32 bit regs) */ | |
153 | -#define TIDR 0x0 /* r */ | |
154 | -#define TIOCP_CFG 0x10 /* rw */ | |
155 | -#define TISTAT 0x14 /* r */ | |
156 | -#define TISR 0x18 /* rw */ | |
157 | -#define TIER 0x1C /* rw */ | |
158 | -#define TWER 0x20 /* rw */ | |
159 | -#define TCLR 0x24 /* rw */ | |
160 | -#define TCRR 0x28 /* rw */ | |
161 | -#define TLDR 0x2C /* rw */ | |
162 | -#define TTGR 0x30 /* rw */ | |
163 | -#define TWPS 0x34 /* r */ | |
164 | -#define TMAR 0x38 /* rw */ | |
165 | -#define TCAR1 0x3c /* r */ | |
166 | -#define TSICR 0x40 /* rw */ | |
167 | -#define TCAR2 0x44 /* r */ | |
168 | - | |
169 | -/* WatchDog Timers (1 secure, 3 GP) */ | |
170 | -#define WD1_BASE 0x48020000 | |
171 | -#define WD2_BASE 0x48022000 | |
172 | -#define WD3_BASE 0x48024000 | |
173 | -#define WD4_BASE 0x48026000 | |
174 | -#define WWPS 0x34 /* r */ | |
175 | -#define WSPR 0x48 /* rw */ | |
176 | -#define WD_UNLOCK1 0xAAAA | |
177 | -#define WD_UNLOCK2 0x5555 | |
178 | - | |
179 | -/* PRCM */ | |
180 | -#define OMAP2420_CM_BASE 0x48008000 | |
181 | -#define PRCM_CLKCFG_CTRL (OMAP2420_CM_BASE+0x080) | |
182 | -#define CM_CLKSEL_MPU (OMAP2420_CM_BASE+0x140) | |
183 | -#define CM_FCLKEN1_CORE (OMAP2420_CM_BASE+0x200) | |
184 | -#define CM_FCLKEN2_CORE (OMAP2420_CM_BASE+0x204) | |
185 | -#define CM_ICLKEN1_CORE (OMAP2420_CM_BASE+0x210) | |
186 | -#define CM_ICLKEN2_CORE (OMAP2420_CM_BASE+0x214) | |
187 | -#define CM_CLKSEL1_CORE (OMAP2420_CM_BASE+0x240) | |
188 | -#define CM_CLKSEL_WKUP (OMAP2420_CM_BASE+0x440) | |
189 | -#define CM_CLKSEL2_CORE (OMAP2420_CM_BASE+0x244) | |
190 | -#define CM_CLKSEL_GFX (OMAP2420_CM_BASE+0x340) | |
191 | -#define PM_RSTCTRL_WKUP (OMAP2420_CM_BASE+0x450) | |
192 | -#define CM_CLKEN_PLL (OMAP2420_CM_BASE+0x500) | |
193 | -#define CM_IDLEST_CKGEN (OMAP2420_CM_BASE+0x520) | |
194 | -#define CM_CLKSEL1_PLL (OMAP2420_CM_BASE+0x540) | |
195 | -#define CM_CLKSEL2_PLL (OMAP2420_CM_BASE+0x544) | |
196 | -#define CM_CLKSEL_DSP (OMAP2420_CM_BASE+0x840) | |
197 | - | |
198 | -/* | |
199 | - * H4 specific Section | |
200 | - */ | |
201 | - | |
202 | -/* | |
203 | - * The 2420's chip selects are programmable. The mask ROM | |
204 | - * does configure CS0 to 0x08000000 before dispatch. So, if | |
205 | - * you want your code to live below that address, you have to | |
206 | - * be prepared to jump though hoops, to reset the base address. | |
207 | - */ | |
208 | -#if defined(CONFIG_OMAP2420H4) | |
209 | -/* GPMC */ | |
210 | -#ifdef CONFIG_VIRTIO_A /* Pre version B */ | |
211 | -# define H4_CS0_BASE 0x08000000 /* flash (64 Meg aligned) */ | |
212 | -# define H4_CS1_BASE 0x04000000 /* debug board */ | |
213 | -# define H4_CS2_BASE 0x0A000000 /* wifi board */ | |
214 | -#else | |
215 | -# define H4_CS0_BASE 0x04000000 /* flash (64 Meg aligned) */ | |
216 | -# define H4_CS1_BASE 0x08000000 /* debug board */ | |
217 | -# define H4_CS2_BASE 0x0A000000 /* wifi board */ | |
218 | -#endif | |
219 | - | |
220 | -/* base address for indirect vectors (internal boot mode) */ | |
221 | -#define SRAM_OFFSET0 0x40000000 | |
222 | -#define SRAM_OFFSET1 0x00200000 | |
223 | -#define SRAM_OFFSET2 0x0000F800 | |
224 | -#define SRAM_VECT_CODE (SRAM_OFFSET0|SRAM_OFFSET1|SRAM_OFFSET2) | |
225 | - | |
226 | -/* FPGA on Debug board.*/ | |
227 | -#define ETH_CONTROL_REG (H4_CS1_BASE+0x30b) | |
228 | -#define LAN_RESET_REGISTER (H4_CS1_BASE+0x1c) | |
229 | -#endif /* endif CONFIG_2420H4 */ | |
230 | - | |
231 | -#if defined(CONFIG_APOLLON) | |
232 | -#define APOLLON_CS0_BASE 0x00000000 /* OneNAND */ | |
233 | -#define APOLLON_CS1_BASE 0x08000000 /* ethernet */ | |
234 | -#define APOLLON_CS2_BASE 0x10000000 /* OneNAND */ | |
235 | -#define APOLLON_CS3_BASE 0x18000000 /* NOR */ | |
236 | - | |
237 | -#define ETH_CONTROL_REG (APOLLON_CS1_BASE + 0x30b) | |
238 | -#define LAN_RESET_REGISTER (APOLLON_CS1_BASE + 0x1c) | |
239 | -#endif /* endif CONFIG_APOLLON */ | |
240 | - | |
241 | -/* Common */ | |
242 | -#define LOW_LEVEL_SRAM_STACK 0x4020FFFC | |
243 | - | |
244 | -#define PERIFERAL_PORT_BASE 0x480FE003 | |
245 | - | |
246 | -#endif |
include/asm-arm/arch-omap24xx/sizes.h
1 | -/* | |
2 | - * This program is free software; you can redistribute it and/or modify | |
3 | - * it under the terms of the GNU General Public License as published by | |
4 | - * the Free Software Foundation; either version 2 of the License, or | |
5 | - * (at your option) any later version. | |
6 | - * | |
7 | - * This program is distributed in the hope that it will be useful, | |
8 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | - * GNU General Public License for more details. | |
11 | - * | |
12 | - * You should have received a copy of the GNU General Public License | |
13 | - * along with this program; if not, write to the Free Software | |
14 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
15 | - */ | |
16 | -/* Size defintions | |
17 | - * Copyright (C) ARM Limited 1998. All rights reserved. | |
18 | - */ | |
19 | - | |
20 | -#ifndef __sizes_h | |
21 | -#define __sizes_h 1 | |
22 | - | |
23 | -/* handy sizes */ | |
24 | -#define SZ_1K 0x00000400 | |
25 | -#define SZ_4K 0x00001000 | |
26 | -#define SZ_8K 0x00002000 | |
27 | -#define SZ_16K 0x00004000 | |
28 | -#define SZ_32K 0x00008000 | |
29 | -#define SZ_64K 0x00010000 | |
30 | -#define SZ_128K 0x00020000 | |
31 | -#define SZ_256K 0x00040000 | |
32 | -#define SZ_512K 0x00080000 | |
33 | - | |
34 | -#define SZ_1M 0x00100000 | |
35 | -#define SZ_2M 0x00200000 | |
36 | -#define SZ_4M 0x00400000 | |
37 | -#define SZ_8M 0x00800000 | |
38 | -#define SZ_16M 0x01000000 | |
39 | -#define SZ_31M 0x01F00000 | |
40 | -#define SZ_32M 0x02000000 | |
41 | -#define SZ_64M 0x04000000 | |
42 | -#define SZ_128M 0x08000000 | |
43 | -#define SZ_256M 0x10000000 | |
44 | -#define SZ_512M 0x20000000 | |
45 | - | |
46 | -#define SZ_1G 0x40000000 | |
47 | -#define SZ_2G 0x80000000 | |
48 | - | |
49 | -#endif /* __sizes_h */ |
include/asm-arm/arch-omap24xx/sys_info.h
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments, <www.ti.com> | |
4 | - * Richard Woodruff <r-woodruff2@ti.com> | |
5 | - * | |
6 | - * See file CREDITS for list of people who contributed to this | |
7 | - * project. | |
8 | - * | |
9 | - * This program is free software; you can redistribute it and/or | |
10 | - * modify it under the terms of the GNU General Public License as | |
11 | - * published by the Free Software Foundation; either version 2 of | |
12 | - * the License, or (at your option) any later version. | |
13 | - * | |
14 | - * This program is distributed in the hope that it will be useful, | |
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | - * GNU General Public License for more details. | |
18 | - * | |
19 | - * You should have received a copy of the GNU General Public License | |
20 | - * along with this program; if not, write to the Free Software | |
21 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
22 | - * MA 02111-1307 USA | |
23 | - */ | |
24 | - | |
25 | -#ifndef _OMAP24XX_SYS_INFO_H_ | |
26 | -#define _OMAP24XX_SYS_INFO_H_ | |
27 | - | |
28 | -typedef struct h4_system_data { | |
29 | - /* base board info */ | |
30 | - u32 base_b_rev; /* rev from base board i2c */ | |
31 | - /* cpu board info */ | |
32 | - u32 cpu_b_rev; /* rev from cpu board i2c */ | |
33 | - u32 cpu_b_mux; /* mux type on daughter board */ | |
34 | - u32 cpu_b_ddr_type; /* mem type */ | |
35 | - u32 cpu_b_ddr_speed; /* ddr speed rating */ | |
36 | - u32 cpu_b_switches; /* boot ctrl switch settings */ | |
37 | - /* cpu info */ | |
38 | - u32 cpu_type; /* type of cpu; 2420, 2422, 2430,...*/ | |
39 | - u32 cpu_rev; /* rev of given cpu; ES1, ES2,...*/ | |
40 | -} h4_sys_data; | |
41 | - | |
42 | -#define XDR_POP 5 /* package on package part */ | |
43 | -#define SDR_DISCRETE 4 /* 128M memory SDR module*/ | |
44 | -#define DDR_STACKED 3 /* stacked part on 2422 */ | |
45 | -#define DDR_COMBO 2 /* combo part on cpu daughter card (menalaeus) */ | |
46 | -#define DDR_DISCRETE 1 /* 2x16 parts on daughter card */ | |
47 | - | |
48 | -#define DDR_100 100 /* type found on most mem d-boards */ | |
49 | -#define DDR_111 111 /* some combo parts */ | |
50 | -#define DDR_133 133 /* most combo, some mem d-boards */ | |
51 | -#define DDR_165 165 /* future parts */ | |
52 | - | |
53 | -#define CPU_2420 0x2420 | |
54 | -#define CPU_2422 0x2422 /* 2420 + 64M stacked */ | |
55 | -#define CPU_2423 0x2423 /* 2420 + 96M stacked */ | |
56 | - | |
57 | -#define CPU_2422_ES1 1 | |
58 | -#define CPU_2422_ES2 2 | |
59 | -#define CPU_2420_ES1 1 | |
60 | -#define CPU_2420_ES2 2 | |
61 | -#define CPU_2420_2422_ES1 1 | |
62 | - | |
63 | -#define CPU_2420_CHIPID 0x0B5D9000 | |
64 | -#define CPU_24XX_ID_MASK 0x0FFFF000 | |
65 | -#define CPU_242X_REV_MASK 0xF0000000 | |
66 | -#define CPU_242X_PID_MASK 0x000F0000 | |
67 | - | |
68 | -#define BOARD_H4_MENELAUS 1 | |
69 | -#define BOARD_H4_SDP 2 | |
70 | - | |
71 | -#define GPMC_MUXED 1 | |
72 | -#define GPMC_NONMUXED 0 | |
73 | - | |
74 | -#define TYPE_NAND 0x800 /* bit pos for nand in gpmc reg */ | |
75 | -#define TYPE_NOR 0x000 | |
76 | - | |
77 | -#define WIDTH_8BIT 0x0000 | |
78 | -#define WIDTH_16BIT 0x1000 /* bit pos for 16 bit in gpmc */ | |
79 | - | |
80 | -#define I2C_MENELAUS 0x72 /* i2c id for companion chip */ | |
81 | - | |
82 | -#endif |
include/asm-arm/arch-omap24xx/sys_proto.h
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments, <www.ti.com> | |
4 | - * Richard Woodruff <r-woodruff2@ti.com> | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License as | |
8 | - * published by the Free Software Foundation; either version 2 of | |
9 | - * the License, or (at your option) any later version. | |
10 | - * | |
11 | - * This program is distributed in the hope that it will be useful, | |
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the | |
14 | - * GNU General Public License for more details. | |
15 | - * | |
16 | - * You should have received a copy of the GNU General Public License | |
17 | - * along with this program; if not, write to the Free Software | |
18 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
19 | - * MA 02111-1307 USA | |
20 | - */ | |
21 | -#ifndef _OMAP24XX_SYS_PROTO_H_ | |
22 | -#define _OMAP24XX_SYS_PROTO_H_ | |
23 | - | |
24 | -void prcm_init(void); | |
25 | -void memif_init(void); | |
26 | -void sdrc_init(void); | |
27 | -void do_sdrc_init(u32,u32); | |
28 | -void gpmc_init(void); | |
29 | - | |
30 | -void ether_init(void); | |
31 | -void watchdog_init(void); | |
32 | -void set_muxconf_regs(void); | |
33 | -void peripheral_enable(void); | |
34 | - | |
35 | -u32 get_cpu_type(void); | |
36 | -u32 get_cpu_rev(void); | |
37 | -u32 get_mem_type(void); | |
38 | -u32 get_sysboot_value(void); | |
39 | -u32 get_gpmc0_base(void); | |
40 | -u32 is_gpmc_muxed(void); | |
41 | -u32 get_gpmc0_type(void); | |
42 | -u32 get_gpmc0_width(void); | |
43 | -u32 wait_on_value(u32 read_bit_mask, u32 match_value, u32 read_addr, u32 bound); | |
44 | -u32 get_board_type(void); | |
45 | -void display_board_info(u32); | |
46 | -void update_mux(u32,u32); | |
47 | -u32 get_sdr_cs_size(u32 offset); | |
48 | - | |
49 | -u32 running_in_sdram(void); | |
50 | -u32 running_in_sram(void); | |
51 | -u32 running_in_flash(void); | |
52 | -u32 running_from_internal_boot(void); | |
53 | -u32 get_device_type(void); | |
54 | -#endif |
include/configs/davinci_dvevm.h
... | ... | @@ -52,9 +52,6 @@ |
52 | 52 | #define DV_EVM |
53 | 53 | #define CFG_NAND_SMALLPAGE |
54 | 54 | #define CFG_USE_NOR |
55 | -#define CFG_USE_INTEL_NOR /* Define this when your DVEVM has Intel | |
56 | - * flash instead of AMD flash | |
57 | - */ | |
58 | 55 | /*===================*/ |
59 | 56 | /* SoC Configuration */ |
60 | 57 | /*===================*/ |
... | ... | @@ -63,24 +60,6 @@ |
63 | 60 | #define CFG_TIMERBASE 0x01c21400 /* use timer 0 */ |
64 | 61 | #define CFG_HZ_CLOCK 27000000 /* Timer Input clock freq */ |
65 | 62 | #define CFG_HZ 1000 |
66 | -#define CFG_DAVINCI_PINMUX_0 0x00000c1f | |
67 | -#define CFG_DAVINCI_WAITCFG 0x00000000 | |
68 | -#define CFG_DAVINCI_ACFG2 0x3ffffffd /* CE configs */ | |
69 | -#define CFG_DAVINCI_ACFG3 0x3ffffffd | |
70 | -#define CFG_DAVINCI_ACFG4 0x3ffffffd | |
71 | -#define CFG_DAVINCI_ACFG5 0x3ffffffd | |
72 | -#undef CFG_DAVINCI_NANDCE /* When using NAND, define 2,3 or 4 */ | |
73 | -#define CFG_DAVINCI_DDRCTL 0x50006405 /* DDR timing config */ | |
74 | -#define CFG_DAVINCI_SDREF 0x000005c3 | |
75 | -#define CFG_DAVINCI_SDCFG 0x00178632 /* 8 banks */ | |
76 | -#define CFG_DAVINCI_SDTIM0 0x28923211 | |
77 | -#define CFG_DAVINCI_SDTIM1 0x0016c722 | |
78 | -#define CFG_DAVINCI_MMARG_BRF0 0x00444400 | |
79 | -/* DM6446 = 0x15, DM6441 = 0x12, DM6441_LV = 0x0e */ | |
80 | -#define CFG_DAVINCI_PLL1_PLLM 0x15 | |
81 | -#define CFG_DAVINCI_PLL2_PLLM 0x17 /* 162 MHz */ | |
82 | -#define CFG_DAVINCI_PLL2_DIV1 0x0b /* 54 MHz */ | |
83 | -#define CFG_DAVINCI_PLL2_DIV2 0x01 | |
84 | 63 | /*====================================================*/ |
85 | 64 | /* EEPROM definitions for Atmel 24C256BN SEEPROM chip */ |
86 | 65 | /* on Sonata/DV_EVM board. No EEPROM on schmoogie. */ |
... | ... | @@ -135,7 +114,7 @@ |
135 | 114 | #ifdef CFG_USE_NAND |
136 | 115 | #undef CFG_ENV_IS_IN_FLASH |
137 | 116 | #define CFG_NO_FLASH |
138 | -#define CFG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ | |
117 | +#define CFG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ | |
139 | 118 | #ifdef CFG_NAND_SMALLPAGE |
140 | 119 | #define CFG_ENV_SECT_SIZE 512 /* Env sector Size */ |
141 | 120 | #define CFG_ENV_SIZE SZ_16K |
142 | 121 | |
143 | 122 | |
144 | 123 | |
145 | 124 | |
146 | 125 | |
147 | 126 | |
... | ... | @@ -160,31 +139,24 @@ |
160 | 139 | #undef CONFIG_SKIP_RELOCATE_UBOOT |
161 | 140 | #endif |
162 | 141 | #define CFG_ENV_IS_IN_FLASH |
163 | -#undef CFG_NO_FLASH | |
142 | +#undef CFG_NO_FLASH | |
164 | 143 | #define CFG_FLASH_CFI_DRIVER |
165 | 144 | #define CFG_FLASH_CFI |
166 | 145 | #define CFG_MAX_FLASH_BANKS 1 /* max number of flash banks */ |
167 | -#define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x40000) | |
168 | -#define CFG_ENV_OFFSET (CFG_ENV_ADDR) | |
169 | -#define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ | |
170 | -#define PHYS_FLASH_1 0x02000000 /* CS2 Base address */ | |
146 | +#define CFG_FLASH_SECT_SZ 0x10000 /* 64KB sect size AMD Flash */ | |
147 | +#define CFG_ENV_OFFSET (CFG_FLASH_SECT_SZ*3) | |
148 | +#define PHYS_FLASH_1 0x02000000 /* CS2 Base address */ | |
171 | 149 | #define CFG_FLASH_BASE PHYS_FLASH_1 /* Flash Base for U-Boot */ |
172 | -#define PHYS_FLASH_SIZE 0x2000000 /* Flash size 32MB */ | |
150 | +#define PHYS_FLASH_SIZE 0x2000000 /* Flash size 32MB */ | |
173 | 151 | #define CFG_MAX_FLASH_SECT (PHYS_FLASH_SIZE/CFG_FLASH_SECT_SZ) |
174 | 152 | #define CFG_ENV_SECT_SIZE CFG_FLASH_SECT_SZ /* Env sector Size */ |
175 | -#ifdef CFG_USE_INTEL_NOR | |
176 | -#define CFG_FLASH_SECT_SZ 0x20000 /* 128KB sect size INTEL Flash */ | |
177 | -#define CFG_FLASH_PROTECTION 1 | |
178 | -#else | |
179 | -#define CFG_FLASH_SECT_SZ 0x10000 /* 64KB sect size AMD Flash */ | |
180 | 153 | #endif |
181 | -#endif | |
182 | 154 | /*==============================*/ |
183 | 155 | /* U-Boot general configuration */ |
184 | 156 | /*==============================*/ |
185 | -#undef CONFIG_USE_IRQ /* No IRQ/FIQ in U-Boot */ | |
157 | +#undef CONFIG_USE_IRQ /* No IRQ/FIQ in U-Boot */ | |
186 | 158 | #define CONFIG_MISC_INIT_R |
187 | -#undef CONFIG_BOOTDELAY | |
159 | +#undef CONFIG_BOOTDELAY | |
188 | 160 | #define CONFIG_BOOTFILE "uImage" /* Boot file name */ |
189 | 161 | #define CFG_PROMPT "U-Boot > " /* Monitor Command Prompt */ |
190 | 162 | #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */ |
include/configs/davinci_schmoogie.h
... | ... | @@ -35,24 +35,6 @@ |
35 | 35 | #define CFG_TIMERBASE 0x01c21400 /* use timer 0 */ |
36 | 36 | #define CFG_HZ_CLOCK 27000000 /* Timer Input clock freq */ |
37 | 37 | #define CFG_HZ 1000 |
38 | -#define CFG_DAVINCI_PINMUX_0 0x00000c1f | |
39 | -#define CFG_DAVINCI_WAITCFG 0x00000000 | |
40 | -#define CFG_DAVINCI_ACFG2 0x0432229c /* CE configs */ | |
41 | -#define CFG_DAVINCI_ACFG3 0x3ffffffd | |
42 | -#define CFG_DAVINCI_ACFG4 0x3ffffffd | |
43 | -#define CFG_DAVINCI_ACFG5 0x3ffffffd | |
44 | -#define CFG_DAVINCI_NANDCE 2 /* When using NAND, define 2,3 or 4 */ | |
45 | -#define CFG_DAVINCI_DDRCTL 0x50006405 /* DDR timing config */ | |
46 | -#define CFG_DAVINCI_SDREF 0x000005c3 | |
47 | -#define CFG_DAVINCI_SDCFG 0x00178622 /* 4 banks */ | |
48 | -#define CFG_DAVINCI_SDTIM0 0x28923211 | |
49 | -#define CFG_DAVINCI_SDTIM1 0x0016c722 | |
50 | -#define CFG_DAVINCI_MMARG_BRF0 0x00444400 | |
51 | -/* DM6446 = 0x15, DM6441 = 0x12, DM6441_LV = 0x0e */ | |
52 | -#define CFG_DAVINCI_PLL1_PLLM 0x15 | |
53 | -#define CFG_DAVINCI_PLL2_PLLM 0x17 /* 162 MHz */ | |
54 | -#define CFG_DAVINCI_PLL2_DIV1 0x0b /* 54 MHz */ | |
55 | -#define CFG_DAVINCI_PLL2_DIV2 0x01 | |
56 | 38 | /*=============*/ |
57 | 39 | /* Memory Info */ |
58 | 40 | /*=============*/ |
... | ... | @@ -64,6 +46,7 @@ |
64 | 46 | #define CONFIG_STACKSIZE (256*1024) /* regular stack */ |
65 | 47 | #define PHYS_SDRAM_1 0x80000000 /* DDR Start */ |
66 | 48 | #define PHYS_SDRAM_1_SIZE 0x08000000 /* DDR size 128MB */ |
49 | +#define DDR_4BANKS /* 4-bank DDR2 (128MB) */ | |
67 | 50 | /*====================*/ |
68 | 51 | /* Serial Driver info */ |
69 | 52 | /*====================*/ |
include/configs/davinci_sonata.h
... | ... | @@ -60,24 +60,6 @@ |
60 | 60 | #define CFG_TIMERBASE 0x01c21400 /* use timer 0 */ |
61 | 61 | #define CFG_HZ_CLOCK 27000000 /* Timer Input clock freq */ |
62 | 62 | #define CFG_HZ 1000 |
63 | -#define CFG_DAVINCI_PINMUX_0 0x00000c1f | |
64 | -#define CFG_DAVINCI_WAITCFG 0x00000000 | |
65 | -#define CFG_DAVINCI_ACFG2 0x3ffffffd /* CE configs */ | |
66 | -#define CFG_DAVINCI_ACFG3 0x3ffffffd | |
67 | -#define CFG_DAVINCI_ACFG4 0x3ffffffd | |
68 | -#define CFG_DAVINCI_ACFG5 0x3ffffffd | |
69 | -#undef CFG_DAVINCI_NANDCE /* When using NAND, define 2,3 or 4 */ | |
70 | -#define CFG_DAVINCI_DDRCTL 0x50006405 /* DDR timing config */ | |
71 | -#define CFG_DAVINCI_SDREF 0x000005c3 | |
72 | -#define CFG_DAVINCI_SDCFG 0x00178632 /* 8 banks */ | |
73 | -#define CFG_DAVINCI_SDTIM0 0x28923211 | |
74 | -#define CFG_DAVINCI_SDTIM1 0x0016c722 | |
75 | -#define CFG_DAVINCI_MMARG_BRF0 0x00444400 | |
76 | -/* DM6446 = 0x15, DM6441 = 0x12, DM6441_LV = 0x0e */ | |
77 | -#define CFG_DAVINCI_PLL1_PLLM 0x15 | |
78 | -#define CFG_DAVINCI_PLL2_PLLM 0x17 /* 162 MHz */ | |
79 | -#define CFG_DAVINCI_PLL2_DIV1 0x0b /* 54 MHz */ | |
80 | -#define CFG_DAVINCI_PLL2_DIV2 0x01 | |
81 | 63 | /*====================================================*/ |
82 | 64 | /* EEPROM definitions for Atmel 24C256BN SEEPROM chip */ |
83 | 65 | /* on Sonata/DV_EVM board. No EEPROM on schmoogie. */ |
include/configs/imx31_litekit.h
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments. | |
4 | - * Richard Woodruff <r-woodruff2@ti.com> | |
5 | - * Kshitij Gupta <kshitij@ti.com> | |
6 | - * | |
7 | - * Configuration settings for the 242x TI H4 board. | |
8 | - * | |
9 | - * See file CREDITS for list of people who contributed to this | |
10 | - * project. | |
11 | - * | |
12 | - * This program is free software; you can redistribute it and/or | |
13 | - * modify it under the terms of the GNU General Public License as | |
14 | - * published by the Free Software Foundation; either version 2 of | |
15 | - * the License, or (at your option) any later version. | |
16 | - * | |
17 | - * This program is distributed in the hope that it will be useful, | |
18 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | - * GNU General Public License for more details. | |
21 | - * | |
22 | - * You should have received a copy of the GNU General Public License | |
23 | - * along with this program; if not, write to the Free Software | |
24 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
25 | - * MA 02111-1307 USA | |
26 | - */ | |
27 | - | |
28 | -#ifndef __CONFIG_H | |
29 | -#define __CONFIG_H | |
30 | - | |
31 | - /* High Level Configuration Options */ | |
32 | -#define CONFIG_ARM1136 1 /* This is an arm1136 CPU core */ | |
33 | -#define CONFIG_MX31 1 /* in a mx31 */ | |
34 | -#define CONFIG_MX31_HCLK_FREQ 26000000 | |
35 | -#define CONFIG_MX31_CLK32 32000 | |
36 | - | |
37 | -#define CONFIG_DISPLAY_CPUINFO | |
38 | -#define CONFIG_DISPLAY_BOARDINFO | |
39 | - | |
40 | -/* Temporarily disabled */ | |
41 | -#if 0 | |
42 | -#define CONFIG_OF_LIBFDT 1 | |
43 | -#define CONFIG_FIT 1 | |
44 | -#define CONFIG_FIT_VERBOSE 1 | |
45 | -#endif | |
46 | - | |
47 | -#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ | |
48 | -#define CONFIG_SETUP_MEMORY_TAGS 1 | |
49 | -#define CONFIG_INITRD_TAG 1 | |
50 | - | |
51 | -/* | |
52 | - * Size of malloc() pool | |
53 | - */ | |
54 | -#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128 * 1024) | |
55 | -#define CFG_GBL_DATA_SIZE 128 /* num bytes reserved for initial data */ | |
56 | - | |
57 | -/* | |
58 | - * Hardware drivers | |
59 | - */ | |
60 | - | |
61 | -#define CONFIG_MX31_UART 1 | |
62 | -#define CFG_MX31_UART1 1 | |
63 | - | |
64 | -/* allow to overwrite serial and ethaddr */ | |
65 | -#define CONFIG_ENV_OVERWRITE | |
66 | -#define CONFIG_CONS_INDEX 1 | |
67 | -#define CONFIG_BAUDRATE 115200 | |
68 | -#define CFG_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200} | |
69 | - | |
70 | -/*********************************************************** | |
71 | - * Command definition | |
72 | - ***********************************************************/ | |
73 | - | |
74 | -#include <config_cmd_default.h> | |
75 | - | |
76 | -#define CONFIG_CMD_MII | |
77 | -#define CONFIG_CMD_PING | |
78 | - | |
79 | -#define CONFIG_BOOTDELAY 3 | |
80 | - | |
81 | -#define CONFIG_NETMASK 255.255.255.0 | |
82 | -#define CONFIG_IPADDR 192.168.23.168 | |
83 | -#define CONFIG_SERVERIP 192.168.23.2 | |
84 | - | |
85 | -#define CONFIG_EXTRA_ENV_SETTINGS \ | |
86 | - "bootargs_base=setenv bootargs console=ttySMX0,115200\0" \ | |
87 | - "bootargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs " \ | |
88 | - "ip=dhcp nfsroot=$(serverip):$(nfsrootfs), v3, tcp\0" \ | |
89 | - "bootcmd=run bootcmd_net\0" \ | |
90 | - "bootcmd_net=run bootargs_base bootargs_mtd bootargs_nfs; " \ | |
91 | - "tftpboot 0x80000000 uImage-mx31; bootm\0" \ | |
92 | - "prg_uboot=tftpboot 0x80000000 u-boot-imx31_litekit.bin; " \ | |
93 | - "protect off all; erase 0xa00d0000 0xa01effff; " \ | |
94 | - "cp.b 0x80000000 0xa00d0000 $(filesize)\0" | |
95 | - | |
96 | -#define CONFIG_DRIVER_SMC911X 1 | |
97 | -#define CONFIG_DRIVER_SMC911X_BASE 0xb4020000 | |
98 | - | |
99 | -/* | |
100 | - * Miscellaneous configurable options | |
101 | - */ | |
102 | -#define CFG_LONGHELP /* undef to save memory */ | |
103 | -#define CFG_PROMPT "uboot> " | |
104 | -#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ | |
105 | -/* Print Buffer Size */ | |
106 | -#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) | |
107 | -#define CFG_MAXARGS 16 /* max number of command args */ | |
108 | -#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ | |
109 | - | |
110 | -#define CFG_MEMTEST_START 0 /* memtest works on */ | |
111 | -#define CFG_MEMTEST_END 0x10000 | |
112 | - | |
113 | -#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ | |
114 | - | |
115 | -#define CFG_LOAD_ADDR 0 /* default load address */ | |
116 | - | |
117 | -#define CFG_HZ 32000 | |
118 | - | |
119 | -#define CONFIG_CMDLINE_EDITING 1 | |
120 | - | |
121 | -/*----------------------------------------------------------------------- | |
122 | - * Stack sizes | |
123 | - * | |
124 | - * The stack sizes are set up in start.S using the settings below | |
125 | - */ | |
126 | -#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */ | |
127 | - | |
128 | -/*----------------------------------------------------------------------- | |
129 | - * Physical Memory Map | |
130 | - */ | |
131 | -#define CONFIG_NR_DRAM_BANKS 1 | |
132 | -#define PHYS_SDRAM_1 0x80000000 | |
133 | -#define PHYS_SDRAM_1_SIZE (128 * 1024 * 1024) | |
134 | - | |
135 | -/*----------------------------------------------------------------------- | |
136 | - * FLASH and environment organization | |
137 | - */ | |
138 | -#define CFG_FLASH_BASE 0xa0000000 | |
139 | -#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ | |
140 | -#define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */ | |
141 | -/* Monitor at beginning of flash */ | |
142 | -#define CFG_MONITOR_BASE CFG_FLASH_BASE | |
143 | - | |
144 | -#define CFG_ENV_ADDR 0xa01f0000 | |
145 | -#define CFG_ENV_IS_IN_FLASH 1 | |
146 | -#define CFG_ENV_SECT_SIZE (64 * 1024) | |
147 | -#define CFG_ENV_SIZE (64 * 1024) | |
148 | - | |
149 | -/*----------------------------------------------------------------------- | |
150 | - * CFI FLASH driver setup | |
151 | - */ | |
152 | -#define CFG_FLASH_CFI 1 /* Flash memory is CFI compliant */ | |
153 | -#define CFG_FLASH_CFI_DRIVER 1 /* Use drivers/cfi_flash.c */ | |
154 | -#define CFG_FLASH_USE_BUFFER_WRITE 1 /* Use buffered writes (~10x faster) */ | |
155 | -#define CFG_FLASH_PROTECTION 1 /* Use hardware sector protection */ | |
156 | - | |
157 | -/* timeout values are in ticks */ | |
158 | -#define CFG_FLASH_ERASE_TOUT (100*CFG_HZ) /* Timeout for Flash Erase */ | |
159 | -#define CFG_FLASH_WRITE_TOUT (100*CFG_HZ) /* Timeout for Flash Write */ | |
160 | - | |
161 | -/* | |
162 | - * JFFS2 partitions | |
163 | - */ | |
164 | -#undef CONFIG_JFFS2_CMDLINE | |
165 | -#define CONFIG_JFFS2_DEV "nor0" | |
166 | - | |
167 | -#endif /* __CONFIG_H */ |
include/configs/imx31_phycore.h
1 | -/* | |
2 | - * (C) Copyright 2004 | |
3 | - * Texas Instruments. | |
4 | - * Richard Woodruff <r-woodruff2@ti.com> | |
5 | - * Kshitij Gupta <kshitij@ti.com> | |
6 | - * | |
7 | - * Configuration settings for the 242x TI H4 board. | |
8 | - * | |
9 | - * See file CREDITS for list of people who contributed to this | |
10 | - * project. | |
11 | - * | |
12 | - * This program is free software; you can redistribute it and/or | |
13 | - * modify it under the terms of the GNU General Public License as | |
14 | - * published by the Free Software Foundation; either version 2 of | |
15 | - * the License, or (at your option) any later version. | |
16 | - * | |
17 | - * This program is distributed in the hope that it will be useful, | |
18 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | - * GNU General Public License for more details. | |
21 | - * | |
22 | - * You should have received a copy of the GNU General Public License | |
23 | - * along with this program; if not, write to the Free Software | |
24 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
25 | - * MA 02111-1307 USA | |
26 | - */ | |
27 | - | |
28 | -#ifndef __CONFIG_H | |
29 | -#define __CONFIG_H | |
30 | - | |
31 | - /* High Level Configuration Options */ | |
32 | -#define CONFIG_ARM1136 1 /* This is an arm1136 CPU core */ | |
33 | -#define CONFIG_MX31 1 /* in a mx31 */ | |
34 | -#define CONFIG_MX31_HCLK_FREQ 26000000 | |
35 | -#define CONFIG_MX31_CLK32 32000 | |
36 | - | |
37 | -#define CONFIG_DISPLAY_CPUINFO | |
38 | -#define CONFIG_DISPLAY_BOARDINFO | |
39 | - | |
40 | -/* Temporarily disabled */ | |
41 | -#if 0 | |
42 | -#define CONFIG_OF_LIBFDT 1 | |
43 | -#define CONFIG_FIT 1 | |
44 | -#define CONFIG_FIT_VERBOSE 1 | |
45 | -#endif | |
46 | - | |
47 | -#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ | |
48 | -#define CONFIG_SETUP_MEMORY_TAGS 1 | |
49 | -#define CONFIG_INITRD_TAG 1 | |
50 | - | |
51 | -/* | |
52 | - * Size of malloc() pool | |
53 | - */ | |
54 | -#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128 * 1024) | |
55 | -#define CFG_GBL_DATA_SIZE 128 /* num bytes reserved for initial data */ | |
56 | - | |
57 | -/* | |
58 | - * Hardware drivers | |
59 | - */ | |
60 | - | |
61 | -#define CONFIG_HARD_I2C 1 | |
62 | -#define CONFIG_I2C_MXC 1 | |
63 | -#define CFG_I2C_MX31_PORT2 1 | |
64 | -#define CFG_I2C_SPEED 100000 | |
65 | -#define CFG_I2C_SLAVE 0xfe | |
66 | - | |
67 | -#define CONFIG_MX31_UART 1 | |
68 | -#define CFG_MX31_UART1 1 | |
69 | - | |
70 | -/* allow to overwrite serial and ethaddr */ | |
71 | -#define CONFIG_ENV_OVERWRITE | |
72 | -#define CONFIG_CONS_INDEX 1 | |
73 | -#define CONFIG_BAUDRATE 115200 | |
74 | -#define CFG_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200} | |
75 | - | |
76 | -/*********************************************************** | |
77 | - * Command definition | |
78 | - ***********************************************************/ | |
79 | - | |
80 | -#include <config_cmd_default.h> | |
81 | - | |
82 | -#define CONFIG_CMD_PING | |
83 | -#define CONFIG_CMD_EEPROM | |
84 | -#define CONFIG_CMD_I2C | |
85 | - | |
86 | -#define CONFIG_BOOTDELAY 3 | |
87 | - | |
88 | -#define MTDPARTS_DEFAULT \ | |
89 | - "mtdparts=physmap-flash.0:128k(uboot)ro,1536k(kernel),-(root)" | |
90 | - | |
91 | -#define CONFIG_NETMASK 255.255.255.0 | |
92 | -#define CONFIG_IPADDR 192.168.23.168 | |
93 | -#define CONFIG_SERVERIP 192.168.23.2 | |
94 | - | |
95 | -#define CONFIG_EXTRA_ENV_SETTINGS \ | |
96 | - "bootargs_base=setenv bootargs console=ttySMX0,115200\0" \ | |
97 | - "bootargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs " \ | |
98 | - "ip=dhcp nfsroot=$(serverip):$(nfsrootfs),v3,tcp\0" \ | |
99 | - "bootargs_flash=setenv bootargs $(bootargs) " \ | |
100 | - "root=/dev/mtdblock2 rootfstype=jffs2\0" \ | |
101 | - "bootargs_mtd=setenv bootargs $(bootargs) $(mtdparts)\0" \ | |
102 | - "bootcmd=run bootcmd_net\0" \ | |
103 | - "bootcmd_net=run bootargs_base bootargs_mtd bootargs_nfs; " \ | |
104 | - "tftpboot 0x80000000 $(uimage); bootm\0" \ | |
105 | - "bootcmd_flash=run bootargs_base bootargs_mtd bootargs_flash; " \ | |
106 | - "bootm 0x80000000\0" \ | |
107 | - "unlock=yes\0" \ | |
108 | - "mtdparts=" MTDPARTS_DEFAULT "\0" \ | |
109 | - "prg_uboot=tftpboot 0x80000000 $(uboot); " \ | |
110 | - "protect off 0xa0000000 +0x20000; " \ | |
111 | - "erase 0xa0000000 +0x20000; " \ | |
112 | - "cp.b 0x80000000 0xa0000000 $(filesize)\0" \ | |
113 | - "prg_kernel=tftpboot 0x80000000 $(uimage); " \ | |
114 | - "erase 0xa0040000 +0x180000; " \ | |
115 | - "cp.b 0x80000000 0xa0040000 $(filesize)\0" \ | |
116 | - "prg_jffs2=tftpboot 0x80000000 $(jffs2); " \ | |
117 | - "erase 0xa01c0000 0xa1ffffff; " \ | |
118 | - "cp.b 0x80000000 0xa01c0000 $(filesize)\0" | |
119 | - | |
120 | -#define CONFIG_DRIVER_SMC911X 1 | |
121 | -#define CONFIG_DRIVER_SMC911X_BASE 0xa8000000 | |
122 | - | |
123 | -/* | |
124 | - * Miscellaneous configurable options | |
125 | - */ | |
126 | -#define CFG_LONGHELP /* undef to save memory */ | |
127 | -#define CFG_PROMPT "uboot> " | |
128 | -#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ | |
129 | -/* Print Buffer Size */ | |
130 | -#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) | |
131 | -#define CFG_MAXARGS 16 /* max number of command args */ | |
132 | -#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ | |
133 | - | |
134 | -#define CFG_MEMTEST_START 0 /* memtest works on */ | |
135 | -#define CFG_MEMTEST_END 0x10000 | |
136 | - | |
137 | -#define CFG_LOAD_ADDR 0 /* default load address */ | |
138 | - | |
139 | -#define CFG_HZ 32000 | |
140 | - | |
141 | -#define CONFIG_CMDLINE_EDITING 1 | |
142 | - | |
143 | -/*----------------------------------------------------------------------- | |
144 | - * Stack sizes | |
145 | - * | |
146 | - * The stack sizes are set up in start.S using the settings below */ | |
147 | -#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */ | |
148 | - | |
149 | -/*----------------------------------------------------------------------- | |
150 | - * Physical Memory Map | |
151 | - */ | |
152 | -#define CONFIG_NR_DRAM_BANKS 1 | |
153 | -#define PHYS_SDRAM_1 0x80000000 | |
154 | -#define PHYS_SDRAM_1_SIZE (128 * 1024 * 1024) | |
155 | - | |
156 | -/*----------------------------------------------------------------------- | |
157 | - * FLASH and environment organization | |
158 | - */ | |
159 | -#define CFG_FLASH_BASE 0xa0000000 | |
160 | -#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ | |
161 | -#define CFG_MAX_FLASH_SECT 259 /* max number of sectors on one chip */ | |
162 | -#define CFG_MONITOR_BASE CFG_FLASH_BASE /* Monitor at beginning of flash */ | |
163 | - | |
164 | -#define CFG_ENV_IS_IN_EEPROM 1 | |
165 | -#define CFG_ENV_OFFSET 0x00 /* environment starts here */ | |
166 | -#define CFG_ENV_SIZE 4096 | |
167 | -#define CFG_I2C_EEPROM_ADDR 0x52 | |
168 | -#define CFG_EEPROM_PAGE_WRITE_BITS 5 /* 5 bits = 32 octets */ | |
169 | -#define CFG_EEPROM_PAGE_WRITE_DELAY_MS 10 /* between stop and start */ | |
170 | -#define CFG_I2C_EEPROM_ADDR_LEN 2 /* length of byte address */ | |
171 | - | |
172 | -/*----------------------------------------------------------------------- | |
173 | - * CFI FLASH driver setup | |
174 | - */ | |
175 | -#define CFG_FLASH_CFI 1 /* Flash memory is CFI compliant */ | |
176 | -#define CFG_FLASH_CFI_DRIVER 1 /* Use drivers/cfi_flash.c */ | |
177 | -#define CFG_FLASH_USE_BUFFER_WRITE 1 /* Use buffered writes (~10x faster) */ | |
178 | -#define CFG_FLASH_PROTECTION 1 /* Use hardware sector protection */ | |
179 | - | |
180 | -/* timeout values are in ticks */ | |
181 | -#define CFG_FLASH_ERASE_TOUT (100*CFG_HZ) /* Timeout for Flash Erase */ | |
182 | -#define CFG_FLASH_WRITE_TOUT (100*CFG_HZ) /* Timeout for Flash Write */ | |
183 | - | |
184 | -/* | |
185 | - * JFFS2 partitions | |
186 | - */ | |
187 | -#undef CONFIG_JFFS2_CMDLINE | |
188 | -#define CONFIG_JFFS2_DEV "nor0" | |
189 | - | |
190 | -#endif /* __CONFIG_H */ |
include/configs/mx31ads.h
1 | -/* | |
2 | - * Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de> | |
3 | - * | |
4 | - * Configuration settings for the MX31ADS Freescale board. | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License as | |
8 | - * published by the Free Software Foundation; either version 2 of | |
9 | - * the License, or (at your option) any later version. | |
10 | - * | |
11 | - * This program is distributed in the hope that it will be useful, | |
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | - * GNU General Public License for more details. | |
15 | - * | |
16 | - * You should have received a copy of the GNU General Public License | |
17 | - * along with this program; if not, write to the Free Software | |
18 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
19 | - * MA 02111-1307 USA | |
20 | - */ | |
21 | - | |
22 | -#ifndef __CONFIG_H | |
23 | -#define __CONFIG_H | |
24 | - | |
25 | -#include <asm/arch/mx31-regs.h> | |
26 | - | |
27 | - /* High Level Configuration Options */ | |
28 | -#define CONFIG_ARM1136 1 /* This is an arm1136 CPU core */ | |
29 | -#define CONFIG_MX31 1 /* in a mx31 */ | |
30 | -#define CONFIG_MX31_HCLK_FREQ 26000000 /* RedBoot says 26MHz */ | |
31 | -#define CONFIG_MX31_CLK32 32000 | |
32 | - | |
33 | -#define CONFIG_DISPLAY_CPUINFO | |
34 | -#define CONFIG_DISPLAY_BOARDINFO | |
35 | - | |
36 | -/* | |
37 | - * Disabled for now due to build problems under Debian and | |
38 | - * a significant increase in the final file size: 144260 vs. 109536 Bytes | |
39 | - */ | |
40 | -#if 0 | |
41 | -#define CONFIG_OF_LIBFDT 1 | |
42 | -#define CONFIG_FIT 1 | |
43 | -#define CONFIG_FIT_VERBOSE 1 | |
44 | -#endif | |
45 | - | |
46 | -#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ | |
47 | -#define CONFIG_SETUP_MEMORY_TAGS 1 | |
48 | -#define CONFIG_INITRD_TAG 1 | |
49 | - | |
50 | -/* | |
51 | - * Size of malloc() pool | |
52 | - */ | |
53 | -#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128 * 1024) | |
54 | -#define CFG_GBL_DATA_SIZE 128 /* num bytes reserved for initial data */ | |
55 | - | |
56 | -/* | |
57 | - * Hardware drivers | |
58 | - */ | |
59 | - | |
60 | -#define CONFIG_MX31_UART 1 | |
61 | -#define CFG_MX31_UART1 1 | |
62 | - | |
63 | -/* allow to overwrite serial and ethaddr */ | |
64 | -#define CONFIG_ENV_OVERWRITE | |
65 | -#define CONFIG_CONS_INDEX 1 | |
66 | -#define CONFIG_BAUDRATE 115200 | |
67 | -#define CFG_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200} | |
68 | - | |
69 | -/*********************************************************** | |
70 | - * Command definition | |
71 | - ***********************************************************/ | |
72 | - | |
73 | -#include <config_cmd_default.h> | |
74 | - | |
75 | -#define CONFIG_CMD_MII | |
76 | -#define CONFIG_CMD_PING | |
77 | - | |
78 | -#define CONFIG_BOOTDELAY 3 | |
79 | - | |
80 | -#define CONFIG_NETMASK 255.255.255.0 | |
81 | -#define CONFIG_IPADDR 192.168.23.168 | |
82 | -#define CONFIG_SERVERIP 192.168.23.2 | |
83 | - | |
84 | -#define CONFIG_EXTRA_ENV_SETTINGS \ | |
85 | - "bootargs_base=setenv bootargs console=ttymxc0,115200\0" \ | |
86 | - "bootargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs " \ | |
87 | - "ip=dhcp nfsroot=$(serverip):$(nfsrootfs),v3,tcp\0" \ | |
88 | - "bootcmd=run bootcmd_net\0" \ | |
89 | - "bootcmd_net=run bootargs_base bootargs_mtd bootargs_nfs; " \ | |
90 | - "tftpboot 0x80000000 uImage-mx31; bootm\0" \ | |
91 | - "prg_uboot=tftpboot 0x80000000 u-boot-mx31ads.bin; " \ | |
92 | - "protect off 0xa0000000 0xa001ffff; " \ | |
93 | - "erase 0xa0000000 0xa001ffff; " \ | |
94 | - "cp.b 0x80000000 0xa0000000 $(filesize)\0" | |
95 | - | |
96 | -#define CONFIG_DRIVER_CS8900 1 | |
97 | -#define CS8900_BASE 0xb4020300 | |
98 | -#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */ | |
99 | - | |
100 | -/* | |
101 | - * Miscellaneous configurable options | |
102 | - */ | |
103 | -#define CFG_LONGHELP /* undef to save memory */ | |
104 | -#define CFG_PROMPT "=> " | |
105 | -#define CFG_CBSIZE 256 /* Console I/O Buffer Size */ | |
106 | -/* Print Buffer Size */ | |
107 | -#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) | |
108 | -#define CFG_MAXARGS 16 /* max number of command args */ | |
109 | -#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ | |
110 | - | |
111 | -#define CFG_MEMTEST_START 0 /* memtest works on */ | |
112 | -#define CFG_MEMTEST_END 0x10000 | |
113 | - | |
114 | -#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */ | |
115 | - | |
116 | -#define CFG_LOAD_ADDR CSD0_BASE /* default load address */ | |
117 | - | |
118 | -#define CFG_HZ 32000 | |
119 | - | |
120 | -#define CONFIG_CMDLINE_EDITING 1 | |
121 | - | |
122 | -/*----------------------------------------------------------------------- | |
123 | - * Stack sizes | |
124 | - * | |
125 | - * The stack sizes are set up in start.S using the settings below */ | |
126 | -#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */ | |
127 | - | |
128 | -/*----------------------------------------------------------------------- | |
129 | - * Physical Memory Map | |
130 | - */ | |
131 | -#define CONFIG_NR_DRAM_BANKS 1 | |
132 | -#define PHYS_SDRAM_1 CSD0_BASE | |
133 | -#define PHYS_SDRAM_1_SIZE (128 * 1024 * 1024) | |
134 | - | |
135 | -/*----------------------------------------------------------------------- | |
136 | - * FLASH and environment organization | |
137 | - */ | |
138 | -#define CFG_FLASH_BASE CS0_BASE | |
139 | -#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ | |
140 | -#define CFG_MAX_FLASH_SECT 262 /* max number of sectors on one chip */ | |
141 | -#define CFG_MONITOR_BASE CFG_FLASH_BASE /* Monitor at beginning of flash */ | |
142 | -#define CFG_MONITOR_LEN (128 * 1024) /* Reserve 128KiB */ | |
143 | - | |
144 | -#define CFG_ENV_IS_IN_FLASH 1 | |
145 | -#define CFG_ENV_SECT_SIZE (32 * 1024) | |
146 | -#define CFG_ENV_SIZE CFG_ENV_SECT_SIZE | |
147 | -/* S29WS256N NOR flash has 4 32KiB small sectors at beginning and end. | |
148 | - * The rest of 32MiB is in 128KiB big sectors. | |
149 | - * U-Boot occupies the low 4 sectors, | |
150 | - * if we put environment next to it, we will have to occupy 128KiB for it. | |
151 | - * Putting it at the top of flash we use only 32KiB. */ | |
152 | -#define CFG_ENV_ADDR (CFG_MONITOR_BASE + 32 * 1024 * 1024 - CFG_ENV_SIZE) | |
153 | - | |
154 | -/*----------------------------------------------------------------------- | |
155 | - * CFI FLASH driver setup | |
156 | - */ | |
157 | -#define CFG_FLASH_CFI 1 /* Flash memory is CFI compliant */ | |
158 | -#define CFG_FLASH_CFI_DRIVER 1 /* Use drivers/cfi_flash.c */ | |
159 | -#if 0 /* Doesn't work yet, work in progress */ | |
160 | -#define CFG_FLASH_USE_BUFFER_WRITE 1 /* Use buffered writes(~10x faster)*/ | |
161 | -#endif | |
162 | -#define CFG_FLASH_PROTECTION 1 /* Use hardware sector protection */ | |
163 | - | |
164 | -/* | |
165 | - * JFFS2 partitions | |
166 | - */ | |
167 | -#undef CONFIG_JFFS2_CMDLINE | |
168 | -#define CONFIG_JFFS2_DEV "nor0" | |
169 | - | |
170 | -#endif /* __CONFIG_H */ |
include/configs/pmdra.h
1 | -/* | |
2 | - * Copyright (C) 2008 Prodrive BV <pieter.voorthijsen@prodrive.nl> | |
3 | - * | |
4 | - * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License as | |
8 | - * published by the Free Software Foundation; either version 2 of | |
9 | - * the License, or (at your option) any later version. | |
10 | - * | |
11 | - * This program is distributed in the hope that it will be useful, | |
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | - * GNU General Public License for more details. | |
15 | - * | |
16 | - * You should have received a copy of the GNU General Public License | |
17 | - * along with this program; if not, write to the Free Software | |
18 | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
19 | - * MA 02111-1307 USA | |
20 | - */ | |
21 | - | |
22 | -#ifndef __CONFIG_H | |
23 | -#define __CONFIG_H | |
24 | -#include <asm/sizes.h> | |
25 | - | |
26 | -/*=======*/ | |
27 | -/* Board */ | |
28 | -/*=======*/ | |
29 | -#define CFG_PMDRA | |
30 | -#define CFG_NAND_LARGEPAGE | |
31 | -/*===================*/ | |
32 | -/* SoC Configuration */ | |
33 | -/*===================*/ | |
34 | -#define CONFIG_ARM926EJS /* arm926ejs CPU core */ | |
35 | -#define CONFIG_SYS_CLK_FREQ ((CFG_HZ_CLOCK * (CFG_DAVINCI_PLL1_PLLM + 1))/2) | |
36 | -#define CFG_TIMERBASE 0x01c21400 /* use timer 0 */ | |
37 | -#define CFG_HZ_CLOCK 27000000 /* Timer Input clock freq */ | |
38 | -#define CFG_HZ 1000 | |
39 | -#define CFG_DAVINCI_PINMUX_0 0x00000c1f | |
40 | -#define CFG_DAVINCI_WAITCFG 0x10000000 | |
41 | -#define CFG_DAVINCI_ACFG2 0x00460385 /* NOR CE Config */ | |
42 | -#define CFG_DAVINCI_ACFG3 0x0822218c /* NAND CE Config */ | |
43 | -#define CFG_DAVINCI_ACFG4 0x3ffffffd | |
44 | -#define CFG_DAVINCI_ACFG5 0x3ffffffd | |
45 | -#define CFG_DAVINCI_NANDCE 3 /* Use CE3 for NAND */ | |
46 | -#define CFG_DAVINCI_DDRCTL 0x50006405 /* DDR timing config */ | |
47 | -#define CFG_DAVINCI_SDREF 0x000005c3 | |
48 | -#define CFG_DAVINCI_SDCFG 0x00178832 /* 8 banks , CAS = 4*/ | |
49 | -#define CFG_DAVINCI_SDTIM0 0x28923211 | |
50 | -#define CFG_DAVINCI_SDTIM1 0x0016c722 | |
51 | -#define CFG_DAVINCI_MMARG_BRF0 0x00444400 | |
52 | -/* DM6446 = 0x15, DM6441 = 0x12, DM6441_LV = 0x0e */ | |
53 | -#define CFG_DAVINCI_PLL1_PLLM 0x12 | |
54 | -#define CFG_DAVINCI_PLL2_PLLM 0x17 /* 162 MHz */ | |
55 | -#define CFG_DAVINCI_PLL2_DIV1 0x0b /* 54 MHz */ | |
56 | -#define CFG_DAVINCI_PLL2_DIV2 0x01 | |
57 | -/*====================================================*/ | |
58 | -/* EEPROM definitions for Atmel 24C256BN SEEPROM chip */ | |
59 | -/* on Sonata/DV_EVM board. No EEPROM on schmoogie. */ | |
60 | -/*====================================================*/ | |
61 | -#define CFG_I2C_EEPROM_ADDR_LEN 2 | |
62 | -#define CFG_I2C_EEPROM_ADDR 0x50 | |
63 | -#define CFG_EEPROM_PAGE_WRITE_BITS 6 | |
64 | -#define CFG_EEPROM_PAGE_WRITE_DELAY_MS 20 | |
65 | -/*=============*/ | |
66 | -/* Memory Info */ | |
67 | -/*=============*/ | |
68 | -#define CFG_MALLOC_LEN (0x10000 + 128*1024) /* malloc() len */ | |
69 | -#define CFG_GBL_DATA_SIZE 128 /* reserved for initial data */ | |
70 | -#define CFG_MEMTEST_START 0x80000000 /* memtest start address */ | |
71 | -#define CFG_MEMTEST_END 0x81000000 /* 16MB RAM test */ | |
72 | -#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ | |
73 | -#define CONFIG_STACKSIZE (256*1024) /* regular stack */ | |
74 | -#define PHYS_SDRAM_1 0x80000000 /* DDR Start */ | |
75 | -#define PHYS_SDRAM_1_SIZE 0x10000000 /* DDR size 256MB */ | |
76 | -#define DDR_8BANKS /* 8-bank DDR2 (256MB) */ | |
77 | -/*====================*/ | |
78 | -/* Serial Driver info */ | |
79 | -/*====================*/ | |
80 | -#define CFG_NS16550 | |
81 | -#define CFG_NS16550_SERIAL | |
82 | -#define CFG_NS16550_REG_SIZE 4 /* NS16550 register size */ | |
83 | -#define CFG_NS16550_COM1 0x01c20000 /* Base address of UART0 */ | |
84 | -#define CFG_NS16550_COM2 0x01c20800 /* Base address of UART2 */ | |
85 | -#define CFG_NS16550_CLK 27000000 /* Input clock to NS16550 */ | |
86 | -#define CONFIG_CONS_INDEX 1 /* use UART0 for console */ | |
87 | -#define CONFIG_BAUDRATE 115200 /* Default baud rate */ | |
88 | -#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } | |
89 | -/*===================*/ | |
90 | -/* I2C Configuration */ | |
91 | -/*===================*/ | |
92 | -#define CONFIG_HARD_I2C | |
93 | -#define CONFIG_DRIVER_DAVINCI_I2C | |
94 | -#define CFG_I2C_SPEED 50000 /* 100Kbps won't work, silicon bug */ | |
95 | -#define CFG_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */ | |
96 | -/*==================================*/ | |
97 | -/* Network & Ethernet Configuration */ | |
98 | -/*==================================*/ | |
99 | -#define CONFIG_DRIVER_TI_EMAC | |
100 | -#define CONFIG_MII | |
101 | -#define CONFIG_BOOTP_DEFAULT | |
102 | -#define CONFIG_BOOTP_DNS | |
103 | -#define CONFIG_BOOTP_DNS2 | |
104 | -#define CONFIG_BOOTP_SEND_HOSTNAME | |
105 | -#define CONFIG_NET_RETRY_COUNT 10 | |
106 | -/*=====================*/ | |
107 | -/* Flash & Environment */ | |
108 | -/*=====================*/ | |
109 | -#define CFG_USE_NAND | |
110 | -#define CFG_NAND_BASE 0x04000000 | |
111 | -#undef CFG_NAND_HW_ECC | |
112 | -#define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ | |
113 | -#define NAND_MAX_CHIPS 1 | |
114 | -#define DEF_BOOTM "" | |
115 | -#define CFG_ENV_IS_IN_FLASH 1 | |
116 | -#define CFG_FLASH_CFI_DRIVER | |
117 | -#define CFG_FLASH_CFI | |
118 | -#define CFG_MAX_FLASH_BANKS 1 /* max number of flash banks */ | |
119 | -#define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x40000) | |
120 | -#define CFG_ENV_OFFSET (CFG_ENV_ADDR) | |
121 | -#define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster)*/ | |
122 | -#define PHYS_FLASH_1 0x02000000 /* CS2 Base address */ | |
123 | -#define CFG_FLASH_BASE PHYS_FLASH_1 /* Flash Base for U-Boot */ | |
124 | -#define PHYS_FLASH_SIZE 0x2000000 /* Flash size 32MB */ | |
125 | -#define CFG_MAX_FLASH_SECT (PHYS_FLASH_SIZE/CFG_FLASH_SECT_SZ) | |
126 | -#define CFG_ENV_SECT_SIZE CFG_FLASH_SECT_SZ /* Env sector Size */ | |
127 | -#define CFG_FLASH_SECT_SZ 0x20000 /* 128KB sect size INTEL Flash */ | |
128 | -#define CFG_FLASH_PROTECTION 1 | |
129 | -/*==============================*/ | |
130 | -/* U-Boot general configuration */ | |
131 | -/*==============================*/ | |
132 | -#undef CONFIG_USE_IRQ /* No IRQ/FIQ in U-Boot */ | |
133 | -#define CONFIG_MISC_INIT_R | |
134 | -#define CONFIG_BOOTFILE "uImage" /* Boot file name */ | |
135 | -#define CFG_PROMPT "U-Boot > " /* Monitor Command Prompt */ | |
136 | -#define CFG_CBSIZE 1024 /* Console I/O Buffer Size */ | |
137 | -#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print buffer sz */ | |
138 | -#define CFG_MAXARGS 16 /* max number of command args */ | |
139 | -#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ | |
140 | -#define CFG_LOAD_ADDR 0x80700000 /* default Linux kernel load address */ | |
141 | -#define CONFIG_VERSION_VARIABLE | |
142 | -#define CONFIG_AUTO_COMPLETE /* Won't work with hush so far, may be later */ | |
143 | -#define CFG_HUSH_PARSER | |
144 | -#define CFG_PROMPT_HUSH_PS2 "> " | |
145 | -#define CONFIG_CMDLINE_EDITING | |
146 | -#define CFG_LONGHELP | |
147 | -#define CONFIG_CRC32_VERIFY | |
148 | -#define CONFIG_MX_CYCLIC | |
149 | -#define CONFIG_ENV_OVERWRITE | |
150 | -/*===================*/ | |
151 | -/* Linux Information */ | |
152 | -/*===================*/ | |
153 | -#define LINUX_BOOT_PARAM_ADDR 0x80000100 | |
154 | -#define CONFIG_CMDLINE_TAG | |
155 | -#define CONFIG_SETUP_MEMORY_TAGS | |
156 | -#define CONFIG_BOOTDELAY 2 | |
157 | -#define CONFIG_BOOTARGS \ | |
158 | - "mem=120M console=ttyS0,115200n8 root=/dev/hda1 rw noinitrd ip=dhcp" | |
159 | -#define CONFIG_BOOTCOMMAND "run nand" | |
160 | -#define CONFIG_EXTRA_ENV_SETTINGS "ethaddr=00:11:22:33:44:55\n" | |
161 | -/*=================*/ | |
162 | -/* U-Boot commands */ | |
163 | -/*=================*/ | |
164 | -#include <config_cmd_default.h> | |
165 | -#define CONFIG_CMD_ASKENV | |
166 | -#define CONFIG_CMD_DHCP | |
167 | -#define CONFIG_CMD_DIAG | |
168 | -#define CONFIG_CMD_I2C | |
169 | -#define CONFIG_CMD_MII | |
170 | -#define CONFIG_CMD_PING | |
171 | -#define CONFIG_CMD_SAVES | |
172 | -#define CONFIG_CMD_EEPROM | |
173 | -#undef CONFIG_CMD_BDI | |
174 | -#undef CONFIG_CMD_FPGA | |
175 | -#undef CONFIG_CMD_SETGETDCR | |
176 | -#define CONFIG_CMD_FLASH | |
177 | -#undef CONFIG_CMD_IMLS | |
178 | -#define CONFIG_CMD_NAND | |
179 | -/*=======================*/ | |
180 | -/* KGDB support (if any) */ | |
181 | -/*=======================*/ | |
182 | -#ifdef CONFIG_CMD_KGDB | |
183 | -#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ | |
184 | -#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ | |
185 | -#endif | |
186 | -#endif /* __CONFIG_H */ |