]> git.neil.brown.name Git - history.git/commitdiff
[ARM PATCH] 1922/1: OMAP update 2/2: include files (replaces patch 1904/1)
authorTony Lindgren <tony@com.rmk.(none)>
Sat, 12 Jun 2004 21:27:40 +0000 (22:27 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Sat, 12 Jun 2004 21:27:40 +0000 (22:27 +0100)
Patch from Tony Lindgren

This patch syncs the mainline kernel with the linux-omap tree.
The highlights of the patch are:
- Register name clean-up. Mostly removes _REG from register names
  and replace OMAP1510P1 with OMAP1510. Also moves IO macros
  from hardware.h to io.h (Dirk Behme)
- Add DMA framebuffer hardware acceleration features (Imre Deak)
- Fix GPIO code not to do unnecessary address translations
  between physical and virtual addresses (Juha Yrjölä)
- Misc updates, such as OMAP gpio export fixes, additional
  multiplexing settings, include mach-types.h only where needed,
  show OMAP revision early during boot

12 files changed:
include/asm-arm/arch-omap/board-innovator.h
include/asm-arm/arch-omap/bus.h
include/asm-arm/arch-omap/dma.h
include/asm-arm/arch-omap/gpio.h
include/asm-arm/arch-omap/hardware.h
include/asm-arm/arch-omap/io.h
include/asm-arm/arch-omap/mux.h
include/asm-arm/arch-omap/omap1610.h
include/asm-arm/arch-omap/omap5912.h
include/asm-arm/arch-omap/omap730.h
include/asm-arm/arch-omap/time.h
include/asm-arm/arch-omap/uncompress.h

index beb50550fdd6ffbe4c6126ea68bc257e67f60aae..50671ba477d720c1620270485c4609528c6c3caa 100644 (file)
  *  OMAP-1510 FPGA
  * ---------------------------------------------------------------------------
  */
-#define OMAP1510P1_FPGA_BASE                   0xE8000000      /* Virtual */
-#define OMAP1510P1_FPGA_SIZE                   SZ_4K
-#define OMAP1510P1_FPGA_START                  0x08000000      /* Physical */
+#define OMAP1510_FPGA_BASE                     0xE8000000      /* Virtual */
+#define OMAP1510_FPGA_SIZE                     SZ_4K
+#define OMAP1510_FPGA_START                    0x08000000      /* Physical */
 
 /* Revision */
-#define OMAP1510P1_FPGA_REV_LOW                        (OMAP1510P1_FPGA_BASE + 0x0)
-#define OMAP1510P1_FPGA_REV_HIGH               (OMAP1510P1_FPGA_BASE + 0x1)
+#define OMAP1510_FPGA_REV_LOW                  (OMAP1510_FPGA_BASE + 0x0)
+#define OMAP1510_FPGA_REV_HIGH                 (OMAP1510_FPGA_BASE + 0x1)
 
-#define OMAP1510P1_FPGA_LCD_PANEL_CONTROL      (OMAP1510P1_FPGA_BASE + 0x2)
-#define OMAP1510P1_FPGA_LED_DIGIT              (OMAP1510P1_FPGA_BASE + 0x3)
-#define INNOVATOR_FPGA_HID_SPI                 (OMAP1510P1_FPGA_BASE + 0x4)
-#define OMAP1510P1_FPGA_POWER                  (OMAP1510P1_FPGA_BASE + 0x5)
+#define OMAP1510_FPGA_LCD_PANEL_CONTROL                (OMAP1510_FPGA_BASE + 0x2)
+#define OMAP1510_FPGA_LED_DIGIT                        (OMAP1510_FPGA_BASE + 0x3)
+#define INNOVATOR_FPGA_HID_SPI                 (OMAP1510_FPGA_BASE + 0x4)
+#define OMAP1510_FPGA_POWER                    (OMAP1510_FPGA_BASE + 0x5)
 
 /* Interrupt status */
-#define OMAP1510P1_FPGA_ISR_LO                 (OMAP1510P1_FPGA_BASE + 0x6)
-#define OMAP1510P1_FPGA_ISR_HI                 (OMAP1510P1_FPGA_BASE + 0x7)
+#define OMAP1510_FPGA_ISR_LO                   (OMAP1510_FPGA_BASE + 0x6)
+#define OMAP1510_FPGA_ISR_HI                   (OMAP1510_FPGA_BASE + 0x7)
 
 /* Interrupt mask */
-#define OMAP1510P1_FPGA_IMR_LO                 (OMAP1510P1_FPGA_BASE + 0x8)
-#define OMAP1510P1_FPGA_IMR_HI                 (OMAP1510P1_FPGA_BASE + 0x9)
+#define OMAP1510_FPGA_IMR_LO                   (OMAP1510_FPGA_BASE + 0x8)
+#define OMAP1510_FPGA_IMR_HI                   (OMAP1510_FPGA_BASE + 0x9)
 
 /* Reset registers */
-#define OMAP1510P1_FPGA_HOST_RESET             (OMAP1510P1_FPGA_BASE + 0xa)
-#define OMAP1510P1_FPGA_RST                    (OMAP1510P1_FPGA_BASE + 0xb)
-
-#define OMAP1510P1_FPGA_AUDIO                  (OMAP1510P1_FPGA_BASE + 0xc)
-#define OMAP1510P1_FPGA_DIP                    (OMAP1510P1_FPGA_BASE + 0xe)
-#define OMAP1510P1_FPGA_FPGA_IO                        (OMAP1510P1_FPGA_BASE + 0xf)
-#define OMAP1510P1_FPGA_UART1                  (OMAP1510P1_FPGA_BASE + 0x14)
-#define OMAP1510P1_FPGA_UART2                  (OMAP1510P1_FPGA_BASE + 0x15)
-#define OMAP1510P1_FPGA_OMAP1510_STATUS                (OMAP1510P1_FPGA_BASE + 0x16)
-#define OMAP1510P1_FPGA_BOARD_REV              (OMAP1510P1_FPGA_BASE + 0x18)
-#define OMAP1510P1_PPT_DATA                    (OMAP1510P1_FPGA_BASE + 0x100)
-#define OMAP1510P1_PPT_STATUS                  (OMAP1510P1_FPGA_BASE + 0x101)
-#define OMAP1510P1_PPT_CONTROL                 (OMAP1510P1_FPGA_BASE + 0x102)
-
-#define OMAP1510P1_FPGA_TOUCHSCREEN            (OMAP1510P1_FPGA_BASE + 0x204)
-
-#define INNOVATOR_FPGA_INFO                    (OMAP1510P1_FPGA_BASE + 0x205)
-#define INNOVATOR_FPGA_LCD_BRIGHT_LO           (OMAP1510P1_FPGA_BASE + 0x206)
-#define INNOVATOR_FPGA_LCD_BRIGHT_HI           (OMAP1510P1_FPGA_BASE + 0x207)
-#define INNOVATOR_FPGA_LED_GRN_LO              (OMAP1510P1_FPGA_BASE + 0x208)
-#define INNOVATOR_FPGA_LED_GRN_HI              (OMAP1510P1_FPGA_BASE + 0x209)
-#define INNOVATOR_FPGA_LED_RED_LO              (OMAP1510P1_FPGA_BASE + 0x20a)
-#define INNOVATOR_FPGA_LED_RED_HI              (OMAP1510P1_FPGA_BASE + 0x20b)
-#define INNOVATOR_FPGA_CAM_USB_CONTROL         (OMAP1510P1_FPGA_BASE + 0x20c)
-#define INNOVATOR_FPGA_EXP_CONTROL             (OMAP1510P1_FPGA_BASE + 0x20d)
-#define INNOVATOR_FPGA_ISR2                    (OMAP1510P1_FPGA_BASE + 0x20e)
-#define INNOVATOR_FPGA_IMR2                    (OMAP1510P1_FPGA_BASE + 0x210)
-
-#define OMAP1510P1_FPGA_ETHR_START             (OMAP1510P1_FPGA_START + 0x300)
-#define OMAP1510P1_FPGA_ETHR_BASE              (OMAP1510P1_FPGA_BASE + 0x300)
+#define OMAP1510_FPGA_HOST_RESET               (OMAP1510_FPGA_BASE + 0xa)
+#define OMAP1510_FPGA_RST                      (OMAP1510_FPGA_BASE + 0xb)
+
+#define OMAP1510_FPGA_AUDIO                    (OMAP1510_FPGA_BASE + 0xc)
+#define OMAP1510_FPGA_DIP                      (OMAP1510_FPGA_BASE + 0xe)
+#define OMAP1510_FPGA_FPGA_IO                  (OMAP1510_FPGA_BASE + 0xf)
+#define OMAP1510_FPGA_UART1                    (OMAP1510_FPGA_BASE + 0x14)
+#define OMAP1510_FPGA_UART2                    (OMAP1510_FPGA_BASE + 0x15)
+#define OMAP1510_FPGA_OMAP1510_STATUS          (OMAP1510_FPGA_BASE + 0x16)
+#define OMAP1510_FPGA_BOARD_REV                        (OMAP1510_FPGA_BASE + 0x18)
+#define OMAP1510P1_PPT_DATA                    (OMAP1510_FPGA_BASE + 0x100)
+#define OMAP1510P1_PPT_STATUS                  (OMAP1510_FPGA_BASE + 0x101)
+#define OMAP1510P1_PPT_CONTROL                 (OMAP1510_FPGA_BASE + 0x102)
+
+#define OMAP1510_FPGA_TOUCHSCREEN              (OMAP1510_FPGA_BASE + 0x204)
+
+#define INNOVATOR_FPGA_INFO                    (OMAP1510_FPGA_BASE + 0x205)
+#define INNOVATOR_FPGA_LCD_BRIGHT_LO           (OMAP1510_FPGA_BASE + 0x206)
+#define INNOVATOR_FPGA_LCD_BRIGHT_HI           (OMAP1510_FPGA_BASE + 0x207)
+#define INNOVATOR_FPGA_LED_GRN_LO              (OMAP1510_FPGA_BASE + 0x208)
+#define INNOVATOR_FPGA_LED_GRN_HI              (OMAP1510_FPGA_BASE + 0x209)
+#define INNOVATOR_FPGA_LED_RED_LO              (OMAP1510_FPGA_BASE + 0x20a)
+#define INNOVATOR_FPGA_LED_RED_HI              (OMAP1510_FPGA_BASE + 0x20b)
+#define INNOVATOR_FPGA_CAM_USB_CONTROL         (OMAP1510_FPGA_BASE + 0x20c)
+#define INNOVATOR_FPGA_EXP_CONTROL             (OMAP1510_FPGA_BASE + 0x20d)
+#define INNOVATOR_FPGA_ISR2                    (OMAP1510_FPGA_BASE + 0x20e)
+#define INNOVATOR_FPGA_IMR2                    (OMAP1510_FPGA_BASE + 0x210)
+
+#define OMAP1510_FPGA_ETHR_START               (OMAP1510_FPGA_START + 0x300)
+#define OMAP1510_FPGA_ETHR_BASE                        (OMAP1510_FPGA_BASE + 0x300)
 
 /*
  * Power up Giga UART driver, turn on HID clock.
  * Turn off BT power, since we're not using it and it
  * draws power.
  */
-#define OMAP1510P1_FPGA_RESET_VALUE            0x42
-
-#define OMAP1510P1_FPGA_PCR_IF_PD0             (1 << 7)
-#define OMAP1510P1_FPGA_PCR_COM2_EN            (1 << 6)
-#define OMAP1510P1_FPGA_PCR_COM1_EN            (1 << 5)
-#define OMAP1510P1_FPGA_PCR_EXP_PD0            (1 << 4)
-#define OMAP1510P1_FPGA_PCR_EXP_PD1            (1 << 3)
-#define OMAP1510P1_FPGA_PCR_48MHZ_CLK          (1 << 2)
-#define OMAP1510P1_FPGA_PCR_4MHZ_CLK           (1 << 1)
-#define OMAP1510P1_FPGA_PCR_RSRVD_BIT0         (1 << 0)
+#define OMAP1510_FPGA_RESET_VALUE              0x42
+
+#define OMAP1510_FPGA_PCR_IF_PD0               (1 << 7)
+#define OMAP1510_FPGA_PCR_COM2_EN              (1 << 6)
+#define OMAP1510_FPGA_PCR_COM1_EN              (1 << 5)
+#define OMAP1510_FPGA_PCR_EXP_PD0              (1 << 4)
+#define OMAP1510_FPGA_PCR_EXP_PD1              (1 << 3)
+#define OMAP1510_FPGA_PCR_48MHZ_CLK            (1 << 2)
+#define OMAP1510_FPGA_PCR_4MHZ_CLK             (1 << 1)
+#define OMAP1510_FPGA_PCR_RSRVD_BIT0           (1 << 0)
 
 /*
  * Innovator/OMAP1510 FPGA HID register bit definitions
index ff3594797387188362dc00f7f053ae70d93d58a4..afb61f8eacb329614a4af202271d93d78daf9afd 100644 (file)
@@ -72,8 +72,12 @@ struct omap_driver {
  * Device ID numbers for bus types
  */
 #define OMAP_OCP_DEVID_USB     0
+
+#define OMAP_TIPB_DEVID_OHCI   0
 #define OMAP_TIPB_DEVID_LCD    1
 #define OMAP_TIPB_DEVID_MMC    2
+#define OMAP_TIPB_DEVID_OTG    3
+#define OMAP_TIPB_DEVID_UDC    4
 
 /*
  * Virtual bus definitions for OMAP
index a7d7a36d6d80c9a69e5f4ebd802b40f20f862f13..bf87b3a56e08c92bfaf94b7ee622310a92cc995f 100644 (file)
 #define OMAP_DMA_EXT_NDMA_REQ          5
 #define OMAP_DMA_EXT_NDMA_REQ2         6
 #define OMAP_DMA_UWIRE_TX              7
-#define OMAP_DMA_MCBSP1_DMA_TX         8
-#define OMAP_DMA_MCBSP1_DMA_RX         9
-#define OMAP_DMA_MCBSP3_DMA_TX         10
-#define OMAP_DMA_MCBSP3_DMA_RX         11
+#define OMAP_DMA_MCBSP1_TX             8
+#define OMAP_DMA_MCBSP1_RX             9
+#define OMAP_DMA_MCBSP3_TX             10
+#define OMAP_DMA_MCBSP3_RX             11
 #define OMAP_DMA_UART1_TX              12
 #define OMAP_DMA_UART1_RX              13
 #define OMAP_DMA_UART2_TX              14
 #define OMAP_DMA_CRYPTO_DES_OUT                56
 
 
-#define OMAP_DMA_BASE                  0xfffed800
-#define OMAP_DMA_GCR_REG               (OMAP_DMA_BASE + 0x400)
-#define OMAP_DMA_GSCR_REG              (OMAP_DMA_BASE + 0x404)
-#define OMAP_DMA_GRST_REG              (OMAP_DMA_BASE + 0x408)
-#define OMAP_DMA_HW_ID_REG             (OMAP_DMA_BASE + 0x442)
-#define OMAP_DMA_PCH2_ID_REG           (OMAP_DMA_BASE + 0x444)
+#define OMAP_DMA_BASE                  (0xfffed800)
+#define OMAP_DMA_GCR                   (OMAP_DMA_BASE + 0x400)
+#define OMAP_DMA_GSCR                  (OMAP_DMA_BASE + 0x404)
+#define OMAP_DMA_GRST                  (OMAP_DMA_BASE + 0x408)
+#define OMAP_DMA_HW_ID                 (OMAP_DMA_BASE + 0x442)
+#define OMAP_DMA_PCH2_ID               (OMAP_DMA_BASE + 0x444)
 #define OMAP_DMA_PCH0_ID               (OMAP_DMA_BASE + 0x446)
 #define OMAP_DMA_PCH1_ID               (OMAP_DMA_BASE + 0x448)
 #define OMAP_DMA_PCHG_ID               (OMAP_DMA_BASE + 0x44a)
 #define OMAP_DMA_PCHD_ID               (OMAP_DMA_BASE + 0x44c)
-#define OMAP_DMA_CAPS_0_U_REG          (OMAP_DMA_BASE + 0x44e)
-#define OMAP_DMA_CAPS_0_L_REG          (OMAP_DMA_BASE + 0x450)
-#define OMAP_DMA_CAPS_1_U_REG          (OMAP_DMA_BASE + 0x452)
-#define OMAP_DMA_CAPS_1_L_REG          (OMAP_DMA_BASE + 0x454)
-#define OMAP_DMA_CAPS_2_REG            (OMAP_DMA_BASE + 0x456)
-#define OMAP_DMA_CAPS_3_REG            (OMAP_DMA_BASE + 0x458)
-#define OMAP_DMA_CAPS_4_REG            (OMAP_DMA_BASE + 0x45a)
-#define OMAP_DMA_PCH2_SR_REG           (OMAP_DMA_BASE + 0x460)
-#define OMAP_DMA_PCH0_SR_REG           (OMAP_DMA_BASE + 0x480)
-#define OMAP_DMA_PCH1_SR_REG           (OMAP_DMA_BASE + 0x482)
-#define OMAP_DMA_PCHD_SR_REG           (OMAP_DMA_BASE + 0x4c0)
-
-#define OMAP1510_DMA_LCD_CTRL          0xfffedb00
-#define OMAP1510_DMA_LCD_TOP_F1_L      0xfffedb02
-#define OMAP1510_DMA_LCD_TOP_F1_U      0xfffedb04
-#define OMAP1510_DMA_LCD_BOT_F1_L      0xfffedb06
-#define OMAP1510_DMA_LCD_BOT_F1_U      0xfffedb08
-
-#define OMAP1610_DMA_LCD_CSDP          0xfffee3c0
-#define OMAP1610_DMA_LCD_CCR           0xfffee3c2
-#define OMAP1610_DMA_LCD_CTRL          0xfffee3c4
-#define OMAP1610_DMA_LCD_TOP_B1_L      0xfffee3c8
-#define OMAP1610_DMA_LCD_TOP_B1_U      0xfffee3ca
-#define OMAP1610_DMA_LCD_BOT_B1_L      0xfffee3cc
-#define OMAP1610_DMA_LCD_BOT_B1_U      0xfffee3ce
-#define OMAP1610_DMA_LCD_TOP_B2_L      0xfffee3d0
-#define OMAP1610_DMA_LCD_TOP_B2_U      0xfffee3d2
-#define OMAP1610_DMA_LCD_BOT_B2_L      0xfffee3d4
-#define OMAP1610_DMA_LCD_BOT_B2_U      0xfffee3d6
-#define OMAP1610_DMA_LCD_SRC_EI_B1     0xfffee3d8
-#define OMAP1610_DMA_LCD_SRC_FI_B1_L   0xfffee3da
-#define OMAP1610_DMA_LCD_SRC_EN_B1     0xfffee3e0
-#define OMAP1610_DMA_LCD_SRC_FN_B1     0xfffee3e4
-#define OMAP1610_DMA_LCD_LCH_CTRL      0xfffee3ea
-#define OMAP1610_DMA_LCD_SRC_FI_B1_U   0xfffee3f4
+#define OMAP_DMA_CAPS_0_U              (OMAP_DMA_BASE + 0x44e)
+#define OMAP_DMA_CAPS_0_L              (OMAP_DMA_BASE + 0x450)
+#define OMAP_DMA_CAPS_1_U              (OMAP_DMA_BASE + 0x452)
+#define OMAP_DMA_CAPS_1_L              (OMAP_DMA_BASE + 0x454)
+#define OMAP_DMA_CAPS_2                        (OMAP_DMA_BASE + 0x456)
+#define OMAP_DMA_CAPS_3                        (OMAP_DMA_BASE + 0x458)
+#define OMAP_DMA_CAPS_4                        (OMAP_DMA_BASE + 0x45a)
+#define OMAP_DMA_PCH2_SR               (OMAP_DMA_BASE + 0x460)
+#define OMAP_DMA_PCH0_SR               (OMAP_DMA_BASE + 0x480)
+#define OMAP_DMA_PCH1_SR               (OMAP_DMA_BASE + 0x482)
+#define OMAP_DMA_PCHD_SR               (OMAP_DMA_BASE + 0x4c0)
+
+#define OMAP1510_DMA_LCD_BASE          (0xfffedb00)
+#define OMAP1510_DMA_LCD_CTRL          (OMAP1510_DMA_LCD_BASE + 0x00)
+#define OMAP1510_DMA_LCD_TOP_F1_L      (OMAP1510_DMA_LCD_BASE + 0x02)
+#define OMAP1510_DMA_LCD_TOP_F1_U      (OMAP1510_DMA_LCD_BASE + 0x04)
+#define OMAP1510_DMA_LCD_BOT_F1_L      (OMAP1510_DMA_LCD_BASE + 0x06)
+#define OMAP1510_DMA_LCD_BOT_F1_U      (OMAP1510_DMA_LCD_BASE + 0x08)
+
+#define OMAP1610_DMA_LCD_BASE          (0xfffee300)
+#define OMAP1610_DMA_LCD_CSDP          (OMAP1610_DMA_LCD_BASE + 0xc0)
+#define OMAP1610_DMA_LCD_CCR           (OMAP1610_DMA_LCD_BASE + 0xc2)
+#define OMAP1610_DMA_LCD_CTRL          (OMAP1610_DMA_LCD_BASE + 0xc4)
+#define OMAP1610_DMA_LCD_TOP_B1_L      (OMAP1610_DMA_LCD_BASE + 0xc8)
+#define OMAP1610_DMA_LCD_TOP_B1_U      (OMAP1610_DMA_LCD_BASE + 0xca)
+#define OMAP1610_DMA_LCD_BOT_B1_L      (OMAP1610_DMA_LCD_BASE + 0xcc)
+#define OMAP1610_DMA_LCD_BOT_B1_U      (OMAP1610_DMA_LCD_BASE + 0xce)
+#define OMAP1610_DMA_LCD_TOP_B2_L      (OMAP1610_DMA_LCD_BASE + 0xd0)
+#define OMAP1610_DMA_LCD_TOP_B2_U      (OMAP1610_DMA_LCD_BASE + 0xd2)
+#define OMAP1610_DMA_LCD_BOT_B2_L      (OMAP1610_DMA_LCD_BASE + 0xd4)
+#define OMAP1610_DMA_LCD_BOT_B2_U      (OMAP1610_DMA_LCD_BASE + 0xd6)
+#define OMAP1610_DMA_LCD_SRC_EI_B1     (OMAP1610_DMA_LCD_BASE + 0xd8)
+#define OMAP1610_DMA_LCD_SRC_FI_B1_L   (OMAP1610_DMA_LCD_BASE + 0xda)
+#define OMAP1610_DMA_LCD_SRC_EN_B1     (OMAP1610_DMA_LCD_BASE + 0xe0)
+#define OMAP1610_DMA_LCD_SRC_FN_B1     (OMAP1610_DMA_LCD_BASE + 0xe4)
+#define OMAP1610_DMA_LCD_LCH_CTRL      (OMAP1610_DMA_LCD_BASE + 0xea)
+#define OMAP1610_DMA_LCD_SRC_FI_B1_U   (OMAP1610_DMA_LCD_BASE + 0xf4)
 
 
 /* Every LCh has its own set of the registers below */
-#define OMAP_DMA_CSDP_REG(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x00)
-#define OMAP_DMA_CCR_REG(n)            (OMAP_DMA_BASE + 0x40 * (n) + 0x02)
-#define OMAP_DMA_CICR_REG(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x04)
-#define OMAP_DMA_CSR_REG(n)            (OMAP_DMA_BASE + 0x40 * (n) + 0x06)
-#define OMAP_DMA_CSSA_L_REG(n)         (OMAP_DMA_BASE + 0x40 * (n) + 0x08)
-#define OMAP_DMA_CSSA_U_REG(n)         (OMAP_DMA_BASE + 0x40 * (n) + 0x0a)
-#define OMAP_DMA_CDSA_L_REG(n)         (OMAP_DMA_BASE + 0x40 * (n) + 0x0c)
-#define OMAP_DMA_CDSA_U_REG(n)         (OMAP_DMA_BASE + 0x40 * (n) + 0x0e)
-#define OMAP_DMA_CEN_REG(n)            (OMAP_DMA_BASE + 0x40 * (n) + 0x10)
-#define OMAP_DMA_CFN_REG(n)            (OMAP_DMA_BASE + 0x40 * (n) + 0x12)
-#define OMAP_DMA_CSFI_REG(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x14)
-#define OMAP_DMA_CSEI_REG(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x16)
-#define OMAP_DMA_CSAC_REG(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x18)
-#define OMAP_DMA_CDAC_REG(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x1a)
-#define OMAP_DMA_CDEI_REG(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x1c)
-#define OMAP_DMA_CDFI_REG(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x1e)
-#define OMAP_DMA_COLOR_L_REG(n)                (OMAP_DMA_BASE + 0x40 * (n) + 0x20)
-#define OMAP_DMA_COLOR_U_REG(n)                (OMAP_DMA_BASE + 0x40 * (n) + 0x22)
-#define OMAP_DMA_CCR2_REG(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x24)
-#define OMAP_DMA_CLNK_CTRL_REG(n)      (OMAP_DMA_BASE + 0x40 * (n) + 0x28)
-#define OMAP_DMA_LCH_CTRL_REG(n)       (OMAP_DMA_BASE + 0x40 * (n) + 0x2a)
+#define OMAP_DMA_CSDP(n)               (OMAP_DMA_BASE + 0x40 * (n) + 0x00)
+#define OMAP_DMA_CCR(n)                        (OMAP_DMA_BASE + 0x40 * (n) + 0x02)
+#define OMAP_DMA_CICR(n)               (OMAP_DMA_BASE + 0x40 * (n) + 0x04)
+#define OMAP_DMA_CSR(n)                        (OMAP_DMA_BASE + 0x40 * (n) + 0x06)
+#define OMAP_DMA_CSSA_L(n)             (OMAP_DMA_BASE + 0x40 * (n) + 0x08)
+#define OMAP_DMA_CSSA_U(n)             (OMAP_DMA_BASE + 0x40 * (n) + 0x0a)
+#define OMAP_DMA_CDSA_L(n)             (OMAP_DMA_BASE + 0x40 * (n) + 0x0c)
+#define OMAP_DMA_CDSA_U(n)             (OMAP_DMA_BASE + 0x40 * (n) + 0x0e)
+#define OMAP_DMA_CEN(n)                        (OMAP_DMA_BASE + 0x40 * (n) + 0x10)
+#define OMAP_DMA_CFN(n)                        (OMAP_DMA_BASE + 0x40 * (n) + 0x12)
+#define OMAP_DMA_CSFI(n)               (OMAP_DMA_BASE + 0x40 * (n) + 0x14)
+#define OMAP_DMA_CSEI(n)               (OMAP_DMA_BASE + 0x40 * (n) + 0x16)
+#define OMAP_DMA_CSAC(n)               (OMAP_DMA_BASE + 0x40 * (n) + 0x18)
+#define OMAP_DMA_CDAC(n)               (OMAP_DMA_BASE + 0x40 * (n) + 0x1a)
+#define OMAP_DMA_CDEI(n)               (OMAP_DMA_BASE + 0x40 * (n) + 0x1c)
+#define OMAP_DMA_CDFI(n)               (OMAP_DMA_BASE + 0x40 * (n) + 0x1e)
+#define OMAP_DMA_COLOR_L(n)            (OMAP_DMA_BASE + 0x40 * (n) + 0x20)
+#define OMAP_DMA_COLOR_U(n)            (OMAP_DMA_BASE + 0x40 * (n) + 0x22)
+#define OMAP_DMA_CCR2(n)               (OMAP_DMA_BASE + 0x40 * (n) + 0x24)
+#define OMAP_DMA_CLNK_CTRL(n)          (OMAP_DMA_BASE + 0x40 * (n) + 0x28)
+#define OMAP_DMA_LCH_CTRL(n)           (OMAP_DMA_BASE + 0x40 * (n) + 0x2a)
 
 #define OMAP_DMA_TOUT_IRQ              (1 << 0)
 #define OMAP_DMA_DROP_IRQ              (1 << 1)
@@ -192,6 +194,11 @@ enum {
        OMAP_LCD_DMA_B2_BOTTOM
 };
 
+enum {
+       OMAP_DMA_DATA_BURST_4,
+       OMAP_DMA_DATA_BURST_8
+};
+
 extern int omap_request_dma(int dev_id, const char *dev_name,
                            void (* callback)(int lch, u16 ch_status, void *data),
                            void *data, int *dma_ch);
@@ -203,10 +210,20 @@ extern void omap_stop_dma(int lch);
 extern void omap_set_dma_transfer_params(int lch, int data_type,
                                         int elem_count, int frame_count,
                                         int sync_mode);
+extern void omap_set_dma_constant_fill(int lch, u32 color);
+extern void omap_set_dma_transparent_copy(int lch, u32 color);
+
 extern void omap_set_dma_src_params(int lch, int src_port, int src_amode,
                                    unsigned long src_start);
+extern void omap_set_dma_src_index(int lch, int eidx, int fidx);
+extern void omap_set_dma_src_data_pack(int lch, int enable);
+extern void omap_set_dma_src_burst_mode(int lch, int burst_mode);
+
 extern void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode,
                                     unsigned long dest_start);
+extern void omap_set_dma_dest_index(int lch, int eidx, int fidx);
+extern void omap_set_dma_dest_data_pack(int lch, int enable);
+extern void omap_set_dma_dest_burst_mode(int lch, int burst_mode);
 
 extern void omap_dma_link_lch (int lch_head, int lch_queue);
 extern void omap_dma_unlink_lch (int lch_head, int lch_queue);
index d54e36cf6963cd2fd433ff3b6597cee90d4b2b50..3b1680dbb465dcf57f3d41c427049bebb792a0a7 100644 (file)
 
 #define OMAP_MPUIO_BASE                        0xfffb5000
 #define OMAP_MPUIO_INPUT_LATCH         0x00
-#define OMAP_MPUIO_OUTPUT_REG          0x04
+#define OMAP_MPUIO_OUTPUT              0x04
 #define OMAP_MPUIO_IO_CNTL             0x08
 #define OMAP_MPUIO_KBR_LATCH           0x10
-#define OMAP_MPUIO_KBC_REG             0x14
-#define OMAP_MPUIO_GPIO_EVENT_MODE_REG 0x18
-#define OMAP_MPUIO_GPIO_INT_EDGE_REG   0x1c
+#define OMAP_MPUIO_KBC                 0x14
+#define OMAP_MPUIO_GPIO_EVENT_MODE     0x18
+#define OMAP_MPUIO_GPIO_INT_EDGE       0x1c
 #define OMAP_MPUIO_KBD_INT             0x20
 #define OMAP_MPUIO_GPIO_INT            0x24
 #define OMAP_MPUIO_KBD_MASKIT          0x28
 #define OMAP_MPUIO_GPIO_MASKIT         0x2c
-#define OMAP_MPUIO_GPIO_DEBOUNCING_REG 0x30
-#define OMAP_MPUIO_LATCH_REG           0x34
+#define OMAP_MPUIO_GPIO_DEBOUNCING     0x30
+#define OMAP_MPUIO_LATCH               0x34
 
 #define OMAP_MPUIO(nr)         (OMAP_MAX_GPIO_LINES + (nr))
 #define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
index c3889427aa7e21794fd82883118a51087c3564cc..348072bc4fbcf396c8ee00a96801f295d21d26af 100644 (file)
@@ -10,6 +10,7 @@
  * Author: RidgeRun, Inc. Greg Lonnon <glonnon@ridgerun.com>
  *
  * Reorganized for Linux-2.6 by Tony Lindgren <tony@atomide.com>
+ *                          and Dirk Behme <dirk.behme@de.bosch.com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the
 #ifndef __ASSEMBLER__
 #include <asm/types.h>
 #endif
-
-/*
- * ----------------------------------------------------------------------------
- * I/O mapping
- * ----------------------------------------------------------------------------
- */
-#define IO_PHYS                        0xFFFB0000
-#define IO_OFFSET              0x01000000      /* Virtual IO = 0xfefb0000 */
-#define IO_VIRT                        (IO_PHYS - IO_OFFSET)
-#define IO_SIZE                        0x40000
-#define IO_ADDRESS(x)          ((x) - IO_OFFSET)
-
-#define PCIO_BASE              0
-
-#define io_p2v(x)               ((x) - IO_OFFSET)
-#define io_v2p(x)               ((x) + IO_OFFSET)
-
-#ifndef __ASSEMBLER__
-
-/* 16 bit uses LDRH/STRH, base +/- offset_8 */
-typedef struct { volatile u16 offset[256]; } __regbase16;
-#define __REGV16(vaddr)                ((__regbase16 *)((vaddr)&~0xff)) \
-                                       ->offset[((vaddr)&0xff)>>1]
-#define __REG16(paddr)          __REGV16(io_p2v(paddr))
-
-/* 8/32 bit uses LDR/STR, base +/- offset_12 */
-typedef struct { volatile u8 offset[4096]; } __regbase8;
-#define __REGV8(vaddr)         ((__regbase8  *)((paddr)&~4095)) \
-                                       ->offset[((paddr)&4095)>>0]
-#define __REG8(paddr)          __REGV8(io_p2v(paddr))
-
-typedef struct { volatile u32 offset[4096]; } __regbase32;
-#define __REGV32(vaddr)                ((__regbase32 *)((vaddr)&~4095)) \
-                                       ->offset[((vaddr)&4095)>>2]
-#define __REG32(paddr)         __REGV32(io_p2v(paddr))
-
-#else
-
-#define __REG8(paddr)          io_p2v(paddr)
-#define __REG16(paddr)         io_p2v(paddr)
-#define __REG32(paddr)         io_p2v(paddr)
-
-#endif
+#include <asm/arch/io.h>
 
 /*
  * ---------------------------------------------------------------------------
@@ -97,14 +56,14 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
  * Clocks
  * ----------------------------------------------------------------------------
  */
-#define CLKGEN_RESET_BASE      (0xfffece00)
-#define ARM_CKCTL              (CLKGEN_RESET_BASE + 0x0)
-#define ARM_IDLECT1            (CLKGEN_RESET_BASE + 0x4)
-#define ARM_IDLECT2            (CLKGEN_RESET_BASE + 0x8)
-#define ARM_EWUPCT             (CLKGEN_RESET_BASE + 0xC)
-#define ARM_RSTCT1             (CLKGEN_RESET_BASE + 0x10)
-#define ARM_RSTCT2             (CLKGEN_RESET_BASE + 0x14)
-#define ARM_SYSST              (CLKGEN_RESET_BASE + 0x18)
+#define CLKGEN_REG_BASE                (0xfffece00)
+#define ARM_CKCTL              (CLKGEN_REG_BASE + 0x0)
+#define ARM_IDLECT1            (CLKGEN_REG_BASE + 0x4)
+#define ARM_IDLECT2            (CLKGEN_REG_BASE + 0x8)
+#define ARM_EWUPCT             (CLKGEN_REG_BASE + 0xC)
+#define ARM_RSTCT1             (CLKGEN_REG_BASE + 0x10)
+#define ARM_RSTCT2             (CLKGEN_REG_BASE + 0x14)
+#define ARM_SYSST              (CLKGEN_REG_BASE + 0x18)
 
 #define CK_RATEF               1
 #define CK_IDLEF               2
@@ -113,19 +72,27 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
 #define SETARM_IDLE_SHIFT
 
 /* DPLL control registers */
-#define DPLL_CTL_REG           (0xfffecf00)
-#define CK_DPLL1               (0xfffecf00)
+#define DPLL_CTL               (0xfffecf00)
 
-/* ULPD */
+/* DSP clock control */
+#define DSP_CONFIG_REG_BASE     (0xe1008000)
+#define DSP_IDLECT1            (DSP_CONFIG_REG_BASE + 0x4)
+#define DSP_IDLECT2            (DSP_CONFIG_REG_BASE + 0x8)
+
+/*
+ * ---------------------------------------------------------------------------
+ * UPLD
+ * ---------------------------------------------------------------------------
+ */
 #define ULPD_REG_BASE          (0xfffe0800)
-#define ULPD_IT_STATUS_REG     (ULPD_REG_BASE + 0x14)
-#define ULPD_CLOCK_CTRL_REG    (ULPD_REG_BASE + 0x30)
-#define ULPD_SOFT_REQ_REG      (ULPD_REG_BASE + 0x34)
-#define ULPD_DPLL_CTRL_REG     (ULPD_REG_BASE + 0x3c)
-#define ULPD_STATUS_REQ_REG    (ULPD_REG_BASE + 0x40)
-#define ULPD_APLL_CTRL_REG     (ULPD_REG_BASE + 0x4c)
-#define ULPD_POWER_CTRL_REG    (ULPD_REG_BASE + 0x50)
-#define ULPD_CAM_CLK_CTRL_REG  (ULPD_REG_BASE + 0x7c)
+#define ULPD_IT_STATUS         (ULPD_REG_BASE + 0x14)
+#define ULPD_CLOCK_CTRL                (ULPD_REG_BASE + 0x30)
+#define ULPD_SOFT_REQ          (ULPD_REG_BASE + 0x34)
+#define ULPD_DPLL_CTRL         (ULPD_REG_BASE + 0x3c)
+#define ULPD_STATUS_REQ                (ULPD_REG_BASE + 0x40)
+#define ULPD_APLL_CTRL         (ULPD_REG_BASE + 0x4c)
+#define ULPD_POWER_CTRL                (ULPD_REG_BASE + 0x50)
+#define ULPD_CAM_CLK_CTRL      (ULPD_REG_BASE + 0x7c)
 
 /*
  * ---------------------------------------------------------------------------
@@ -146,18 +113,24 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
 #define TIMER32k_ARL           (1<<3)
 
 /* MPU Timer base addresses */
-#define OMAP_MPUTIMER_BASE     0xfffec500
-#define OMAP_MPUTIMER_OFF      0x00000100
-
-#define OMAP_TIMER1_BASE       0xfffec500
-#define OMAP_TIMER2_BASE       0xfffec600
-#define OMAP_TIMER3_BASE       0xfffec700
-#define OMAP_WATCHDOG_BASE     0xfffec800
+#define OMAP_TIMER1_BASE       (0xfffec500)
+#define OMAP_TIMER2_BASE       (0xfffec600)
+#define OMAP_TIMER3_BASE       (0xfffec700)
+#define OMAP_MPUTIMER_BASE     OMAP_TIMER1_BASE
+#define OMAP_MPUTIMER_OFFSET   0x100
 
 /* MPU Timer Registers */
-#define CNTL_TIMER             0
-#define LOAD_TIM               4
-#define READ_TIM               8
+#define OMAP_TIMER1_CNTL       (OMAP_TIMER_BASE1 + 0x0)
+#define OMAP_TIMER1_LOAD_TIM   (OMAP_TIMER_BASE1 + 0x4)
+#define OMAP_TIMER1_READ_TIM   (OMAP_TIMER_BASE1 + 0x8)
+
+#define OMAP_TIMER2_CNTL       (OMAP_TIMER_BASE2 + 0x0)
+#define OMAP_TIMER2_LOAD_TIM   (OMAP_TIMER_BASE2 + 0x4)
+#define OMAP_TIMER2_READ_TIM   (OMAP_TIMER_BASE2 + 0x8)
+
+#define OMAP_TIMER3_CNTL       (OMAP_TIMER_BASE3 + 0x0)
+#define OMAP_TIMER3_LOAD_TIM   (OMAP_TIMER_BASE3 + 0x4)
+#define OMAP_TIMER3_READ_TIM   (OMAP_TIMER_BASE3 + 0x8)
 
 /* CNTL_TIMER register bits */
 #define MPUTIM_FREE            (1<<6)
@@ -167,6 +140,13 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
 #define MPUTIM_AR              (1<<1)
 #define MPUTIM_ST              (1<<0)
 
+/* Watchdog */
+#define OMAP_WATCHDOG_BASE     (0xfffec800)
+#define OMAP_WDT_TIMER         (OMAP_WATCHDOG_BASE + 0x0)
+#define OMAP_WDT_LOAD_TIM      (OMAP_WATCHDOG_BASE + 0x4)
+#define OMAP_WDT_READ_TIM      (OMAP_WATCHDOG_BASE + 0x4)
+#define OMAP_WDT_TIMER_MODE    (OMAP_WATCHDOG_BASE + 0x8)
+
 /*
  * ---------------------------------------------------------------------------
  * Interrupts
@@ -174,22 +154,30 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
  */
 #define OMAP_IH1_BASE          0xfffecb00
 #define OMAP_IH2_BASE          0xfffe0000
-#define OMAP_ITR               0x0
-#define OMAP_MASK              0x4
-
-#define IRQ_ITR                        0x00
-#define IRQ_MIR                        0x04
-#define IRQ_SIR_IRQ            0x10
-#define IRQ_SIR_FIQ            0x14
-#define IRQ_CONTROL_REG                0x18
-#define IRQ_ISR                        0x9c
-#define IRQ_ILR0               0x1c
-
-/* OMAP-1610 specific interrupt handler registers */
-#define OMAP_IH2_SECT1         (OMAP_IH2_BASE)
-#define OMAP_IH2_SECT2         (OMAP_IH2_BASE + 0x100)
-#define OMAP_IH2_SECT3         (OMAP_IH2_BASE + 0x200)
-#define OMAP_IH2_SECT4         (OMAP_IH2_BASE + 0x300)
+
+#define OMAP_IH1_ITR           (OMAP_IH1_BASE + 0x00)
+#define OMAP_IH1_MIR           (OMAP_IH1_BASE + 0x04)
+#define OMAP_IH1_SIR_IRQ       (OMAP_IH1_BASE + 0x10)
+#define OMAP_IH1_SIR_FIQ       (OMAP_IH1_BASE + 0x14)
+#define OMAP_IH1_CONTROL       (OMAP_IH1_BASE + 0x18)
+#define OMAP_IH1_ILR0          (OMAP_IH1_BASE + 0x1c)
+#define OMAP_IH1_ISR           (OMAP_IH1_BASE + 0x9c)
+
+#define OMAP_IH2_ITR           (OMAP_IH2_BASE + 0x00)
+#define OMAP_IH2_MIR           (OMAP_IH2_BASE + 0x04)
+#define OMAP_IH2_SIR_IRQ       (OMAP_IH2_BASE + 0x10)
+#define OMAP_IH2_SIR_FIQ       (OMAP_IH2_BASE + 0x14)
+#define OMAP_IH2_CONTROL       (OMAP_IH2_BASE + 0x18)
+#define OMAP_IH2_ILR0          (OMAP_IH2_BASE + 0x1c)
+#define OMAP_IH2_ISR           (OMAP_IH2_BASE + 0x9c)
+
+#define IRQ_ITR_REG_OFFSET     0x00
+#define IRQ_MIR_REG_OFFSET     0x04
+#define IRQ_SIR_IRQ_REG_OFFSET 0x10
+#define IRQ_SIR_FIQ_REG_OFFSET 0x14
+#define IRQ_CONTROL_REG_OFFSET 0x18
+#define IRQ_ISR_REG_OFFSET     0x9c
+#define IRQ_ILR0_REG_OFFSET    0x1c
 
 /*
  * ---------------------------------------------------------------------------
@@ -198,9 +186,9 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
  */
 #define TCMIF_BASE             0xfffecc00
 #define IMIF_PRIO              (TCMIF_BASE + 0x00)
-#define EMIFS_PRIO_REG         (TCMIF_BASE + 0x04)
-#define EMIFF_PRIO_REG         (TCMIF_BASE + 0x08)
-#define EMIFS_CONFIG_REG       (TCMIF_BASE + 0x0c)
+#define EMIFS_PRIO             (TCMIF_BASE + 0x04)
+#define EMIFF_PRIO             (TCMIF_BASE + 0x08)
+#define EMIFS_CONFIG           (TCMIF_BASE + 0x0c)
 #define EMIFS_CS0_CONFIG       (TCMIF_BASE + 0x10)
 #define EMIFS_CS1_CONFIG       (TCMIF_BASE + 0x14)
 #define EMIFS_CS2_CONFIG       (TCMIF_BASE + 0x18)
@@ -213,7 +201,6 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
 #define TC_ENDIANISM           (TCMIF_BASE + 0x34)
 #define EMIFF_SDRAM_CONFIG_2   (TCMIF_BASE + 0x3c)
 #define EMIF_CFG_DYNAMIC_WS    (TCMIF_BASE + 0x40)
-
 /*
  * ----------------------------------------------------------------------------
  * System control registers
@@ -265,25 +252,24 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
  * ---------------------------------------------------------------------------
  */
 #define TIPB_PUBLIC_CNTL_BASE          0xfffed300
-#define MPU_PUBLIC_TIPB_CNTL_REG       (TIPB_PUBLIC_CNTL_BASE + 0x8)
+#define MPU_PUBLIC_TIPB_CNTL           (TIPB_PUBLIC_CNTL_BASE + 0x8)
 #define TIPB_PRIVATE_CNTL_BASE         0xfffeca00
-#define MPU_PRIVATE_TIPB_CNTL_REG      (TIPB_PRIVATE_CNTL_BASE + 0x8)
+#define MPU_PRIVATE_TIPB_CNTL          (TIPB_PRIVATE_CNTL_BASE + 0x8)
 
 /*
  * ----------------------------------------------------------------------------
- * DSP control registers
+ * MPUI interface
  * ----------------------------------------------------------------------------
  */
-/*  MPUI Interface Registers */
-#define MPUI_CTRL_REG          (0xfffec900)
-#define MPUI_DEBUG_ADDR                (0xfffec904)
-#define MPUI_DEBUG_DATA                (0xfffec908)
-#define MPUI_DEBUG_FLAG                (0xfffec90c)
-#define MPUI_STATUS_REG                (0xfffec910)
-#define MPUI_DSP_STATUS_REG    (0xfffec914)
-#define MPUI_DSP_BOOT_CONFIG   (0xfffec918)
-#define MPUI_DSP_API_CONFIG    (0xfffec91c)
-
+#define MPUI_BASE                      (0xfffec900)
+#define MPUI_CTRL                      (MPUI_BASE + 0x0)
+#define MPUI_DEBUG_ADDR                        (MPUI_BASE + 0x4)
+#define MPUI_DEBUG_DATA                        (MPUI_BASE + 0x8)
+#define MPUI_DEBUG_FLAG                        (MPUI_BASE + 0xc)
+#define MPUI_STATUS_REG                        (MPUI_BASE + 0x10)
+#define MPUI_DSP_STATUS                        (MPUI_BASE + 0x14)
+#define MPUI_DSP_BOOT_CONFIG           (MPUI_BASE + 0x18)
+#define MPUI_DSP_API_CONFIG            (MPUI_BASE + 0x1c)
 
 #ifndef __ASSEMBLER__
 
@@ -292,34 +278,38 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
  * Processor differentiation
  * ---------------------------------------------------------------------------
  */
-#define OMAP_ID_REG            __REG32(0xfffed404)
+#define OMAP_ID_BASE           (0xfffed400)
+#define OMAP_ID_REG            __REG32(OMAP_ID_BASE +  0x04)
+
+#define ID_SHIFT               12
+#define ID_MASK                        0x7fff
 
 /* See also uncompress.h */
-#define OMAP_ID_730            0xB55F
-#define OMAP_ID_1510           0xB470
-#define OMAP_ID_1610           0xB576
-#define OMAP_ID_1710           0xB5F7
-#define OMAP_ID_5912           0xB58C
+#define OMAP_ID_730            0x355F
+#define OMAP_ID_1510           0x3470
+#define OMAP_ID_1610           0x3576
+#define OMAP_ID_1710           0x35F7
+#define OMAP_ID_5912           0x358C
 
 #ifdef CONFIG_ARCH_OMAP730
 #include "omap730.h"
-#define cpu_is_omap730()       (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_730)
+#define cpu_is_omap730()       (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_730)
 #else
 #define cpu_is_omap730()       0
 #endif
 
 #ifdef CONFIG_ARCH_OMAP1510
 #include "omap1510.h"
-#define cpu_is_omap1510()      (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_1510)
+#define cpu_is_omap1510()      (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1510)
 #else
 #define cpu_is_omap1510()      0
 #endif
 
 #ifdef CONFIG_ARCH_OMAP1610
 #include "omap1610.h"
-#define cpu_is_omap1710()       (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_1710)
+#define cpu_is_omap1710()       (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1710)
 /* Detect 1710 as 1610 for now */
-#define cpu_is_omap1610()      (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_1610 \
+#define cpu_is_omap1610()      (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_1610 \
                                || cpu_is_omap1710())
 #else
 #define cpu_is_omap1610()      0
@@ -328,7 +318,7 @@ typedef struct { volatile u32 offset[4096]; } __regbase32;
 
 #ifdef CONFIG_ARCH_OMAP5912
 #include "omap5912.h"
-#define cpu_is_omap5912()      (((OMAP_ID_REG >> 12) & 0xffff) == OMAP_ID_5912)
+#define cpu_is_omap5912()      (((OMAP_ID_REG >> ID_SHIFT) & ID_MASK) == OMAP_ID_5912)
 #else
 #define cpu_is_omap5912()      0
 #endif
index 86c1cb3fbcd3694d801a8e7401ba0b6eb7cfa066..6622ba31f7bc8ecb46ccf0fe55aacc1b3afd9474 100644 (file)
@@ -1,13 +1,36 @@
 /*
  * linux/include/asm-arm/arch-omap/io.h
  *
+ * IO definitions for TI OMAP processors and boards
+ *
  * Copied from linux/include/asm-arm/arch-sa1100/io.h
  * Copyright (C) 1997-1999 Russell King
  *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
  * Modifications:
  *  06-12-1997 RMK     Created.
  *  07-04-1999 RMK     Major cleanup
  */
+
 #ifndef __ASM_ARM_ARCH_IO_H
 #define __ASM_ARM_ARCH_IO_H
 
 #define __mem_pci(a)           ((unsigned long)(a))
 #define __mem_isa(a)           ((unsigned long)(a))
 
+/*
+ * ----------------------------------------------------------------------------
+ * I/O mapping
+ * ----------------------------------------------------------------------------
+ */
+#define IO_PHYS                        0xFFFB0000
+#define IO_OFFSET              0x01000000      /* Virtual IO = 0xfefb0000 */
+#define IO_VIRT                        (IO_PHYS - IO_OFFSET)
+#define IO_SIZE                        0x40000
+#define IO_ADDRESS(x)          ((x) - IO_OFFSET)
+
+#define PCIO_BASE              0
+
+#define io_p2v(x)               ((x) - IO_OFFSET)
+#define io_v2p(x)               ((x) + IO_OFFSET)
+
+#ifndef __ASSEMBLER__
+
 /*
  * Functions to access the OMAP IO region
  *
 #define omap_writew(v,a)       (*(volatile unsigned short *)IO_ADDRESS(a) = (v))
 #define omap_writel(v,a)       (*(volatile unsigned int   *)IO_ADDRESS(a) = (v))
 
+/* 16 bit uses LDRH/STRH, base +/- offset_8 */
+typedef struct { volatile u16 offset[256]; } __regbase16;
+#define __REGV16(vaddr)                ((__regbase16 *)((vaddr)&~0xff)) \
+                                       ->offset[((vaddr)&0xff)>>1]
+#define __REG16(paddr)          __REGV16(io_p2v(paddr))
+
+/* 8/32 bit uses LDR/STR, base +/- offset_12 */
+typedef struct { volatile u8 offset[4096]; } __regbase8;
+#define __REGV8(vaddr)         ((__regbase8  *)((vaddr)&~4095)) \
+                                       ->offset[((vaddr)&4095)>>0]
+#define __REG8(paddr)          __REGV8(io_p2v(paddr))
+
+typedef struct { volatile u32 offset[4096]; } __regbase32;
+#define __REGV32(vaddr)                ((__regbase32 *)((vaddr)&~4095)) \
+                                       ->offset[((vaddr)&4095)>>2]
+#define __REG32(paddr)         __REGV32(io_p2v(paddr))
+
+#else
+
+#define __REG8(paddr)          io_p2v(paddr)
+#define __REG16(paddr)         io_p2v(paddr)
+#define __REG32(paddr)         io_p2v(paddr)
+
+#endif
+
 #endif
index a5ecbec2167e24ddc60088383aac36fb9078c572..405395706196c55b4632377658ac434757cdcedc 100644 (file)
@@ -140,16 +140,20 @@ typedef enum {
        R18_1510_USB_GPIO0,
        W4_USB_PUEN,
        W4_USB_CLKO,
+       W4_USB_HIGHZ,
+       W4_GPIO58,
 
        /* USB1 master */
        USB1_SUSP,
        USB1_SEO,
+       W13_1610_USB1_SE0,
        USB1_TXEN,
        USB1_TXD,
        USB1_VP,
        USB1_VM,
        USB1_RCV,
        USB1_SPEED,
+       R13_1610_USB1_SPEED,
 
        /* USB2 master */
        USB2_SUSP,
@@ -216,6 +220,7 @@ typedef enum {
        /* OMAP-1610 GPIO */
        P20_1610_GPIO4,
        V9_1610_GPIO7,
+       W8_1610_GPIO9,
        N19_1610_GPIO13,
        P10_1610_GPIO22,
        V5_1610_GPIO24,
@@ -317,16 +322,20 @@ MUX_CFG("R18_USB_VBUS",            7,    9,    2,   1,  11,   0,   NA,     0,  1)
 MUX_CFG("R18_1510_USB_GPIO0",   7,    9,    0,   1,  11,   1,   NA,     0,  1)
 MUX_CFG("W4_USB_PUEN",          D,    3,    0,   3,   5,   1,   NA,     0,  1)
 MUX_CFG("W4_USB_CLKO",          D,    3,    1,   3,   5,   0,   NA,     0,  1)
+MUX_CFG("W4_USB_HIGHZ",                 D,    3,    4,   3,   5,   0,    3,     0,  1)
+MUX_CFG("W4_GPIO58",            D,    3,    7,   3,   5,   0,    3,     0,  1)
 
 /* USB1 master */
 MUX_CFG("USB1_SUSP",            8,   27,    2,   1,  27,   0,   NA,     0,  1)
 MUX_CFG("USB1_SE0",             9,    0,    2,   1,  28,   0,   NA,     0,  1)
+MUX_CFG("W13_1610_USB1_SE0",    9,    0,    4,   1,  28,   0,   NA,     0,  1)
 MUX_CFG("USB1_TXEN",            9,    3,    2,   1,  29,   0,   NA,     0,  1)
 MUX_CFG("USB1_TXD",             9,   24,    1,   2,   4,   0,   NA,     0,  1)
 MUX_CFG("USB1_VP",              A,    3,    1,   2,   7,   0,   NA,     0,  1)
 MUX_CFG("USB1_VM",              A,    6,    1,   2,   8,   0,   NA,     0,  1)
 MUX_CFG("USB1_RCV",             A,    9,    1,   2,   9,   0,   NA,     0,  1)
 MUX_CFG("USB1_SPEED",           A,   12,    2,   2,  10,   0,   NA,     0,  1)
+MUX_CFG("R13_1610_USB1_SPEED",  A,   12,    5,   2,  10,   0,   NA,     0,  1)
 
 /* USB2 master */
 MUX_CFG("USB2_SUSP",            B,    3,    1,   2,  17,   0,   NA,     0,  1)
@@ -394,6 +403,7 @@ MUX_CFG("J18_1610_ETM_D7",   5,   27,    1,   0,  19,   0,    0,     0,  1)
 /* OMAP-1610 GPIO */
 MUX_CFG("P20_1610_GPIO4",       6,   27,    0,   1,   7,   0,    1,     1,  1)
 MUX_CFG("V9_1610_GPIO7",        B,   12,    1,   2,  20,   0,    2,     1,  1)
+MUX_CFG("W8_1610_GPIO9",        B,   21,    0,   2,  23,   0,    2,     1,  1)
 MUX_CFG("N19_1610_GPIO13",      6,   12,    0,   1,   2,   0,    1,     1,  1)
 MUX_CFG("P10_1610_GPIO22",      C,    0,    7,   2,  26,   0,    2,     1,  1)
 MUX_CFG("V5_1610_GPIO24",       B,   15,    7,   2,  21,   0,    2,     1,  1)
@@ -405,7 +415,7 @@ MUX_CFG("U18_1610_UWIRE_SDI",        8,    0,    0,   1,  18,   0,    1,     1,  1)
 MUX_CFG("W21_1610_UWIRE_SDO",   8,    3,    0,   1,  19,   0,    1,     1,  1)
 MUX_CFG("N14_1610_UWIRE_CS0",   8,    9,    1,   1,  21,   0,    1,     1,  1)
 MUX_CFG("P15_1610_UWIRE_CS3",   8,   12,    1,   1,  22,   0,    1,     1,  1)
-MUX_CFG("N15_1610_UWIRE_CS1",   7,   18,    2,  NA,   0,   0,   NA,     0,  0)
+MUX_CFG("N15_1610_UWIRE_CS1",   7,   18,    2,   1,  14,   0,   NA,     0,  1)
 
 /* First MMC interface, same on 1510 and 1610 */
 MUX_CFG("MMC_CMD",              A,   27,    0,   2,  15,   1,    2,     1,  1)
index c2ef7c32c96c9a34ec97eed9493a5ed5a064b284..667a6f697c1105195bf622820f0ae297f8aaba9a 100644 (file)
 #define OMAP1610_DSPREG_SIZE   SZ_128K
 #define OMAP1610_DSPREG_START  0xE1000000
 
-#define OMAP_IH2_0_BASE          0xfffe0000
-#define OMAP_IH2_1_BASE          0xfffe0100
-#define OMAP_IH2_2_BASE          0xfffe0200
-#define OMAP_IH2_3_BASE          0xfffe0300
+/*
+ * ---------------------------------------------------------------------------
+ * Interrupts
+ * ---------------------------------------------------------------------------
+ */
+#define OMAP_IH2_0_BASE                (0xfffe0000)
+#define OMAP_IH2_1_BASE                (0xfffe0100)
+#define OMAP_IH2_2_BASE                (0xfffe0200)
+#define OMAP_IH2_3_BASE                (0xfffe0300)
+
+#define OMAP_IH2_0_ITR         (OMAP_IH2_0_BASE + 0x00)
+#define OMAP_IH2_0_MIR         (OMAP_IH2_0_BASE + 0x04)
+#define OMAP_IH2_0_SIR_IRQ     (OMAP_IH2_0_BASE + 0x10)
+#define OMAP_IH2_0_SIR_FIQ     (OMAP_IH2_0_BASE + 0x14)
+#define OMAP_IH2_0_CONTROL     (OMAP_IH2_0_BASE + 0x18)
+#define OMAP_IH2_0_ILR0                (OMAP_IH2_0_BASE + 0x1c)
+#define OMAP_IH2_0_ISR         (OMAP_IH2_0_BASE + 0x9c)
+
+#define OMAP_IH2_1_ITR         (OMAP_IH2_1_BASE + 0x00)
+#define OMAP_IH2_1_MIR         (OMAP_IH2_1_BASE + 0x04)
+#define OMAP_IH2_1_SIR_IRQ     (OMAP_IH2_1_BASE + 0x10)
+#define OMAP_IH2_1_SIR_FIQ     (OMAP_IH2_1_BASE + 0x14)
+#define OMAP_IH2_1_CONTROL     (OMAP_IH2_1_BASE + 0x18)
+#define OMAP_IH2_1_ILR1                (OMAP_IH2_1_BASE + 0x1c)
+#define OMAP_IH2_1_ISR         (OMAP_IH2_1_BASE + 0x9c)
+
+#define OMAP_IH2_2_ITR         (OMAP_IH2_2_BASE + 0x00)
+#define OMAP_IH2_2_MIR         (OMAP_IH2_2_BASE + 0x04)
+#define OMAP_IH2_2_SIR_IRQ     (OMAP_IH2_2_BASE + 0x10)
+#define OMAP_IH2_2_SIR_FIQ     (OMAP_IH2_2_BASE + 0x14)
+#define OMAP_IH2_2_CONTROL     (OMAP_IH2_2_BASE + 0x18)
+#define OMAP_IH2_2_ILR2                (OMAP_IH2_2_BASE + 0x1c)
+#define OMAP_IH2_2_ISR         (OMAP_IH2_2_BASE + 0x9c)
+
+#define OMAP_IH2_3_ITR         (OMAP_IH2_3_BASE + 0x00)
+#define OMAP_IH2_3_MIR         (OMAP_IH2_3_BASE + 0x04)
+#define OMAP_IH2_3_SIR_IRQ     (OMAP_IH2_3_BASE + 0x10)
+#define OMAP_IH2_3_SIR_FIQ     (OMAP_IH2_3_BASE + 0x14)
+#define OMAP_IH2_3_CONTROL     (OMAP_IH2_3_BASE + 0x18)
+#define OMAP_IH2_3_ILR3                (OMAP_IH2_3_BASE + 0x1c)
+#define OMAP_IH2_3_ISR         (OMAP_IH2_3_BASE + 0x9c)
 
 /*
  * ----------------------------------------------------------------------------
- * System control registers
+ * Clocks
  * ----------------------------------------------------------------------------
  */
+#define OMAP1610_ARM_IDLECT3   (CLKGEN_REG_BASE + 0x24)
 
-#define OMAP1610_RESET_CONTROL         0xfffe1140
-#define OMAP1610_ARM_IDLECT3           (CLKGEN_RESET_BASE + 0x24)
-#define OMAP1610_CONF_VOLTAGE_CTRL_0   0xfffe1060
+/*
+ * ----------------------------------------------------------------------------
+ * Pin configuration registers
+ * ----------------------------------------------------------------------------
+ */
 #define OMAP1610_CONF_VOLTAGE_VDDSHV6  (1 << 8)
 #define OMAP1610_CONF_VOLTAGE_VDDSHV7  (1 << 9)
 #define OMAP1610_CONF_VOLTAGE_VDDSHV8  (1 << 10)
  * TIPB bus interface
  * ---------------------------------------------------------------------------
  */
-
-#define OMAP1610_TIPB_SWITCH           0xfffbc800
-#define OMAP1610_TIPB_BRIDGE_INT       0xfffeca00      /* Private TIPB_CNTL */
-#define OMAP1610_PRIVATE_MPU_TIPB_CNTL 0xfffeca08
-#define OMAP1610_TIPB_BRIDGE_EXT       0xfffed300      /* Public (Shared) TIPB_CNTL */
-#define OMAP1610_PUBLIC_MPU_TIPB_CNTL  0xfffed308
-#define OMAP1610_TIPB_SWITCH_CFG       OMAP_TIPB_SWITCH
-#define OMAP1610_MMCSD2_SSW_MPU_CONF   (TIPB_SWITCH_CFG + 0x160)
+#define TIPB_SWITCH_BASE                (0xfffbc800)
+#define OMAP1610_MMCSD2_SSW_MPU_CONF   (TIPB_SWITCH_BASE + 0x160)
 
 #endif /*  __ASM_ARCH_OMAP1610_H */
 
index aa72dd5c2453be238a17ede731bd2543d0a4e229..f996af7c185b69602af0e3649eee9a541c1787b2 100644 (file)
 #define OMAP5912_DSPREG_SIZE   SZ_128K
 #define OMAP5912_DSPREG_START  0xE1000000
 
+/*
+ * ---------------------------------------------------------------------------
+ * Interrupts
+ * ---------------------------------------------------------------------------
+ */
+#define OMAP_IH2_0_BASE                (0xfffe0000)
+#define OMAP_IH2_1_BASE                (0xfffe0100)
+#define OMAP_IH2_2_BASE                (0xfffe0200)
+#define OMAP_IH2_3_BASE                (0xfffe0300)
+
+#define OMAP_IH2_0_ITR         (OMAP_IH2_0_BASE + 0x00)
+#define OMAP_IH2_0_MIR         (OMAP_IH2_0_BASE + 0x04)
+#define OMAP_IH2_0_SIR_IRQ     (OMAP_IH2_0_BASE + 0x10)
+#define OMAP_IH2_0_SIR_FIQ     (OMAP_IH2_0_BASE + 0x14)
+#define OMAP_IH2_0_CONTROL     (OMAP_IH2_0_BASE + 0x18)
+#define OMAP_IH2_0_ILR0                (OMAP_IH2_0_BASE + 0x1c)
+#define OMAP_IH2_0_ISR         (OMAP_IH2_0_BASE + 0x9c)
+
+#define OMAP_IH2_1_ITR         (OMAP_IH2_1_BASE + 0x00)
+#define OMAP_IH2_1_MIR         (OMAP_IH2_1_BASE + 0x04)
+#define OMAP_IH2_1_SIR_IRQ     (OMAP_IH2_1_BASE + 0x10)
+#define OMAP_IH2_1_SIR_FIQ     (OMAP_IH2_1_BASE + 0x14)
+#define OMAP_IH2_1_CONTROL     (OMAP_IH2_1_BASE + 0x18)
+#define OMAP_IH2_1_ILR1                (OMAP_IH2_1_BASE + 0x1c)
+#define OMAP_IH2_1_ISR         (OMAP_IH2_1_BASE + 0x9c)
+
+#define OMAP_IH2_2_ITR         (OMAP_IH2_2_BASE + 0x00)
+#define OMAP_IH2_2_MIR         (OMAP_IH2_2_BASE + 0x04)
+#define OMAP_IH2_2_SIR_IRQ     (OMAP_IH2_2_BASE + 0x10)
+#define OMAP_IH2_2_SIR_FIQ     (OMAP_IH2_2_BASE + 0x14)
+#define OMAP_IH2_2_CONTROL     (OMAP_IH2_2_BASE + 0x18)
+#define OMAP_IH2_2_ILR2                (OMAP_IH2_2_BASE + 0x1c)
+#define OMAP_IH2_2_ISR         (OMAP_IH2_2_BASE + 0x9c)
+
+#define OMAP_IH2_3_ITR         (OMAP_IH2_3_BASE + 0x00)
+#define OMAP_IH2_3_MIR         (OMAP_IH2_3_BASE + 0x04)
+#define OMAP_IH2_3_SIR_IRQ     (OMAP_IH2_3_BASE + 0x10)
+#define OMAP_IH2_3_SIR_FIQ     (OMAP_IH2_3_BASE + 0x14)
+#define OMAP_IH2_3_CONTROL     (OMAP_IH2_3_BASE + 0x18)
+#define OMAP_IH2_3_ILR3                (OMAP_IH2_3_BASE + 0x1c)
+#define OMAP_IH2_3_ISR         (OMAP_IH2_3_BASE + 0x9c)
+
 /*
  * ----------------------------------------------------------------------------
  * System control registers
  * ----------------------------------------------------------------------------
  */
 
-#define OMAP5912_ARM_IDLECT3           (CLKGEN_RESET_BASE + 0x24)
+#define OMAP5912_ARM_IDLECT3   (CLKGEN_REG_BASE + 0x24)
 
 #endif /*  __ASM_ARCH_OMAP5912_H */
 
index 82aca67e2367253c7f12caa58c5207b3b8726207..8ca763687295048204371927f10816cdd8309848 100644 (file)
  * OMAP730 PCC_UPLD configuration registers
  * ----------------------------------------------------------------------------
  */
-#define OMAP730_PCC_UPLD_CTRL_REG_BASE (0xfffe0900)
-#define OMAP730_PCC_UPLD_CTRL_REG      (OMAP730_PCC_UPLD_CTRL_REG_BASE + 0x00)
+#define OMAP730_PCC_UPLD_CTRL_BASE     (0xfffe0900)
+#define OMAP730_PCC_UPLD_CTRL          (OMAP730_PCC_UPLD_CTRL_BASE + 0x00)
 
 #endif /*  __ASM_ARCH_OMAP730_H */
 
index 9e3cc951ebb404c3d8d6b8e97cf6082c0898bfcd..85d48121982498d736590537fe99a751e3e34b9c 100644 (file)
@@ -52,7 +52,7 @@ typedef struct {
 
 #define mputimer_base(n) \
     ((volatile mputimer_regs_t*)IO_ADDRESS(OMAP_MPUTIMER_BASE + \
-                                (n)*OMAP_MPUTIMER_OFF))
+                                (n)*OMAP_MPUTIMER_OFFSET))
 
 static inline unsigned long timer32k_read(int reg) {
        unsigned long val;
index f0b82d370d0db29211bed8fad1790657f69503d4..9b287366de823d85e9a9e130805c3964f86b1606 100644 (file)
@@ -25,7 +25,7 @@
 
 #define UART_OMAP_MDR1         0x08    /* mode definition register */
 #define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0)
-#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & 0xffff
+#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK
 
 static void
 puts(const char *s)