Eric Miao | 49cbe78 | 2009-01-20 14:15:18 +0800 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-mmp/include/mach/regs-apbc.h |
| 3 | * |
| 4 | * Application Peripheral Bus Clock Unit |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #ifndef __ASM_MACH_REGS_APBC_H |
| 12 | #define __ASM_MACH_REGS_APBC_H |
| 13 | |
| 14 | #include <mach/addr-map.h> |
| 15 | |
Eric Miao | 49cbe78 | 2009-01-20 14:15:18 +0800 | [diff] [blame] | 16 | /* |
| 17 | * APB clock register offsets for PXA168 |
| 18 | */ |
| 19 | #define APBC_PXA168_UART1 APBC_REG(0x000) |
| 20 | #define APBC_PXA168_UART2 APBC_REG(0x004) |
| 21 | #define APBC_PXA168_GPIO APBC_REG(0x008) |
Eric Miao | a27ba76 | 2009-04-13 18:29:52 +0800 | [diff] [blame] | 22 | #define APBC_PXA168_PWM1 APBC_REG(0x00c) |
| 23 | #define APBC_PXA168_PWM2 APBC_REG(0x010) |
| 24 | #define APBC_PXA168_PWM3 APBC_REG(0x014) |
| 25 | #define APBC_PXA168_PWM4 APBC_REG(0x018) |
Eric Miao | 49cbe78 | 2009-01-20 14:15:18 +0800 | [diff] [blame] | 26 | #define APBC_PXA168_RTC APBC_REG(0x028) |
| 27 | #define APBC_PXA168_TWSI0 APBC_REG(0x02c) |
| 28 | #define APBC_PXA168_KPC APBC_REG(0x030) |
| 29 | #define APBC_PXA168_TIMERS APBC_REG(0x034) |
| 30 | #define APBC_PXA168_AIB APBC_REG(0x03c) |
| 31 | #define APBC_PXA168_SW_JTAG APBC_REG(0x040) |
| 32 | #define APBC_PXA168_ONEWIRE APBC_REG(0x048) |
Eric Miao | 49cbe78 | 2009-01-20 14:15:18 +0800 | [diff] [blame] | 33 | #define APBC_PXA168_ASFAR APBC_REG(0x050) |
| 34 | #define APBC_PXA168_ASSAR APBC_REG(0x054) |
Eric Miao | 49cbe78 | 2009-01-20 14:15:18 +0800 | [diff] [blame] | 35 | #define APBC_PXA168_TWSI1 APBC_REG(0x06c) |
| 36 | #define APBC_PXA168_UART3 APBC_REG(0x070) |
| 37 | #define APBC_PXA168_AC97 APBC_REG(0x084) |
Haojian Zhuang | 7e49922 | 2010-03-19 11:53:17 -0400 | [diff] [blame] | 38 | #define APBC_PXA168_SSP1 APBC_REG(0x81c) |
| 39 | #define APBC_PXA168_SSP2 APBC_REG(0x820) |
| 40 | #define APBC_PXA168_SSP3 APBC_REG(0x84c) |
| 41 | #define APBC_PXA168_SSP4 APBC_REG(0x858) |
| 42 | #define APBC_PXA168_SSP5 APBC_REG(0x85c) |
Eric Miao | 49cbe78 | 2009-01-20 14:15:18 +0800 | [diff] [blame] | 43 | |
Eric Miao | 14c6b5e | 2009-03-20 12:50:22 +0800 | [diff] [blame] | 44 | /* |
| 45 | * APB Clock register offsets for PXA910 |
| 46 | */ |
| 47 | #define APBC_PXA910_UART0 APBC_REG(0x000) |
| 48 | #define APBC_PXA910_UART1 APBC_REG(0x004) |
| 49 | #define APBC_PXA910_GPIO APBC_REG(0x008) |
Eric Miao | a27ba76 | 2009-04-13 18:29:52 +0800 | [diff] [blame] | 50 | #define APBC_PXA910_PWM1 APBC_REG(0x00c) |
| 51 | #define APBC_PXA910_PWM2 APBC_REG(0x010) |
| 52 | #define APBC_PXA910_PWM3 APBC_REG(0x014) |
| 53 | #define APBC_PXA910_PWM4 APBC_REG(0x018) |
Eric Miao | 14c6b5e | 2009-03-20 12:50:22 +0800 | [diff] [blame] | 54 | #define APBC_PXA910_SSP1 APBC_REG(0x01c) |
| 55 | #define APBC_PXA910_SSP2 APBC_REG(0x020) |
| 56 | #define APBC_PXA910_IPC APBC_REG(0x024) |
Haojian Zhuang | 4128e27 | 2012-02-23 23:37:33 +0800 | [diff] [blame] | 57 | #define APBC_PXA910_RTC APBC_REG(0x028) |
Eric Miao | 14c6b5e | 2009-03-20 12:50:22 +0800 | [diff] [blame] | 58 | #define APBC_PXA910_TWSI0 APBC_REG(0x02c) |
| 59 | #define APBC_PXA910_KPC APBC_REG(0x030) |
| 60 | #define APBC_PXA910_TIMERS APBC_REG(0x034) |
| 61 | #define APBC_PXA910_TBROT APBC_REG(0x038) |
| 62 | #define APBC_PXA910_AIB APBC_REG(0x03c) |
| 63 | #define APBC_PXA910_SW_JTAG APBC_REG(0x040) |
| 64 | #define APBC_PXA910_TIMERS1 APBC_REG(0x044) |
| 65 | #define APBC_PXA910_ONEWIRE APBC_REG(0x048) |
| 66 | #define APBC_PXA910_SSP3 APBC_REG(0x04c) |
| 67 | #define APBC_PXA910_ASFAR APBC_REG(0x050) |
| 68 | #define APBC_PXA910_ASSAR APBC_REG(0x054) |
| 69 | |
Haojian Zhuang | 2f7e8fa | 2009-12-04 09:41:28 -0500 | [diff] [blame] | 70 | /* |
| 71 | * APB Clock register offsets for MMP2 |
| 72 | */ |
| 73 | #define APBC_MMP2_RTC APBC_REG(0x000) |
| 74 | #define APBC_MMP2_TWSI1 APBC_REG(0x004) |
| 75 | #define APBC_MMP2_TWSI2 APBC_REG(0x008) |
| 76 | #define APBC_MMP2_TWSI3 APBC_REG(0x00c) |
| 77 | #define APBC_MMP2_TWSI4 APBC_REG(0x010) |
| 78 | #define APBC_MMP2_ONEWIRE APBC_REG(0x014) |
| 79 | #define APBC_MMP2_KPC APBC_REG(0x018) |
| 80 | #define APBC_MMP2_TB_ROTARY APBC_REG(0x01c) |
| 81 | #define APBC_MMP2_SW_JTAG APBC_REG(0x020) |
| 82 | #define APBC_MMP2_TIMERS APBC_REG(0x024) |
| 83 | #define APBC_MMP2_UART1 APBC_REG(0x02c) |
| 84 | #define APBC_MMP2_UART2 APBC_REG(0x030) |
| 85 | #define APBC_MMP2_UART3 APBC_REG(0x034) |
| 86 | #define APBC_MMP2_GPIO APBC_REG(0x038) |
| 87 | #define APBC_MMP2_PWM0 APBC_REG(0x03c) |
| 88 | #define APBC_MMP2_PWM1 APBC_REG(0x040) |
| 89 | #define APBC_MMP2_PWM2 APBC_REG(0x044) |
| 90 | #define APBC_MMP2_PWM3 APBC_REG(0x048) |
| 91 | #define APBC_MMP2_SSP0 APBC_REG(0x04c) |
| 92 | #define APBC_MMP2_SSP1 APBC_REG(0x050) |
| 93 | #define APBC_MMP2_SSP2 APBC_REG(0x054) |
| 94 | #define APBC_MMP2_SSP3 APBC_REG(0x058) |
| 95 | #define APBC_MMP2_SSP4 APBC_REG(0x05c) |
| 96 | #define APBC_MMP2_SSP5 APBC_REG(0x060) |
| 97 | #define APBC_MMP2_AIB APBC_REG(0x064) |
| 98 | #define APBC_MMP2_ASFAR APBC_REG(0x068) |
| 99 | #define APBC_MMP2_ASSAR APBC_REG(0x06c) |
| 100 | #define APBC_MMP2_USIM APBC_REG(0x070) |
| 101 | #define APBC_MMP2_MPMU APBC_REG(0x074) |
| 102 | #define APBC_MMP2_IPC APBC_REG(0x078) |
| 103 | #define APBC_MMP2_TWSI5 APBC_REG(0x07c) |
| 104 | #define APBC_MMP2_TWSI6 APBC_REG(0x080) |
| 105 | #define APBC_MMP2_TWSI_INTSTS APBC_REG(0x084) |
| 106 | #define APBC_MMP2_UART4 APBC_REG(0x088) |
| 107 | #define APBC_MMP2_RIPC APBC_REG(0x08c) |
| 108 | #define APBC_MMP2_THSENS1 APBC_REG(0x090) /* Thermal Sensor */ |
| 109 | #define APBC_MMP2_THSENS_INTSTS APBC_REG(0x0a4) |
| 110 | |
Eric Miao | 49cbe78 | 2009-01-20 14:15:18 +0800 | [diff] [blame] | 111 | /* Common APB clock register bit definitions */ |
| 112 | #define APBC_APBCLK (1 << 0) /* APB Bus Clock Enable */ |
| 113 | #define APBC_FNCLK (1 << 1) /* Functional Clock Enable */ |
| 114 | #define APBC_RST (1 << 2) /* Reset Generation */ |
| 115 | |
| 116 | /* Functional Clock Selection Mask */ |
| 117 | #define APBC_FNCLKSEL(x) (((x) & 0xf) << 4) |
| 118 | |
| 119 | #endif /* __ASM_MACH_REGS_APBC_H */ |