diff options
Diffstat (limited to 'include')
93 files changed, 1597 insertions, 644 deletions
diff --git a/include/asm-arm/arch-at91/at91_lcdc.h b/include/asm-arm/arch-at91/at91_lcdc.h deleted file mode 100644 index ab040a40d37b..000000000000 --- a/include/asm-arm/arch-at91/at91_lcdc.h +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/at91_lcdc.h | ||
3 | * | ||
4 | * LCD Controller (LCDC). | ||
5 | * Based on AT91SAM9261 datasheet revision E. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef AT91_LCDC_H | ||
14 | #define AT91_LCDC_H | ||
15 | |||
16 | #define AT91_LCDC_DMABADDR1 0x00 /* DMA Base Address Register 1 */ | ||
17 | #define AT91_LCDC_DMABADDR2 0x04 /* DMA Base Address Register 2 */ | ||
18 | #define AT91_LCDC_DMAFRMPT1 0x08 /* DMA Frame Pointer Register 1 */ | ||
19 | #define AT91_LCDC_DMAFRMPT2 0x0c /* DMA Frame Pointer Register 2 */ | ||
20 | #define AT91_LCDC_DMAFRMADD1 0x10 /* DMA Frame Address Register 1 */ | ||
21 | #define AT91_LCDC_DMAFRMADD2 0x14 /* DMA Frame Address Register 2 */ | ||
22 | |||
23 | #define AT91_LCDC_DMAFRMCFG 0x18 /* DMA Frame Configuration Register */ | ||
24 | #define AT91_LCDC_FRSIZE (0x7fffff << 0) /* Frame Size */ | ||
25 | #define AT91_LCDC_BLENGTH (0x7f << 24) /* Burst Length */ | ||
26 | |||
27 | #define AT91_LCDC_DMACON 0x1c /* DMA Control Register */ | ||
28 | #define AT91_LCDC_DMAEN (0x1 << 0) /* DMA Enable */ | ||
29 | #define AT91_LCDC_DMARST (0x1 << 1) /* DMA Reset */ | ||
30 | #define AT91_LCDC_DMABUSY (0x1 << 2) /* DMA Busy */ | ||
31 | |||
32 | #define AT91_LCDC_LCDCON1 0x0800 /* LCD Control Register 1 */ | ||
33 | #define AT91_LCDC_BYPASS (1 << 0) /* Bypass lcd_dotck divider */ | ||
34 | #define AT91_LCDC_CLKVAL (0x1ff << 12) /* Clock Divider */ | ||
35 | #define AT91_LCDC_LINCNT (0x7ff << 21) /* Line Counter */ | ||
36 | |||
37 | #define AT91_LCDC_LCDCON2 0x0804 /* LCD Control Register 2 */ | ||
38 | #define AT91_LCDC_DISTYPE (3 << 0) /* Display Type */ | ||
39 | #define AT91_LCDC_DISTYPE_STNMONO (0 << 0) | ||
40 | #define AT91_LCDC_DISTYPE_STNCOLOR (1 << 0) | ||
41 | #define AT91_LCDC_DISTYPE_TFT (2 << 0) | ||
42 | #define AT91_LCDC_SCANMOD (1 << 2) /* Scan Mode */ | ||
43 | #define AT91_LCDC_SCANMOD_SINGLE (0 << 2) | ||
44 | #define AT91_LCDC_SCANMOD_DUAL (1 << 2) | ||
45 | #define AT91_LCDC_IFWIDTH (3 << 3) /*Interface Width */ | ||
46 | #define AT91_LCDC_IFWIDTH_4 (0 << 3) | ||
47 | #define AT91_LCDC_IFWIDTH_8 (1 << 3) | ||
48 | #define AT91_LCDC_IFWIDTH_16 (2 << 3) | ||
49 | #define AT91_LCDC_PIXELSIZE (7 << 5) /* Bits per pixel */ | ||
50 | #define AT91_LCDC_PIXELSIZE_1 (0 << 5) | ||
51 | #define AT91_LCDC_PIXELSIZE_2 (1 << 5) | ||
52 | #define AT91_LCDC_PIXELSIZE_4 (2 << 5) | ||
53 | #define AT91_LCDC_PIXELSIZE_8 (3 << 5) | ||
54 | #define AT91_LCDC_PIXELSIZE_16 (4 << 5) | ||
55 | #define AT91_LCDC_PIXELSIZE_24 (5 << 5) | ||
56 | #define AT91_LCDC_INVVD (1 << 8) /* LCD Data polarity */ | ||
57 | #define AT91_LCDC_INVVD_NORMAL (0 << 8) | ||
58 | #define AT91_LCDC_INVVD_INVERTED (1 << 8) | ||
59 | #define AT91_LCDC_INVFRAME (1 << 9 ) /* LCD VSync polarity */ | ||
60 | #define AT91_LCDC_INVFRAME_NORMAL (0 << 9) | ||
61 | #define AT91_LCDC_INVFRAME_INVERTED (1 << 9) | ||
62 | #define AT91_LCDC_INVLINE (1 << 10) /* LCD HSync polarity */ | ||
63 | #define AT91_LCDC_INVLINE_NORMAL (0 << 10) | ||
64 | #define AT91_LCDC_INVLINE_INVERTED (1 << 10) | ||
65 | #define AT91_LCDC_INVCLK (1 << 11) /* LCD dotclk polarity */ | ||
66 | #define AT91_LCDC_INVCLK_NORMAL (0 << 11) | ||
67 | #define AT91_LCDC_INVCLK_INVERTED (1 << 11) | ||
68 | #define AT91_LCDC_INVDVAL (1 << 12) /* LCD dval polarity */ | ||
69 | #define AT91_LCDC_INVDVAL_NORMAL (0 << 12) | ||
70 | #define AT91_LCDC_INVDVAL_INVERTED (1 << 12) | ||
71 | #define AT91_LCDC_CLKMOD (1 << 15) /* LCD dotclk mode */ | ||
72 | #define AT91_LCDC_CLKMOD_ACTIVEDISPLAY (0 << 15) | ||
73 | #define AT91_LCDC_CLKMOD_ALWAYSACTIVE (1 << 15) | ||
74 | #define AT91_LCDC_MEMOR (1 << 31) /* Memory Ordering Format */ | ||
75 | #define AT91_LCDC_MEMOR_BIG (0 << 31) | ||
76 | #define AT91_LCDC_MEMOR_LITTLE (1 << 31) | ||
77 | |||
78 | #define AT91_LCDC_TIM1 0x0808 /* LCD Timing Register 1 */ | ||
79 | #define AT91_LCDC_VFP (0xff << 0) /* Vertical Front Porch */ | ||
80 | #define AT91_LCDC_VBP (0xff << 8) /* Vertical Back Porch */ | ||
81 | #define AT91_LCDC_VPW (0x3f << 16) /* Vertical Synchronization Pulse Width */ | ||
82 | #define AT91_LCDC_VHDLY (0xf << 24) /* Vertical to Horizontal Delay */ | ||
83 | |||
84 | #define AT91_LCDC_TIM2 0x080c /* LCD Timing Register 2 */ | ||
85 | #define AT91_LCDC_HBP (0xff << 0) /* Horizontal Back Porch */ | ||
86 | #define AT91_LCDC_HPW (0x3f << 8) /* Horizontal Synchronization Pulse Width */ | ||
87 | #define AT91_LCDC_HFP (0x7ff << 21) /* Horizontal Front Porch */ | ||
88 | |||
89 | #define AT91_LCDC_LCDFRMCFG 0x0810 /* LCD Frame Configuration Register */ | ||
90 | #define AT91_LCDC_LINEVAL (0x7ff << 0) /* Vertical Size of LCD Module */ | ||
91 | #define AT91_LCDC_HOZVAL (0x7ff << 21) /* Horizontal Size of LCD Module */ | ||
92 | |||
93 | #define AT91_LCDC_FIFO 0x0814 /* LCD FIFO Register */ | ||
94 | #define AT91_LCDC_FIFOTH (0xffff) /* FIFO Threshold */ | ||
95 | |||
96 | #define AT91_LCDC_DP1_2 0x081c /* Dithering Pattern DP1_2 Register */ | ||
97 | #define AT91_LCDC_DP4_7 0x0820 /* Dithering Pattern DP4_7 Register */ | ||
98 | #define AT91_LCDC_DP3_5 0x0824 /* Dithering Pattern DP3_5 Register */ | ||
99 | #define AT91_LCDC_DP2_3 0x0828 /* Dithering Pattern DP2_3 Register */ | ||
100 | #define AT91_LCDC_DP5_7 0x082c /* Dithering Pattern DP5_7 Register */ | ||
101 | #define AT91_LCDC_DP3_4 0x0830 /* Dithering Pattern DP3_4 Register */ | ||
102 | #define AT91_LCDC_DP4_5 0x0834 /* Dithering Pattern DP4_5 Register */ | ||
103 | #define AT91_LCDC_DP6_7 0x0838 /* Dithering Pattern DP6_7 Register */ | ||
104 | #define AT91_LCDC_DP1_2_VAL (0xff) | ||
105 | #define AT91_LCDC_DP4_7_VAL (0xfffffff) | ||
106 | #define AT91_LCDC_DP3_5_VAL (0xfffff) | ||
107 | #define AT91_LCDC_DP2_3_VAL (0xfff) | ||
108 | #define AT91_LCDC_DP5_7_VAL (0xfffffff) | ||
109 | #define AT91_LCDC_DP3_4_VAL (0xffff) | ||
110 | #define AT91_LCDC_DP4_5_VAL (0xfffff) | ||
111 | #define AT91_LCDC_DP6_7_VAL (0xfffffff) | ||
112 | |||
113 | #define AT91_LCDC_PWRCON 0x083c /* Power Control Register */ | ||
114 | #define AT91_LCDC_PWR (1 << 0) /* LCD Module Power Control */ | ||
115 | #define AT91_LCDC_GUARDT (0x7f << 1) /* Delay in Frame Period */ | ||
116 | #define AT91_LCDC_BUSY (1 << 31) /* LCD Busy */ | ||
117 | |||
118 | #define AT91_LCDC_CONTRAST_CTR 0x0840 /* Contrast Control Register */ | ||
119 | #define AT91_LCDC_PS (3 << 0) /* Contrast Counter Prescaler */ | ||
120 | #define AT91_LCDC_PS_DIV1 (0 << 0) | ||
121 | #define AT91_LCDC_PS_DIV2 (1 << 0) | ||
122 | #define AT91_LCDC_PS_DIV4 (2 << 0) | ||
123 | #define AT91_LCDC_PS_DIV8 (3 << 0) | ||
124 | #define AT91_LCDC_POL (1 << 2) /* Polarity of output Pulse */ | ||
125 | #define AT91_LCDC_POL_NEGATIVE (0 << 2) | ||
126 | #define AT91_LCDC_POL_POSITIVE (1 << 2) | ||
127 | #define AT91_LCDC_ENA (1 << 3) /* PWM generator Control */ | ||
128 | #define AT91_LCDC_ENA_PWMDISABLE (0 << 3) | ||
129 | #define AT91_LCDC_ENA_PWMENABLE (1 << 3) | ||
130 | |||
131 | #define AT91_LCDC_CONTRAST_VAL 0x0844 /* Contrast Value Register */ | ||
132 | #define AT91_LCDC_CVAL (0xff) /* PWM compare value */ | ||
133 | |||
134 | #define AT91_LCDC_IER 0x0848 /* Interrupt Enable Register */ | ||
135 | #define AT91_LCDC_IDR 0x084c /* Interrupt Disable Register */ | ||
136 | #define AT91_LCDC_IMR 0x0850 /* Interrupt Mask Register */ | ||
137 | #define AT91_LCDC_ISR 0x0854 /* Interrupt Enable Register */ | ||
138 | #define AT91_LCDC_ICR 0x0858 /* Interrupt Clear Register */ | ||
139 | #define AT91_LCDC_LNI (1 << 0) /* Line Interrupt */ | ||
140 | #define AT91_LCDC_LSTLNI (1 << 1) /* Last Line Interrupt */ | ||
141 | #define AT91_LCDC_EOFI (1 << 2) /* DMA End Of Frame Interrupt */ | ||
142 | #define AT91_LCDC_UFLWI (1 << 4) /* FIFO Underflow Interrupt */ | ||
143 | #define AT91_LCDC_OWRI (1 << 5) /* FIFO Overwrite Interrupt */ | ||
144 | #define AT91_LCDC_MERI (1 << 6) /* DMA Memory Error Interrupt */ | ||
145 | |||
146 | #define AT91_LCDC_LUT_(n) (0x0c00 + ((n)*4)) /* Palette Entry 0..255 */ | ||
147 | |||
148 | #endif | ||
diff --git a/include/asm-arm/arch-ep93xx/gpio.h b/include/asm-arm/arch-ep93xx/gpio.h index 1ee14a14cba0..9b1864bbd9a8 100644 --- a/include/asm-arm/arch-ep93xx/gpio.h +++ b/include/asm-arm/arch-ep93xx/gpio.h | |||
@@ -5,16 +5,6 @@ | |||
5 | #ifndef __ASM_ARCH_GPIO_H | 5 | #ifndef __ASM_ARCH_GPIO_H |
6 | #define __ASM_ARCH_GPIO_H | 6 | #define __ASM_ARCH_GPIO_H |
7 | 7 | ||
8 | #define GPIO_IN 0 | ||
9 | #define GPIO_OUT 1 | ||
10 | |||
11 | #define EP93XX_GPIO_LOW 0 | ||
12 | #define EP93XX_GPIO_HIGH 1 | ||
13 | |||
14 | extern void gpio_line_config(int line, int direction); | ||
15 | extern int gpio_line_get(int line); | ||
16 | extern void gpio_line_set(int line, int value); | ||
17 | |||
18 | /* GPIO port A. */ | 8 | /* GPIO port A. */ |
19 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) | 9 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) |
20 | #define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0) | 10 | #define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0) |
@@ -38,7 +28,7 @@ extern void gpio_line_set(int line, int value); | |||
38 | #define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7) | 28 | #define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7) |
39 | 29 | ||
40 | /* GPIO port C. */ | 30 | /* GPIO port C. */ |
41 | #define EP93XX_GPIO_LINE_C(x) ((x) + 16) | 31 | #define EP93XX_GPIO_LINE_C(x) ((x) + 40) |
42 | #define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0) | 32 | #define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0) |
43 | #define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1) | 33 | #define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1) |
44 | #define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2) | 34 | #define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2) |
@@ -71,7 +61,7 @@ extern void gpio_line_set(int line, int value); | |||
71 | #define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7) | 61 | #define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7) |
72 | 62 | ||
73 | /* GPIO port F. */ | 63 | /* GPIO port F. */ |
74 | #define EP93XX_GPIO_LINE_F(x) ((x) + 40) | 64 | #define EP93XX_GPIO_LINE_F(x) ((x) + 16) |
75 | #define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0) | 65 | #define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0) |
76 | #define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1) | 66 | #define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1) |
77 | #define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2) | 67 | #define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2) |
@@ -103,5 +93,49 @@ extern void gpio_line_set(int line, int value); | |||
103 | #define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6) | 93 | #define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6) |
104 | #define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7) | 94 | #define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7) |
105 | 95 | ||
96 | /* maximum value for gpio line identifiers */ | ||
97 | #define EP93XX_GPIO_LINE_MAX EP93XX_GPIO_LINE_H(7) | ||
98 | |||
99 | /* maximum value for irq capable line identifiers */ | ||
100 | #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7) | ||
101 | |||
102 | /* new generic GPIO API - see Documentation/gpio.txt */ | ||
103 | |||
104 | static inline int gpio_request(unsigned gpio, const char *label) | ||
105 | { | ||
106 | if (gpio > EP93XX_GPIO_LINE_MAX) | ||
107 | return -EINVAL; | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static inline void gpio_free(unsigned gpio) | ||
112 | { | ||
113 | } | ||
114 | |||
115 | int gpio_direction_input(unsigned gpio); | ||
116 | int gpio_direction_output(unsigned gpio, int value); | ||
117 | int gpio_get_value(unsigned gpio); | ||
118 | void gpio_set_value(unsigned gpio, int value); | ||
119 | |||
120 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
121 | |||
122 | /* | ||
123 | * Map GPIO A0..A7 (0..7) to irq 64..71, | ||
124 | * B0..B7 (7..15) to irq 72..79, and | ||
125 | * F0..F7 (16..24) to irq 80..87. | ||
126 | */ | ||
127 | |||
128 | static inline int gpio_to_irq(unsigned gpio) | ||
129 | { | ||
130 | if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ) | ||
131 | return 64 + gpio; | ||
132 | |||
133 | return -EINVAL; | ||
134 | } | ||
135 | |||
136 | static inline int irq_to_gpio(unsigned irq) | ||
137 | { | ||
138 | return irq - gpio_to_irq(0); | ||
139 | } | ||
106 | 140 | ||
107 | #endif | 141 | #endif |
diff --git a/include/asm-arm/arch-ep93xx/irqs.h b/include/asm-arm/arch-ep93xx/irqs.h index 2a8c63638c5e..53d4a68bfc88 100644 --- a/include/asm-arm/arch-ep93xx/irqs.h +++ b/include/asm-arm/arch-ep93xx/irqs.h | |||
@@ -67,12 +67,6 @@ | |||
67 | #define IRQ_EP93XX_SAI 60 | 67 | #define IRQ_EP93XX_SAI 60 |
68 | #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff | 68 | #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff |
69 | 69 | ||
70 | /* | ||
71 | * Map GPIO A0..A7 to irq 64..71, B0..B7 to 72..79, and | ||
72 | * F0..F7 to 80..87. | ||
73 | */ | ||
74 | #define IRQ_EP93XX_GPIO(x) (64 + (((x) + (((x) >> 2) & 8)) & 0x1f)) | ||
75 | |||
76 | #define NR_EP93XX_IRQS (64 + 24) | 70 | #define NR_EP93XX_IRQS (64 + 24) |
77 | 71 | ||
78 | #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x)) | 72 | #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x)) |
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index eeeea90cd5a9..9c5d2357aff3 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -61,13 +61,13 @@ __ixp4xx_ioremap(unsigned long addr, size_t size, unsigned int mtype) | |||
61 | if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff)) | 61 | if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff)) |
62 | return __arm_ioremap(addr, size, mtype); | 62 | return __arm_ioremap(addr, size, mtype); |
63 | 63 | ||
64 | return (void *)addr; | 64 | return (void __iomem *)addr; |
65 | } | 65 | } |
66 | 66 | ||
67 | static inline void | 67 | static inline void |
68 | __ixp4xx_iounmap(void __iomem *addr) | 68 | __ixp4xx_iounmap(void __iomem *addr) |
69 | { | 69 | { |
70 | if ((u32)addr >= VMALLOC_START) | 70 | if ((__force u32)addr >= VMALLOC_START) |
71 | __iounmap(addr); | 71 | __iounmap(addr); |
72 | } | 72 | } |
73 | 73 | ||
@@ -141,9 +141,9 @@ __ixp4xx_writesw(volatile void __iomem *bus_addr, const u16 *vaddr, int count) | |||
141 | static inline void | 141 | static inline void |
142 | __ixp4xx_writel(u32 value, volatile void __iomem *p) | 142 | __ixp4xx_writel(u32 value, volatile void __iomem *p) |
143 | { | 143 | { |
144 | u32 addr = (u32)p; | 144 | u32 addr = (__force u32)p; |
145 | if (addr >= VMALLOC_START) { | 145 | if (addr >= VMALLOC_START) { |
146 | __raw_writel(value, addr); | 146 | __raw_writel(value, p); |
147 | return; | 147 | return; |
148 | } | 148 | } |
149 | 149 | ||
@@ -208,11 +208,11 @@ __ixp4xx_readsw(const volatile void __iomem *bus_addr, u16 *vaddr, u32 count) | |||
208 | static inline unsigned long | 208 | static inline unsigned long |
209 | __ixp4xx_readl(const volatile void __iomem *p) | 209 | __ixp4xx_readl(const volatile void __iomem *p) |
210 | { | 210 | { |
211 | u32 addr = (u32)p; | 211 | u32 addr = (__force u32)p; |
212 | u32 data; | 212 | u32 data; |
213 | 213 | ||
214 | if (addr >= VMALLOC_START) | 214 | if (addr >= VMALLOC_START) |
215 | return __raw_readl(addr); | 215 | return __raw_readl(p); |
216 | 216 | ||
217 | if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data)) | 217 | if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data)) |
218 | return 0xffffffff; | 218 | return 0xffffffff; |
@@ -438,7 +438,7 @@ __ixp4xx_ioread32(const void __iomem *addr) | |||
438 | return (unsigned int)__ixp4xx_inl(port & PIO_MASK); | 438 | return (unsigned int)__ixp4xx_inl(port & PIO_MASK); |
439 | else { | 439 | else { |
440 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 440 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
441 | return le32_to_cpu(__raw_readl((u32)port)); | 441 | return le32_to_cpu((__force __le32)__raw_readl(addr)); |
442 | #else | 442 | #else |
443 | return (unsigned int)__ixp4xx_readl(addr); | 443 | return (unsigned int)__ixp4xx_readl(addr); |
444 | #endif | 444 | #endif |
@@ -523,7 +523,7 @@ __ixp4xx_iowrite32(u32 value, void __iomem *addr) | |||
523 | __ixp4xx_outl(value, port & PIO_MASK); | 523 | __ixp4xx_outl(value, port & PIO_MASK); |
524 | else | 524 | else |
525 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 525 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI |
526 | __raw_writel(cpu_to_le32(value), port); | 526 | __raw_writel((u32 __force)cpu_to_le32(value), addr); |
527 | #else | 527 | #else |
528 | __ixp4xx_writel(value, addr); | 528 | __ixp4xx_writel(value, addr); |
529 | #endif | 529 | #endif |
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h index 2a44d3d67980..2ce28e3fd325 100644 --- a/include/asm-arm/arch-ixp4xx/platform.h +++ b/include/asm-arm/arch-ixp4xx/platform.h | |||
@@ -76,17 +76,6 @@ extern unsigned long ixp4xx_exp_bus_size; | |||
76 | #define IXP4XX_UART_XTAL 14745600 | 76 | #define IXP4XX_UART_XTAL 14745600 |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * The IXP4xx chips do not have an I2C unit, so GPIO lines are just | ||
80 | * used to | ||
81 | * Used as platform_data to provide GPIO pin information to the ixp42x | ||
82 | * I2C driver. | ||
83 | */ | ||
84 | struct ixp4xx_i2c_pins { | ||
85 | unsigned long sda_pin; | ||
86 | unsigned long scl_pin; | ||
87 | }; | ||
88 | |||
89 | /* | ||
90 | * This structure provide a means for the board setup code | 79 | * This structure provide a means for the board setup code |
91 | * to give information to th pata_ixp4xx driver. It is | 80 | * to give information to th pata_ixp4xx driver. It is |
92 | * passed as platform_data. | 81 | * passed as platform_data. |
diff --git a/include/asm-arm/arch-ks8695/regs-gpio.h b/include/asm-arm/arch-ks8695/regs-gpio.h index 57fcf9fc82e4..6b95d77aea19 100644 --- a/include/asm-arm/arch-ks8695/regs-gpio.h +++ b/include/asm-arm/arch-ks8695/regs-gpio.h | |||
@@ -49,5 +49,7 @@ | |||
49 | #define IOPC_TM_FALLING (4) /* Falling Edge Detection */ | 49 | #define IOPC_TM_FALLING (4) /* Falling Edge Detection */ |
50 | #define IOPC_TM_EDGE (6) /* Both Edge Detection */ | 50 | #define IOPC_TM_EDGE (6) /* Both Edge Detection */ |
51 | 51 | ||
52 | /* Port Data Register */ | ||
53 | #define IOPD_(x) (1 << (x)) /* Signal Level of GPIO Pin x */ | ||
52 | 54 | ||
53 | #endif | 55 | #endif |
diff --git a/include/asm-arm/arch-msm/board.h b/include/asm-arm/arch-msm/board.h new file mode 100644 index 000000000000..763051f8ba14 --- /dev/null +++ b/include/asm-arm/arch-msm/board.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/board.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARCH_MSM_BOARD_H | ||
18 | #define __ASM_ARCH_MSM_BOARD_H | ||
19 | |||
20 | #include <linux/types.h> | ||
21 | |||
22 | /* platform device data structures */ | ||
23 | |||
24 | struct msm_mddi_platform_data | ||
25 | { | ||
26 | void (*panel_power)(int on); | ||
27 | unsigned has_vsync_irq:1; | ||
28 | }; | ||
29 | |||
30 | /* common init routines for use by arch/arm/mach-msm/board-*.c */ | ||
31 | |||
32 | void __init msm_add_devices(void); | ||
33 | void __init msm_map_common_io(void); | ||
34 | void __init msm_init_irq(void); | ||
35 | void __init msm_init_gpio(void); | ||
36 | |||
37 | #endif | ||
diff --git a/include/asm-arm/arch-msm/debug-macro.S b/include/asm-arm/arch-msm/debug-macro.S new file mode 100644 index 000000000000..393d5272e506 --- /dev/null +++ b/include/asm-arm/arch-msm/debug-macro.S | |||
@@ -0,0 +1,40 @@ | |||
1 | /* include/asm-arm/arch-msm7200/debug-macro.S | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <asm/hardware.h> | ||
18 | #include <asm/arch/msm_iomap.h> | ||
19 | |||
20 | .macro addruart,rx | ||
21 | @ see if the MMU is enabled and select appropriate base address | ||
22 | mrc p15, 0, \rx, c1, c0 | ||
23 | tst \rx, #1 | ||
24 | ldreq \rx, =MSM_UART1_PHYS | ||
25 | ldrne \rx, =MSM_UART1_BASE | ||
26 | .endm | ||
27 | |||
28 | .macro senduart,rd,rx | ||
29 | str \rd, [\rx, #0x0C] | ||
30 | .endm | ||
31 | |||
32 | .macro waituart,rd,rx | ||
33 | @ wait for TX_READY | ||
34 | 1: ldr \rd, [\rx, #0x08] | ||
35 | tst \rd, #0x04 | ||
36 | beq 1b | ||
37 | .endm | ||
38 | |||
39 | .macro busyuart,rd,rx | ||
40 | .endm | ||
diff --git a/include/asm-arm/arch-msm/dma.h b/include/asm-arm/arch-msm/dma.h new file mode 100644 index 000000000000..e4b565b27b35 --- /dev/null +++ b/include/asm-arm/arch-msm/dma.h | |||
@@ -0,0 +1,151 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/dma.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
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 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_DMA_H | ||
17 | |||
18 | #include <linux/list.h> | ||
19 | #include <asm/arch/msm_iomap.h> | ||
20 | |||
21 | struct msm_dmov_cmd { | ||
22 | struct list_head list; | ||
23 | unsigned int cmdptr; | ||
24 | void (*complete_func)(struct msm_dmov_cmd *cmd, unsigned int result); | ||
25 | /* void (*user_result_func)(struct msm_dmov_cmd *cmd); */ | ||
26 | }; | ||
27 | |||
28 | void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd); | ||
29 | void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd); | ||
30 | int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr); | ||
31 | /* int msm_dmov_exec_cmd_etc(unsigned id, unsigned int cmdptr, int timeout, int interruptible); */ | ||
32 | |||
33 | |||
34 | |||
35 | #define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2)) | ||
36 | #define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2)) | ||
37 | #define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2)) | ||
38 | #define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2)) | ||
39 | |||
40 | /* only security domain 3 is available to the ARM11 | ||
41 | * SD0 -> mARM trusted, SD1 -> mARM nontrusted, SD2 -> aDSP, SD3 -> aARM | ||
42 | */ | ||
43 | |||
44 | #define DMOV_CMD_PTR(ch) DMOV_SD3(0x000, ch) | ||
45 | #define DMOV_CMD_LIST (0 << 29) /* does not work */ | ||
46 | #define DMOV_CMD_PTR_LIST (1 << 29) /* works */ | ||
47 | #define DMOV_CMD_INPUT_CFG (2 << 29) /* untested */ | ||
48 | #define DMOV_CMD_OUTPUT_CFG (3 << 29) /* untested */ | ||
49 | #define DMOV_CMD_ADDR(addr) ((addr) >> 3) | ||
50 | |||
51 | #define DMOV_RSLT(ch) DMOV_SD3(0x040, ch) | ||
52 | #define DMOV_RSLT_VALID (1 << 31) /* 0 == host has empties result fifo */ | ||
53 | #define DMOV_RSLT_ERROR (1 << 3) | ||
54 | #define DMOV_RSLT_FLUSH (1 << 2) | ||
55 | #define DMOV_RSLT_DONE (1 << 1) /* top pointer done */ | ||
56 | #define DMOV_RSLT_USER (1 << 0) /* command with FR force result */ | ||
57 | |||
58 | #define DMOV_FLUSH0(ch) DMOV_SD3(0x080, ch) | ||
59 | #define DMOV_FLUSH1(ch) DMOV_SD3(0x0C0, ch) | ||
60 | #define DMOV_FLUSH2(ch) DMOV_SD3(0x100, ch) | ||
61 | #define DMOV_FLUSH3(ch) DMOV_SD3(0x140, ch) | ||
62 | #define DMOV_FLUSH4(ch) DMOV_SD3(0x180, ch) | ||
63 | #define DMOV_FLUSH5(ch) DMOV_SD3(0x1C0, ch) | ||
64 | |||
65 | #define DMOV_STATUS(ch) DMOV_SD3(0x200, ch) | ||
66 | #define DMOV_STATUS_RSLT_COUNT(n) (((n) >> 29)) | ||
67 | #define DMOV_STATUS_CMD_COUNT(n) (((n) >> 27) & 3) | ||
68 | #define DMOV_STATUS_RSLT_VALID (1 << 1) | ||
69 | #define DMOV_STATUS_CMD_PTR_RDY (1 << 0) | ||
70 | |||
71 | #define DMOV_ISR DMOV_SD3(0x380, 0) | ||
72 | |||
73 | #define DMOV_CONFIG(ch) DMOV_SD3(0x300, ch) | ||
74 | #define DMOV_CONFIG_FORCE_TOP_PTR_RSLT (1 << 2) | ||
75 | #define DMOV_CONFIG_FORCE_FLUSH_RSLT (1 << 1) | ||
76 | #define DMOV_CONFIG_IRQ_EN (1 << 0) | ||
77 | |||
78 | /* channel assignments */ | ||
79 | |||
80 | #define DMOV_NAND_CHAN 7 | ||
81 | #define DMOV_NAND_CRCI_CMD 5 | ||
82 | #define DMOV_NAND_CRCI_DATA 4 | ||
83 | |||
84 | #define DMOV_SDC1_CHAN 8 | ||
85 | #define DMOV_SDC1_CRCI 6 | ||
86 | |||
87 | #define DMOV_SDC2_CHAN 8 | ||
88 | #define DMOV_SDC2_CRCI 7 | ||
89 | |||
90 | #define DMOV_TSIF_CHAN 10 | ||
91 | #define DMOV_TSIF_CRCI 10 | ||
92 | |||
93 | #define DMOV_USB_CHAN 11 | ||
94 | |||
95 | /* no client rate control ifc (eg, ram) */ | ||
96 | #define DMOV_NONE_CRCI 0 | ||
97 | |||
98 | |||
99 | /* If the CMD_PTR register has CMD_PTR_LIST selected, the data mover | ||
100 | * is going to walk a list of 32bit pointers as described below. Each | ||
101 | * pointer points to a *array* of dmov_s, etc structs. The last pointer | ||
102 | * in the list is marked with CMD_PTR_LP. The last struct in each array | ||
103 | * is marked with CMD_LC (see below). | ||
104 | */ | ||
105 | #define CMD_PTR_ADDR(addr) ((addr) >> 3) | ||
106 | #define CMD_PTR_LP (1 << 31) /* last pointer */ | ||
107 | #define CMD_PTR_PT (3 << 29) /* ? */ | ||
108 | |||
109 | /* Single Item Mode */ | ||
110 | typedef struct { | ||
111 | unsigned cmd; | ||
112 | unsigned src; | ||
113 | unsigned dst; | ||
114 | unsigned len; | ||
115 | } dmov_s; | ||
116 | |||
117 | /* Scatter/Gather Mode */ | ||
118 | typedef struct { | ||
119 | unsigned cmd; | ||
120 | unsigned src_dscr; | ||
121 | unsigned dst_dscr; | ||
122 | unsigned _reserved; | ||
123 | } dmov_sg; | ||
124 | |||
125 | /* bits for the cmd field of the above structures */ | ||
126 | |||
127 | #define CMD_LC (1 << 31) /* last command */ | ||
128 | #define CMD_FR (1 << 22) /* force result -- does not work? */ | ||
129 | #define CMD_OCU (1 << 21) /* other channel unblock */ | ||
130 | #define CMD_OCB (1 << 20) /* other channel block */ | ||
131 | #define CMD_TCB (1 << 19) /* ? */ | ||
132 | #define CMD_DAH (1 << 18) /* destination address hold -- does not work?*/ | ||
133 | #define CMD_SAH (1 << 17) /* source address hold -- does not work? */ | ||
134 | |||
135 | #define CMD_MODE_SINGLE (0 << 0) /* dmov_s structure used */ | ||
136 | #define CMD_MODE_SG (1 << 0) /* untested */ | ||
137 | #define CMD_MODE_IND_SG (2 << 0) /* untested */ | ||
138 | #define CMD_MODE_BOX (3 << 0) /* untested */ | ||
139 | |||
140 | #define CMD_DST_SWAP_BYTES (1 << 14) /* exchange each byte n with byte n+1 */ | ||
141 | #define CMD_DST_SWAP_SHORTS (1 << 15) /* exchange each short n with short n+1 */ | ||
142 | #define CMD_DST_SWAP_WORDS (1 << 16) /* exchange each word n with word n+1 */ | ||
143 | |||
144 | #define CMD_SRC_SWAP_BYTES (1 << 11) /* exchange each byte n with byte n+1 */ | ||
145 | #define CMD_SRC_SWAP_SHORTS (1 << 12) /* exchange each short n with short n+1 */ | ||
146 | #define CMD_SRC_SWAP_WORDS (1 << 13) /* exchange each word n with word n+1 */ | ||
147 | |||
148 | #define CMD_DST_CRCI(n) (((n) & 15) << 7) | ||
149 | #define CMD_SRC_CRCI(n) (((n) & 15) << 3) | ||
150 | |||
151 | #endif | ||
diff --git a/include/asm-arm/arch-msm/entry-macro.S b/include/asm-arm/arch-msm/entry-macro.S new file mode 100644 index 000000000000..ee24aece4cb0 --- /dev/null +++ b/include/asm-arm/arch-msm/entry-macro.S | |||
@@ -0,0 +1,38 @@ | |||
1 | /* include/asm-arm/arch-msm7200/entry-macro.S | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <asm/arch/msm_iomap.h> | ||
18 | |||
19 | .macro disable_fiq | ||
20 | .endm | ||
21 | |||
22 | .macro get_irqnr_preamble, base, tmp | ||
23 | @ enable imprecise aborts | ||
24 | cpsie a | ||
25 | mov \base, #MSM_VIC_BASE | ||
26 | .endm | ||
27 | |||
28 | .macro arch_ret_to_user, tmp1, tmp2 | ||
29 | .endm | ||
30 | |||
31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
32 | @ 0xD0 has irq# or old irq# if the irq has been handled | ||
33 | @ 0xD4 has irq# or -1 if none pending *but* if you just | ||
34 | @ read 0xD4 you never get the first irq for some reason | ||
35 | ldr \irqnr, [\base, #0xD0] | ||
36 | ldr \irqnr, [\base, #0xD4] | ||
37 | cmp \irqnr, #0xffffffff | ||
38 | .endm | ||
diff --git a/include/asm-arm/arch-msm/hardware.h b/include/asm-arm/arch-msm/hardware.h new file mode 100644 index 000000000000..89af2b70182f --- /dev/null +++ b/include/asm-arm/arch-msm/hardware.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/hardware.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
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 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_HARDWARE_H | ||
17 | |||
18 | #endif | ||
diff --git a/include/asm-arm/arch-msm/io.h b/include/asm-arm/arch-msm/io.h new file mode 100644 index 000000000000..4645ae26b62a --- /dev/null +++ b/include/asm-arm/arch-msm/io.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* include/asm-arm/arch-msm/io.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
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 | */ | ||
15 | |||
16 | #ifndef __ASM_ARM_ARCH_IO_H | ||
17 | #define __ASM_ARM_ARCH_IO_H | ||
18 | |||
19 | #define IO_SPACE_LIMIT 0xffffffff | ||
20 | |||
21 | #define __arch_ioremap __msm_ioremap | ||
22 | #define __arch_iounmap __iounmap | ||
23 | |||
24 | void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype); | ||
25 | |||
26 | static inline void __iomem *__io(unsigned long addr) | ||
27 | { | ||
28 | return (void __iomem *)addr; | ||
29 | } | ||
30 | #define __io(a) __io(a) | ||
31 | #define __mem_pci(a) (a) | ||
32 | |||
33 | #endif | ||
diff --git a/include/asm-arm/arch-msm/irqs.h b/include/asm-arm/arch-msm/irqs.h new file mode 100644 index 000000000000..565430cfaa7e --- /dev/null +++ b/include/asm-arm/arch-msm/irqs.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/irqs.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARCH_MSM_IRQS_H | ||
18 | |||
19 | /* MSM ARM11 Interrupt Numbers */ | ||
20 | /* See 80-VE113-1 A, pp219-221 */ | ||
21 | |||
22 | #define INT_A9_M2A_0 0 | ||
23 | #define INT_A9_M2A_1 1 | ||
24 | #define INT_A9_M2A_2 2 | ||
25 | #define INT_A9_M2A_3 3 | ||
26 | #define INT_A9_M2A_4 4 | ||
27 | #define INT_A9_M2A_5 5 | ||
28 | #define INT_A9_M2A_6 6 | ||
29 | #define INT_GP_TIMER_EXP 7 | ||
30 | #define INT_DEBUG_TIMER_EXP 8 | ||
31 | #define INT_UART1 9 | ||
32 | #define INT_UART2 10 | ||
33 | #define INT_UART3 11 | ||
34 | #define INT_UART1_RX 12 | ||
35 | #define INT_UART2_RX 13 | ||
36 | #define INT_UART3_RX 14 | ||
37 | #define INT_USB_OTG 15 | ||
38 | #define INT_MDDI_PRI 16 | ||
39 | #define INT_MDDI_EXT 17 | ||
40 | #define INT_MDDI_CLIENT 18 | ||
41 | #define INT_MDP 19 | ||
42 | #define INT_GRAPHICS 20 | ||
43 | #define INT_ADM_AARM 21 | ||
44 | #define INT_ADSP_A11 22 | ||
45 | #define INT_ADSP_A9_A11 23 | ||
46 | #define INT_SDC1_0 24 | ||
47 | #define INT_SDC1_1 25 | ||
48 | #define INT_SDC2_0 26 | ||
49 | #define INT_SDC2_1 27 | ||
50 | #define INT_KEYSENSE 28 | ||
51 | #define INT_TCHSCRN_SSBI 29 | ||
52 | #define INT_TCHSCRN1 30 | ||
53 | #define INT_TCHSCRN2 31 | ||
54 | |||
55 | #define INT_GPIO_GROUP1 (32 + 0) | ||
56 | #define INT_GPIO_GROUP2 (32 + 1) | ||
57 | #define INT_PWB_I2C (32 + 2) | ||
58 | #define INT_SOFTRESET (32 + 3) | ||
59 | #define INT_NAND_WR_ER_DONE (32 + 4) | ||
60 | #define INT_NAND_OP_DONE (32 + 5) | ||
61 | #define INT_PBUS_ARM11 (32 + 6) | ||
62 | #define INT_AXI_MPU_SMI (32 + 7) | ||
63 | #define INT_AXI_MPU_EBI1 (32 + 8) | ||
64 | #define INT_AD_HSSD (32 + 9) | ||
65 | #define INT_ARM11_PMU (32 + 10) | ||
66 | #define INT_ARM11_DMA (32 + 11) | ||
67 | #define INT_TSIF_IRQ (32 + 12) | ||
68 | #define INT_UART1DM_IRQ (32 + 13) | ||
69 | #define INT_UART1DM_RX (32 + 14) | ||
70 | #define INT_USB_HS (32 + 15) | ||
71 | #define INT_SDC3_0 (32 + 16) | ||
72 | #define INT_SDC3_1 (32 + 17) | ||
73 | #define INT_SDC4_0 (32 + 18) | ||
74 | #define INT_SDC4_1 (32 + 19) | ||
75 | #define INT_UART2DM_RX (32 + 20) | ||
76 | #define INT_UART2DM_IRQ (32 + 21) | ||
77 | |||
78 | /* 22-31 are reserved */ | ||
79 | |||
80 | #define MSM_IRQ_BIT(irq) (1 << ((irq) & 31)) | ||
81 | |||
82 | #define NR_MSM_IRQS 64 | ||
83 | #define NR_GPIO_IRQS 122 | ||
84 | #define NR_BOARD_IRQS 64 | ||
85 | #define NR_IRQS (NR_MSM_IRQS + NR_GPIO_IRQS + NR_BOARD_IRQS) | ||
86 | |||
87 | #define MSM_GPIO_TO_INT(n) (NR_MSM_IRQS + (n)) | ||
88 | |||
89 | #endif | ||
diff --git a/include/asm-arm/arch-msm/memory.h b/include/asm-arm/arch-msm/memory.h new file mode 100644 index 000000000000..b5ce0e9ac86d --- /dev/null +++ b/include/asm-arm/arch-msm/memory.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/memory.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
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 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MEMORY_H | ||
17 | #define __ASM_ARCH_MEMORY_H | ||
18 | |||
19 | /* physical offset of RAM */ | ||
20 | #define PHYS_OFFSET UL(0x10000000) | ||
21 | |||
22 | /* bus address and physical addresses are identical */ | ||
23 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
24 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
25 | |||
26 | #endif | ||
27 | |||
diff --git a/include/asm-arm/arch-msm/msm_iomap.h b/include/asm-arm/arch-msm/msm_iomap.h new file mode 100644 index 000000000000..b8955cc26fec --- /dev/null +++ b/include/asm-arm/arch-msm/msm_iomap.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/msm_iomap.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * | ||
16 | * The MSM peripherals are spread all over across 768MB of physical | ||
17 | * space, which makes just having a simple IO_ADDRESS macro to slide | ||
18 | * them into the right virtual location rough. Instead, we will | ||
19 | * provide a master phys->virt mapping for peripherals here. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef __ASM_ARCH_MSM_IOMAP_H | ||
24 | #define __ASM_ARCH_MSM_IOMAP_H | ||
25 | |||
26 | #include <asm/sizes.h> | ||
27 | |||
28 | /* Physical base address and size of peripherals. | ||
29 | * Ordered by the virtual base addresses they will be mapped at. | ||
30 | * | ||
31 | * MSM_VIC_BASE must be an value that can be loaded via a "mov" | ||
32 | * instruction, otherwise entry-macro.S will not compile. | ||
33 | * | ||
34 | * If you add or remove entries here, you'll want to edit the | ||
35 | * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your | ||
36 | * changes. | ||
37 | * | ||
38 | */ | ||
39 | |||
40 | #define MSM_VIC_BASE 0xE0000000 | ||
41 | #define MSM_VIC_PHYS 0xC0000000 | ||
42 | #define MSM_VIC_SIZE SZ_4K | ||
43 | |||
44 | #define MSM_CSR_BASE 0xE0001000 | ||
45 | #define MSM_CSR_PHYS 0xC0100000 | ||
46 | #define MSM_CSR_SIZE SZ_4K | ||
47 | |||
48 | #define MSM_GPT_PHYS MSM_CSR_PHYS | ||
49 | #define MSM_GPT_BASE MSM_CSR_BASE | ||
50 | #define MSM_GPT_SIZE SZ_4K | ||
51 | |||
52 | #define MSM_DMOV_BASE 0xE0002000 | ||
53 | #define MSM_DMOV_PHYS 0xA9700000 | ||
54 | #define MSM_DMOV_SIZE SZ_4K | ||
55 | |||
56 | #define MSM_UART1_BASE 0xE0003000 | ||
57 | #define MSM_UART1_PHYS 0xA9A00000 | ||
58 | #define MSM_UART1_SIZE SZ_4K | ||
59 | |||
60 | #define MSM_UART2_BASE 0xE0004000 | ||
61 | #define MSM_UART2_PHYS 0xA9B00000 | ||
62 | #define MSM_UART2_SIZE SZ_4K | ||
63 | |||
64 | #define MSM_UART3_BASE 0xE0005000 | ||
65 | #define MSM_UART3_PHYS 0xA9C00000 | ||
66 | #define MSM_UART3_SIZE SZ_4K | ||
67 | |||
68 | #define MSM_I2C_BASE 0xE0006000 | ||
69 | #define MSM_I2C_PHYS 0xA9900000 | ||
70 | #define MSM_I2C_SIZE SZ_4K | ||
71 | |||
72 | #define MSM_GPIO1_BASE 0xE0007000 | ||
73 | #define MSM_GPIO1_PHYS 0xA9200000 | ||
74 | #define MSM_GPIO1_SIZE SZ_4K | ||
75 | |||
76 | #define MSM_GPIO2_BASE 0xE0008000 | ||
77 | #define MSM_GPIO2_PHYS 0xA9300000 | ||
78 | #define MSM_GPIO2_SIZE SZ_4K | ||
79 | |||
80 | #define MSM_HSUSB_BASE 0xE0009000 | ||
81 | #define MSM_HSUSB_PHYS 0xA0800000 | ||
82 | #define MSM_HSUSB_SIZE SZ_4K | ||
83 | |||
84 | #define MSM_CLK_CTL_BASE 0xE000A000 | ||
85 | #define MSM_CLK_CTL_PHYS 0xA8600000 | ||
86 | #define MSM_CLK_CTL_SIZE SZ_4K | ||
87 | |||
88 | #define MSM_PMDH_BASE 0xE000B000 | ||
89 | #define MSM_PMDH_PHYS 0xAA600000 | ||
90 | #define MSM_PMDH_SIZE SZ_4K | ||
91 | |||
92 | #define MSM_EMDH_BASE 0xE000C000 | ||
93 | #define MSM_EMDH_PHYS 0xAA700000 | ||
94 | #define MSM_EMDH_SIZE SZ_4K | ||
95 | |||
96 | #define MSM_MDP_BASE 0xE0010000 | ||
97 | #define MSM_MDP_PHYS 0xAA200000 | ||
98 | #define MSM_MDP_SIZE 0x000F0000 | ||
99 | |||
100 | #define MSM_SHARED_RAM_BASE 0xE0100000 | ||
101 | #define MSM_SHARED_RAM_PHYS 0x01F00000 | ||
102 | #define MSM_SHARED_RAM_SIZE SZ_1M | ||
103 | |||
104 | #endif | ||
diff --git a/include/asm-arm/arch-msm/system.h b/include/asm-arm/arch-msm/system.h new file mode 100644 index 000000000000..7c5544bdd0c7 --- /dev/null +++ b/include/asm-arm/arch-msm/system.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/system.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
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 | */ | ||
15 | |||
16 | #include <asm/hardware.h> | ||
17 | |||
18 | void arch_idle(void); | ||
19 | |||
20 | static inline void arch_reset(char mode) | ||
21 | { | ||
22 | for (;;) ; /* depends on IPC w/ other core */ | ||
23 | } | ||
diff --git a/include/asm-arm/arch-msm/timex.h b/include/asm-arm/arch-msm/timex.h new file mode 100644 index 000000000000..154b23fb3599 --- /dev/null +++ b/include/asm-arm/arch-msm/timex.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/timex.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
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 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_TIMEX_H | ||
17 | |||
18 | #define CLOCK_TICK_RATE 1000000 | ||
19 | |||
20 | #endif | ||
diff --git a/include/asm-arm/arch-msm/uncompress.h b/include/asm-arm/arch-msm/uncompress.h new file mode 100644 index 000000000000..e91ed786ffec --- /dev/null +++ b/include/asm-arm/arch-msm/uncompress.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/uncompress.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
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 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_UNCOMPRESS_H | ||
17 | |||
18 | #include "hardware.h" | ||
19 | |||
20 | static void putc(int c) | ||
21 | { | ||
22 | } | ||
23 | |||
24 | static inline void flush(void) | ||
25 | { | ||
26 | } | ||
27 | |||
28 | static inline void arch_decomp_setup(void) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | static inline void arch_decomp_wdog(void) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | #endif | ||
diff --git a/include/asm-arm/arch-msm/vmalloc.h b/include/asm-arm/arch-msm/vmalloc.h new file mode 100644 index 000000000000..60f8d910e825 --- /dev/null +++ b/include/asm-arm/arch-msm/vmalloc.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* linux/include/asm-arm/arch-msm/vmalloc.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
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 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MSM_VMALLOC_H | ||
17 | #define __ASM_ARCH_MSM_VMALLOC_H | ||
18 | |||
19 | #define VMALLOC_END (PAGE_OFFSET + 0x10000000) | ||
20 | |||
21 | #endif | ||
22 | |||
diff --git a/include/asm-arm/arch-pxa/i2c.h b/include/asm-arm/arch-pxa/i2c.h index e404b233d8a8..80596b013443 100644 --- a/include/asm-arm/arch-pxa/i2c.h +++ b/include/asm-arm/arch-pxa/i2c.h | |||
@@ -65,7 +65,13 @@ struct i2c_pxa_platform_data { | |||
65 | unsigned int slave_addr; | 65 | unsigned int slave_addr; |
66 | struct i2c_slave_client *slave; | 66 | struct i2c_slave_client *slave; |
67 | unsigned int class; | 67 | unsigned int class; |
68 | int use_pio; | ||
68 | }; | 69 | }; |
69 | 70 | ||
70 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); | 71 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); |
72 | |||
73 | #ifdef CONFIG_PXA27x | ||
74 | extern void pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
75 | #endif | ||
76 | |||
71 | #endif | 77 | #endif |
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index 9c8cd9abb82b..89076c322726 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -92,11 +92,9 @@ | |||
92 | #if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY) | 92 | #if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY) |
93 | #define fifo_full fifo_full_s3c2410 | 93 | #define fifo_full fifo_full_s3c2410 |
94 | #define fifo_level fifo_level_s3c2410 | 94 | #define fifo_level fifo_level_s3c2410 |
95 | #warning 2410only | ||
96 | #elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY) | 95 | #elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY) |
97 | #define fifo_full fifo_full_s3c24xx | 96 | #define fifo_full fifo_full_s3c24xx |
98 | #define fifo_level fifo_level_s3c24xx | 97 | #define fifo_level fifo_level_s3c24xx |
99 | #warning generic | ||
100 | #endif | 98 | #endif |
101 | 99 | ||
102 | /* include the reset of the code which will do the work */ | 100 | /* include the reset of the code which will do the work */ |
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index c6e8d8f64938..4f291d9b7d93 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h | |||
@@ -214,6 +214,7 @@ struct s3c2410_dma_chan { | |||
214 | unsigned long dev_addr; | 214 | unsigned long dev_addr; |
215 | unsigned long load_timeout; | 215 | unsigned long load_timeout; |
216 | unsigned int flags; /* channel flags */ | 216 | unsigned int flags; /* channel flags */ |
217 | unsigned int hw_cfg; /* last hw config */ | ||
217 | 218 | ||
218 | struct s3c24xx_dma_map *map; /* channel hw maps */ | 219 | struct s3c24xx_dma_map *map; /* channel hw maps */ |
219 | 220 | ||
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index 6dadf58ff984..29592c3ebf22 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
@@ -50,6 +50,17 @@ extern unsigned int s3c2410_gpio_getcfg(unsigned int pin); | |||
50 | 50 | ||
51 | extern int s3c2410_gpio_getirq(unsigned int pin); | 51 | extern int s3c2410_gpio_getirq(unsigned int pin); |
52 | 52 | ||
53 | /* s3c2410_gpio_irq2pin | ||
54 | * | ||
55 | * turn the given irq number into the corresponding GPIO number | ||
56 | * | ||
57 | * returns: | ||
58 | * < 0 = no pin | ||
59 | * >=0 = gpio pin number | ||
60 | */ | ||
61 | |||
62 | extern int s3c2410_gpio_irq2pin(unsigned int irq); | ||
63 | |||
53 | #ifdef CONFIG_CPU_S3C2400 | 64 | #ifdef CONFIG_CPU_S3C2400 |
54 | 65 | ||
55 | extern int s3c2400_gpio_getirq(unsigned int pin); | 66 | extern int s3c2400_gpio_getirq(unsigned int pin); |
@@ -87,6 +98,18 @@ extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, | |||
87 | 98 | ||
88 | extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to); | 99 | extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to); |
89 | 100 | ||
101 | /* s3c2410_gpio_getpull | ||
102 | * | ||
103 | * Read the state of the pull-up on a given pin | ||
104 | * | ||
105 | * return: | ||
106 | * < 0 => error code | ||
107 | * 0 => enabled | ||
108 | * 1 => disabled | ||
109 | */ | ||
110 | |||
111 | extern int s3c2410_gpio_getpull(unsigned int pin); | ||
112 | |||
90 | extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to); | 113 | extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to); |
91 | 114 | ||
92 | extern unsigned int s3c2410_gpio_getpin(unsigned int pin); | 115 | extern unsigned int s3c2410_gpio_getpin(unsigned int pin); |
@@ -99,6 +122,11 @@ extern int s3c2440_set_dsc(unsigned int pin, unsigned int value); | |||
99 | 122 | ||
100 | #endif /* CONFIG_CPU_S3C2440 */ | 123 | #endif /* CONFIG_CPU_S3C2440 */ |
101 | 124 | ||
125 | #ifdef CONFIG_CPU_S3C2412 | ||
126 | |||
127 | extern int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state); | ||
128 | |||
129 | #endif /* CONFIG_CPU_S3C2412 */ | ||
102 | 130 | ||
103 | #endif /* __ASSEMBLY__ */ | 131 | #endif /* __ASSEMBLY__ */ |
104 | 132 | ||
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index 996f65488d2d..d858b3eb5547 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h | |||
@@ -160,4 +160,7 @@ | |||
160 | #define NR_IRQS (IRQ_S3C2440_AC97+1) | 160 | #define NR_IRQS (IRQ_S3C2440_AC97+1) |
161 | #endif | 161 | #endif |
162 | 162 | ||
163 | /* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */ | ||
164 | #define FIQ_START IRQ_EINT0 | ||
165 | |||
163 | #endif /* __ASM_ARCH_IRQ_H */ | 166 | #endif /* __ASM_ARCH_IRQ_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index e39656b7a086..dba9df9d8713 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -138,6 +138,8 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) | |||
138 | #define S3C2412_CLKDIVN_PDIVN (1<<2) | 138 | #define S3C2412_CLKDIVN_PDIVN (1<<2) |
139 | #define S3C2412_CLKDIVN_HDIVN_MASK (3<<0) | 139 | #define S3C2412_CLKDIVN_HDIVN_MASK (3<<0) |
140 | #define S3C2421_CLKDIVN_ARMDIVN (1<<3) | 140 | #define S3C2421_CLKDIVN_ARMDIVN (1<<3) |
141 | #define S3C2412_CLKDIVN_DVSEN (1<<4) | ||
142 | #define S3C2412_CLKDIVN_HALFHCLK (1<<5) | ||
141 | #define S3C2412_CLKDIVN_USB48DIV (1<<6) | 143 | #define S3C2412_CLKDIVN_USB48DIV (1<<6) |
142 | #define S3C2412_CLKDIVN_UARTDIV_MASK (15<<8) | 144 | #define S3C2412_CLKDIVN_UARTDIV_MASK (15<<8) |
143 | #define S3C2412_CLKDIVN_UARTDIV_SHIFT (8) | 145 | #define S3C2412_CLKDIVN_UARTDIV_SHIFT (8) |
diff --git a/include/asm-arm/arch-s3c2410/regs-dsc.h b/include/asm-arm/arch-s3c2410/regs-dsc.h index c0748511edbc..1235df70f34e 100644 --- a/include/asm-arm/arch-s3c2410/regs-dsc.h +++ b/include/asm-arm/arch-s3c2410/regs-dsc.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) | 19 | #define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #if defined(CONFIG_CPU_S3C2440) | 22 | #if defined(CONFIG_CPU_S3C244X) |
23 | 23 | ||
24 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) | 24 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) |
25 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) | 25 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index b693158b2d3c..0ad75d716ded 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -1133,12 +1133,16 @@ | |||
1133 | #define S3C2412_GPBSLPCON S3C2410_GPIOREG(0x1C) | 1133 | #define S3C2412_GPBSLPCON S3C2410_GPIOREG(0x1C) |
1134 | #define S3C2412_GPCSLPCON S3C2410_GPIOREG(0x2C) | 1134 | #define S3C2412_GPCSLPCON S3C2410_GPIOREG(0x2C) |
1135 | #define S3C2412_GPDSLPCON S3C2410_GPIOREG(0x3C) | 1135 | #define S3C2412_GPDSLPCON S3C2410_GPIOREG(0x3C) |
1136 | #define S3C2412_GPESLPCON S3C2410_GPIOREG(0x4C) | ||
1137 | #define S3C2412_GPFSLPCON S3C2410_GPIOREG(0x5C) | 1136 | #define S3C2412_GPFSLPCON S3C2410_GPIOREG(0x5C) |
1138 | #define S3C2412_GPGSLPCON S3C2410_GPIOREG(0x6C) | 1137 | #define S3C2412_GPGSLPCON S3C2410_GPIOREG(0x6C) |
1139 | #define S3C2412_GPHSLPCON S3C2410_GPIOREG(0x7C) | 1138 | #define S3C2412_GPHSLPCON S3C2410_GPIOREG(0x7C) |
1140 | 1139 | ||
1141 | /* definitions for each pin bit */ | 1140 | /* definitions for each pin bit */ |
1141 | #define S3C2412_GPIO_SLPCON_LOW ( 0x00 ) | ||
1142 | #define S3C2412_GPIO_SLPCON_HIGH ( 0x01 ) | ||
1143 | #define S3C2412_GPIO_SLPCON_IN ( 0x02 ) | ||
1144 | #define S3C2412_GPIO_SLPCON_PULL ( 0x03 ) | ||
1145 | |||
1142 | #define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2)) | 1146 | #define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2)) |
1143 | #define S3C2412_SLPCON_HIGH(x) ( 0x01 << ((x) * 2)) | 1147 | #define S3C2412_SLPCON_HIGH(x) ( 0x01 << ((x) * 2)) |
1144 | #define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2)) | 1148 | #define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2)) |
diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h index e4d82341f7ba..312ff93b63c6 100644 --- a/include/asm-arm/arch-s3c2410/regs-mem.h +++ b/include/asm-arm/arch-s3c2410/regs-mem.h | |||
@@ -98,16 +98,19 @@ | |||
98 | #define S3C2410_BANKCON_Tacp3 (0x1 << 2) | 98 | #define S3C2410_BANKCON_Tacp3 (0x1 << 2) |
99 | #define S3C2410_BANKCON_Tacp4 (0x2 << 2) | 99 | #define S3C2410_BANKCON_Tacp4 (0x2 << 2) |
100 | #define S3C2410_BANKCON_Tacp6 (0x3 << 2) | 100 | #define S3C2410_BANKCON_Tacp6 (0x3 << 2) |
101 | #define S3C2410_BANKCON_Tacp_SHIFT (2) | ||
101 | 102 | ||
102 | #define S3C2410_BANKCON_Tcah0 (0x0 << 4) | 103 | #define S3C2410_BANKCON_Tcah0 (0x0 << 4) |
103 | #define S3C2410_BANKCON_Tcah1 (0x1 << 4) | 104 | #define S3C2410_BANKCON_Tcah1 (0x1 << 4) |
104 | #define S3C2410_BANKCON_Tcah2 (0x2 << 4) | 105 | #define S3C2410_BANKCON_Tcah2 (0x2 << 4) |
105 | #define S3C2410_BANKCON_Tcah4 (0x3 << 4) | 106 | #define S3C2410_BANKCON_Tcah4 (0x3 << 4) |
107 | #define S3C2410_BANKCON_Tcah_SHIFT (4) | ||
106 | 108 | ||
107 | #define S3C2410_BANKCON_Tcoh0 (0x0 << 6) | 109 | #define S3C2410_BANKCON_Tcoh0 (0x0 << 6) |
108 | #define S3C2410_BANKCON_Tcoh1 (0x1 << 6) | 110 | #define S3C2410_BANKCON_Tcoh1 (0x1 << 6) |
109 | #define S3C2410_BANKCON_Tcoh2 (0x2 << 6) | 111 | #define S3C2410_BANKCON_Tcoh2 (0x2 << 6) |
110 | #define S3C2410_BANKCON_Tcoh4 (0x3 << 6) | 112 | #define S3C2410_BANKCON_Tcoh4 (0x3 << 6) |
113 | #define S3C2410_BANKCON_Tcoh_SHIFT (6) | ||
111 | 114 | ||
112 | #define S3C2410_BANKCON_Tacc1 (0x0 << 8) | 115 | #define S3C2410_BANKCON_Tacc1 (0x0 << 8) |
113 | #define S3C2410_BANKCON_Tacc2 (0x1 << 8) | 116 | #define S3C2410_BANKCON_Tacc2 (0x1 << 8) |
@@ -117,16 +120,19 @@ | |||
117 | #define S3C2410_BANKCON_Tacc8 (0x5 << 8) | 120 | #define S3C2410_BANKCON_Tacc8 (0x5 << 8) |
118 | #define S3C2410_BANKCON_Tacc10 (0x6 << 8) | 121 | #define S3C2410_BANKCON_Tacc10 (0x6 << 8) |
119 | #define S3C2410_BANKCON_Tacc14 (0x7 << 8) | 122 | #define S3C2410_BANKCON_Tacc14 (0x7 << 8) |
123 | #define S3C2410_BANKCON_Tacc_SHIFT (8) | ||
120 | 124 | ||
121 | #define S3C2410_BANKCON_Tcos0 (0x0 << 11) | 125 | #define S3C2410_BANKCON_Tcos0 (0x0 << 11) |
122 | #define S3C2410_BANKCON_Tcos1 (0x1 << 11) | 126 | #define S3C2410_BANKCON_Tcos1 (0x1 << 11) |
123 | #define S3C2410_BANKCON_Tcos2 (0x2 << 11) | 127 | #define S3C2410_BANKCON_Tcos2 (0x2 << 11) |
124 | #define S3C2410_BANKCON_Tcos4 (0x3 << 11) | 128 | #define S3C2410_BANKCON_Tcos4 (0x3 << 11) |
129 | #define S3C2410_BANKCON_Tcos_SHIFT (11) | ||
125 | 130 | ||
126 | #define S3C2410_BANKCON_Tacs0 (0x0 << 13) | 131 | #define S3C2410_BANKCON_Tacs0 (0x0 << 13) |
127 | #define S3C2410_BANKCON_Tacs1 (0x1 << 13) | 132 | #define S3C2410_BANKCON_Tacs1 (0x1 << 13) |
128 | #define S3C2410_BANKCON_Tacs2 (0x2 << 13) | 133 | #define S3C2410_BANKCON_Tacs2 (0x2 << 13) |
129 | #define S3C2410_BANKCON_Tacs4 (0x3 << 13) | 134 | #define S3C2410_BANKCON_Tacs4 (0x3 << 13) |
135 | #define S3C2410_BANKCON_Tacs_SHIFT (13) | ||
130 | 136 | ||
131 | #define S3C2410_BANKCON_SRAM (0x0 << 15) | 137 | #define S3C2410_BANKCON_SRAM (0x0 << 15) |
132 | #define S3C2400_BANKCON_EDODRAM (0x2 << 15) | 138 | #define S3C2400_BANKCON_EDODRAM (0x2 << 15) |
diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h index f79987be55e8..13d13b7cfe98 100644 --- a/include/asm-arm/arch-s3c2410/regs-power.h +++ b/include/asm-arm/arch-s3c2410/regs-power.h | |||
@@ -23,7 +23,8 @@ | |||
23 | #define S3C2412_INFORM2 S3C24XX_PWRREG(0x78) | 23 | #define S3C2412_INFORM2 S3C24XX_PWRREG(0x78) |
24 | #define S3C2412_INFORM3 S3C24XX_PWRREG(0x7C) | 24 | #define S3C2412_INFORM3 S3C24XX_PWRREG(0x7C) |
25 | 25 | ||
26 | #define S3C2412_PWRCFG_BATF_IGNORE (0<<0) | 26 | #define S3C2412_PWRCFG_BATF_IRQ (1<<0) |
27 | #define S3C2412_PWRCFG_BATF_IGNORE (2<<0) | ||
27 | #define S3C2412_PWRCFG_BATF_SLEEP (3<<0) | 28 | #define S3C2412_PWRCFG_BATF_SLEEP (3<<0) |
28 | #define S3C2412_PWRCFG_BATF_MASK (3<<0) | 29 | #define S3C2412_PWRCFG_BATF_MASK (3<<0) |
29 | 30 | ||
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index 63891786dfa0..14de4e596f87 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h | |||
@@ -20,6 +20,9 @@ | |||
20 | #include <asm/plat-s3c/regs-watchdog.h> | 20 | #include <asm/plat-s3c/regs-watchdog.h> |
21 | #include <asm/arch/regs-clock.h> | 21 | #include <asm/arch/regs-clock.h> |
22 | 22 | ||
23 | #include <linux/clk.h> | ||
24 | #include <linux/err.h> | ||
25 | |||
23 | void (*s3c24xx_idle)(void); | 26 | void (*s3c24xx_idle)(void); |
24 | void (*s3c24xx_reset_hook)(void); | 27 | void (*s3c24xx_reset_hook)(void); |
25 | 28 | ||
@@ -59,6 +62,8 @@ static void arch_idle(void) | |||
59 | static void | 62 | static void |
60 | arch_reset(char mode) | 63 | arch_reset(char mode) |
61 | { | 64 | { |
65 | struct clk *wdtclk; | ||
66 | |||
62 | if (mode == 's') { | 67 | if (mode == 's') { |
63 | cpu_reset(0); | 68 | cpu_reset(0); |
64 | } | 69 | } |
@@ -70,19 +75,28 @@ arch_reset(char mode) | |||
70 | 75 | ||
71 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ | 76 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ |
72 | 77 | ||
78 | wdtclk = clk_get(NULL, "watchdog"); | ||
79 | if (!IS_ERR(wdtclk)) { | ||
80 | clk_enable(wdtclk); | ||
81 | } else | ||
82 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
83 | |||
73 | /* put initial values into count and data */ | 84 | /* put initial values into count and data */ |
74 | __raw_writel(0x100, S3C2410_WTCNT); | 85 | __raw_writel(0x80, S3C2410_WTCNT); |
75 | __raw_writel(0x100, S3C2410_WTDAT); | 86 | __raw_writel(0x80, S3C2410_WTDAT); |
76 | 87 | ||
77 | /* set the watchdog to go and reset... */ | 88 | /* set the watchdog to go and reset... */ |
78 | __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN | | 89 | __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN | |
79 | S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON); | 90 | S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON); |
80 | 91 | ||
81 | /* wait for reset to assert... */ | 92 | /* wait for reset to assert... */ |
82 | mdelay(5000); | 93 | mdelay(500); |
83 | 94 | ||
84 | printk(KERN_ERR "Watchdog reset failed to assert reset\n"); | 95 | printk(KERN_ERR "Watchdog reset failed to assert reset\n"); |
85 | 96 | ||
97 | /* delay to allow the serial port to show the message */ | ||
98 | mdelay(50); | ||
99 | |||
86 | /* we'll take a jump through zero as a poor second */ | 100 | /* we'll take a jump through zero as a poor second */ |
87 | cpu_reset(0); | 101 | cpu_reset(0); |
88 | } | 102 | } |
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index f31cda5a55ee..392eb5332323 100644 --- a/include/asm-arm/fpstate.h +++ b/include/asm-arm/fpstate.h | |||
@@ -17,14 +17,18 @@ | |||
17 | /* | 17 | /* |
18 | * VFP storage area has: | 18 | * VFP storage area has: |
19 | * - FPEXC, FPSCR, FPINST and FPINST2. | 19 | * - FPEXC, FPSCR, FPINST and FPINST2. |
20 | * - 16 double precision data registers | 20 | * - 16 or 32 double precision data registers |
21 | * - an implementation-dependant word of state for FLDMX/FSTMX | 21 | * - an implementation-dependant word of state for FLDMX/FSTMX (pre-ARMv6) |
22 | * | 22 | * |
23 | * FPEXC will always be non-zero once the VFP has been used in this process. | 23 | * FPEXC will always be non-zero once the VFP has been used in this process. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | struct vfp_hard_struct { | 26 | struct vfp_hard_struct { |
27 | #ifdef CONFIG_VFPv3 | ||
28 | __u64 fpregs[32]; | ||
29 | #else | ||
27 | __u64 fpregs[16]; | 30 | __u64 fpregs[16]; |
31 | #endif | ||
28 | #if __LINUX_ARM_ARCH__ < 6 | 32 | #if __LINUX_ARM_ARCH__ < 6 |
29 | __u32 fpmx_state; | 33 | __u32 fpmx_state; |
30 | #endif | 34 | #endif |
@@ -35,6 +39,7 @@ struct vfp_hard_struct { | |||
35 | */ | 39 | */ |
36 | __u32 fpinst; | 40 | __u32 fpinst; |
37 | __u32 fpinst2; | 41 | __u32 fpinst2; |
42 | |||
38 | #ifdef CONFIG_SMP | 43 | #ifdef CONFIG_SMP |
39 | __u32 cpu; | 44 | __u32 cpu; |
40 | #endif | 45 | #endif |
diff --git a/include/asm-arm/kprobes.h b/include/asm-arm/kprobes.h new file mode 100644 index 000000000000..4e7bd32288ae --- /dev/null +++ b/include/asm-arm/kprobes.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * include/asm-arm/kprobes.h | ||
3 | * | ||
4 | * Copyright (C) 2006, 2007 Motorola Inc. | ||
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 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef _ARM_KPROBES_H | ||
17 | #define _ARM_KPROBES_H | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | #include <linux/ptrace.h> | ||
21 | #include <linux/percpu.h> | ||
22 | |||
23 | #define ARCH_SUPPORTS_KRETPROBES | ||
24 | #define __ARCH_WANT_KPROBES_INSN_SLOT | ||
25 | #define MAX_INSN_SIZE 2 | ||
26 | #define MAX_STACK_SIZE 64 /* 32 would probably be OK */ | ||
27 | |||
28 | /* | ||
29 | * This undefined instruction must be unique and | ||
30 | * reserved solely for kprobes' use. | ||
31 | */ | ||
32 | #define KPROBE_BREAKPOINT_INSTRUCTION 0xe7f001f8 | ||
33 | |||
34 | #define regs_return_value(regs) ((regs)->ARM_r0) | ||
35 | #define flush_insn_slot(p) do { } while (0) | ||
36 | #define kretprobe_blacklist_size 0 | ||
37 | |||
38 | typedef u32 kprobe_opcode_t; | ||
39 | |||
40 | struct kprobe; | ||
41 | typedef void (kprobe_insn_handler_t)(struct kprobe *, struct pt_regs *); | ||
42 | |||
43 | /* Architecture specific copy of original instruction. */ | ||
44 | struct arch_specific_insn { | ||
45 | kprobe_opcode_t *insn; | ||
46 | kprobe_insn_handler_t *insn_handler; | ||
47 | }; | ||
48 | |||
49 | struct prev_kprobe { | ||
50 | struct kprobe *kp; | ||
51 | unsigned int status; | ||
52 | }; | ||
53 | |||
54 | /* per-cpu kprobe control block */ | ||
55 | struct kprobe_ctlblk { | ||
56 | unsigned int kprobe_status; | ||
57 | struct prev_kprobe prev_kprobe; | ||
58 | struct pt_regs jprobe_saved_regs; | ||
59 | char jprobes_stack[MAX_STACK_SIZE]; | ||
60 | }; | ||
61 | |||
62 | void arch_remove_kprobe(struct kprobe *); | ||
63 | |||
64 | int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr); | ||
65 | int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr); | ||
66 | int kprobe_exceptions_notify(struct notifier_block *self, | ||
67 | unsigned long val, void *data); | ||
68 | |||
69 | enum kprobe_insn { | ||
70 | INSN_REJECTED, | ||
71 | INSN_GOOD, | ||
72 | INSN_GOOD_NO_SLOT | ||
73 | }; | ||
74 | |||
75 | enum kprobe_insn arm_kprobe_decode_insn(kprobe_opcode_t, | ||
76 | struct arch_specific_insn *); | ||
77 | void __init arm_kprobe_decode_init(void); | ||
78 | |||
79 | #endif /* _ARM_KPROBES_H */ | ||
diff --git a/include/asm-arm/plat-s3c24xx/dma.h b/include/asm-arm/plat-s3c24xx/dma.h index 2c59406435e5..c78efe316fc8 100644 --- a/include/asm-arm/plat-s3c24xx/dma.h +++ b/include/asm-arm/plat-s3c24xx/dma.h | |||
@@ -32,6 +32,7 @@ struct s3c24xx_dma_map { | |||
32 | struct s3c24xx_dma_addr hw_addr; | 32 | struct s3c24xx_dma_addr hw_addr; |
33 | 33 | ||
34 | unsigned long channels[S3C2410_DMA_CHANNELS]; | 34 | unsigned long channels[S3C2410_DMA_CHANNELS]; |
35 | unsigned long channels_rx[S3C2410_DMA_CHANNELS]; | ||
35 | }; | 36 | }; |
36 | 37 | ||
37 | struct s3c24xx_dma_selection { | 38 | struct s3c24xx_dma_selection { |
@@ -41,6 +42,10 @@ struct s3c24xx_dma_selection { | |||
41 | 42 | ||
42 | void (*select)(struct s3c2410_dma_chan *chan, | 43 | void (*select)(struct s3c2410_dma_chan *chan, |
43 | struct s3c24xx_dma_map *map); | 44 | struct s3c24xx_dma_map *map); |
45 | |||
46 | void (*direction)(struct s3c2410_dma_chan *chan, | ||
47 | struct s3c24xx_dma_map *map, | ||
48 | enum s3c2410_dmasrc dir); | ||
44 | }; | 49 | }; |
45 | 50 | ||
46 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); | 51 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); |
diff --git a/include/asm-arm/plat-s3c24xx/irq.h b/include/asm-arm/plat-s3c24xx/irq.h index 8af6d9579b31..45746a995343 100644 --- a/include/asm-arm/plat-s3c24xx/irq.h +++ b/include/asm-arm/plat-s3c24xx/irq.h | |||
@@ -15,7 +15,9 @@ | |||
15 | 15 | ||
16 | #define EXTINT_OFF (IRQ_EINT4 - 4) | 16 | #define EXTINT_OFF (IRQ_EINT4 - 4) |
17 | 17 | ||
18 | /* these are exported for arch/arm/mach-* usage */ | ||
18 | extern struct irq_chip s3c_irq_level_chip; | 19 | extern struct irq_chip s3c_irq_level_chip; |
20 | extern struct irq_chip s3c_irq_chip; | ||
19 | 21 | ||
20 | static inline void | 22 | static inline void |
21 | s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit, | 23 | s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit, |
diff --git a/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h b/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h new file mode 100644 index 000000000000..25d4058bcfed --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/regs-s3c2412-iis.h | ||
2 | * | ||
3 | * Copyright 2007 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://armlinux.simtec.co.uk/ | ||
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 | * S3C2412 IIS register definition | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_S3C2412_IIS_H | ||
14 | #define __ASM_ARCH_REGS_S3C2412_IIS_H | ||
15 | |||
16 | #define S3C2412_IISCON (0x00) | ||
17 | #define S3C2412_IISMOD (0x04) | ||
18 | #define S3C2412_IISFIC (0x08) | ||
19 | #define S3C2412_IISPSR (0x0C) | ||
20 | #define S3C2412_IISTXD (0x10) | ||
21 | #define S3C2412_IISRXD (0x14) | ||
22 | |||
23 | #define S3C2412_IISCON_LRINDEX (1 << 11) | ||
24 | #define S3C2412_IISCON_TXFIFO_EMPTY (1 << 10) | ||
25 | #define S3C2412_IISCON_RXFIFO_EMPTY (1 << 9) | ||
26 | #define S3C2412_IISCON_TXFIFO_FULL (1 << 8) | ||
27 | #define S3C2412_IISCON_RXFIFO_FULL (1 << 7) | ||
28 | #define S3C2412_IISCON_TXDMA_PAUSE (1 << 6) | ||
29 | #define S3C2412_IISCON_RXDMA_PAUSE (1 << 5) | ||
30 | #define S3C2412_IISCON_TXCH_PAUSE (1 << 4) | ||
31 | #define S3C2412_IISCON_RXCH_PAUSE (1 << 3) | ||
32 | #define S3C2412_IISCON_TXDMA_ACTIVE (1 << 2) | ||
33 | #define S3C2412_IISCON_RXDMA_ACTIVE (1 << 1) | ||
34 | #define S3C2412_IISCON_IIS_ACTIVE (1 << 0) | ||
35 | |||
36 | #define S3C2412_IISMOD_MASTER_INTERNAL (0 << 10) | ||
37 | #define S3C2412_IISMOD_MASTER_EXTERNAL (1 << 10) | ||
38 | #define S3C2412_IISMOD_SLAVE (2 << 10) | ||
39 | #define S3C2412_IISMOD_MASTER_MASK (3 << 10) | ||
40 | #define S3C2412_IISMOD_MODE_TXONLY (0 << 8) | ||
41 | #define S3C2412_IISMOD_MODE_RXONLY (1 << 8) | ||
42 | #define S3C2412_IISMOD_MODE_TXRX (2 << 8) | ||
43 | #define S3C2412_IISMOD_MODE_MASK (3 << 8) | ||
44 | #define S3C2412_IISMOD_LR_LLOW (0 << 7) | ||
45 | #define S3C2412_IISMOD_LR_RLOW (1 << 7) | ||
46 | #define S3C2412_IISMOD_SDF_IIS (0 << 5) | ||
47 | #define S3C2412_IISMOD_SDF_MSB (0 << 5) | ||
48 | #define S3C2412_IISMOD_SDF_LSB (0 << 5) | ||
49 | #define S3C2412_IISMOD_SDF_MASK (3 << 5) | ||
50 | #define S3C2412_IISMOD_RCLK_256FS (0 << 3) | ||
51 | #define S3C2412_IISMOD_RCLK_512FS (1 << 3) | ||
52 | #define S3C2412_IISMOD_RCLK_384FS (2 << 3) | ||
53 | #define S3C2412_IISMOD_RCLK_768FS (3 << 3) | ||
54 | #define S3C2412_IISMOD_RCLK_MASK (3 << 3) | ||
55 | #define S3C2412_IISMOD_BCLK_32FS (0 << 1) | ||
56 | #define S3C2412_IISMOD_BCLK_48FS (1 << 1) | ||
57 | #define S3C2412_IISMOD_BCLK_16FS (2 << 1) | ||
58 | #define S3C2412_IISMOD_BCLK_24FS (3 << 1) | ||
59 | #define S3C2412_IISMOD_BCLK_MASK (3 << 1) | ||
60 | #define S3C2412_IISMOD_8BIT (1 << 0) | ||
61 | |||
62 | #define S3C2412_IISPSR_PSREN (1 << 15) | ||
63 | |||
64 | #define S3C2412_IISFIC_TXFLUSH (1 << 15) | ||
65 | #define S3C2412_IISFIC_RXFLUSH (1 << 7) | ||
66 | #define S3C2412_IISFIC_TXCOUNT(x) (((x) >> 8) & 0xf) | ||
67 | #define S3C2412_IISFIC_RXCOUNT(x) (((x) >> 0) & 0xf) | ||
68 | |||
69 | |||
70 | |||
71 | #endif /* __ASM_ARCH_REGS_S3C2412_IIS_H */ | ||
72 | |||
diff --git a/include/asm-arm/plat-s3c24xx/regs-spi.h b/include/asm-arm/plat-s3c24xx/regs-spi.h index 4a499a138256..ea565b007d04 100644 --- a/include/asm-arm/plat-s3c24xx/regs-spi.h +++ b/include/asm-arm/plat-s3c24xx/regs-spi.h | |||
@@ -17,6 +17,21 @@ | |||
17 | 17 | ||
18 | #define S3C2410_SPCON (0x00) | 18 | #define S3C2410_SPCON (0x00) |
19 | 19 | ||
20 | #define S3C2412_SPCON_RXFIFO_RB2 (0<<14) | ||
21 | #define S3C2412_SPCON_RXFIFO_RB4 (1<<14) | ||
22 | #define S3C2412_SPCON_RXFIFO_RB12 (2<<14) | ||
23 | #define S3C2412_SPCON_RXFIFO_RB14 (3<<14) | ||
24 | #define S3C2412_SPCON_TXFIFO_RB2 (0<<12) | ||
25 | #define S3C2412_SPCON_TXFIFO_RB4 (1<<12) | ||
26 | #define S3C2412_SPCON_TXFIFO_RB12 (2<<12) | ||
27 | #define S3C2412_SPCON_TXFIFO_RB14 (3<<12) | ||
28 | #define S3C2412_SPCON_RXFIFO_RESET (1<<11) /* RxFIFO reset */ | ||
29 | #define S3C2412_SPCON_TXFIFO_RESET (1<<10) /* TxFIFO reset */ | ||
30 | #define S3C2412_SPCON_RXFIFO_EN (1<<9) /* RxFIFO Enable */ | ||
31 | #define S3C2412_SPCON_TXFIFO_EN (1<<8) /* TxFIFO Enable */ | ||
32 | |||
33 | #define S3C2412_SPCON_DIRC_RX (1<<7) | ||
34 | |||
20 | #define S3C2410_SPCON_SMOD_DMA (2<<5) /* DMA mode */ | 35 | #define S3C2410_SPCON_SMOD_DMA (2<<5) /* DMA mode */ |
21 | #define S3C2410_SPCON_SMOD_INT (1<<5) /* interrupt mode */ | 36 | #define S3C2410_SPCON_SMOD_INT (1<<5) /* interrupt mode */ |
22 | #define S3C2410_SPCON_SMOD_POLL (0<<5) /* polling mode */ | 37 | #define S3C2410_SPCON_SMOD_POLL (0<<5) /* polling mode */ |
@@ -34,10 +49,19 @@ | |||
34 | 49 | ||
35 | #define S3C2410_SPSTA (0x04) | 50 | #define S3C2410_SPSTA (0x04) |
36 | 51 | ||
52 | #define S3C2412_SPSTA_RXFIFO_AE (1<<11) | ||
53 | #define S3C2412_SPSTA_TXFIFO_AE (1<<10) | ||
54 | #define S3C2412_SPSTA_RXFIFO_ERROR (1<<9) | ||
55 | #define S3C2412_SPSTA_TXFIFO_ERROR (1<<8) | ||
56 | #define S3C2412_SPSTA_RXFIFO_FIFO (1<<7) | ||
57 | #define S3C2412_SPSTA_RXFIFO_EMPTY (1<<6) | ||
58 | #define S3C2412_SPSTA_TXFIFO_NFULL (1<<5) | ||
59 | #define S3C2412_SPSTA_TXFIFO_EMPTY (1<<4) | ||
60 | |||
37 | #define S3C2410_SPSTA_DCOL (1<<2) /* Data Collision Error */ | 61 | #define S3C2410_SPSTA_DCOL (1<<2) /* Data Collision Error */ |
38 | #define S3C2410_SPSTA_MULD (1<<1) /* Multi Master Error */ | 62 | #define S3C2410_SPSTA_MULD (1<<1) /* Multi Master Error */ |
39 | #define S3C2410_SPSTA_READY (1<<0) /* Data Tx/Rx ready */ | 63 | #define S3C2410_SPSTA_READY (1<<0) /* Data Tx/Rx ready */ |
40 | 64 | #define S3C2412_SPSTA_READY_ORG (1<<3) | |
41 | 65 | ||
42 | #define S3C2410_SPPIN (0x08) | 66 | #define S3C2410_SPPIN (0x08) |
43 | 67 | ||
@@ -46,9 +70,13 @@ | |||
46 | #define S3C2400_SPPIN_nCS (1<<1) /* SPI Card Select */ | 70 | #define S3C2400_SPPIN_nCS (1<<1) /* SPI Card Select */ |
47 | #define S3C2410_SPPIN_KEEP (1<<0) /* Master Out keep */ | 71 | #define S3C2410_SPPIN_KEEP (1<<0) /* Master Out keep */ |
48 | 72 | ||
49 | |||
50 | #define S3C2410_SPPRE (0x0C) | 73 | #define S3C2410_SPPRE (0x0C) |
51 | #define S3C2410_SPTDAT (0x10) | 74 | #define S3C2410_SPTDAT (0x10) |
52 | #define S3C2410_SPRDAT (0x14) | 75 | #define S3C2410_SPRDAT (0x14) |
53 | 76 | ||
77 | #define S3C2412_TXFIFO (0x18) | ||
78 | #define S3C2412_RXFIFO (0x18) | ||
79 | #define S3C2412_SPFIC (0x24) | ||
80 | |||
81 | |||
54 | #endif /* __ASM_ARCH_REGS_SPI_H */ | 82 | #endif /* __ASM_ARCH_REGS_SPI_H */ |
diff --git a/include/asm-arm/traps.h b/include/asm-arm/traps.h index d4f34dc83eb0..f1541afcf85c 100644 --- a/include/asm-arm/traps.h +++ b/include/asm-arm/traps.h | |||
@@ -15,4 +15,13 @@ struct undef_hook { | |||
15 | void register_undef_hook(struct undef_hook *hook); | 15 | void register_undef_hook(struct undef_hook *hook); |
16 | void unregister_undef_hook(struct undef_hook *hook); | 16 | void unregister_undef_hook(struct undef_hook *hook); |
17 | 17 | ||
18 | static inline int in_exception_text(unsigned long ptr) | ||
19 | { | ||
20 | extern char __exception_text_start[]; | ||
21 | extern char __exception_text_end[]; | ||
22 | |||
23 | return ptr >= (unsigned long)&__exception_text_start && | ||
24 | ptr < (unsigned long)&__exception_text_end; | ||
25 | } | ||
26 | |||
18 | #endif | 27 | #endif |
diff --git a/include/asm-arm/vfp.h b/include/asm-arm/vfp.h index bd6be9d7f772..5f9a2cb3d452 100644 --- a/include/asm-arm/vfp.h +++ b/include/asm-arm/vfp.h | |||
@@ -7,7 +7,11 @@ | |||
7 | 7 | ||
8 | #define FPSID cr0 | 8 | #define FPSID cr0 |
9 | #define FPSCR cr1 | 9 | #define FPSCR cr1 |
10 | #define MVFR1 cr6 | ||
11 | #define MVFR0 cr7 | ||
10 | #define FPEXC cr8 | 12 | #define FPEXC cr8 |
13 | #define FPINST cr9 | ||
14 | #define FPINST2 cr10 | ||
11 | 15 | ||
12 | /* FPSID bits */ | 16 | /* FPSID bits */ |
13 | #define FPSID_IMPLEMENTER_BIT (24) | 17 | #define FPSID_IMPLEMENTER_BIT (24) |
@@ -28,6 +32,19 @@ | |||
28 | /* FPEXC bits */ | 32 | /* FPEXC bits */ |
29 | #define FPEXC_EX (1 << 31) | 33 | #define FPEXC_EX (1 << 31) |
30 | #define FPEXC_EN (1 << 30) | 34 | #define FPEXC_EN (1 << 30) |
35 | #define FPEXC_DEX (1 << 29) | ||
36 | #define FPEXC_FP2V (1 << 28) | ||
37 | #define FPEXC_VV (1 << 27) | ||
38 | #define FPEXC_TFV (1 << 26) | ||
39 | #define FPEXC_LENGTH_BIT (8) | ||
40 | #define FPEXC_LENGTH_MASK (7 << FPEXC_LENGTH_BIT) | ||
41 | #define FPEXC_IDF (1 << 7) | ||
42 | #define FPEXC_IXF (1 << 4) | ||
43 | #define FPEXC_UFF (1 << 3) | ||
44 | #define FPEXC_OFF (1 << 2) | ||
45 | #define FPEXC_DZF (1 << 1) | ||
46 | #define FPEXC_IOF (1 << 0) | ||
47 | #define FPEXC_TRAP_MASK (FPEXC_IDF|FPEXC_IXF|FPEXC_UFF|FPEXC_OFF|FPEXC_DZF|FPEXC_IOF) | ||
31 | 48 | ||
32 | /* FPSCR bits */ | 49 | /* FPSCR bits */ |
33 | #define FPSCR_DEFAULT_NAN (1<<25) | 50 | #define FPSCR_DEFAULT_NAN (1<<25) |
@@ -55,20 +72,9 @@ | |||
55 | #define FPSCR_IXC (1<<4) | 72 | #define FPSCR_IXC (1<<4) |
56 | #define FPSCR_IDC (1<<7) | 73 | #define FPSCR_IDC (1<<7) |
57 | 74 | ||
58 | /* | 75 | /* MVFR0 bits */ |
59 | * VFP9-S specific. | 76 | #define MVFR0_A_SIMD_BIT (0) |
60 | */ | 77 | #define MVFR0_A_SIMD_MASK (0xf << MVFR0_A_SIMD_BIT) |
61 | #define FPINST cr9 | ||
62 | #define FPINST2 cr10 | ||
63 | |||
64 | /* FPEXC bits */ | ||
65 | #define FPEXC_FPV2 (1<<28) | ||
66 | #define FPEXC_LENGTH_BIT (8) | ||
67 | #define FPEXC_LENGTH_MASK (7 << FPEXC_LENGTH_BIT) | ||
68 | #define FPEXC_INV (1 << 7) | ||
69 | #define FPEXC_UFC (1 << 3) | ||
70 | #define FPEXC_OFC (1 << 2) | ||
71 | #define FPEXC_IOC (1 << 0) | ||
72 | 78 | ||
73 | /* Bit patterns for decoding the packaged operation descriptors */ | 79 | /* Bit patterns for decoding the packaged operation descriptors */ |
74 | #define VFPOPDESC_LENGTH_BIT (9) | 80 | #define VFPOPDESC_LENGTH_BIT (9) |
diff --git a/include/asm-arm/vfpmacros.h b/include/asm-arm/vfpmacros.h index 27fe028b4e72..cccb3892e73c 100644 --- a/include/asm-arm/vfpmacros.h +++ b/include/asm-arm/vfpmacros.h | |||
@@ -15,19 +15,33 @@ | |||
15 | .endm | 15 | .endm |
16 | 16 | ||
17 | @ read all the working registers back into the VFP | 17 | @ read all the working registers back into the VFP |
18 | .macro VFPFLDMIA, base | 18 | .macro VFPFLDMIA, base, tmp |
19 | #if __LINUX_ARM_ARCH__ < 6 | 19 | #if __LINUX_ARM_ARCH__ < 6 |
20 | LDC p11, cr0, [\base],#33*4 @ FLDMIAX \base!, {d0-d15} | 20 | LDC p11, cr0, [\base],#33*4 @ FLDMIAX \base!, {d0-d15} |
21 | #else | 21 | #else |
22 | LDC p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d0-d15} | 22 | LDC p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d0-d15} |
23 | #endif | 23 | #endif |
24 | #ifdef CONFIG_VFPv3 | ||
25 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | ||
26 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | ||
27 | cmp \tmp, #2 @ 32 x 64bit registers? | ||
28 | ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} | ||
29 | addne \base, \base, #32*4 @ step over unused register space | ||
30 | #endif | ||
24 | .endm | 31 | .endm |
25 | 32 | ||
26 | @ write all the working registers out of the VFP | 33 | @ write all the working registers out of the VFP |
27 | .macro VFPFSTMIA, base | 34 | .macro VFPFSTMIA, base, tmp |
28 | #if __LINUX_ARM_ARCH__ < 6 | 35 | #if __LINUX_ARM_ARCH__ < 6 |
29 | STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} | 36 | STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} |
30 | #else | 37 | #else |
31 | STC p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d0-d15} | 38 | STC p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d0-d15} |
32 | #endif | 39 | #endif |
40 | #ifdef CONFIG_VFPv3 | ||
41 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | ||
42 | and \tmp, \tmp, #MVFR0_A_SIMD_MASK @ A_SIMD field | ||
43 | cmp \tmp, #2 @ 32 x 64bit registers? | ||
44 | stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} | ||
45 | addne \base, \base, #32*4 @ step over unused register space | ||
46 | #endif | ||
33 | .endm | 47 | .endm |
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 39bdd86871cf..6ae0619d7696 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -51,7 +51,7 @@ extern unsigned long sclk_to_usecs(unsigned long sclk); | |||
51 | extern unsigned long usecs_to_sclk(unsigned long usecs); | 51 | extern unsigned long usecs_to_sclk(unsigned long usecs); |
52 | 52 | ||
53 | extern void dump_bfin_process(struct pt_regs *regs); | 53 | extern void dump_bfin_process(struct pt_regs *regs); |
54 | extern void dump_bfin_mem(void *retaddr); | 54 | extern void dump_bfin_mem(struct pt_regs *regs); |
55 | extern void dump_bfin_trace_buffer(void); | 55 | extern void dump_bfin_trace_buffer(void); |
56 | 56 | ||
57 | extern int init_arch_irq(void); | 57 | extern int init_arch_irq(void); |
diff --git a/include/asm-blackfin/cplb-mpu.h b/include/asm-blackfin/cplb-mpu.h new file mode 100644 index 000000000000..75c67b99d607 --- /dev/null +++ b/include/asm-blackfin/cplb-mpu.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * File: include/asm-blackfin/cplbinit.h | ||
3 | * Based on: | ||
4 | * Author: | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: | ||
8 | * | ||
9 | * Modified: | ||
10 | * Copyright 2004-2006 Analog Devices Inc. | ||
11 | * | ||
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, see the file COPYING, or write | ||
26 | * to the Free Software Foundation, Inc., | ||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
28 | */ | ||
29 | #ifndef __ASM_BFIN_CPLB_MPU_H | ||
30 | #define __ASM_BFIN_CPLB_MPU_H | ||
31 | |||
32 | struct cplb_entry { | ||
33 | unsigned long data, addr; | ||
34 | }; | ||
35 | |||
36 | struct mem_region { | ||
37 | unsigned long start, end; | ||
38 | unsigned long dcplb_data; | ||
39 | unsigned long icplb_data; | ||
40 | }; | ||
41 | |||
42 | extern struct cplb_entry dcplb_tbl[MAX_CPLBS]; | ||
43 | extern struct cplb_entry icplb_tbl[MAX_CPLBS]; | ||
44 | extern int first_switched_icplb; | ||
45 | extern int first_mask_dcplb; | ||
46 | extern int first_switched_dcplb; | ||
47 | |||
48 | extern int nr_dcplb_miss, nr_icplb_miss, nr_icplb_supv_miss, nr_dcplb_prot; | ||
49 | extern int nr_cplb_flush; | ||
50 | |||
51 | extern int page_mask_order; | ||
52 | extern int page_mask_nelts; | ||
53 | |||
54 | extern unsigned long *current_rwx_mask; | ||
55 | |||
56 | extern void flush_switched_cplbs(void); | ||
57 | extern void set_mask_dcplbs(unsigned long *); | ||
58 | |||
59 | extern void __noreturn panic_cplb_error(int seqstat, struct pt_regs *); | ||
60 | |||
61 | #endif /* __ASM_BFIN_CPLB_MPU_H */ | ||
diff --git a/include/asm-blackfin/cplb.h b/include/asm-blackfin/cplb.h index 06828d77a58f..654375c2b746 100644 --- a/include/asm-blackfin/cplb.h +++ b/include/asm-blackfin/cplb.h | |||
@@ -65,7 +65,11 @@ | |||
65 | #define SIZE_1M 0x00100000 /* 1M */ | 65 | #define SIZE_1M 0x00100000 /* 1M */ |
66 | #define SIZE_4M 0x00400000 /* 4M */ | 66 | #define SIZE_4M 0x00400000 /* 4M */ |
67 | 67 | ||
68 | #ifdef CONFIG_MPU | ||
69 | #define MAX_CPLBS 16 | ||
70 | #else | ||
68 | #define MAX_CPLBS (16 * 2) | 71 | #define MAX_CPLBS (16 * 2) |
72 | #endif | ||
69 | 73 | ||
70 | #define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \ | 74 | #define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \ |
71 | ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M) | 75 | ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M) |
diff --git a/include/asm-blackfin/cplbinit.h b/include/asm-blackfin/cplbinit.h index c4d0596e8e9f..0eb1c1b685a7 100644 --- a/include/asm-blackfin/cplbinit.h +++ b/include/asm-blackfin/cplbinit.h | |||
@@ -33,6 +33,12 @@ | |||
33 | #include <asm/blackfin.h> | 33 | #include <asm/blackfin.h> |
34 | #include <asm/cplb.h> | 34 | #include <asm/cplb.h> |
35 | 35 | ||
36 | #ifdef CONFIG_MPU | ||
37 | |||
38 | #include <asm/cplb-mpu.h> | ||
39 | |||
40 | #else | ||
41 | |||
36 | #define INITIAL_T 0x1 | 42 | #define INITIAL_T 0x1 |
37 | #define SWITCH_T 0x2 | 43 | #define SWITCH_T 0x2 |
38 | #define I_CPLB 0x4 | 44 | #define I_CPLB 0x4 |
@@ -79,6 +85,8 @@ extern u_long ipdt_swapcount_table[]; | |||
79 | extern u_long dpdt_swapcount_table[]; | 85 | extern u_long dpdt_swapcount_table[]; |
80 | #endif | 86 | #endif |
81 | 87 | ||
88 | #endif /* CONFIG_MPU */ | ||
89 | |||
82 | extern unsigned long reserved_mem_dcache_on; | 90 | extern unsigned long reserved_mem_dcache_on; |
83 | extern unsigned long reserved_mem_icache_on; | 91 | extern unsigned long reserved_mem_icache_on; |
84 | 92 | ||
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h index b469505af364..5abaa2cee8db 100644 --- a/include/asm-blackfin/dma.h +++ b/include/asm-blackfin/dma.h | |||
@@ -76,6 +76,9 @@ enum dma_chan_status { | |||
76 | #define INTR_ON_BUF 2 | 76 | #define INTR_ON_BUF 2 |
77 | #define INTR_ON_ROW 3 | 77 | #define INTR_ON_ROW 3 |
78 | 78 | ||
79 | #define DMA_NOSYNC_KEEP_DMA_BUF 0 | ||
80 | #define DMA_SYNC_RESTART 1 | ||
81 | |||
79 | struct dmasg { | 82 | struct dmasg { |
80 | unsigned long next_desc_addr; | 83 | unsigned long next_desc_addr; |
81 | unsigned long start_addr; | 84 | unsigned long start_addr; |
@@ -157,7 +160,8 @@ void set_dma_y_count(unsigned int channel, unsigned short y_count); | |||
157 | void set_dma_y_modify(unsigned int channel, short y_modify); | 160 | void set_dma_y_modify(unsigned int channel, short y_modify); |
158 | void set_dma_config(unsigned int channel, unsigned short config); | 161 | void set_dma_config(unsigned int channel, unsigned short config); |
159 | unsigned short set_bfin_dma_config(char direction, char flow_mode, | 162 | unsigned short set_bfin_dma_config(char direction, char flow_mode, |
160 | char intr_mode, char dma_mode, char width); | 163 | char intr_mode, char dma_mode, char width, |
164 | char syncmode); | ||
161 | void set_dma_curr_addr(unsigned int channel, unsigned long addr); | 165 | void set_dma_curr_addr(unsigned int channel, unsigned long addr); |
162 | 166 | ||
163 | /* get curr status for polling */ | 167 | /* get curr status for polling */ |
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index 33ce98ef7e0f..d0426c108262 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Description: | 7 | * Description: |
8 | * | 8 | * |
9 | * Modified: | 9 | * Modified: |
10 | * Copyright 2004-2006 Analog Devices Inc. | 10 | * Copyright 2004-2008 Analog Devices Inc. |
11 | * | 11 | * |
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
13 | * | 13 | * |
@@ -304,39 +304,39 @@ | |||
304 | **************************************************************/ | 304 | **************************************************************/ |
305 | 305 | ||
306 | #ifndef BF548_FAMILY | 306 | #ifndef BF548_FAMILY |
307 | void set_gpio_dir(unsigned short, unsigned short); | 307 | void set_gpio_dir(unsigned, unsigned short); |
308 | void set_gpio_inen(unsigned short, unsigned short); | 308 | void set_gpio_inen(unsigned, unsigned short); |
309 | void set_gpio_polar(unsigned short, unsigned short); | 309 | void set_gpio_polar(unsigned, unsigned short); |
310 | void set_gpio_edge(unsigned short, unsigned short); | 310 | void set_gpio_edge(unsigned, unsigned short); |
311 | void set_gpio_both(unsigned short, unsigned short); | 311 | void set_gpio_both(unsigned, unsigned short); |
312 | void set_gpio_data(unsigned short, unsigned short); | 312 | void set_gpio_data(unsigned, unsigned short); |
313 | void set_gpio_maska(unsigned short, unsigned short); | 313 | void set_gpio_maska(unsigned, unsigned short); |
314 | void set_gpio_maskb(unsigned short, unsigned short); | 314 | void set_gpio_maskb(unsigned, unsigned short); |
315 | void set_gpio_toggle(unsigned short); | 315 | void set_gpio_toggle(unsigned); |
316 | void set_gpiop_dir(unsigned short, unsigned short); | 316 | void set_gpiop_dir(unsigned, unsigned short); |
317 | void set_gpiop_inen(unsigned short, unsigned short); | 317 | void set_gpiop_inen(unsigned, unsigned short); |
318 | void set_gpiop_polar(unsigned short, unsigned short); | 318 | void set_gpiop_polar(unsigned, unsigned short); |
319 | void set_gpiop_edge(unsigned short, unsigned short); | 319 | void set_gpiop_edge(unsigned, unsigned short); |
320 | void set_gpiop_both(unsigned short, unsigned short); | 320 | void set_gpiop_both(unsigned, unsigned short); |
321 | void set_gpiop_data(unsigned short, unsigned short); | 321 | void set_gpiop_data(unsigned, unsigned short); |
322 | void set_gpiop_maska(unsigned short, unsigned short); | 322 | void set_gpiop_maska(unsigned, unsigned short); |
323 | void set_gpiop_maskb(unsigned short, unsigned short); | 323 | void set_gpiop_maskb(unsigned, unsigned short); |
324 | unsigned short get_gpio_dir(unsigned short); | 324 | unsigned short get_gpio_dir(unsigned); |
325 | unsigned short get_gpio_inen(unsigned short); | 325 | unsigned short get_gpio_inen(unsigned); |
326 | unsigned short get_gpio_polar(unsigned short); | 326 | unsigned short get_gpio_polar(unsigned); |
327 | unsigned short get_gpio_edge(unsigned short); | 327 | unsigned short get_gpio_edge(unsigned); |
328 | unsigned short get_gpio_both(unsigned short); | 328 | unsigned short get_gpio_both(unsigned); |
329 | unsigned short get_gpio_maska(unsigned short); | 329 | unsigned short get_gpio_maska(unsigned); |
330 | unsigned short get_gpio_maskb(unsigned short); | 330 | unsigned short get_gpio_maskb(unsigned); |
331 | unsigned short get_gpio_data(unsigned short); | 331 | unsigned short get_gpio_data(unsigned); |
332 | unsigned short get_gpiop_dir(unsigned short); | 332 | unsigned short get_gpiop_dir(unsigned); |
333 | unsigned short get_gpiop_inen(unsigned short); | 333 | unsigned short get_gpiop_inen(unsigned); |
334 | unsigned short get_gpiop_polar(unsigned short); | 334 | unsigned short get_gpiop_polar(unsigned); |
335 | unsigned short get_gpiop_edge(unsigned short); | 335 | unsigned short get_gpiop_edge(unsigned); |
336 | unsigned short get_gpiop_both(unsigned short); | 336 | unsigned short get_gpiop_both(unsigned); |
337 | unsigned short get_gpiop_maska(unsigned short); | 337 | unsigned short get_gpiop_maska(unsigned); |
338 | unsigned short get_gpiop_maskb(unsigned short); | 338 | unsigned short get_gpiop_maskb(unsigned); |
339 | unsigned short get_gpiop_data(unsigned short); | 339 | unsigned short get_gpiop_data(unsigned); |
340 | 340 | ||
341 | struct gpio_port_t { | 341 | struct gpio_port_t { |
342 | unsigned short data; | 342 | unsigned short data; |
@@ -382,8 +382,8 @@ struct gpio_port_t { | |||
382 | #define PM_WAKE_LOW 0x8 | 382 | #define PM_WAKE_LOW 0x8 |
383 | #define PM_WAKE_BOTH_EDGES (PM_WAKE_RISING | PM_WAKE_FALLING) | 383 | #define PM_WAKE_BOTH_EDGES (PM_WAKE_RISING | PM_WAKE_FALLING) |
384 | 384 | ||
385 | int gpio_pm_wakeup_request(unsigned short gpio, unsigned char type); | 385 | int gpio_pm_wakeup_request(unsigned gpio, unsigned char type); |
386 | void gpio_pm_wakeup_free(unsigned short gpio); | 386 | void gpio_pm_wakeup_free(unsigned gpio); |
387 | unsigned int gpio_pm_setup(void); | 387 | unsigned int gpio_pm_setup(void); |
388 | void gpio_pm_restore(void); | 388 | void gpio_pm_restore(void); |
389 | 389 | ||
@@ -426,19 +426,19 @@ struct gpio_port_s { | |||
426 | * MODIFICATION HISTORY : | 426 | * MODIFICATION HISTORY : |
427 | **************************************************************/ | 427 | **************************************************************/ |
428 | 428 | ||
429 | int gpio_request(unsigned short, const char *); | 429 | int gpio_request(unsigned, const char *); |
430 | void gpio_free(unsigned short); | 430 | void gpio_free(unsigned); |
431 | 431 | ||
432 | void gpio_set_value(unsigned short gpio, unsigned short arg); | 432 | void gpio_set_value(unsigned gpio, int arg); |
433 | unsigned short gpio_get_value(unsigned short gpio); | 433 | int gpio_get_value(unsigned gpio); |
434 | 434 | ||
435 | #ifndef BF548_FAMILY | 435 | #ifndef BF548_FAMILY |
436 | #define gpio_get_value(gpio) get_gpio_data(gpio) | 436 | #define gpio_get_value(gpio) get_gpio_data(gpio) |
437 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) | 437 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) |
438 | #endif | 438 | #endif |
439 | 439 | ||
440 | void gpio_direction_input(unsigned short gpio); | 440 | int gpio_direction_input(unsigned gpio); |
441 | void gpio_direction_output(unsigned short gpio); | 441 | int gpio_direction_output(unsigned gpio, int value); |
442 | 442 | ||
443 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 443 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
444 | #include <asm/irq.h> | 444 | #include <asm/irq.h> |
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h index 0b867e6a76c4..15dbc21eed8b 100644 --- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h | |||
@@ -146,7 +146,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
146 | 146 | ||
147 | if (uart->rts_pin >= 0) { | 147 | if (uart->rts_pin >= 0) { |
148 | gpio_request(uart->rts_pin, DRIVER_NAME); | 148 | gpio_request(uart->rts_pin, DRIVER_NAME); |
149 | gpio_direction_output(uart->rts_pin); | 149 | gpio_direction_output(uart->rts_pin, 0); |
150 | } | 150 | } |
151 | #endif | 151 | #endif |
152 | } | 152 | } |
diff --git a/include/asm-blackfin/mach-bf527/portmux.h b/include/asm-blackfin/mach-bf527/portmux.h index dcf001adc63c..ae4d205bfcf5 100644 --- a/include/asm-blackfin/mach-bf527/portmux.h +++ b/include/asm-blackfin/mach-bf527/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES MAX_BLACKFIN_GPIOS | ||
5 | |||
4 | #define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) | 6 | #define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) |
5 | #define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) | 7 | #define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) |
6 | #define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) | 8 | #define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) |
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index f36ff5af1b91..98209d40abba 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h | |||
@@ -7,9 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision X, March 23, 2007; ADSP-BF533 Blackfin Processor Anomaly List | 10 | * - Revision B, 12/10/2007; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List |
11 | * - Revision AB, March 23, 2007; ADSP-BF532 Blackfin Processor Anomaly List | ||
12 | * - Revision W, March 23, 2007; ADSP-BF531 Blackfin Processor Anomaly List | ||
13 | */ | 11 | */ |
14 | 12 | ||
15 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -17,7 +15,7 @@ | |||
17 | 15 | ||
18 | /* We do not support 0.1 or 0.2 silicon - sorry */ | 16 | /* We do not support 0.1 or 0.2 silicon - sorry */ |
19 | #if __SILICON_REVISION__ < 3 | 17 | #if __SILICON_REVISION__ < 3 |
20 | # error Kernel will not work on BF533 silicon version 0.0, 0.1, or 0.2 | 18 | # error will not work on BF533 silicon version 0.0, 0.1, or 0.2 |
21 | #endif | 19 | #endif |
22 | 20 | ||
23 | #if defined(__ADSPBF531__) | 21 | #if defined(__ADSPBF531__) |
@@ -251,6 +249,12 @@ | |||
251 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) | 249 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) |
252 | /* Internal Voltage Regulator may not start up */ | 250 | /* Internal Voltage Regulator may not start up */ |
253 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) | 251 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) |
252 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
253 | #define ANOMALY_05000357 (1) | ||
254 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
255 | #define ANOMALY_05000366 (1) | ||
256 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
257 | #define ANOMALY_05000371 (1) | ||
254 | 258 | ||
255 | /* Anomalies that don't exist on this proc */ | 259 | /* Anomalies that don't exist on this proc */ |
256 | #define ANOMALY_05000266 (0) | 260 | #define ANOMALY_05000266 (0) |
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h index 69b9f8e120e9..7871d4313f49 100644 --- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | |||
@@ -111,7 +111,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
111 | } | 111 | } |
112 | if (uart->rts_pin >= 0) { | 112 | if (uart->rts_pin >= 0) { |
113 | gpio_request(uart->rts_pin, DRIVER_NAME); | 113 | gpio_request(uart->rts_pin, DRIVER_NAME); |
114 | gpio_direction_input(uart->rts_pin); | 114 | gpio_direction_input(uart->rts_pin, 0); |
115 | } | 115 | } |
116 | #endif | 116 | #endif |
117 | } | 117 | } |
diff --git a/include/asm-blackfin/mach-bf533/portmux.h b/include/asm-blackfin/mach-bf533/portmux.h index 137f4884acfe..685a2651dcda 100644 --- a/include/asm-blackfin/mach-bf533/portmux.h +++ b/include/asm-blackfin/mach-bf533/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES MAX_BLACKFIN_GPIOS | ||
5 | |||
4 | #define P_PPI0_CLK (P_DONTCARE) | 6 | #define P_PPI0_CLK (P_DONTCARE) |
5 | #define P_PPI0_FS1 (P_DONTCARE) | 7 | #define P_PPI0_FS1 (P_DONTCARE) |
6 | #define P_PPI0_FS2 (P_DONTCARE) | 8 | #define P_PPI0_FS2 (P_DONTCARE) |
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h index 2b66ecf489f7..746a794b3119 100644 --- a/include/asm-blackfin/mach-bf537/anomaly.h +++ b/include/asm-blackfin/mach-bf537/anomaly.h | |||
@@ -7,9 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision M, March 13, 2007; ADSP-BF537 Blackfin Processor Anomaly List | 10 | * - Revision A, 09/04/2007; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List |
11 | * - Revision L, March 13, 2007; ADSP-BF536 Blackfin Processor Anomaly List | ||
12 | * - Revision M, March 13, 2007; ADSP-BF534 Blackfin Processor Anomaly List | ||
13 | */ | 11 | */ |
14 | 12 | ||
15 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -17,7 +15,7 @@ | |||
17 | 15 | ||
18 | /* We do not support 0.1 silicon - sorry */ | 16 | /* We do not support 0.1 silicon - sorry */ |
19 | #if __SILICON_REVISION__ < 2 | 17 | #if __SILICON_REVISION__ < 2 |
20 | # error Kernel will not work on BF537 silicon version 0.0 or 0.1 | 18 | # error will not work on BF537 silicon version 0.0 or 0.1 |
21 | #endif | 19 | #endif |
22 | 20 | ||
23 | #if defined(__ADSPBF534__) | 21 | #if defined(__ADSPBF534__) |
@@ -44,6 +42,8 @@ | |||
44 | #define ANOMALY_05000122 (1) | 42 | #define ANOMALY_05000122 (1) |
45 | /* Killed 32-bit MMR write leads to next system MMR access thinking it should be 32-bit */ | 43 | /* Killed 32-bit MMR write leads to next system MMR access thinking it should be 32-bit */ |
46 | #define ANOMALY_05000157 (__SILICON_REVISION__ < 2) | 44 | #define ANOMALY_05000157 (__SILICON_REVISION__ < 2) |
45 | /* Turning SPORTs on while External Frame Sync Is Active May Corrupt Data */ | ||
46 | #define ANOMALY_05000167 (1) | ||
47 | /* PPI_DELAY not functional in PPI modes with 0 frame syncs */ | 47 | /* PPI_DELAY not functional in PPI modes with 0 frame syncs */ |
48 | #define ANOMALY_05000180 (1) | 48 | #define ANOMALY_05000180 (1) |
49 | /* Instruction Cache Is Not Functional */ | 49 | /* Instruction Cache Is Not Functional */ |
@@ -130,6 +130,12 @@ | |||
130 | #define ANOMALY_05000321 (__SILICON_REVISION__ < 3) | 130 | #define ANOMALY_05000321 (__SILICON_REVISION__ < 3) |
131 | /* EMAC RMII mode at 10-Base-T speed: RX frames not received properly */ | 131 | /* EMAC RMII mode at 10-Base-T speed: RX frames not received properly */ |
132 | #define ANOMALY_05000322 (1) | 132 | #define ANOMALY_05000322 (1) |
133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ | ||
134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) | ||
135 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
136 | #define ANOMALY_05000357 (1) | ||
137 | /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ | ||
138 | #define ANOMALY_05000359 (1) | ||
133 | 139 | ||
134 | /* Anomalies that don't exist on this proc */ | 140 | /* Anomalies that don't exist on this proc */ |
135 | #define ANOMALY_05000125 (0) | 141 | #define ANOMALY_05000125 (0) |
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h index 6fb328f5186a..86e45c379838 100644 --- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h | |||
@@ -146,7 +146,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
146 | 146 | ||
147 | if (uart->rts_pin >= 0) { | 147 | if (uart->rts_pin >= 0) { |
148 | gpio_request(uart->rts_pin, DRIVER_NAME); | 148 | gpio_request(uart->rts_pin, DRIVER_NAME); |
149 | gpio_direction_output(uart->rts_pin); | 149 | gpio_direction_output(uart->rts_pin, 0); |
150 | } | 150 | } |
151 | #endif | 151 | #endif |
152 | } | 152 | } |
diff --git a/include/asm-blackfin/mach-bf537/portmux.h b/include/asm-blackfin/mach-bf537/portmux.h index 5a3f7d3bf73d..78fee6e0f237 100644 --- a/include/asm-blackfin/mach-bf537/portmux.h +++ b/include/asm-blackfin/mach-bf537/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES (MAX_BLACKFIN_GPIOS + GPIO_BANKSIZE) /* We additionally handle PORTJ */ | ||
5 | |||
4 | #define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) | 6 | #define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) |
5 | #define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) | 7 | #define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) |
6 | #define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) | 8 | #define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) |
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h index c5b63759cdee..850dc12eb7f2 100644 --- a/include/asm-blackfin/mach-bf548/anomaly.h +++ b/include/asm-blackfin/mach-bf548/anomaly.h | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision C, July 16, 2007; ADSP-BF549 Silicon Anomaly List | 10 | * - Revision E, 11/28/2007; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -26,47 +26,59 @@ | |||
26 | /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ | 26 | /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ |
27 | #define ANOMALY_05000272 (1) | 27 | #define ANOMALY_05000272 (1) |
28 | /* False Hardware Error Exception when ISR context is not restored */ | 28 | /* False Hardware Error Exception when ISR context is not restored */ |
29 | #define ANOMALY_05000281 (1) | 29 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 1) |
30 | /* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */ | 30 | /* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */ |
31 | #define ANOMALY_05000304 (1) | 31 | #define ANOMALY_05000304 (__SILICON_REVISION__ < 1) |
32 | /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ | 32 | /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ |
33 | #define ANOMALY_05000310 (1) | 33 | #define ANOMALY_05000310 (1) |
34 | /* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ | 34 | /* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ |
35 | #define ANOMALY_05000312 (1) | 35 | #define ANOMALY_05000312 (__SILICON_REVISION__ < 1) |
36 | /* TWI Slave Boot Mode Is Not Functional */ | 36 | /* TWI Slave Boot Mode Is Not Functional */ |
37 | #define ANOMALY_05000324 (1) | 37 | #define ANOMALY_05000324 (__SILICON_REVISION__ < 1) |
38 | /* External FIFO Boot Mode Is Not Functional */ | 38 | /* External FIFO Boot Mode Is Not Functional */ |
39 | #define ANOMALY_05000325 (1) | 39 | #define ANOMALY_05000325 (__SILICON_REVISION__ < 1) |
40 | /* Data Lost When Core and DMA Accesses Are Made to the USB FIFO Simultaneously */ | 40 | /* Data Lost When Core and DMA Accesses Are Made to the USB FIFO Simultaneously */ |
41 | #define ANOMALY_05000327 (1) | 41 | #define ANOMALY_05000327 (__SILICON_REVISION__ < 1) |
42 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | 42 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ |
43 | #define ANOMALY_05000328 (1) | 43 | #define ANOMALY_05000328 (__SILICON_REVISION__ < 1) |
44 | /* Synchronous Burst Flash Boot Mode Is Not Functional */ | 44 | /* Synchronous Burst Flash Boot Mode Is Not Functional */ |
45 | #define ANOMALY_05000329 (1) | 45 | #define ANOMALY_05000329 (__SILICON_REVISION__ < 1) |
46 | /* Host DMA Boot Mode Is Not Functional */ | 46 | /* Host DMA Boot Mode Is Not Functional */ |
47 | #define ANOMALY_05000330 (1) | 47 | #define ANOMALY_05000330 (__SILICON_REVISION__ < 1) |
48 | /* Inadequate Timing Margins on DDR DQS to DQ and DQM Skew */ | 48 | /* Inadequate Timing Margins on DDR DQS to DQ and DQM Skew */ |
49 | #define ANOMALY_05000334 (1) | 49 | #define ANOMALY_05000334 (__SILICON_REVISION__ < 1) |
50 | /* Inadequate Rotary Debounce Logic Duration */ | 50 | /* Inadequate Rotary Debounce Logic Duration */ |
51 | #define ANOMALY_05000335 (1) | 51 | #define ANOMALY_05000335 (__SILICON_REVISION__ < 1) |
52 | /* Phantom Interrupt Occurs After First Configuration of Host DMA Port */ | 52 | /* Phantom Interrupt Occurs After First Configuration of Host DMA Port */ |
53 | #define ANOMALY_05000336 (1) | 53 | #define ANOMALY_05000336 (__SILICON_REVISION__ < 1) |
54 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | 54 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ |
55 | #define ANOMALY_05000337 (1) | 55 | #define ANOMALY_05000337 (__SILICON_REVISION__ < 1) |
56 | /* Slave-Mode SPI0 MISO Failure With CPHA = 0 */ | 56 | /* Slave-Mode SPI0 MISO Failure With CPHA = 0 */ |
57 | #define ANOMALY_05000338 (1) | 57 | #define ANOMALY_05000338 (__SILICON_REVISION__ < 1) |
58 | /* If Memory Reads Are Enabled on SDH or HOSTDP, Other DMAC1 Peripherals Cannot Read */ | 58 | /* If Memory Reads Are Enabled on SDH or HOSTDP, Other DMAC1 Peripherals Cannot Read */ |
59 | #define ANOMALY_05000340 (1) | 59 | #define ANOMALY_05000340 (__SILICON_REVISION__ < 1) |
60 | /* Boot Host Wait (HWAIT) and Boot Host Wait Alternate (HWAITA) Signals Are Swapped */ | 60 | /* Boot Host Wait (HWAIT) and Boot Host Wait Alternate (HWAITA) Signals Are Swapped */ |
61 | #define ANOMALY_05000344 (1) | 61 | #define ANOMALY_05000344 (__SILICON_REVISION__ < 1) |
62 | /* USB Calibration Value Is Not Intialized */ | 62 | /* USB Calibration Value Is Not Intialized */ |
63 | #define ANOMALY_05000346 (1) | 63 | #define ANOMALY_05000346 (__SILICON_REVISION__ < 1) |
64 | /* Boot ROM Kernel Incorrectly Alters Reset Value of USB Register */ | 64 | /* Boot ROM Kernel Incorrectly Alters Reset Value of USB Register */ |
65 | #define ANOMALY_05000347 (1) | 65 | #define ANOMALY_05000347 (__SILICON_REVISION__ < 1) |
66 | /* Data Lost when Core Reads SDH Data FIFO */ | 66 | /* Data Lost when Core Reads SDH Data FIFO */ |
67 | #define ANOMALY_05000349 (1) | 67 | #define ANOMALY_05000349 (__SILICON_REVISION__ < 1) |
68 | /* PLL Status Register Is Inaccurate */ | 68 | /* PLL Status Register Is Inaccurate */ |
69 | #define ANOMALY_05000351 (1) | 69 | #define ANOMALY_05000351 (__SILICON_REVISION__ < 1) |
70 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
71 | #define ANOMALY_05000357 (1) | ||
72 | /* External Memory Read Access Hangs Core With PLL Bypass */ | ||
73 | #define ANOMALY_05000360 (1) | ||
74 | /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ | ||
75 | #define ANOMALY_05000365 (1) | ||
76 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ | ||
77 | #define ANOMALY_05000369 (1) | ||
78 | /* Mobile DDR Operation Not Functional */ | ||
79 | #define ANOMALY_05000377 (1) | ||
80 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ | ||
81 | #define ANOMALY_05000378 (1) | ||
70 | 82 | ||
71 | /* Anomalies that don't exist on this proc */ | 83 | /* Anomalies that don't exist on this proc */ |
72 | #define ANOMALY_05000125 (0) | 84 | #define ANOMALY_05000125 (0) |
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h index f21a1620e6bd..3770aa38ee9f 100644 --- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h | |||
@@ -186,7 +186,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
186 | 186 | ||
187 | if (uart->rts_pin >= 0) { | 187 | if (uart->rts_pin >= 0) { |
188 | gpio_request(uart->rts_pin, DRIVER_NAME); | 188 | gpio_request(uart->rts_pin, DRIVER_NAME); |
189 | gpio_direction_output(uart->rts_pin); | 189 | gpio_direction_output(uart->rts_pin, 0); |
190 | } | 190 | } |
191 | #endif | 191 | #endif |
192 | } | 192 | } |
diff --git a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h index aefab3f618c1..19ddcd83c71f 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h | |||
@@ -244,39 +244,6 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
244 | #define bfin_read_TWI0_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) | 244 | #define bfin_read_TWI0_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) |
245 | #define bfin_write_TWI0_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) | 245 | #define bfin_write_TWI0_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) |
246 | 246 | ||
247 | #define bfin_read_TWI_CLKDIV() bfin_read16(TWI0_CLKDIV) | ||
248 | #define bfin_write_TWI_CLKDIV(val) bfin_write16(TWI0_CLKDIV, val) | ||
249 | #define bfin_read_TWI_CONTROL() bfin_read16(TWI0_CONTROL) | ||
250 | #define bfin_write_TWI_CONTROL(val) bfin_write16(TWI0_CONTROL, val) | ||
251 | #define bfin_read_TWI_SLAVE_CTRL() bfin_read16(TWI0_SLAVE_CTRL) | ||
252 | #define bfin_write_TWI_SLAVE_CTRL(val) bfin_write16(TWI0_SLAVE_CTRL, val) | ||
253 | #define bfin_read_TWI_SLAVE_STAT() bfin_read16(TWI0_SLAVE_STAT) | ||
254 | #define bfin_write_TWI_SLAVE_STAT(val) bfin_write16(TWI0_SLAVE_STAT, val) | ||
255 | #define bfin_read_TWI_SLAVE_ADDR() bfin_read16(TWI0_SLAVE_ADDR) | ||
256 | #define bfin_write_TWI_SLAVE_ADDR(val) bfin_write16(TWI0_SLAVE_ADDR, val) | ||
257 | #define bfin_read_TWI_MASTER_CTL() bfin_read16(TWI0_MASTER_CTRL) | ||
258 | #define bfin_write_TWI_MASTER_CTL(val) bfin_write16(TWI0_MASTER_CTRL, val) | ||
259 | #define bfin_read_TWI_MASTER_STAT() bfin_read16(TWI0_MASTER_STAT) | ||
260 | #define bfin_write_TWI_MASTER_STAT(val) bfin_write16(TWI0_MASTER_STAT, val) | ||
261 | #define bfin_read_TWI_MASTER_ADDR() bfin_read16(TWI0_MASTER_ADDR) | ||
262 | #define bfin_write_TWI_MASTER_ADDR(val) bfin_write16(TWI0_MASTER_ADDR, val) | ||
263 | #define bfin_read_TWI_INT_STAT() bfin_read16(TWI0_INT_STAT) | ||
264 | #define bfin_write_TWI_INT_STAT(val) bfin_write16(TWI0_INT_STAT, val) | ||
265 | #define bfin_read_TWI_INT_MASK() bfin_read16(TWI0_INT_MASK) | ||
266 | #define bfin_write_TWI_INT_MASK(val) bfin_write16(TWI0_INT_MASK, val) | ||
267 | #define bfin_read_TWI_FIFO_CTL() bfin_read16(TWI0_FIFO_CTRL) | ||
268 | #define bfin_write_TWI_FIFO_CTL(val) bfin_write16(TWI0_FIFO_CTRL, val) | ||
269 | #define bfin_read_TWI_FIFO_STAT() bfin_read16(TWI0_FIFO_STAT) | ||
270 | #define bfin_write_TWI_FIFO_STAT(val) bfin_write16(TWI0_FIFO_STAT, val) | ||
271 | #define bfin_read_TWI_XMT_DATA8() bfin_read16(TWI0_XMT_DATA8) | ||
272 | #define bfin_write_TWI_XMT_DATA8(val) bfin_write16(TWI0_XMT_DATA8, val) | ||
273 | #define bfin_read_TWI_XMT_DATA16() bfin_read16(TWI0_XMT_DATA16) | ||
274 | #define bfin_write_TWI_XMT_DATA16(val) bfin_write16(TWI0_XMT_DATA16, val) | ||
275 | #define bfin_read_TWI_RCV_DATA8() bfin_read16(TWI0_RCV_DATA8) | ||
276 | #define bfin_write_TWI_RCV_DATA8(val) bfin_write16(TWI0_RCV_DATA8, val) | ||
277 | #define bfin_read_TWI_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) | ||
278 | #define bfin_write_TWI_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) | ||
279 | |||
280 | /* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */ | 247 | /* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */ |
281 | 248 | ||
282 | /* SPORT1 Registers */ | 249 | /* SPORT1 Registers */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF542.h b/include/asm-blackfin/mach-bf548/defBF542.h index 32d07130200c..a7c809f29ede 100644 --- a/include/asm-blackfin/mach-bf548/defBF542.h +++ b/include/asm-blackfin/mach-bf548/defBF542.h | |||
@@ -432,8 +432,8 @@ | |||
432 | 432 | ||
433 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ | 433 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ |
434 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ | 434 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ |
435 | #define CMD_TIMEOUT 0x4 /* CMD Time Out */ | 435 | #define CMD_TIME_OUT 0x4 /* CMD Time Out */ |
436 | #define DAT_TIMEOUT 0x8 /* Data Time Out */ | 436 | #define DAT_TIME_OUT 0x8 /* Data Time Out */ |
437 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ | 437 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ |
438 | #define RX_OVERRUN 0x20 /* Receive Overrun */ | 438 | #define RX_OVERRUN 0x20 /* Receive Overrun */ |
439 | #define CMD_RESP_END 0x40 /* CMD Response End */ | 439 | #define CMD_RESP_END 0x40 /* CMD Response End */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF548.h b/include/asm-blackfin/mach-bf548/defBF548.h index ecbca952985c..e46f56891e6a 100644 --- a/include/asm-blackfin/mach-bf548/defBF548.h +++ b/include/asm-blackfin/mach-bf548/defBF548.h | |||
@@ -1095,8 +1095,8 @@ | |||
1095 | 1095 | ||
1096 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ | 1096 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ |
1097 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ | 1097 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ |
1098 | #define CMD_TIMEOUT 0x4 /* CMD Time Out */ | 1098 | #define CMD_TIME_OUT 0x4 /* CMD Time Out */ |
1099 | #define DAT_TIMEOUT 0x8 /* Data Time Out */ | 1099 | #define DAT_TIME_OUT 0x8 /* Data Time Out */ |
1100 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ | 1100 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ |
1101 | #define RX_OVERRUN 0x20 /* Receive Overrun */ | 1101 | #define RX_OVERRUN 0x20 /* Receive Overrun */ |
1102 | #define CMD_RESP_END 0x40 /* CMD Response End */ | 1102 | #define CMD_RESP_END 0x40 /* CMD Response End */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h index 319a48590c9c..08f90c21fe8a 100644 --- a/include/asm-blackfin/mach-bf548/defBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/defBF54x_base.h | |||
@@ -1772,17 +1772,36 @@ | |||
1772 | #define TRP 0x3c0000 /* Pre charge-to-active command period */ | 1772 | #define TRP 0x3c0000 /* Pre charge-to-active command period */ |
1773 | #define TRAS 0x3c00000 /* Min Active-to-pre charge time */ | 1773 | #define TRAS 0x3c00000 /* Min Active-to-pre charge time */ |
1774 | #define TRC 0x3c000000 /* Active-to-active time */ | 1774 | #define TRC 0x3c000000 /* Active-to-active time */ |
1775 | #define DDR_TRAS(x) ((x<<22)&TRAS) /* DDR tRAS = (1~15) cycles */ | ||
1776 | #define DDR_TRP(x) ((x<<18)&TRP) /* DDR tRP = (1~15) cycles */ | ||
1777 | #define DDR_TRC(x) ((x<<26)&TRC) /* DDR tRC = (1~15) cycles */ | ||
1778 | #define DDR_TRFC(x) ((x<<14)&TRFC) /* DDR tRFC = (1~15) cycles */ | ||
1779 | #define DDR_TREFI(x) (x&TREFI) /* DDR tRFC = (1~15) cycles */ | ||
1775 | 1780 | ||
1776 | /* Bit masks for EBIU_DDRCTL1 */ | 1781 | /* Bit masks for EBIU_DDRCTL1 */ |
1777 | 1782 | ||
1778 | #define TRCD 0xf /* Active-to-Read/write delay */ | 1783 | #define TRCD 0xf /* Active-to-Read/write delay */ |
1779 | #define MRD 0xf0 /* Mode register set to active */ | 1784 | #define TMRD 0xf0 /* Mode register set to active */ |
1780 | #define TWR 0x300 /* Write Recovery time */ | 1785 | #define TWR 0x300 /* Write Recovery time */ |
1781 | #define DDRDATWIDTH 0x3000 /* DDR data width */ | 1786 | #define DDRDATWIDTH 0x3000 /* DDR data width */ |
1782 | #define EXTBANKS 0xc000 /* External banks */ | 1787 | #define EXTBANKS 0xc000 /* External banks */ |
1783 | #define DDRDEVWIDTH 0x30000 /* DDR device width */ | 1788 | #define DDRDEVWIDTH 0x30000 /* DDR device width */ |
1784 | #define DDRDEVSIZE 0xc0000 /* DDR device size */ | 1789 | #define DDRDEVSIZE 0xc0000 /* DDR device size */ |
1785 | #define TWWTR 0xf0000000 /* Write-to-read delay */ | 1790 | #define TWTR 0xf0000000 /* Write-to-read delay */ |
1791 | #define DDR_TWTR(x) ((x<<28)&TWTR) /* DDR tWTR = (1~15) cycles */ | ||
1792 | #define DDR_TMRD(x) ((x<<4)&TMRD) /* DDR tMRD = (1~15) cycles */ | ||
1793 | #define DDR_TWR(x) ((x<<8)&TWR) /* DDR tWR = (1~15) cycles */ | ||
1794 | #define DDR_TRCD(x) (x&TRCD) /* DDR tRCD = (1~15) cycles */ | ||
1795 | #define DDR_DATWIDTH 0x2000 /* DDR data width */ | ||
1796 | #define EXTBANK_1 0 /* 1 external bank */ | ||
1797 | #define EXTBANK_2 0x4000 /* 2 external banks */ | ||
1798 | #define DEVSZ_64 0x40000 /* DDR External Bank Size = 64MB */ | ||
1799 | #define DEVSZ_128 0x80000 /* DDR External Bank Size = 128MB */ | ||
1800 | #define DEVSZ_256 0xc0000 /* DDR External Bank Size = 256MB */ | ||
1801 | #define DEVSZ_512 0 /* DDR External Bank Size = 512MB */ | ||
1802 | #define DEVWD_4 0 /* DDR Device Width = 4 Bits */ | ||
1803 | #define DEVWD_8 0x10000 /* DDR Device Width = 8 Bits */ | ||
1804 | #define DEVWD_16 0x20000 /* DDR Device Width = 16 Bits */ | ||
1786 | 1805 | ||
1787 | /* Bit masks for EBIU_DDRCTL2 */ | 1806 | /* Bit masks for EBIU_DDRCTL2 */ |
1788 | 1807 | ||
@@ -1790,6 +1809,10 @@ | |||
1790 | #define CASLATENCY 0x70 /* CAS latency */ | 1809 | #define CASLATENCY 0x70 /* CAS latency */ |
1791 | #define DLLRESET 0x100 /* DLL Reset */ | 1810 | #define DLLRESET 0x100 /* DLL Reset */ |
1792 | #define REGE 0x1000 /* Register mode enable */ | 1811 | #define REGE 0x1000 /* Register mode enable */ |
1812 | #define CL_1_5 0x50 /* DDR CAS Latency = 1.5 cycles */ | ||
1813 | #define CL_2 0x20 /* DDR CAS Latency = 2 cycles */ | ||
1814 | #define CL_2_5 0x60 /* DDR CAS Latency = 2.5 cycles */ | ||
1815 | #define CL_3 0x30 /* DDR CAS Latency = 3 cycles */ | ||
1793 | 1816 | ||
1794 | /* Bit masks for EBIU_DDRCTL3 */ | 1817 | /* Bit masks for EBIU_DDRCTL3 */ |
1795 | 1818 | ||
@@ -2257,6 +2280,10 @@ | |||
2257 | 2280 | ||
2258 | #define CSEL 0x30 /* Core Select */ | 2281 | #define CSEL 0x30 /* Core Select */ |
2259 | #define SSEL 0xf /* System Select */ | 2282 | #define SSEL 0xf /* System Select */ |
2283 | #define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */ | ||
2284 | #define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */ | ||
2285 | #define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */ | ||
2286 | #define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */ | ||
2260 | 2287 | ||
2261 | /* Bit masks for PLL_CTL */ | 2288 | /* Bit masks for PLL_CTL */ |
2262 | 2289 | ||
diff --git a/include/asm-blackfin/mach-bf548/irq.h b/include/asm-blackfin/mach-bf548/irq.h index 9fb7bc5399a8..c34507a3f1df 100644 --- a/include/asm-blackfin/mach-bf548/irq.h +++ b/include/asm-blackfin/mach-bf548/irq.h | |||
@@ -88,7 +88,7 @@ Events (highest priority) EMU 0 | |||
88 | #define IRQ_PINT1 BFIN_IRQ(20) /* PINT1 Interrupt */ | 88 | #define IRQ_PINT1 BFIN_IRQ(20) /* PINT1 Interrupt */ |
89 | #define IRQ_MDMAS0 BFIN_IRQ(21) /* MDMA Stream 0 Interrupt */ | 89 | #define IRQ_MDMAS0 BFIN_IRQ(21) /* MDMA Stream 0 Interrupt */ |
90 | #define IRQ_MDMAS1 BFIN_IRQ(22) /* MDMA Stream 1 Interrupt */ | 90 | #define IRQ_MDMAS1 BFIN_IRQ(22) /* MDMA Stream 1 Interrupt */ |
91 | #define IRQ_WATCHDOG BFIN_IRQ(23) /* Watchdog Interrupt */ | 91 | #define IRQ_WATCH BFIN_IRQ(23) /* Watchdog Interrupt */ |
92 | #define IRQ_DMAC1_ERROR BFIN_IRQ(24) /* DMAC1 Status (Error) Interrupt */ | 92 | #define IRQ_DMAC1_ERROR BFIN_IRQ(24) /* DMAC1 Status (Error) Interrupt */ |
93 | #define IRQ_SPORT2_ERROR BFIN_IRQ(25) /* SPORT2 Error Interrupt */ | 93 | #define IRQ_SPORT2_ERROR BFIN_IRQ(25) /* SPORT2 Error Interrupt */ |
94 | #define IRQ_SPORT3_ERROR BFIN_IRQ(26) /* SPORT3 Error Interrupt */ | 94 | #define IRQ_SPORT3_ERROR BFIN_IRQ(26) /* SPORT3 Error Interrupt */ |
@@ -406,7 +406,7 @@ Events (highest priority) EMU 0 | |||
406 | #define IRQ_PINT1_POS 16 | 406 | #define IRQ_PINT1_POS 16 |
407 | #define IRQ_MDMAS0_POS 20 | 407 | #define IRQ_MDMAS0_POS 20 |
408 | #define IRQ_MDMAS1_POS 24 | 408 | #define IRQ_MDMAS1_POS 24 |
409 | #define IRQ_WATCHDOG_POS 28 | 409 | #define IRQ_WATCH_POS 28 |
410 | 410 | ||
411 | /* IAR3 BIT FIELDS */ | 411 | /* IAR3 BIT FIELDS */ |
412 | #define IRQ_DMAC1_ERR_POS 0 | 412 | #define IRQ_DMAC1_ERR_POS 0 |
diff --git a/include/asm-blackfin/mach-bf548/mem_init.h b/include/asm-blackfin/mach-bf548/mem_init.h index 0cb279e973d7..befc2903d5a5 100644 --- a/include/asm-blackfin/mach-bf548/mem_init.h +++ b/include/asm-blackfin/mach-bf548/mem_init.h | |||
@@ -28,8 +28,68 @@ | |||
28 | * If not, write to the Free Software Foundation, | 28 | * If not, write to the Free Software Foundation, |
29 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 29 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
30 | */ | 30 | */ |
31 | #define MIN_DDR_SCLK(x) (x*(CONFIG_SCLK_HZ/1000/1000)/1000 + 1) | ||
32 | |||
33 | #if (CONFIG_MEM_MT46V32M16_6T) | ||
34 | #define DDR_SIZE DEVSZ_512 | ||
35 | #define DDR_WIDTH DEVWD_16 | ||
36 | |||
37 | #define DDR_tRC DDR_TRC(MIN_DDR_SCLK(60)) | ||
38 | #define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(42)) | ||
39 | #define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15)) | ||
40 | #define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(72)) | ||
41 | #define DDR_tREFI DDR_TREFI(MIN_DDR_SCLK(7800)) | ||
42 | |||
43 | #define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15)) | ||
44 | #define DDR_tWTR DDR_TWTR(1) | ||
45 | #define DDR_tMRD DDR_TMRD(MIN_DDR_SCLK(12)) | ||
46 | #define DDR_tWR DDR_TWR(MIN_DDR_SCLK(15)) | ||
47 | #endif | ||
48 | |||
49 | #if (CONFIG_MEM_MT46V32M16_5B) | ||
50 | #define DDR_SIZE DEVSZ_512 | ||
51 | #define DDR_WIDTH DEVWD_16 | ||
52 | |||
53 | #define DDR_tRC DDR_TRC(MIN_DDR_SCLK(55)) | ||
54 | #define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(40)) | ||
55 | #define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15)) | ||
56 | #define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(70)) | ||
57 | #define DDR_tREFI DDR_TREFI(MIN_DDR_SCLK(7800)) | ||
58 | |||
59 | #define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15)) | ||
60 | #define DDR_tWTR DDR_TWTR(2) | ||
61 | #define DDR_tMRD DDR_TMRD(MIN_DDR_SCLK(10)) | ||
62 | #define DDR_tWR DDR_TWR(MIN_DDR_SCLK(15)) | ||
63 | #endif | ||
64 | |||
65 | #if (CONFIG_MEM_GENERIC_BOARD) | ||
66 | #define DDR_SIZE DEVSZ_512 | ||
67 | #define DDR_WIDTH DEVWD_16 | ||
68 | |||
69 | #define DDR_tRCD DDR_TRCD(3) | ||
70 | #define DDR_tWTR DDR_TWTR(2) | ||
71 | #define DDR_tWR DDR_TWR(2) | ||
72 | #define DDR_tMRD DDR_TMRD(2) | ||
73 | #define DDR_tRP DDR_TRP(3) | ||
74 | #define DDR_tRAS DDR_TRAS(7) | ||
75 | #define DDR_tRC DDR_TRC(10) | ||
76 | #define DDR_tRFC DDR_TRFC(12) | ||
77 | #define DDR_tREFI DDR_TREFI(1288) | ||
78 | #endif | ||
79 | |||
80 | #if (CONFIG_SCLK_HZ <= 133333333) | ||
81 | #define DDR_CL CL_2 | ||
82 | #elif (CONFIG_SCLK_HZ <= 166666666) | ||
83 | #define DDR_CL CL_2_5 | ||
84 | #else | ||
85 | #define DDR_CL CL_3 | ||
86 | #endif | ||
87 | |||
88 | #define mem_DDRCTL0 (DDR_tRP | DDR_tRAS | DDR_tRC | DDR_tRFC | DDR_tREFI) | ||
89 | #define mem_DDRCTL1 (DDR_DATWIDTH | EXTBANK_1 | DDR_SIZE | DDR_WIDTH | DDR_tWTR \ | ||
90 | | DDR_tMRD | DDR_tWR | DDR_tRCD) | ||
91 | #define mem_DDRCTL2 DDR_CL | ||
31 | 92 | ||
32 | #if (CONFIG_MEM_MT46V32M16) | ||
33 | 93 | ||
34 | #if defined CONFIG_CLKIN_HALF | 94 | #if defined CONFIG_CLKIN_HALF |
35 | #define CLKIN_HALF 1 | 95 | #define CLKIN_HALF 1 |
diff --git a/include/asm-blackfin/mach-bf548/portmux.h b/include/asm-blackfin/mach-bf548/portmux.h index 6b485120015f..8177a567dcdb 100644 --- a/include/asm-blackfin/mach-bf548/portmux.h +++ b/include/asm-blackfin/mach-bf548/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES MAX_BLACKFIN_GPIOS | ||
5 | |||
4 | #define P_SPORT2_TFS (P_DEFINED | P_IDENT(GPIO_PA0) | P_FUNCT(0)) | 6 | #define P_SPORT2_TFS (P_DEFINED | P_IDENT(GPIO_PA0) | P_FUNCT(0)) |
5 | #define P_SPORT2_DTSEC (P_DEFINED | P_IDENT(GPIO_PA1) | P_FUNCT(0)) | 7 | #define P_SPORT2_DTSEC (P_DEFINED | P_IDENT(GPIO_PA1) | P_FUNCT(0)) |
6 | #define P_SPORT2_DTPRI (P_DEFINED | P_IDENT(GPIO_PA2) | P_FUNCT(0)) | 8 | #define P_SPORT2_DTPRI (P_DEFINED | P_IDENT(GPIO_PA2) | P_FUNCT(0)) |
diff --git a/include/asm-blackfin/mach-bf561/anomaly.h b/include/asm-blackfin/mach-bf561/anomaly.h index bed956456884..0c1d46193939 100644 --- a/include/asm-blackfin/mach-bf561/anomaly.h +++ b/include/asm-blackfin/mach-bf561/anomaly.h | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision N, March 28, 2007; ADSP-BF561 Silicon Anomaly List | 10 | * - Revision O, 11/15/2007; ADSP-BF561 Blackfin Processor Anomaly List |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | /* We do not support 0.1, 0.2, or 0.4 silicon - sorry */ | 16 | /* We do not support 0.1, 0.2, or 0.4 silicon - sorry */ |
17 | #if __SILICON_REVISION__ < 3 || __SILICON_REVISION__ == 4 | 17 | #if __SILICON_REVISION__ < 3 || __SILICON_REVISION__ == 4 |
18 | # error Kernel will not work on BF561 silicon version 0.0, 0.1, 0.2, or 0.4 | 18 | # error will not work on BF561 silicon version 0.0, 0.1, 0.2, or 0.4 |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */ | 21 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */ |
@@ -208,6 +208,8 @@ | |||
208 | #define ANOMALY_05000275 (__SILICON_REVISION__ > 2) | 208 | #define ANOMALY_05000275 (__SILICON_REVISION__ > 2) |
209 | /* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */ | 209 | /* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */ |
210 | #define ANOMALY_05000276 (__SILICON_REVISION__ < 5) | 210 | #define ANOMALY_05000276 (__SILICON_REVISION__ < 5) |
211 | /* Writes to an I/O data register one SCLK cycle after an edge is detected may clear interrupt */ | ||
212 | #define ANOMALY_05000277 (__SILICON_REVISION__ < 3) | ||
211 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ | 213 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ |
212 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 5) | 214 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 5) |
213 | /* False Hardware Error Exception When ISR Context Is Not Restored */ | 215 | /* False Hardware Error Exception When ISR Context Is Not Restored */ |
@@ -246,6 +248,18 @@ | |||
246 | #define ANOMALY_05000332 (__SILICON_REVISION__ < 5) | 248 | #define ANOMALY_05000332 (__SILICON_REVISION__ < 5) |
247 | /* Flag Data Register Writes One SCLK Cycle After Edge Is Detected May Clear Interrupt Status */ | 249 | /* Flag Data Register Writes One SCLK Cycle After Edge Is Detected May Clear Interrupt Status */ |
248 | #define ANOMALY_05000333 (__SILICON_REVISION__ < 5) | 250 | #define ANOMALY_05000333 (__SILICON_REVISION__ < 5) |
251 | /* New Feature: Additional PPI Frame Sync Sampling Options (Not Available on Older Silicon) */ | ||
252 | #define ANOMALY_05000339 (__SILICON_REVISION__ < 5) | ||
253 | /* Memory DMA FIFO Causes Throughput Degradation on Writes to External Memory */ | ||
254 | #define ANOMALY_05000343 (__SILICON_REVISION__ < 5) | ||
255 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
256 | #define ANOMALY_05000357 (1) | ||
257 | /* Conflicting Column Address Widths Causes SDRAM Errors */ | ||
258 | #define ANOMALY_05000362 (1) | ||
259 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
260 | #define ANOMALY_05000366 (1) | ||
261 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
262 | #define ANOMALY_05000371 (1) | ||
249 | 263 | ||
250 | /* Anomalies that don't exist on this proc */ | 264 | /* Anomalies that don't exist on this proc */ |
251 | #define ANOMALY_05000158 (0) | 265 | #define ANOMALY_05000158 (0) |
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h index 69b9f8e120e9..7871d4313f49 100644 --- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | |||
@@ -111,7 +111,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
111 | } | 111 | } |
112 | if (uart->rts_pin >= 0) { | 112 | if (uart->rts_pin >= 0) { |
113 | gpio_request(uart->rts_pin, DRIVER_NAME); | 113 | gpio_request(uart->rts_pin, DRIVER_NAME); |
114 | gpio_direction_input(uart->rts_pin); | 114 | gpio_direction_input(uart->rts_pin, 0); |
115 | } | 115 | } |
116 | #endif | 116 | #endif |
117 | } | 117 | } |
diff --git a/include/asm-blackfin/mach-bf561/portmux.h b/include/asm-blackfin/mach-bf561/portmux.h index 132ad31665e3..a6ee8206efb6 100644 --- a/include/asm-blackfin/mach-bf561/portmux.h +++ b/include/asm-blackfin/mach-bf561/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES MAX_BLACKFIN_GPIOS | ||
5 | |||
4 | #define P_PPI0_CLK (P_DONTCARE) | 6 | #define P_PPI0_CLK (P_DONTCARE) |
5 | #define P_PPI0_FS1 (P_DONTCARE) | 7 | #define P_PPI0_FS1 (P_DONTCARE) |
6 | #define P_PPI0_FS2 (P_DONTCARE) | 8 | #define P_PPI0_FS2 (P_DONTCARE) |
diff --git a/include/asm-blackfin/mmu.h b/include/asm-blackfin/mmu.h index 11d52f1167d0..757e43906ed4 100644 --- a/include/asm-blackfin/mmu.h +++ b/include/asm-blackfin/mmu.h | |||
@@ -24,7 +24,9 @@ typedef struct { | |||
24 | unsigned long exec_fdpic_loadmap; | 24 | unsigned long exec_fdpic_loadmap; |
25 | unsigned long interp_fdpic_loadmap; | 25 | unsigned long interp_fdpic_loadmap; |
26 | #endif | 26 | #endif |
27 | 27 | #ifdef CONFIG_MPU | |
28 | unsigned long *page_rwx_mask; | ||
29 | #endif | ||
28 | } mm_context_t; | 30 | } mm_context_t; |
29 | 31 | ||
30 | #endif | 32 | #endif |
diff --git a/include/asm-blackfin/mmu_context.h b/include/asm-blackfin/mmu_context.h index c5c71a6aaf19..b5eb67596ad5 100644 --- a/include/asm-blackfin/mmu_context.h +++ b/include/asm-blackfin/mmu_context.h | |||
@@ -30,9 +30,12 @@ | |||
30 | #ifndef __BLACKFIN_MMU_CONTEXT_H__ | 30 | #ifndef __BLACKFIN_MMU_CONTEXT_H__ |
31 | #define __BLACKFIN_MMU_CONTEXT_H__ | 31 | #define __BLACKFIN_MMU_CONTEXT_H__ |
32 | 32 | ||
33 | #include <linux/gfp.h> | ||
34 | #include <linux/sched.h> | ||
33 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
34 | #include <asm/page.h> | 36 | #include <asm/page.h> |
35 | #include <asm/pgalloc.h> | 37 | #include <asm/pgalloc.h> |
38 | #include <asm/cplbinit.h> | ||
36 | 39 | ||
37 | extern void *current_l1_stack_save; | 40 | extern void *current_l1_stack_save; |
38 | extern int nr_l1stack_tasks; | 41 | extern int nr_l1stack_tasks; |
@@ -50,6 +53,12 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
50 | static inline int | 53 | static inline int |
51 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 54 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
52 | { | 55 | { |
56 | #ifdef CONFIG_MPU | ||
57 | unsigned long p = __get_free_pages(GFP_KERNEL, page_mask_order); | ||
58 | mm->context.page_rwx_mask = (unsigned long *)p; | ||
59 | memset(mm->context.page_rwx_mask, 0, | ||
60 | page_mask_nelts * 3 * sizeof(long)); | ||
61 | #endif | ||
53 | return 0; | 62 | return 0; |
54 | } | 63 | } |
55 | 64 | ||
@@ -73,6 +82,11 @@ static inline void destroy_context(struct mm_struct *mm) | |||
73 | sram_free(tmp->addr); | 82 | sram_free(tmp->addr); |
74 | kfree(tmp); | 83 | kfree(tmp); |
75 | } | 84 | } |
85 | #ifdef CONFIG_MPU | ||
86 | if (current_rwx_mask == mm->context.page_rwx_mask) | ||
87 | current_rwx_mask = NULL; | ||
88 | free_pages((unsigned long)mm->context.page_rwx_mask, page_mask_order); | ||
89 | #endif | ||
76 | } | 90 | } |
77 | 91 | ||
78 | static inline unsigned long | 92 | static inline unsigned long |
@@ -106,9 +120,21 @@ activate_l1stack(struct mm_struct *mm, unsigned long sp_base) | |||
106 | 120 | ||
107 | #define deactivate_mm(tsk,mm) do { } while (0) | 121 | #define deactivate_mm(tsk,mm) do { } while (0) |
108 | 122 | ||
109 | static inline void activate_mm(struct mm_struct *prev_mm, | 123 | #define activate_mm(prev, next) switch_mm(prev, next, NULL) |
110 | struct mm_struct *next_mm) | 124 | |
125 | static inline void switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm, | ||
126 | struct task_struct *tsk) | ||
111 | { | 127 | { |
128 | if (prev_mm == next_mm) | ||
129 | return; | ||
130 | #ifdef CONFIG_MPU | ||
131 | if (prev_mm->context.page_rwx_mask == current_rwx_mask) { | ||
132 | flush_switched_cplbs(); | ||
133 | set_mask_dcplbs(next_mm->context.page_rwx_mask); | ||
134 | } | ||
135 | #endif | ||
136 | |||
137 | /* L1 stack switching. */ | ||
112 | if (!next_mm->context.l1_stack_save) | 138 | if (!next_mm->context.l1_stack_save) |
113 | return; | 139 | return; |
114 | if (next_mm->context.l1_stack_save == current_l1_stack_save) | 140 | if (next_mm->context.l1_stack_save == current_l1_stack_save) |
@@ -120,10 +146,36 @@ static inline void activate_mm(struct mm_struct *prev_mm, | |||
120 | memcpy(l1_stack_base, current_l1_stack_save, l1_stack_len); | 146 | memcpy(l1_stack_base, current_l1_stack_save, l1_stack_len); |
121 | } | 147 | } |
122 | 148 | ||
123 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 149 | #ifdef CONFIG_MPU |
124 | struct task_struct *tsk) | 150 | static inline void protect_page(struct mm_struct *mm, unsigned long addr, |
151 | unsigned long flags) | ||
152 | { | ||
153 | unsigned long *mask = mm->context.page_rwx_mask; | ||
154 | unsigned long page = addr >> 12; | ||
155 | unsigned long idx = page >> 5; | ||
156 | unsigned long bit = 1 << (page & 31); | ||
157 | |||
158 | if (flags & VM_MAYREAD) | ||
159 | mask[idx] |= bit; | ||
160 | else | ||
161 | mask[idx] &= ~bit; | ||
162 | mask += page_mask_nelts; | ||
163 | if (flags & VM_MAYWRITE) | ||
164 | mask[idx] |= bit; | ||
165 | else | ||
166 | mask[idx] &= ~bit; | ||
167 | mask += page_mask_nelts; | ||
168 | if (flags & VM_MAYEXEC) | ||
169 | mask[idx] |= bit; | ||
170 | else | ||
171 | mask[idx] &= ~bit; | ||
172 | } | ||
173 | |||
174 | static inline void update_protections(struct mm_struct *mm) | ||
125 | { | 175 | { |
126 | activate_mm(prev, next); | 176 | flush_switched_cplbs(); |
177 | set_mask_dcplbs(mm->context.page_rwx_mask); | ||
127 | } | 178 | } |
179 | #endif | ||
128 | 180 | ||
129 | #endif | 181 | #endif |
diff --git a/include/asm-blackfin/traps.h b/include/asm-blackfin/traps.h index ee1cbf73a9ab..f0e5f940d9ca 100644 --- a/include/asm-blackfin/traps.h +++ b/include/asm-blackfin/traps.h | |||
@@ -45,6 +45,10 @@ | |||
45 | #define VEC_CPLB_I_M (44) | 45 | #define VEC_CPLB_I_M (44) |
46 | #define VEC_CPLB_I_MHIT (45) | 46 | #define VEC_CPLB_I_MHIT (45) |
47 | #define VEC_ILL_RES (46) /* including unvalid supervisor mode insn */ | 47 | #define VEC_ILL_RES (46) /* including unvalid supervisor mode insn */ |
48 | /* The hardware reserves (63) for future use - we use it to tell our | ||
49 | * normal exception handling code we have a hardware error | ||
50 | */ | ||
51 | #define VEC_HWERR (63) | ||
48 | 52 | ||
49 | #ifndef __ASSEMBLY__ | 53 | #ifndef __ASSEMBLY__ |
50 | 54 | ||
diff --git a/include/asm-blackfin/uaccess.h b/include/asm-blackfin/uaccess.h index 2233f8f9314d..22a410b8003b 100644 --- a/include/asm-blackfin/uaccess.h +++ b/include/asm-blackfin/uaccess.h | |||
@@ -31,7 +31,7 @@ static inline void set_fs(mm_segment_t fs) | |||
31 | #define VERIFY_READ 0 | 31 | #define VERIFY_READ 0 |
32 | #define VERIFY_WRITE 1 | 32 | #define VERIFY_WRITE 1 |
33 | 33 | ||
34 | #define access_ok(type,addr,size) _access_ok((unsigned long)(addr),(size)) | 34 | #define access_ok(type, addr, size) _access_ok((unsigned long)(addr), (size)) |
35 | 35 | ||
36 | static inline int is_in_rom(unsigned long addr) | 36 | static inline int is_in_rom(unsigned long addr) |
37 | { | 37 | { |
diff --git a/include/asm-blackfin/unistd.h b/include/asm-blackfin/unistd.h index 07ffe8b718c5..e98167358d26 100644 --- a/include/asm-blackfin/unistd.h +++ b/include/asm-blackfin/unistd.h | |||
@@ -369,8 +369,9 @@ | |||
369 | #define __NR_set_robust_list 354 | 369 | #define __NR_set_robust_list 354 |
370 | #define __NR_get_robust_list 355 | 370 | #define __NR_get_robust_list 355 |
371 | #define __NR_fallocate 356 | 371 | #define __NR_fallocate 356 |
372 | #define __NR_semtimedop 357 | ||
372 | 373 | ||
373 | #define __NR_syscall 357 | 374 | #define __NR_syscall 358 |
374 | #define NR_syscalls __NR_syscall | 375 | #define NR_syscalls __NR_syscall |
375 | 376 | ||
376 | /* Old optional stuff no one actually uses */ | 377 | /* Old optional stuff no one actually uses */ |
diff --git a/include/asm-s390/airq.h b/include/asm-s390/airq.h new file mode 100644 index 000000000000..41d028cb52a4 --- /dev/null +++ b/include/asm-s390/airq.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * include/asm-s390/airq.h | ||
3 | * | ||
4 | * Copyright IBM Corp. 2002,2007 | ||
5 | * Author(s): Ingo Adlung <adlung@de.ibm.com> | ||
6 | * Cornelia Huck <cornelia.huck@de.ibm.com> | ||
7 | * Arnd Bergmann <arndb@de.ibm.com> | ||
8 | * Peter Oberparleiter <peter.oberparleiter@de.ibm.com> | ||
9 | */ | ||
10 | |||
11 | #ifndef _ASM_S390_AIRQ_H | ||
12 | #define _ASM_S390_AIRQ_H | ||
13 | |||
14 | typedef void (*adapter_int_handler_t)(void *, void *); | ||
15 | |||
16 | void *s390_register_adapter_interrupt(adapter_int_handler_t, void *); | ||
17 | void s390_unregister_adapter_interrupt(void *); | ||
18 | |||
19 | #endif /* _ASM_S390_AIRQ_H */ | ||
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h index 2f08c16e44ad..123b557c3ff4 100644 --- a/include/asm-s390/cio.h +++ b/include/asm-s390/cio.h | |||
@@ -24,8 +24,8 @@ | |||
24 | * @fmt: format | 24 | * @fmt: format |
25 | * @pfch: prefetch | 25 | * @pfch: prefetch |
26 | * @isic: initial-status interruption control | 26 | * @isic: initial-status interruption control |
27 | * @alcc: adress-limit checking control | 27 | * @alcc: address-limit checking control |
28 | * @ssi: supress-suspended interruption | 28 | * @ssi: suppress-suspended interruption |
29 | * @zcc: zero condition code | 29 | * @zcc: zero condition code |
30 | * @ectl: extended control | 30 | * @ectl: extended control |
31 | * @pno: path not operational | 31 | * @pno: path not operational |
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h index 604f68fa6f56..3f002e13d024 100644 --- a/include/asm-s390/dasd.h +++ b/include/asm-s390/dasd.h | |||
@@ -105,7 +105,7 @@ typedef struct dasd_information_t { | |||
105 | } dasd_information_t; | 105 | } dasd_information_t; |
106 | 106 | ||
107 | /* | 107 | /* |
108 | * Read Subsystem Data - Perfomance Statistics | 108 | * Read Subsystem Data - Performance Statistics |
109 | */ | 109 | */ |
110 | typedef struct dasd_rssd_perf_stats_t { | 110 | typedef struct dasd_rssd_perf_stats_t { |
111 | unsigned char invalid:1; | 111 | unsigned char invalid:1; |
diff --git a/include/asm-s390/ipl.h b/include/asm-s390/ipl.h index 2c40fd3a137f..c1b2e50392bb 100644 --- a/include/asm-s390/ipl.h +++ b/include/asm-s390/ipl.h | |||
@@ -83,6 +83,8 @@ extern u32 dump_prefix_page; | |||
83 | extern unsigned int zfcpdump_prefix_array[]; | 83 | extern unsigned int zfcpdump_prefix_array[]; |
84 | 84 | ||
85 | extern void do_reipl(void); | 85 | extern void do_reipl(void); |
86 | extern void do_halt(void); | ||
87 | extern void do_poff(void); | ||
86 | extern void ipl_save_parameters(void); | 88 | extern void ipl_save_parameters(void); |
87 | 89 | ||
88 | enum { | 90 | enum { |
@@ -118,7 +120,7 @@ struct ipl_info | |||
118 | }; | 120 | }; |
119 | 121 | ||
120 | extern struct ipl_info ipl_info; | 122 | extern struct ipl_info ipl_info; |
121 | extern void setup_ipl_info(void); | 123 | extern void setup_ipl(void); |
122 | 124 | ||
123 | /* | 125 | /* |
124 | * DIAG 308 support | 126 | * DIAG 308 support |
@@ -141,6 +143,10 @@ enum diag308_opt { | |||
141 | DIAG308_IPL_OPT_DUMP = 0x20, | 143 | DIAG308_IPL_OPT_DUMP = 0x20, |
142 | }; | 144 | }; |
143 | 145 | ||
146 | enum diag308_flags { | ||
147 | DIAG308_FLAGS_LP_VALID = 0x80, | ||
148 | }; | ||
149 | |||
144 | enum diag308_rc { | 150 | enum diag308_rc { |
145 | DIAG308_RC_OK = 1, | 151 | DIAG308_RC_OK = 1, |
146 | }; | 152 | }; |
diff --git a/include/asm-s390/mmu_context.h b/include/asm-s390/mmu_context.h index 05b842126b99..a77d4ba3c8eb 100644 --- a/include/asm-s390/mmu_context.h +++ b/include/asm-s390/mmu_context.h | |||
@@ -12,10 +12,15 @@ | |||
12 | #include <asm/pgalloc.h> | 12 | #include <asm/pgalloc.h> |
13 | #include <asm-generic/mm_hooks.h> | 13 | #include <asm-generic/mm_hooks.h> |
14 | 14 | ||
15 | /* | 15 | static inline int init_new_context(struct task_struct *tsk, |
16 | * get a new mmu context.. S390 don't know about contexts. | 16 | struct mm_struct *mm) |
17 | */ | 17 | { |
18 | #define init_new_context(tsk,mm) 0 | 18 | mm->context = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS; |
19 | #ifdef CONFIG_64BIT | ||
20 | mm->context |= _ASCE_TYPE_REGION3; | ||
21 | #endif | ||
22 | return 0; | ||
23 | } | ||
19 | 24 | ||
20 | #define destroy_context(mm) do { } while (0) | 25 | #define destroy_context(mm) do { } while (0) |
21 | 26 | ||
@@ -27,19 +32,11 @@ | |||
27 | 32 | ||
28 | static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk) | 33 | static inline void update_mm(struct mm_struct *mm, struct task_struct *tsk) |
29 | { | 34 | { |
30 | pgd_t *pgd = mm->pgd; | 35 | S390_lowcore.user_asce = mm->context | __pa(mm->pgd); |
31 | unsigned long asce_bits; | ||
32 | |||
33 | /* Calculate asce bits from the first pgd table entry. */ | ||
34 | asce_bits = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS; | ||
35 | #ifdef CONFIG_64BIT | ||
36 | asce_bits |= _ASCE_TYPE_REGION3; | ||
37 | #endif | ||
38 | S390_lowcore.user_asce = asce_bits | __pa(pgd); | ||
39 | if (switch_amode) { | 36 | if (switch_amode) { |
40 | /* Load primary space page table origin. */ | 37 | /* Load primary space page table origin. */ |
41 | pgd_t *shadow_pgd = get_shadow_table(pgd) ? : pgd; | 38 | pgd_t *shadow_pgd = get_shadow_table(mm->pgd) ? : mm->pgd; |
42 | S390_lowcore.user_exec_asce = asce_bits | __pa(shadow_pgd); | 39 | S390_lowcore.user_exec_asce = mm->context | __pa(shadow_pgd); |
43 | asm volatile(LCTL_OPCODE" 1,1,%0\n" | 40 | asm volatile(LCTL_OPCODE" 1,1,%0\n" |
44 | : : "m" (S390_lowcore.user_exec_asce) ); | 41 | : : "m" (S390_lowcore.user_exec_asce) ); |
45 | } else | 42 | } else |
diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 1f530f8a6280..79b9eab1a0c7 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h | |||
@@ -104,41 +104,27 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
104 | 104 | ||
105 | #ifndef __ASSEMBLY__ | 105 | #ifndef __ASSEMBLY__ |
106 | /* | 106 | /* |
107 | * Just any arbitrary offset to the start of the vmalloc VM area: the | 107 | * The vmalloc area will always be on the topmost area of the kernel |
108 | * current 8MB value just means that there will be a 8MB "hole" after the | 108 | * mapping. We reserve 96MB (31bit) / 1GB (64bit) for vmalloc, |
109 | * physical memory until the kernel virtual memory starts. That means that | 109 | * which should be enough for any sane case. |
110 | * any out-of-bounds memory accesses will hopefully be caught. | 110 | * By putting vmalloc at the top, we maximise the gap between physical |
111 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | 111 | * memory and vmalloc to catch misplaced memory accesses. As a side |
112 | * area for the same reason. ;) | 112 | * effect, this also makes sure that 64 bit module code cannot be used |
113 | * vmalloc area starts at 4GB to prevent syscall table entry exchanging | 113 | * as system call address. |
114 | * from modules. | ||
115 | */ | ||
116 | extern unsigned long vmalloc_end; | ||
117 | |||
118 | #ifdef CONFIG_64BIT | ||
119 | #define VMALLOC_ADDR (max(0x100000000UL, (unsigned long) high_memory)) | ||
120 | #else | ||
121 | #define VMALLOC_ADDR ((unsigned long) high_memory) | ||
122 | #endif | ||
123 | #define VMALLOC_OFFSET (8*1024*1024) | ||
124 | #define VMALLOC_START ((VMALLOC_ADDR + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) | ||
125 | #define VMALLOC_END vmalloc_end | ||
126 | |||
127 | /* | ||
128 | * We need some free virtual space to be able to do vmalloc. | ||
129 | * VMALLOC_MIN_SIZE defines the minimum size of the vmalloc | ||
130 | * area. On a machine with 2GB memory we make sure that we | ||
131 | * have at least 128MB free space for vmalloc. On a machine | ||
132 | * with 4TB we make sure we have at least 128GB. | ||
133 | */ | 114 | */ |
134 | #ifndef __s390x__ | 115 | #ifndef __s390x__ |
135 | #define VMALLOC_MIN_SIZE 0x8000000UL | 116 | #define VMALLOC_START 0x78000000UL |
136 | #define VMALLOC_END_INIT 0x80000000UL | 117 | #define VMALLOC_END 0x7e000000UL |
118 | #define VMEM_MAP_MAX 0x80000000UL | ||
137 | #else /* __s390x__ */ | 119 | #else /* __s390x__ */ |
138 | #define VMALLOC_MIN_SIZE 0x2000000000UL | 120 | #define VMALLOC_START 0x3e000000000UL |
139 | #define VMALLOC_END_INIT 0x40000000000UL | 121 | #define VMALLOC_END 0x3e040000000UL |
122 | #define VMEM_MAP_MAX 0x40000000000UL | ||
140 | #endif /* __s390x__ */ | 123 | #endif /* __s390x__ */ |
141 | 124 | ||
125 | #define VMEM_MAP ((struct page *) VMALLOC_END) | ||
126 | #define VMEM_MAP_SIZE ((VMALLOC_START / PAGE_SIZE) * sizeof(struct page)) | ||
127 | |||
142 | /* | 128 | /* |
143 | * A 31 bit pagetable entry of S390 has following format: | 129 | * A 31 bit pagetable entry of S390 has following format: |
144 | * | PFRA | | OS | | 130 | * | PFRA | | OS | |
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index 21d40a19355e..c86b982aef5a 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h | |||
@@ -59,9 +59,6 @@ extern void s390_adjust_jiffies(void); | |||
59 | extern void print_cpu_info(struct cpuinfo_S390 *); | 59 | extern void print_cpu_info(struct cpuinfo_S390 *); |
60 | extern int get_cpu_capability(unsigned int *); | 60 | extern int get_cpu_capability(unsigned int *); |
61 | 61 | ||
62 | /* Lazy FPU handling on uni-processor */ | ||
63 | extern struct task_struct *last_task_used_math; | ||
64 | |||
65 | /* | 62 | /* |
66 | * User space process size: 2GB for 31 bit, 4TB for 64 bit. | 63 | * User space process size: 2GB for 31 bit, 4TB for 64 bit. |
67 | */ | 64 | */ |
@@ -95,7 +92,6 @@ struct thread_struct { | |||
95 | unsigned long ksp; /* kernel stack pointer */ | 92 | unsigned long ksp; /* kernel stack pointer */ |
96 | mm_segment_t mm_segment; | 93 | mm_segment_t mm_segment; |
97 | unsigned long prot_addr; /* address of protection-excep. */ | 94 | unsigned long prot_addr; /* address of protection-excep. */ |
98 | unsigned int error_code; /* error-code of last prog-excep. */ | ||
99 | unsigned int trap_no; | 95 | unsigned int trap_no; |
100 | per_struct per_info; | 96 | per_struct per_info; |
101 | /* Used to give failing instruction back to user for ieee exceptions */ | 97 | /* Used to give failing instruction back to user for ieee exceptions */ |
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h index 332ee73688fc..61f6952f2e35 100644 --- a/include/asm-s390/ptrace.h +++ b/include/asm-s390/ptrace.h | |||
@@ -465,6 +465,14 @@ struct user_regs_struct | |||
465 | #ifdef __KERNEL__ | 465 | #ifdef __KERNEL__ |
466 | #define __ARCH_SYS_PTRACE 1 | 466 | #define __ARCH_SYS_PTRACE 1 |
467 | 467 | ||
468 | /* | ||
469 | * These are defined as per linux/ptrace.h, which see. | ||
470 | */ | ||
471 | #define arch_has_single_step() (1) | ||
472 | struct task_struct; | ||
473 | extern void user_enable_single_step(struct task_struct *); | ||
474 | extern void user_disable_single_step(struct task_struct *); | ||
475 | |||
468 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) | 476 | #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) |
469 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) | 477 | #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) |
470 | #define regs_return_value(regs)((regs)->gprs[2]) | 478 | #define regs_return_value(regs)((regs)->gprs[2]) |
diff --git a/include/asm-s390/qdio.h b/include/asm-s390/qdio.h index 74db1dc10a7d..4b8ff55f680e 100644 --- a/include/asm-s390/qdio.h +++ b/include/asm-s390/qdio.h | |||
@@ -184,7 +184,7 @@ struct qdr { | |||
184 | #endif /* QDIO_32_BIT */ | 184 | #endif /* QDIO_32_BIT */ |
185 | unsigned long qiba; /* queue-information-block address */ | 185 | unsigned long qiba; /* queue-information-block address */ |
186 | unsigned int res8; /* reserved */ | 186 | unsigned int res8; /* reserved */ |
187 | unsigned int qkey : 4; /* queue-informatio-block key */ | 187 | unsigned int qkey : 4; /* queue-information-block key */ |
188 | unsigned int res9 : 28; /* reserved */ | 188 | unsigned int res9 : 28; /* reserved */ |
189 | /* union _qd {*/ /* why this? */ | 189 | /* union _qd {*/ /* why this? */ |
190 | struct qdesfmt0 qdf0[126]; | 190 | struct qdesfmt0 qdf0[126]; |
diff --git a/include/asm-s390/rwsem.h b/include/asm-s390/rwsem.h index 90f4eccaa290..9d2a17971805 100644 --- a/include/asm-s390/rwsem.h +++ b/include/asm-s390/rwsem.h | |||
@@ -91,8 +91,8 @@ struct rw_semaphore { | |||
91 | #endif | 91 | #endif |
92 | 92 | ||
93 | #define __RWSEM_INITIALIZER(name) \ | 93 | #define __RWSEM_INITIALIZER(name) \ |
94 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \ | 94 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait.lock), \ |
95 | __RWSEM_DEP_MAP_INIT(name) } | 95 | LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) } |
96 | 96 | ||
97 | #define DECLARE_RWSEM(name) \ | 97 | #define DECLARE_RWSEM(name) \ |
98 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | 98 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) |
diff --git a/include/asm-s390/sclp.h b/include/asm-s390/sclp.h index cb9faf1ea5cf..b5f2843013a3 100644 --- a/include/asm-s390/sclp.h +++ b/include/asm-s390/sclp.h | |||
@@ -27,7 +27,25 @@ struct sclp_ipl_info { | |||
27 | char loadparm[LOADPARM_LEN]; | 27 | char loadparm[LOADPARM_LEN]; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | void sclp_readinfo_early(void); | 30 | struct sclp_cpu_entry { |
31 | u8 address; | ||
32 | u8 reserved0[13]; | ||
33 | u8 type; | ||
34 | u8 reserved1; | ||
35 | } __attribute__((packed)); | ||
36 | |||
37 | struct sclp_cpu_info { | ||
38 | unsigned int configured; | ||
39 | unsigned int standby; | ||
40 | unsigned int combined; | ||
41 | int has_cpu_type; | ||
42 | struct sclp_cpu_entry cpu[255]; | ||
43 | }; | ||
44 | |||
45 | int sclp_get_cpu_info(struct sclp_cpu_info *info); | ||
46 | int sclp_cpu_configure(u8 cpu); | ||
47 | int sclp_cpu_deconfigure(u8 cpu); | ||
48 | void sclp_read_info_early(void); | ||
31 | void sclp_facilities_detect(void); | 49 | void sclp_facilities_detect(void); |
32 | unsigned long long sclp_memory_detect(void); | 50 | unsigned long long sclp_memory_detect(void); |
33 | int sclp_sdias_blk_count(void); | 51 | int sclp_sdias_blk_count(void); |
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index 07708c07701e..c7b74326a527 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h | |||
@@ -35,8 +35,6 @@ extern void machine_restart_smp(char *); | |||
35 | extern void machine_halt_smp(void); | 35 | extern void machine_halt_smp(void); |
36 | extern void machine_power_off_smp(void); | 36 | extern void machine_power_off_smp(void); |
37 | 37 | ||
38 | extern void smp_setup_cpu_possible_map(void); | ||
39 | |||
40 | #define NO_PROC_ID 0xFF /* No processor magic marker */ | 38 | #define NO_PROC_ID 0xFF /* No processor magic marker */ |
41 | 39 | ||
42 | /* | 40 | /* |
@@ -92,6 +90,8 @@ extern void __cpu_die (unsigned int cpu); | |||
92 | extern void cpu_die (void) __attribute__ ((noreturn)); | 90 | extern void cpu_die (void) __attribute__ ((noreturn)); |
93 | extern int __cpu_up (unsigned int cpu); | 91 | extern int __cpu_up (unsigned int cpu); |
94 | 92 | ||
93 | extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *), | ||
94 | void *info, int wait); | ||
95 | #endif | 95 | #endif |
96 | 96 | ||
97 | #ifndef CONFIG_SMP | 97 | #ifndef CONFIG_SMP |
@@ -103,7 +103,6 @@ static inline void smp_send_stop(void) | |||
103 | 103 | ||
104 | #define hard_smp_processor_id() 0 | 104 | #define hard_smp_processor_id() 0 |
105 | #define smp_cpu_not_running(cpu) 1 | 105 | #define smp_cpu_not_running(cpu) 1 |
106 | #define smp_setup_cpu_possible_map() do { } while (0) | ||
107 | #endif | 106 | #endif |
108 | 107 | ||
109 | extern union save_area *zfcpdump_save_areas[NR_CPUS + 1]; | 108 | extern union save_area *zfcpdump_save_areas[NR_CPUS + 1]; |
diff --git a/include/asm-s390/spinlock.h b/include/asm-s390/spinlock.h index 3fd43826fd0b..df84ae96915f 100644 --- a/include/asm-s390/spinlock.h +++ b/include/asm-s390/spinlock.h | |||
@@ -53,44 +53,48 @@ _raw_compare_and_swap(volatile unsigned int *lock, | |||
53 | */ | 53 | */ |
54 | 54 | ||
55 | #define __raw_spin_is_locked(x) ((x)->owner_cpu != 0) | 55 | #define __raw_spin_is_locked(x) ((x)->owner_cpu != 0) |
56 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) | ||
57 | #define __raw_spin_unlock_wait(lock) \ | 56 | #define __raw_spin_unlock_wait(lock) \ |
58 | do { while (__raw_spin_is_locked(lock)) \ | 57 | do { while (__raw_spin_is_locked(lock)) \ |
59 | _raw_spin_relax(lock); } while (0) | 58 | _raw_spin_relax(lock); } while (0) |
60 | 59 | ||
61 | extern void _raw_spin_lock_wait(raw_spinlock_t *, unsigned int pc); | 60 | extern void _raw_spin_lock_wait(raw_spinlock_t *); |
62 | extern int _raw_spin_trylock_retry(raw_spinlock_t *, unsigned int pc); | 61 | extern void _raw_spin_lock_wait_flags(raw_spinlock_t *, unsigned long flags); |
62 | extern int _raw_spin_trylock_retry(raw_spinlock_t *); | ||
63 | extern void _raw_spin_relax(raw_spinlock_t *lock); | 63 | extern void _raw_spin_relax(raw_spinlock_t *lock); |
64 | 64 | ||
65 | static inline void __raw_spin_lock(raw_spinlock_t *lp) | 65 | static inline void __raw_spin_lock(raw_spinlock_t *lp) |
66 | { | 66 | { |
67 | unsigned long pc = 1 | (unsigned long) __builtin_return_address(0); | ||
68 | int old; | 67 | int old; |
69 | 68 | ||
70 | old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); | 69 | old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); |
71 | if (likely(old == 0)) { | 70 | if (likely(old == 0)) |
72 | lp->owner_pc = pc; | ||
73 | return; | 71 | return; |
74 | } | 72 | _raw_spin_lock_wait(lp); |
75 | _raw_spin_lock_wait(lp, pc); | 73 | } |
74 | |||
75 | static inline void __raw_spin_lock_flags(raw_spinlock_t *lp, | ||
76 | unsigned long flags) | ||
77 | { | ||
78 | int old; | ||
79 | |||
80 | old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); | ||
81 | if (likely(old == 0)) | ||
82 | return; | ||
83 | _raw_spin_lock_wait_flags(lp, flags); | ||
76 | } | 84 | } |
77 | 85 | ||
78 | static inline int __raw_spin_trylock(raw_spinlock_t *lp) | 86 | static inline int __raw_spin_trylock(raw_spinlock_t *lp) |
79 | { | 87 | { |
80 | unsigned long pc = 1 | (unsigned long) __builtin_return_address(0); | ||
81 | int old; | 88 | int old; |
82 | 89 | ||
83 | old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); | 90 | old = _raw_compare_and_swap(&lp->owner_cpu, 0, ~smp_processor_id()); |
84 | if (likely(old == 0)) { | 91 | if (likely(old == 0)) |
85 | lp->owner_pc = pc; | ||
86 | return 1; | 92 | return 1; |
87 | } | 93 | return _raw_spin_trylock_retry(lp); |
88 | return _raw_spin_trylock_retry(lp, pc); | ||
89 | } | 94 | } |
90 | 95 | ||
91 | static inline void __raw_spin_unlock(raw_spinlock_t *lp) | 96 | static inline void __raw_spin_unlock(raw_spinlock_t *lp) |
92 | { | 97 | { |
93 | lp->owner_pc = 0; | ||
94 | _raw_compare_and_swap(&lp->owner_cpu, lp->owner_cpu, 0); | 98 | _raw_compare_and_swap(&lp->owner_cpu, lp->owner_cpu, 0); |
95 | } | 99 | } |
96 | 100 | ||
diff --git a/include/asm-s390/spinlock_types.h b/include/asm-s390/spinlock_types.h index b7ac13f7aa37..654abc40de04 100644 --- a/include/asm-s390/spinlock_types.h +++ b/include/asm-s390/spinlock_types.h | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | typedef struct { | 8 | typedef struct { |
9 | volatile unsigned int owner_cpu; | 9 | volatile unsigned int owner_cpu; |
10 | volatile unsigned int owner_pc; | ||
11 | } __attribute__ ((aligned (4))) raw_spinlock_t; | 10 | } __attribute__ ((aligned (4))) raw_spinlock_t; |
12 | 11 | ||
13 | #define __RAW_SPIN_LOCK_UNLOCKED { 0 } | 12 | #define __RAW_SPIN_LOCK_UNLOCKED { 0 } |
diff --git a/include/asm-s390/tlbflush.h b/include/asm-s390/tlbflush.h index a69bd2490d52..70fa5ae58180 100644 --- a/include/asm-s390/tlbflush.h +++ b/include/asm-s390/tlbflush.h | |||
@@ -42,11 +42,11 @@ static inline void __tlb_flush_global(void) | |||
42 | /* | 42 | /* |
43 | * Flush all tlb entries of a page table on all cpus. | 43 | * Flush all tlb entries of a page table on all cpus. |
44 | */ | 44 | */ |
45 | static inline void __tlb_flush_idte(pgd_t *pgd) | 45 | static inline void __tlb_flush_idte(unsigned long asce) |
46 | { | 46 | { |
47 | asm volatile( | 47 | asm volatile( |
48 | " .insn rrf,0xb98e0000,0,%0,%1,0" | 48 | " .insn rrf,0xb98e0000,0,%0,%1,0" |
49 | : : "a" (2048), "a" (__pa(pgd) & PAGE_MASK) : "cc" ); | 49 | : : "a" (2048), "a" (asce) : "cc" ); |
50 | } | 50 | } |
51 | 51 | ||
52 | static inline void __tlb_flush_mm(struct mm_struct * mm) | 52 | static inline void __tlb_flush_mm(struct mm_struct * mm) |
@@ -61,11 +61,11 @@ static inline void __tlb_flush_mm(struct mm_struct * mm) | |||
61 | * only ran on the local cpu. | 61 | * only ran on the local cpu. |
62 | */ | 62 | */ |
63 | if (MACHINE_HAS_IDTE) { | 63 | if (MACHINE_HAS_IDTE) { |
64 | pgd_t *shadow_pgd = get_shadow_table(mm->pgd); | 64 | pgd_t *shadow = get_shadow_table(mm->pgd); |
65 | 65 | ||
66 | if (shadow_pgd) | 66 | if (shadow) |
67 | __tlb_flush_idte(shadow_pgd); | 67 | __tlb_flush_idte((unsigned long) shadow | mm->context); |
68 | __tlb_flush_idte(mm->pgd); | 68 | __tlb_flush_idte((unsigned long) mm->pgd | mm->context); |
69 | return; | 69 | return; |
70 | } | 70 | } |
71 | preempt_disable(); | 71 | preempt_disable(); |
@@ -106,9 +106,23 @@ static inline void __tlb_flush_mm_cond(struct mm_struct * mm) | |||
106 | */ | 106 | */ |
107 | #define flush_tlb() do { } while (0) | 107 | #define flush_tlb() do { } while (0) |
108 | #define flush_tlb_all() do { } while (0) | 108 | #define flush_tlb_all() do { } while (0) |
109 | #define flush_tlb_mm(mm) __tlb_flush_mm_cond(mm) | ||
110 | #define flush_tlb_page(vma, addr) do { } while (0) | 109 | #define flush_tlb_page(vma, addr) do { } while (0) |
111 | #define flush_tlb_range(vma, start, end) __tlb_flush_mm_cond(mm) | 110 | |
112 | #define flush_tlb_kernel_range(start, end) __tlb_flush_mm(&init_mm) | 111 | static inline void flush_tlb_mm(struct mm_struct *mm) |
112 | { | ||
113 | __tlb_flush_mm_cond(mm); | ||
114 | } | ||
115 | |||
116 | static inline void flush_tlb_range(struct vm_area_struct *vma, | ||
117 | unsigned long start, unsigned long end) | ||
118 | { | ||
119 | __tlb_flush_mm_cond(vma->vm_mm); | ||
120 | } | ||
121 | |||
122 | static inline void flush_tlb_kernel_range(unsigned long start, | ||
123 | unsigned long end) | ||
124 | { | ||
125 | __tlb_flush_mm(&init_mm); | ||
126 | } | ||
113 | 127 | ||
114 | #endif /* _S390_TLBFLUSH_H */ | 128 | #endif /* _S390_TLBFLUSH_H */ |
diff --git a/include/asm-s390/zcrypt.h b/include/asm-s390/zcrypt.h index a5dada617751..f228f1b86877 100644 --- a/include/asm-s390/zcrypt.h +++ b/include/asm-s390/zcrypt.h | |||
@@ -117,7 +117,7 @@ struct CPRBX { | |||
117 | unsigned char padx004[16 - sizeof (char *)]; | 117 | unsigned char padx004[16 - sizeof (char *)]; |
118 | unsigned char * req_extb; /* request extension block 'addr'*/ | 118 | unsigned char * req_extb; /* request extension block 'addr'*/ |
119 | unsigned char padx005[16 - sizeof (char *)]; | 119 | unsigned char padx005[16 - sizeof (char *)]; |
120 | unsigned char * rpl_extb; /* reply extension block 'addres'*/ | 120 | unsigned char * rpl_extb; /* reply extension block 'address'*/ |
121 | unsigned short ccp_rtcode; /* server return code */ | 121 | unsigned short ccp_rtcode; /* server return code */ |
122 | unsigned short ccp_rscode; /* server reason code */ | 122 | unsigned short ccp_rscode; /* server reason code */ |
123 | unsigned int mac_data_len; /* Mac Data Length */ | 123 | unsigned int mac_data_len; /* Mac Data Length */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index bd20a4e8663a..49b7a4c31a6d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -143,7 +143,6 @@ enum rq_cmd_type_bits { | |||
143 | * use REQ_TYPE_SPECIAL and use rq->cmd[0] with the range of driver | 143 | * use REQ_TYPE_SPECIAL and use rq->cmd[0] with the range of driver |
144 | * private REQ_LB opcodes to differentiate what type of request this is | 144 | * private REQ_LB opcodes to differentiate what type of request this is |
145 | */ | 145 | */ |
146 | REQ_TYPE_ATA_CMD, | ||
147 | REQ_TYPE_ATA_TASKFILE, | 146 | REQ_TYPE_ATA_TASKFILE, |
148 | REQ_TYPE_ATA_PC, | 147 | REQ_TYPE_ATA_PC, |
149 | }; | 148 | }; |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index c7a51a196f51..f922b060158b 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -33,23 +33,13 @@ | |||
33 | 33 | ||
34 | #define I2C_DRIVERID_MSP3400 1 | 34 | #define I2C_DRIVERID_MSP3400 1 |
35 | #define I2C_DRIVERID_TUNER 2 | 35 | #define I2C_DRIVERID_TUNER 2 |
36 | #define I2C_DRIVERID_VIDEOTEX 3 /* please rename */ | ||
37 | #define I2C_DRIVERID_TDA8425 4 /* stereo sound processor */ | 36 | #define I2C_DRIVERID_TDA8425 4 /* stereo sound processor */ |
38 | #define I2C_DRIVERID_TEA6420 5 /* audio matrix switch */ | 37 | #define I2C_DRIVERID_TEA6420 5 /* audio matrix switch */ |
39 | #define I2C_DRIVERID_TEA6415C 6 /* video matrix switch */ | 38 | #define I2C_DRIVERID_TEA6415C 6 /* video matrix switch */ |
40 | #define I2C_DRIVERID_TDA9840 7 /* stereo sound processor */ | 39 | #define I2C_DRIVERID_TDA9840 7 /* stereo sound processor */ |
41 | #define I2C_DRIVERID_SAA7111A 8 /* video input processor */ | 40 | #define I2C_DRIVERID_SAA7111A 8 /* video input processor */ |
42 | #define I2C_DRIVERID_SAA5281 9 /* videotext decoder */ | ||
43 | #define I2C_DRIVERID_SAA7112 10 /* video decoder, image scaler */ | ||
44 | #define I2C_DRIVERID_SAA7120 11 /* video encoder */ | ||
45 | #define I2C_DRIVERID_SAA7121 12 /* video encoder */ | ||
46 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ | 41 | #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ |
47 | #define I2C_DRIVERID_CH7003 14 /* digital pc to tv encoder */ | ||
48 | #define I2C_DRIVERID_PCF8574A 15 /* i2c expander - 8 bit in/out */ | ||
49 | #define I2C_DRIVERID_PCF8582C 16 /* eeprom */ | ||
50 | #define I2C_DRIVERID_AT24Cxx 17 /* eeprom 1/2/4/8/16 K */ | ||
51 | #define I2C_DRIVERID_TEA6300 18 /* audio mixer */ | 42 | #define I2C_DRIVERID_TEA6300 18 /* audio mixer */ |
52 | #define I2C_DRIVERID_BT829 19 /* pc to tv encoder */ | ||
53 | #define I2C_DRIVERID_TDA9850 20 /* audio mixer */ | 43 | #define I2C_DRIVERID_TDA9850 20 /* audio mixer */ |
54 | #define I2C_DRIVERID_TDA9855 21 /* audio mixer */ | 44 | #define I2C_DRIVERID_TDA9855 21 /* audio mixer */ |
55 | #define I2C_DRIVERID_SAA7110 22 /* video decoder */ | 45 | #define I2C_DRIVERID_SAA7110 22 /* video decoder */ |
@@ -60,42 +50,19 @@ | |||
60 | #define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */ | 50 | #define I2C_DRIVERID_TDA7432 27 /* Stereo sound processor */ |
61 | #define I2C_DRIVERID_TVMIXER 28 /* Mixer driver for tv cards */ | 51 | #define I2C_DRIVERID_TVMIXER 28 /* Mixer driver for tv cards */ |
62 | #define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */ | 52 | #define I2C_DRIVERID_TVAUDIO 29 /* Generic TV sound driver */ |
63 | #define I2C_DRIVERID_DPL3518 30 /* Dolby decoder chip */ | ||
64 | #define I2C_DRIVERID_TDA9873 31 /* TV sound decoder chip */ | 53 | #define I2C_DRIVERID_TDA9873 31 /* TV sound decoder chip */ |
65 | #define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */ | 54 | #define I2C_DRIVERID_TDA9875 32 /* TV sound decoder chip */ |
66 | #define I2C_DRIVERID_PIC16C54_PV9 33 /* Audio mux/ir receiver */ | 55 | #define I2C_DRIVERID_PIC16C54_PV9 33 /* Audio mux/ir receiver */ |
67 | |||
68 | #define I2C_DRIVERID_SBATT 34 /* Smart Battery Device */ | ||
69 | #define I2C_DRIVERID_SBS 35 /* SB System Manager */ | ||
70 | #define I2C_DRIVERID_VES1893 36 /* VLSI DVB-S decoder */ | ||
71 | #define I2C_DRIVERID_VES1820 37 /* VLSI DVB-C decoder */ | ||
72 | #define I2C_DRIVERID_SAA7113 38 /* video decoder */ | ||
73 | #define I2C_DRIVERID_TDA8444 39 /* octuple 6-bit DAC */ | ||
74 | #define I2C_DRIVERID_BT819 40 /* video decoder */ | 56 | #define I2C_DRIVERID_BT819 40 /* video decoder */ |
75 | #define I2C_DRIVERID_BT856 41 /* video encoder */ | 57 | #define I2C_DRIVERID_BT856 41 /* video encoder */ |
76 | #define I2C_DRIVERID_VPX3220 42 /* video decoder+vbi/vtxt */ | 58 | #define I2C_DRIVERID_VPX3220 42 /* video decoder+vbi/vtxt */ |
77 | #define I2C_DRIVERID_DRP3510 43 /* ADR decoder (Astra Radio) */ | ||
78 | #define I2C_DRIVERID_SP5055 44 /* Satellite tuner */ | ||
79 | #define I2C_DRIVERID_STV0030 45 /* Multipurpose switch */ | ||
80 | #define I2C_DRIVERID_SAA7108 46 /* video decoder, image scaler */ | ||
81 | #define I2C_DRIVERID_DS1307 47 /* DS1307 real time clock */ | ||
82 | #define I2C_DRIVERID_ADV7175 48 /* ADV 7175/7176 video encoder */ | 59 | #define I2C_DRIVERID_ADV7175 48 /* ADV 7175/7176 video encoder */ |
83 | #define I2C_DRIVERID_SAA7114 49 /* video decoder */ | 60 | #define I2C_DRIVERID_SAA7114 49 /* video decoder */ |
84 | #define I2C_DRIVERID_ZR36120 50 /* Zoran 36120 video encoder */ | ||
85 | #define I2C_DRIVERID_24LC32A 51 /* Microchip 24LC32A 32k EEPROM */ | ||
86 | #define I2C_DRIVERID_STM41T00 52 /* real time clock */ | ||
87 | #define I2C_DRIVERID_UDA1342 53 /* UDA1342 audio codec */ | ||
88 | #define I2C_DRIVERID_ADV7170 54 /* video encoder */ | 61 | #define I2C_DRIVERID_ADV7170 54 /* video encoder */ |
89 | #define I2C_DRIVERID_MAX1617 56 /* temp sensor */ | ||
90 | #define I2C_DRIVERID_SAA7191 57 /* video decoder */ | 62 | #define I2C_DRIVERID_SAA7191 57 /* video decoder */ |
91 | #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ | 63 | #define I2C_DRIVERID_INDYCAM 58 /* SGI IndyCam */ |
92 | #define I2C_DRIVERID_BT832 59 /* CMOS camera video processor */ | ||
93 | #define I2C_DRIVERID_TDA9887 60 /* TDA988x IF-PLL demodulator */ | ||
94 | #define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */ | 64 | #define I2C_DRIVERID_OVCAMCHIP 61 /* OmniVision CMOS image sens. */ |
95 | #define I2C_DRIVERID_TDA7313 62 /* TDA7313 audio processor */ | ||
96 | #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */ | 65 | #define I2C_DRIVERID_MAX6900 63 /* MAX6900 real-time clock */ |
97 | #define I2C_DRIVERID_SAA7114H 64 /* video decoder */ | ||
98 | #define I2C_DRIVERID_DS1374 65 /* DS1374 real time clock */ | ||
99 | #define I2C_DRIVERID_TDA9874 66 /* TV sound decoder */ | 66 | #define I2C_DRIVERID_TDA9874 66 /* TV sound decoder */ |
100 | #define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ | 67 | #define I2C_DRIVERID_SAA6752HS 67 /* MPEG2 encoder */ |
101 | #define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ | 68 | #define I2C_DRIVERID_TVEEPROM 68 /* TV EEPROM */ |
@@ -114,7 +81,6 @@ | |||
114 | #define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */ | 81 | #define I2C_DRIVERID_DS1672 81 /* Dallas/Maxim DS1672 RTC */ |
115 | #define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */ | 82 | #define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */ |
116 | #define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */ | 83 | #define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */ |
117 | #define I2C_DRIVERID_RS5C372 84 /* Ricoh RS5C372 RTC */ | ||
118 | #define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ | 84 | #define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ |
119 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ | 85 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ |
120 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ | 86 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ |
@@ -129,8 +95,6 @@ | |||
129 | #define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ | 95 | #define I2C_DRIVERID_CS5345 96 /* cs5345 audio processor */ |
130 | 96 | ||
131 | #define I2C_DRIVERID_I2CDEV 900 | 97 | #define I2C_DRIVERID_I2CDEV 900 |
132 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | ||
133 | #define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */ | ||
134 | 98 | ||
135 | /* IDs -- Use DRIVERIDs 1000-1999 for sensors. | 99 | /* IDs -- Use DRIVERIDs 1000-1999 for sensors. |
136 | These were originally in sensors.h in the lm_sensors package */ | 100 | These were originally in sensors.h in the lm_sensors package */ |
@@ -176,24 +140,16 @@ | |||
176 | 140 | ||
177 | /* --- Bit algorithm adapters */ | 141 | /* --- Bit algorithm adapters */ |
178 | #define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */ | 142 | #define I2C_HW_B_LP 0x010000 /* Parallel port Philips style */ |
179 | #define I2C_HW_B_SER 0x010002 /* Serial line interface */ | ||
180 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ | 143 | #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ |
181 | #define I2C_HW_B_WNV 0x010006 /* Winnov Videums */ | ||
182 | #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ | 144 | #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ |
183 | #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ | 145 | #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ |
184 | #define I2C_HW_B_G400 0x010009 /* Matrox G400 */ | 146 | #define I2C_HW_B_G400 0x010009 /* Matrox G400 */ |
185 | #define I2C_HW_B_I810 0x01000a /* Intel I810 */ | 147 | #define I2C_HW_B_I810 0x01000a /* Intel I810 */ |
186 | #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ | 148 | #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ |
187 | #define I2C_HW_B_PPORT 0x01000c /* Primitive parallel port adapter */ | ||
188 | #define I2C_HW_B_SAVG 0x01000d /* Savage 4 */ | ||
189 | #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ | 149 | #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ |
190 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ | 150 | #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ |
191 | #define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */ | 151 | #define I2C_HW_B_IOC 0x010011 /* IOC bit-wiggling */ |
192 | #define I2C_HW_B_TSUNA 0x010012 /* DEC Tsunami chipset */ | ||
193 | #define I2C_HW_B_OMAHA 0x010014 /* Omaha I2C interface (ARM) */ | ||
194 | #define I2C_HW_B_GUIDE 0x010015 /* Guide bit-basher */ | ||
195 | #define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */ | 152 | #define I2C_HW_B_IXP2000 0x010016 /* GPIO on IXP2000 systems */ |
196 | #define I2C_HW_B_IXP4XX 0x010017 /* GPIO on IXP4XX systems */ | ||
197 | #define I2C_HW_B_S3VIA 0x010018 /* S3Via ProSavage adapter */ | 153 | #define I2C_HW_B_S3VIA 0x010018 /* S3Via ProSavage adapter */ |
198 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ | 154 | #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ |
199 | #define I2C_HW_B_PCILYNX 0x01001a /* TI PCILynx I2C adapter */ | 155 | #define I2C_HW_B_PCILYNX 0x01001a /* TI PCILynx I2C adapter */ |
@@ -207,22 +163,11 @@ | |||
207 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ | 163 | #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ |
208 | 164 | ||
209 | /* --- PCF 8584 based algorithms */ | 165 | /* --- PCF 8584 based algorithms */ |
210 | #define I2C_HW_P_LP 0x020000 /* Parallel port interface */ | ||
211 | #define I2C_HW_P_ISA 0x020001 /* generic ISA Bus inteface card */ | ||
212 | #define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */ | 166 | #define I2C_HW_P_ELEK 0x020002 /* Elektor ISA Bus inteface card */ |
213 | 167 | ||
214 | /* --- PCA 9564 based algorithms */ | 168 | /* --- PCA 9564 based algorithms */ |
215 | #define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */ | 169 | #define I2C_HW_A_ISA 0x1a0000 /* generic ISA Bus interface card */ |
216 | 170 | ||
217 | /* --- ACPI Embedded controller algorithms */ | ||
218 | #define I2C_HW_ACPI_EC 0x1f0000 | ||
219 | |||
220 | /* --- MPC824x PowerPC adapters */ | ||
221 | #define I2C_HW_MPC824X 0x100001 /* Motorola 8240 / 8245 */ | ||
222 | |||
223 | /* --- MPC8xx PowerPC adapters */ | ||
224 | #define I2C_HW_MPC8XX_EPON 0x110000 /* Eponymous MPC8xx I2C adapter */ | ||
225 | |||
226 | /* --- PowerPC on-chip adapters */ | 171 | /* --- PowerPC on-chip adapters */ |
227 | #define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */ | 172 | #define I2C_HW_OCP 0x120000 /* IBM on-chip I2C adapter */ |
228 | 173 | ||
@@ -231,7 +176,6 @@ | |||
231 | 176 | ||
232 | /* --- SGI adapters */ | 177 | /* --- SGI adapters */ |
233 | #define I2C_HW_SGI_VINO 0x160000 | 178 | #define I2C_HW_SGI_VINO 0x160000 |
234 | #define I2C_HW_SGI_MACE 0x160001 | ||
235 | 179 | ||
236 | /* --- XSCALE on-chip adapters */ | 180 | /* --- XSCALE on-chip adapters */ |
237 | #define I2C_HW_IOP3XX 0x140000 | 181 | #define I2C_HW_IOP3XX 0x140000 |
@@ -255,17 +199,10 @@ | |||
255 | #define I2C_HW_SMBUS_W9968CF 0x04000d | 199 | #define I2C_HW_SMBUS_W9968CF 0x04000d |
256 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ | 200 | #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ |
257 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ | 201 | #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ |
258 | #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ | ||
259 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ | 202 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ |
260 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ | 203 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ |
261 | #define I2C_HW_SMBUS_ALI1563 0x040013 | 204 | #define I2C_HW_SMBUS_ALI1563 0x040013 |
262 | 205 | ||
263 | /* --- ISA pseudo-adapter */ | ||
264 | #define I2C_HW_ISA 0x050000 | ||
265 | |||
266 | /* --- IPMB adapter */ | ||
267 | #define I2C_HW_IPMB 0x0c0000 | ||
268 | |||
269 | /* --- MCP107 adapter */ | 206 | /* --- MCP107 adapter */ |
270 | #define I2C_HW_MPC107 0x0d0000 | 207 | #define I2C_HW_MPC107 0x0d0000 |
271 | 208 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index a100c9f8eb7c..76014f8f3c60 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -140,7 +140,6 @@ struct i2c_driver { | |||
140 | int (*command)(struct i2c_client *client,unsigned int cmd, void *arg); | 140 | int (*command)(struct i2c_client *client,unsigned int cmd, void *arg); |
141 | 141 | ||
142 | struct device_driver driver; | 142 | struct device_driver driver; |
143 | struct list_head list; | ||
144 | }; | 143 | }; |
145 | #define to_i2c_driver(d) container_of(d, struct i2c_driver, driver) | 144 | #define to_i2c_driver(d) container_of(d, struct i2c_driver, driver) |
146 | 145 | ||
@@ -155,12 +154,11 @@ struct i2c_driver { | |||
155 | * generic enough to hide second-sourcing and compatible revisions. | 154 | * generic enough to hide second-sourcing and compatible revisions. |
156 | * @adapter: manages the bus segment hosting this I2C device | 155 | * @adapter: manages the bus segment hosting this I2C device |
157 | * @driver: device's driver, hence pointer to access routines | 156 | * @driver: device's driver, hence pointer to access routines |
158 | * @usage_count: counts current number of users of this client | ||
159 | * @dev: Driver model device node for the slave. | 157 | * @dev: Driver model device node for the slave. |
160 | * @irq: indicates the IRQ generated by this device (if any) | 158 | * @irq: indicates the IRQ generated by this device (if any) |
161 | * @driver_name: Identifies new-style driver used with this device; also | 159 | * @driver_name: Identifies new-style driver used with this device; also |
162 | * used as the module name for hotplug/coldplug modprobe support. | 160 | * used as the module name for hotplug/coldplug modprobe support. |
163 | * @list: list of active/busy clients | 161 | * @list: list of active/busy clients (DEPRECATED) |
164 | * @released: used to synchronize client releases & detaches and references | 162 | * @released: used to synchronize client releases & detaches and references |
165 | * | 163 | * |
166 | * An i2c_client identifies a single device (i.e. chip) connected to an | 164 | * An i2c_client identifies a single device (i.e. chip) connected to an |
@@ -175,16 +173,16 @@ struct i2c_client { | |||
175 | char name[I2C_NAME_SIZE]; | 173 | char name[I2C_NAME_SIZE]; |
176 | struct i2c_adapter *adapter; /* the adapter we sit on */ | 174 | struct i2c_adapter *adapter; /* the adapter we sit on */ |
177 | struct i2c_driver *driver; /* and our access routines */ | 175 | struct i2c_driver *driver; /* and our access routines */ |
178 | int usage_count; /* How many accesses currently */ | ||
179 | /* to the client */ | ||
180 | struct device dev; /* the device structure */ | 176 | struct device dev; /* the device structure */ |
181 | int irq; /* irq issued by device (or -1) */ | 177 | int irq; /* irq issued by device (or -1) */ |
182 | char driver_name[KOBJ_NAME_LEN]; | 178 | char driver_name[KOBJ_NAME_LEN]; |
183 | struct list_head list; | 179 | struct list_head list; /* DEPRECATED */ |
184 | struct completion released; | 180 | struct completion released; |
185 | }; | 181 | }; |
186 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) | 182 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) |
187 | 183 | ||
184 | extern struct i2c_client *i2c_verify_client(struct device *dev); | ||
185 | |||
188 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) | 186 | static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj) |
189 | { | 187 | { |
190 | struct device * const dev = container_of(kobj, struct device, kobj); | 188 | struct device * const dev = container_of(kobj, struct device, kobj); |
@@ -261,6 +259,12 @@ i2c_new_probed_device(struct i2c_adapter *adap, | |||
261 | struct i2c_board_info *info, | 259 | struct i2c_board_info *info, |
262 | unsigned short const *addr_list); | 260 | unsigned short const *addr_list); |
263 | 261 | ||
262 | /* For devices that use several addresses, use i2c_new_dummy() to make | ||
263 | * client handles for the extra addresses. | ||
264 | */ | ||
265 | extern struct i2c_client * | ||
266 | i2c_new_dummy(struct i2c_adapter *adap, u16 address, const char *type); | ||
267 | |||
264 | extern void i2c_unregister_device(struct i2c_client *); | 268 | extern void i2c_unregister_device(struct i2c_client *); |
265 | 269 | ||
266 | /* Mainboard arch_initcall() code should register all its I2C devices. | 270 | /* Mainboard arch_initcall() code should register all its I2C devices. |
@@ -319,8 +323,7 @@ struct i2c_adapter { | |||
319 | struct device dev; /* the adapter device */ | 323 | struct device dev; /* the adapter device */ |
320 | 324 | ||
321 | int nr; | 325 | int nr; |
322 | struct list_head clients; | 326 | struct list_head clients; /* DEPRECATED */ |
323 | struct list_head list; | ||
324 | char name[48]; | 327 | char name[48]; |
325 | struct completion dev_released; | 328 | struct completion dev_released; |
326 | }; | 329 | }; |
@@ -357,10 +360,10 @@ static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data) | |||
357 | * command line | 360 | * command line |
358 | */ | 361 | */ |
359 | struct i2c_client_address_data { | 362 | struct i2c_client_address_data { |
360 | unsigned short *normal_i2c; | 363 | const unsigned short *normal_i2c; |
361 | unsigned short *probe; | 364 | const unsigned short *probe; |
362 | unsigned short *ignore; | 365 | const unsigned short *ignore; |
363 | unsigned short **forces; | 366 | const unsigned short * const *forces; |
364 | }; | 367 | }; |
365 | 368 | ||
366 | /* Internal numbers to terminate lists */ | 369 | /* Internal numbers to terminate lists */ |
@@ -389,11 +392,8 @@ static inline int i2c_add_driver(struct i2c_driver *driver) | |||
389 | extern int i2c_attach_client(struct i2c_client *); | 392 | extern int i2c_attach_client(struct i2c_client *); |
390 | extern int i2c_detach_client(struct i2c_client *); | 393 | extern int i2c_detach_client(struct i2c_client *); |
391 | 394 | ||
392 | /* Should be used to make sure that client-struct is valid and that it | 395 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); |
393 | is okay to access the i2c-client. | 396 | extern void i2c_release_client(struct i2c_client *client); |
394 | returns -ENODEV if client has gone in the meantime */ | ||
395 | extern int i2c_use_client(struct i2c_client *); | ||
396 | extern int i2c_release_client(struct i2c_client *); | ||
397 | 397 | ||
398 | /* call the i2c_client->command() of all attached clients with | 398 | /* call the i2c_client->command() of all attached clients with |
399 | * the given arguments */ | 399 | * the given arguments */ |
@@ -405,7 +405,7 @@ extern void i2c_clients_command(struct i2c_adapter *adap, | |||
405 | * specific address (unless a 'force' matched); | 405 | * specific address (unless a 'force' matched); |
406 | */ | 406 | */ |
407 | extern int i2c_probe(struct i2c_adapter *adapter, | 407 | extern int i2c_probe(struct i2c_adapter *adapter, |
408 | struct i2c_client_address_data *address_data, | 408 | const struct i2c_client_address_data *address_data, |
409 | int (*found_proc) (struct i2c_adapter *, int, int)); | 409 | int (*found_proc) (struct i2c_adapter *, int, int)); |
410 | 410 | ||
411 | extern struct i2c_adapter* i2c_get_adapter(int id); | 411 | extern struct i2c_adapter* i2c_get_adapter(int id); |
@@ -598,104 +598,93 @@ I2C_CLIENT_MODULE_PARM(probe, "List of adapter,address pairs to scan " \ | |||
598 | "additionally"); \ | 598 | "additionally"); \ |
599 | I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \ | 599 | I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \ |
600 | "scan"); \ | 600 | "scan"); \ |
601 | static struct i2c_client_address_data addr_data = { \ | 601 | const static struct i2c_client_address_data addr_data = { \ |
602 | .normal_i2c = normal_i2c, \ | 602 | .normal_i2c = normal_i2c, \ |
603 | .probe = probe, \ | 603 | .probe = probe, \ |
604 | .ignore = ignore, \ | 604 | .ignore = ignore, \ |
605 | .forces = forces, \ | 605 | .forces = forces, \ |
606 | } | 606 | } |
607 | 607 | ||
608 | #define I2C_CLIENT_FORCE_TEXT \ | ||
609 | "List of adapter,address pairs to boldly assume to be present" | ||
610 | |||
608 | /* These are the ones you want to use in your own drivers. Pick the one | 611 | /* These are the ones you want to use in your own drivers. Pick the one |
609 | which matches the number of devices the driver differenciates between. */ | 612 | which matches the number of devices the driver differenciates between. */ |
610 | #define I2C_CLIENT_INSMOD \ | 613 | #define I2C_CLIENT_INSMOD \ |
611 | I2C_CLIENT_MODULE_PARM(force, \ | 614 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
612 | "List of adapter,address pairs to boldly assume " \ | 615 | static const unsigned short * const forces[] = { force, NULL }; \ |
613 | "to be present"); \ | ||
614 | static unsigned short *forces[] = { \ | ||
615 | force, \ | ||
616 | NULL \ | ||
617 | }; \ | ||
618 | I2C_CLIENT_INSMOD_COMMON | 616 | I2C_CLIENT_INSMOD_COMMON |
619 | 617 | ||
620 | #define I2C_CLIENT_INSMOD_1(chip1) \ | 618 | #define I2C_CLIENT_INSMOD_1(chip1) \ |
621 | enum chips { any_chip, chip1 }; \ | 619 | enum chips { any_chip, chip1 }; \ |
622 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 620 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
623 | "boldly assume to be present"); \ | ||
624 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 621 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
625 | static unsigned short *forces[] = { force, force_##chip1, NULL }; \ | 622 | static const unsigned short * const forces[] = { force, \ |
623 | force_##chip1, NULL }; \ | ||
626 | I2C_CLIENT_INSMOD_COMMON | 624 | I2C_CLIENT_INSMOD_COMMON |
627 | 625 | ||
628 | #define I2C_CLIENT_INSMOD_2(chip1, chip2) \ | 626 | #define I2C_CLIENT_INSMOD_2(chip1, chip2) \ |
629 | enum chips { any_chip, chip1, chip2 }; \ | 627 | enum chips { any_chip, chip1, chip2 }; \ |
630 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 628 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
631 | "boldly assume to be present"); \ | ||
632 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 629 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
633 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 630 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
634 | static unsigned short *forces[] = { force, force_##chip1, \ | 631 | static const unsigned short * const forces[] = { force, \ |
635 | force_##chip2, NULL }; \ | 632 | force_##chip1, force_##chip2, NULL }; \ |
636 | I2C_CLIENT_INSMOD_COMMON | 633 | I2C_CLIENT_INSMOD_COMMON |
637 | 634 | ||
638 | #define I2C_CLIENT_INSMOD_3(chip1, chip2, chip3) \ | 635 | #define I2C_CLIENT_INSMOD_3(chip1, chip2, chip3) \ |
639 | enum chips { any_chip, chip1, chip2, chip3 }; \ | 636 | enum chips { any_chip, chip1, chip2, chip3 }; \ |
640 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 637 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
641 | "boldly assume to be present"); \ | ||
642 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 638 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
643 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 639 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
644 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 640 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
645 | static unsigned short *forces[] = { force, force_##chip1, \ | 641 | static const unsigned short * const forces[] = { force, \ |
646 | force_##chip2, force_##chip3, \ | 642 | force_##chip1, force_##chip2, force_##chip3, NULL }; \ |
647 | NULL }; \ | ||
648 | I2C_CLIENT_INSMOD_COMMON | 643 | I2C_CLIENT_INSMOD_COMMON |
649 | 644 | ||
650 | #define I2C_CLIENT_INSMOD_4(chip1, chip2, chip3, chip4) \ | 645 | #define I2C_CLIENT_INSMOD_4(chip1, chip2, chip3, chip4) \ |
651 | enum chips { any_chip, chip1, chip2, chip3, chip4 }; \ | 646 | enum chips { any_chip, chip1, chip2, chip3, chip4 }; \ |
652 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 647 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
653 | "boldly assume to be present"); \ | ||
654 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 648 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
655 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 649 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
656 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 650 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
657 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | 651 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ |
658 | static unsigned short *forces[] = { force, force_##chip1, \ | 652 | static const unsigned short * const forces[] = { force, \ |
659 | force_##chip2, force_##chip3, \ | 653 | force_##chip1, force_##chip2, force_##chip3, \ |
660 | force_##chip4, NULL}; \ | 654 | force_##chip4, NULL}; \ |
661 | I2C_CLIENT_INSMOD_COMMON | 655 | I2C_CLIENT_INSMOD_COMMON |
662 | 656 | ||
663 | #define I2C_CLIENT_INSMOD_5(chip1, chip2, chip3, chip4, chip5) \ | 657 | #define I2C_CLIENT_INSMOD_5(chip1, chip2, chip3, chip4, chip5) \ |
664 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \ | 658 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \ |
665 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 659 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
666 | "boldly assume to be present"); \ | ||
667 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 660 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
668 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 661 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
669 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 662 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
670 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | 663 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ |
671 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | 664 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ |
672 | static unsigned short *forces[] = { force, force_##chip1, \ | 665 | static const unsigned short * const forces[] = { force, \ |
673 | force_##chip2, force_##chip3, \ | 666 | force_##chip1, force_##chip2, force_##chip3, \ |
674 | force_##chip4, force_##chip5, \ | 667 | force_##chip4, force_##chip5, NULL }; \ |
675 | NULL }; \ | ||
676 | I2C_CLIENT_INSMOD_COMMON | 668 | I2C_CLIENT_INSMOD_COMMON |
677 | 669 | ||
678 | #define I2C_CLIENT_INSMOD_6(chip1, chip2, chip3, chip4, chip5, chip6) \ | 670 | #define I2C_CLIENT_INSMOD_6(chip1, chip2, chip3, chip4, chip5, chip6) \ |
679 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \ | 671 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \ |
680 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 672 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
681 | "boldly assume to be present"); \ | ||
682 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 673 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
683 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 674 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
684 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 675 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
685 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | 676 | I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ |
686 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | 677 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ |
687 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ | 678 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ |
688 | static unsigned short *forces[] = { force, force_##chip1, \ | 679 | static const unsigned short * const forces[] = { force, \ |
689 | force_##chip2, force_##chip3, \ | 680 | force_##chip1, force_##chip2, force_##chip3, \ |
690 | force_##chip4, force_##chip5, \ | 681 | force_##chip4, force_##chip5, force_##chip6, NULL }; \ |
691 | force_##chip6, NULL }; \ | ||
692 | I2C_CLIENT_INSMOD_COMMON | 682 | I2C_CLIENT_INSMOD_COMMON |
693 | 683 | ||
694 | #define I2C_CLIENT_INSMOD_7(chip1, chip2, chip3, chip4, chip5, chip6, chip7) \ | 684 | #define I2C_CLIENT_INSMOD_7(chip1, chip2, chip3, chip4, chip5, chip6, chip7) \ |
695 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ | 685 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ |
696 | chip7 }; \ | 686 | chip7 }; \ |
697 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 687 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
698 | "boldly assume to be present"); \ | ||
699 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 688 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
700 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 689 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
701 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 690 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
@@ -703,18 +692,16 @@ I2C_CLIENT_MODULE_PARM_FORCE(chip4); \ | |||
703 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | 692 | I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ |
704 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ | 693 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ |
705 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ | 694 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ |
706 | static unsigned short *forces[] = { force, force_##chip1, \ | 695 | static const unsigned short * const forces[] = { force, \ |
707 | force_##chip2, force_##chip3, \ | 696 | force_##chip1, force_##chip2, force_##chip3, \ |
708 | force_##chip4, force_##chip5, \ | 697 | force_##chip4, force_##chip5, force_##chip6, \ |
709 | force_##chip6, force_##chip7, \ | 698 | force_##chip7, NULL }; \ |
710 | NULL }; \ | ||
711 | I2C_CLIENT_INSMOD_COMMON | 699 | I2C_CLIENT_INSMOD_COMMON |
712 | 700 | ||
713 | #define I2C_CLIENT_INSMOD_8(chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8) \ | 701 | #define I2C_CLIENT_INSMOD_8(chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8) \ |
714 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ | 702 | enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \ |
715 | chip7, chip8 }; \ | 703 | chip7, chip8 }; \ |
716 | I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \ | 704 | I2C_CLIENT_MODULE_PARM(force, I2C_CLIENT_FORCE_TEXT); \ |
717 | "boldly assume to be present"); \ | ||
718 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ | 705 | I2C_CLIENT_MODULE_PARM_FORCE(chip1); \ |
719 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ | 706 | I2C_CLIENT_MODULE_PARM_FORCE(chip2); \ |
720 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ | 707 | I2C_CLIENT_MODULE_PARM_FORCE(chip3); \ |
@@ -723,11 +710,10 @@ I2C_CLIENT_MODULE_PARM_FORCE(chip5); \ | |||
723 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ | 710 | I2C_CLIENT_MODULE_PARM_FORCE(chip6); \ |
724 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ | 711 | I2C_CLIENT_MODULE_PARM_FORCE(chip7); \ |
725 | I2C_CLIENT_MODULE_PARM_FORCE(chip8); \ | 712 | I2C_CLIENT_MODULE_PARM_FORCE(chip8); \ |
726 | static unsigned short *forces[] = { force, force_##chip1, \ | 713 | static const unsigned short * const forces[] = { force, \ |
727 | force_##chip2, force_##chip3, \ | 714 | force_##chip1, force_##chip2, force_##chip3, \ |
728 | force_##chip4, force_##chip5, \ | 715 | force_##chip4, force_##chip5, force_##chip6, \ |
729 | force_##chip6, force_##chip7, \ | 716 | force_##chip7, force_##chip8, NULL }; \ |
730 | force_##chip8, NULL }; \ | ||
731 | I2C_CLIENT_INSMOD_COMMON | 717 | I2C_CLIENT_INSMOD_COMMON |
732 | #endif /* __KERNEL__ */ | 718 | #endif /* __KERNEL__ */ |
733 | #endif /* _LINUX_I2C_H */ | 719 | #endif /* _LINUX_I2C_H */ |
diff --git a/include/asm-arm/arch-omap/tps65010.h b/include/linux/i2c/tps65010.h index b9aa2b3a3909..7021635ed6a0 100644 --- a/include/asm-arm/arch-omap/tps65010.h +++ b/include/linux/i2c/tps65010.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* linux/include/asm-arm/arch-omap/tps65010.h | 1 | /* linux/i2c/tps65010.h |
2 | * | 2 | * |
3 | * Functions to access TPS65010 power management device. | 3 | * Functions to access TPS65010 power management device. |
4 | * | 4 | * |
@@ -25,8 +25,8 @@ | |||
25 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 25 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef __ASM_ARCH_TPS65010_H | 28 | #ifndef __LINUX_I2C_TPS65010_H |
29 | #define __ASM_ARCH_TPS65010_H | 29 | #define __LINUX_I2C_TPS65010_H |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * ---------------------------------------------------------------------------- | 32 | * ---------------------------------------------------------------------------- |
@@ -152,5 +152,5 @@ extern int tps65010_config_vregs1(unsigned value); | |||
152 | */ | 152 | */ |
153 | extern int tps65013_set_low_pwr(unsigned mode); | 153 | extern int tps65013_set_low_pwr(unsigned mode); |
154 | 154 | ||
155 | #endif /* __ASM_ARCH_TPS65010_H */ | 155 | #endif /* __LINUX_I2C_TPS65010_H */ |
156 | 156 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 1e4409937ec3..27cb39de2ae2 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -107,7 +107,6 @@ typedef unsigned char byte; /* used everywhere */ | |||
107 | #define BAD_W_STAT (BAD_R_STAT | WRERR_STAT) | 107 | #define BAD_W_STAT (BAD_R_STAT | WRERR_STAT) |
108 | #define BAD_STAT (BAD_R_STAT | DRQ_STAT) | 108 | #define BAD_STAT (BAD_R_STAT | DRQ_STAT) |
109 | #define DRIVE_READY (READY_STAT | SEEK_STAT) | 109 | #define DRIVE_READY (READY_STAT | SEEK_STAT) |
110 | #define DATA_READY (DRQ_STAT) | ||
111 | 110 | ||
112 | #define BAD_CRC (ABRT_ERR | ICRC_ERR) | 111 | #define BAD_CRC (ABRT_ERR | ICRC_ERR) |
113 | 112 | ||
@@ -198,8 +197,11 @@ typedef struct hw_regs_s { | |||
198 | } hw_regs_t; | 197 | } hw_regs_t; |
199 | 198 | ||
200 | struct hwif_s * ide_find_port(unsigned long); | 199 | struct hwif_s * ide_find_port(unsigned long); |
200 | void ide_init_port_data(struct hwif_s *, unsigned int); | ||
201 | void ide_init_port_hw(struct hwif_s *, hw_regs_t *); | ||
201 | 202 | ||
202 | int ide_register_hw(hw_regs_t *, void (*)(struct hwif_s *), int, | 203 | struct ide_drive_s; |
204 | int ide_register_hw(hw_regs_t *, void (*)(struct ide_drive_s *), | ||
203 | struct hwif_s **); | 205 | struct hwif_s **); |
204 | 206 | ||
205 | void ide_setup_ports( hw_regs_t *hw, | 207 | void ide_setup_ports( hw_regs_t *hw, |
@@ -391,7 +393,6 @@ typedef struct ide_drive_s { | |||
391 | u8 state; /* retry state */ | 393 | u8 state; /* retry state */ |
392 | u8 waiting_for_dma; /* dma currently in progress */ | 394 | u8 waiting_for_dma; /* dma currently in progress */ |
393 | u8 unmask; /* okay to unmask other irqs */ | 395 | u8 unmask; /* okay to unmask other irqs */ |
394 | u8 bswap; /* byte swap data */ | ||
395 | u8 noflush; /* don't attempt flushes */ | 396 | u8 noflush; /* don't attempt flushes */ |
396 | u8 dsc_overlap; /* DSC overlap */ | 397 | u8 dsc_overlap; /* DSC overlap */ |
397 | u8 nice1; /* give potential excess bandwidth */ | 398 | u8 nice1; /* give potential excess bandwidth */ |
@@ -527,31 +528,26 @@ typedef struct hwif_s { | |||
527 | /* special host masking for drive selection */ | 528 | /* special host masking for drive selection */ |
528 | void (*maskproc)(ide_drive_t *, int); | 529 | void (*maskproc)(ide_drive_t *, int); |
529 | /* check host's drive quirk list */ | 530 | /* check host's drive quirk list */ |
530 | int (*quirkproc)(ide_drive_t *); | 531 | void (*quirkproc)(ide_drive_t *); |
531 | /* driver soft-power interface */ | 532 | /* driver soft-power interface */ |
532 | int (*busproc)(ide_drive_t *, int); | 533 | int (*busproc)(ide_drive_t *, int); |
533 | #endif | 534 | #endif |
534 | u8 (*mdma_filter)(ide_drive_t *); | 535 | u8 (*mdma_filter)(ide_drive_t *); |
535 | u8 (*udma_filter)(ide_drive_t *); | 536 | u8 (*udma_filter)(ide_drive_t *); |
536 | 537 | ||
537 | void (*fixup)(struct hwif_s *); | ||
538 | |||
539 | void (*ata_input_data)(ide_drive_t *, void *, u32); | 538 | void (*ata_input_data)(ide_drive_t *, void *, u32); |
540 | void (*ata_output_data)(ide_drive_t *, void *, u32); | 539 | void (*ata_output_data)(ide_drive_t *, void *, u32); |
541 | 540 | ||
542 | void (*atapi_input_bytes)(ide_drive_t *, void *, u32); | 541 | void (*atapi_input_bytes)(ide_drive_t *, void *, u32); |
543 | void (*atapi_output_bytes)(ide_drive_t *, void *, u32); | 542 | void (*atapi_output_bytes)(ide_drive_t *, void *, u32); |
544 | 543 | ||
544 | void (*dma_host_set)(ide_drive_t *, int); | ||
545 | int (*dma_setup)(ide_drive_t *); | 545 | int (*dma_setup)(ide_drive_t *); |
546 | void (*dma_exec_cmd)(ide_drive_t *, u8); | 546 | void (*dma_exec_cmd)(ide_drive_t *, u8); |
547 | void (*dma_start)(ide_drive_t *); | 547 | void (*dma_start)(ide_drive_t *); |
548 | int (*ide_dma_end)(ide_drive_t *drive); | 548 | int (*ide_dma_end)(ide_drive_t *drive); |
549 | int (*ide_dma_on)(ide_drive_t *drive); | ||
550 | void (*dma_off_quietly)(ide_drive_t *drive); | ||
551 | int (*ide_dma_test_irq)(ide_drive_t *drive); | 549 | int (*ide_dma_test_irq)(ide_drive_t *drive); |
552 | void (*ide_dma_clear_irq)(ide_drive_t *drive); | 550 | void (*ide_dma_clear_irq)(ide_drive_t *drive); |
553 | void (*dma_host_on)(ide_drive_t *drive); | ||
554 | void (*dma_host_off)(ide_drive_t *drive); | ||
555 | void (*dma_lost_irq)(ide_drive_t *drive); | 551 | void (*dma_lost_irq)(ide_drive_t *drive); |
556 | void (*dma_timeout)(ide_drive_t *drive); | 552 | void (*dma_timeout)(ide_drive_t *drive); |
557 | 553 | ||
@@ -874,14 +870,6 @@ extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t); | |||
874 | 870 | ||
875 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | 871 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); |
876 | 872 | ||
877 | /* | ||
878 | * Issue ATA command and wait for completion. | ||
879 | * Use for implementing commands in kernel | ||
880 | * | ||
881 | * (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf) | ||
882 | */ | ||
883 | extern int ide_wait_cmd(ide_drive_t *, u8, u8, u8, u8, u8 *); | ||
884 | |||
885 | enum { | 873 | enum { |
886 | IDE_TFLAG_LBA48 = (1 << 0), | 874 | IDE_TFLAG_LBA48 = (1 << 0), |
887 | IDE_TFLAG_NO_SELECT_MASK = (1 << 1), | 875 | IDE_TFLAG_NO_SELECT_MASK = (1 << 1), |
@@ -934,6 +922,14 @@ enum { | |||
934 | IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT | | 922 | IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT | |
935 | IDE_TFLAG_IN_LBA, | 923 | IDE_TFLAG_IN_LBA, |
936 | IDE_TFLAG_IN_DEVICE = (1 << 29), | 924 | IDE_TFLAG_IN_DEVICE = (1 << 29), |
925 | IDE_TFLAG_HOB = IDE_TFLAG_OUT_HOB | | ||
926 | IDE_TFLAG_IN_HOB, | ||
927 | IDE_TFLAG_TF = IDE_TFLAG_OUT_TF | | ||
928 | IDE_TFLAG_IN_TF, | ||
929 | IDE_TFLAG_DEVICE = IDE_TFLAG_OUT_DEVICE | | ||
930 | IDE_TFLAG_IN_DEVICE, | ||
931 | /* force 16-bit I/O operations */ | ||
932 | IDE_TFLAG_IO_16BIT = (1 << 30), | ||
937 | }; | 933 | }; |
938 | 934 | ||
939 | struct ide_taskfile { | 935 | struct ide_taskfile { |
@@ -988,6 +984,10 @@ void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); | |||
988 | 984 | ||
989 | ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); | 985 | ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); |
990 | 986 | ||
987 | void task_end_request(ide_drive_t *, struct request *, u8); | ||
988 | |||
989 | u8 wait_drive_not_busy(ide_drive_t *); | ||
990 | |||
991 | int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); | 991 | int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); |
992 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); | 992 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); |
993 | 993 | ||
@@ -1015,10 +1015,9 @@ extern void do_ide_request(struct request_queue *); | |||
1015 | 1015 | ||
1016 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1016 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
1017 | 1017 | ||
1018 | extern int ideprobe_init(void); | ||
1019 | |||
1020 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER | 1018 | #ifdef CONFIG_IDEPCI_PCIBUS_ORDER |
1021 | extern void ide_scan_pcibus(int scan_direction) __init; | 1019 | extern int ide_scan_direction; |
1020 | int __init ide_scan_pcibus(void); | ||
1022 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); | 1021 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); |
1023 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) | 1022 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) |
1024 | #else | 1023 | #else |
@@ -1095,6 +1094,8 @@ enum { | |||
1095 | /* unmask IRQs */ | 1094 | /* unmask IRQs */ |
1096 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), | 1095 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), |
1097 | IDE_HFLAG_ABUSE_SET_DMA_MODE = (1 << 26), | 1096 | IDE_HFLAG_ABUSE_SET_DMA_MODE = (1 << 26), |
1097 | /* host is CY82C693 */ | ||
1098 | IDE_HFLAG_CY82C693 = (1 << 27), | ||
1098 | }; | 1099 | }; |
1099 | 1100 | ||
1100 | #ifdef CONFIG_BLK_DEV_OFFBOARD | 1101 | #ifdef CONFIG_BLK_DEV_OFFBOARD |
@@ -1109,7 +1110,6 @@ struct ide_port_info { | |||
1109 | void (*init_iops)(ide_hwif_t *); | 1110 | void (*init_iops)(ide_hwif_t *); |
1110 | void (*init_hwif)(ide_hwif_t *); | 1111 | void (*init_hwif)(ide_hwif_t *); |
1111 | void (*init_dma)(ide_hwif_t *, unsigned long); | 1112 | void (*init_dma)(ide_hwif_t *, unsigned long); |
1112 | void (*fixup)(ide_hwif_t *); | ||
1113 | ide_pci_enablebit_t enablebits[2]; | 1113 | ide_pci_enablebit_t enablebits[2]; |
1114 | hwif_chipset_t chipset; | 1114 | hwif_chipset_t chipset; |
1115 | u8 extra; | 1115 | u8 extra; |
@@ -1147,7 +1147,9 @@ static inline u8 ide_max_dma_mode(ide_drive_t *drive) | |||
1147 | return ide_find_dma_mode(drive, XFER_UDMA_6); | 1147 | return ide_find_dma_mode(drive, XFER_UDMA_6); |
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | void ide_dma_off_quietly(ide_drive_t *); | ||
1150 | void ide_dma_off(ide_drive_t *); | 1151 | void ide_dma_off(ide_drive_t *); |
1152 | void ide_dma_on(ide_drive_t *); | ||
1151 | int ide_set_dma(ide_drive_t *); | 1153 | int ide_set_dma(ide_drive_t *); |
1152 | ide_startstop_t ide_dma_intr(ide_drive_t *); | 1154 | ide_startstop_t ide_dma_intr(ide_drive_t *); |
1153 | 1155 | ||
@@ -1158,10 +1160,7 @@ extern void ide_destroy_dmatable(ide_drive_t *); | |||
1158 | extern int ide_release_dma(ide_hwif_t *); | 1160 | extern int ide_release_dma(ide_hwif_t *); |
1159 | extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); | 1161 | extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); |
1160 | 1162 | ||
1161 | void ide_dma_host_off(ide_drive_t *); | 1163 | void ide_dma_host_set(ide_drive_t *, int); |
1162 | void ide_dma_off_quietly(ide_drive_t *); | ||
1163 | void ide_dma_host_on(ide_drive_t *); | ||
1164 | extern int __ide_dma_on(ide_drive_t *); | ||
1165 | extern int ide_dma_setup(ide_drive_t *); | 1164 | extern int ide_dma_setup(ide_drive_t *); |
1166 | extern void ide_dma_start(ide_drive_t *); | 1165 | extern void ide_dma_start(ide_drive_t *); |
1167 | extern int __ide_dma_end(ide_drive_t *); | 1166 | extern int __ide_dma_end(ide_drive_t *); |
@@ -1173,7 +1172,9 @@ extern void ide_dma_timeout(ide_drive_t *); | |||
1173 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | 1172 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } |
1174 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } | 1173 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } |
1175 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } | 1174 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } |
1175 | static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; } | ||
1176 | static inline void ide_dma_off(ide_drive_t *drive) { ; } | 1176 | static inline void ide_dma_off(ide_drive_t *drive) { ; } |
1177 | static inline void ide_dma_on(ide_drive_t *drive) { ; } | ||
1177 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } | 1178 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } |
1178 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } | 1179 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } |
1179 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 1180 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
@@ -1203,8 +1204,9 @@ extern void ide_unregister (unsigned int index); | |||
1203 | void ide_register_region(struct gendisk *); | 1204 | void ide_register_region(struct gendisk *); |
1204 | void ide_unregister_region(struct gendisk *); | 1205 | void ide_unregister_region(struct gendisk *); |
1205 | 1206 | ||
1206 | void ide_undecoded_slave(ide_hwif_t *); | 1207 | void ide_undecoded_slave(ide_drive_t *); |
1207 | 1208 | ||
1209 | int ide_device_add_all(u8 *idx); | ||
1208 | int ide_device_add(u8 idx[4]); | 1210 | int ide_device_add(u8 idx[4]); |
1209 | 1211 | ||
1210 | static inline void *ide_get_hwifdata (ide_hwif_t * hwif) | 1212 | static inline void *ide_get_hwifdata (ide_hwif_t * hwif) |
@@ -1302,4 +1304,9 @@ static inline ide_drive_t *ide_get_paired_drive(ide_drive_t *drive) | |||
1302 | return &hwif->drives[(drive->dn ^ 1) & 1]; | 1304 | return &hwif->drives[(drive->dn ^ 1) & 1]; |
1303 | } | 1305 | } |
1304 | 1306 | ||
1307 | static inline void ide_set_irq(ide_drive_t *drive, int on) | ||
1308 | { | ||
1309 | drive->hwif->OUTB(drive->ctl | (on ? 0 : 2), IDE_CONTROL_REG); | ||
1310 | } | ||
1311 | |||
1305 | #endif /* _IDE_H */ | 1312 | #endif /* _IDE_H */ |
diff --git a/include/linux/m41t00.h b/include/linux/m41t00.h deleted file mode 100644 index b423360ca38e..000000000000 --- a/include/linux/m41t00.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * Definitions for the ST M41T00 family of i2c rtc chips. | ||
3 | * | ||
4 | * Author: Mark A. Greer <mgreer@mvista.com> | ||
5 | * | ||
6 | * 2005, 2006 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef _M41T00_H | ||
13 | #define _M41T00_H | ||
14 | |||
15 | #define M41T00_DRV_NAME "m41t00" | ||
16 | #define M41T00_I2C_ADDR 0x68 | ||
17 | |||
18 | #define M41T00_TYPE_M41T00 0 | ||
19 | #define M41T00_TYPE_M41T81 81 | ||
20 | #define M41T00_TYPE_M41T85 85 | ||
21 | |||
22 | struct m41t00_platform_data { | ||
23 | u8 type; | ||
24 | u8 i2c_addr; | ||
25 | u8 sqw_freq; | ||
26 | }; | ||
27 | |||
28 | /* SQW output disabled, this is default value by power on */ | ||
29 | #define M41T00_SQW_DISABLE (0) | ||
30 | |||
31 | #define M41T00_SQW_32KHZ (1<<4) /* 32.768 KHz */ | ||
32 | #define M41T00_SQW_8KHZ (2<<4) /* 8.192 KHz */ | ||
33 | #define M41T00_SQW_4KHZ (3<<4) /* 4.096 KHz */ | ||
34 | #define M41T00_SQW_2KHZ (4<<4) /* 2.048 KHz */ | ||
35 | #define M41T00_SQW_1KHZ (5<<4) /* 1.024 KHz */ | ||
36 | #define M41T00_SQW_512HZ (6<<4) /* 512 Hz */ | ||
37 | #define M41T00_SQW_256HZ (7<<4) /* 256 Hz */ | ||
38 | #define M41T00_SQW_128HZ (8<<4) /* 128 Hz */ | ||
39 | #define M41T00_SQW_64HZ (9<<4) /* 64 Hz */ | ||
40 | #define M41T00_SQW_32HZ (10<<4) /* 32 Hz */ | ||
41 | #define M41T00_SQW_16HZ (11<<4) /* 16 Hz */ | ||
42 | #define M41T00_SQW_8HZ (12<<4) /* 8 Hz */ | ||
43 | #define M41T00_SQW_4HZ (13<<4) /* 4 Hz */ | ||
44 | #define M41T00_SQW_2HZ (14<<4) /* 2 Hz */ | ||
45 | #define M41T00_SQW_1HZ (15<<4) /* 1 Hz */ | ||
46 | |||
47 | extern ulong m41t00_get_rtc_time(void); | ||
48 | extern int m41t00_set_rtc_time(ulong nowtime); | ||
49 | |||
50 | #endif /* _M41T00_H */ | ||
diff --git a/include/media/v4l2-i2c-drv-legacy.h b/include/media/v4l2-i2c-drv-legacy.h index 241854229d6f..e7645578fc22 100644 --- a/include/media/v4l2-i2c-drv-legacy.h +++ b/include/media/v4l2-i2c-drv-legacy.h | |||
@@ -34,7 +34,7 @@ struct v4l2_i2c_driver_data { | |||
34 | }; | 34 | }; |
35 | 35 | ||
36 | static struct v4l2_i2c_driver_data v4l2_i2c_data; | 36 | static struct v4l2_i2c_driver_data v4l2_i2c_data; |
37 | static struct i2c_client_address_data addr_data; | 37 | static const struct i2c_client_address_data addr_data; |
38 | static struct i2c_driver v4l2_i2c_driver_legacy; | 38 | static struct i2c_driver v4l2_i2c_driver_legacy; |
39 | static char v4l2_i2c_drv_name_legacy[32]; | 39 | static char v4l2_i2c_drv_name_legacy[32]; |
40 | 40 | ||