diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2013-01-22 06:59:30 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-02-01 04:00:22 -0500 |
commit | 7034228792cc561e79ff8600f02884bd4c80e287 (patch) | |
tree | 89b77af37d087d9de236fc5d21f60bf552d0a2c6 | |
parent | 405ab01c70e18058d9c01a1256769a61fc65413e (diff) |
MIPS: Whitespace cleanup.
Having received another series of whitespace patches I decided to do this
once and for all rather than dealing with this kind of patches trickling
in forever.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
764 files changed, 11712 insertions, 11712 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index f2dfd404550c..6f7978f95090 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -191,7 +191,7 @@ endif | |||
191 | include $(srctree)/arch/mips/Kbuild.platforms | 191 | include $(srctree)/arch/mips/Kbuild.platforms |
192 | 192 | ||
193 | ifdef CONFIG_PHYSICAL_START | 193 | ifdef CONFIG_PHYSICAL_START |
194 | load-y = $(CONFIG_PHYSICAL_START) | 194 | load-y = $(CONFIG_PHYSICAL_START) |
195 | endif | 195 | endif |
196 | 196 | ||
197 | cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic | 197 | cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic |
diff --git a/arch/mips/alchemy/Platform b/arch/mips/alchemy/Platform index 942c5800a684..fa1bdd1aea15 100644 --- a/arch/mips/alchemy/Platform +++ b/arch/mips/alchemy/Platform | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Core Alchemy code | 2 | # Core Alchemy code |
3 | # | 3 | # |
4 | platform-$(CONFIG_MIPS_ALCHEMY) += alchemy/common/ | 4 | platform-$(CONFIG_MIPS_ALCHEMY) += alchemy/common/ |
5 | 5 | ||
6 | 6 | ||
7 | # | 7 | # |
@@ -45,7 +45,7 @@ load-$(CONFIG_MIPS_MTX1) += 0xffffffff80100000 | |||
45 | # | 45 | # |
46 | # MyCable eval board | 46 | # MyCable eval board |
47 | # | 47 | # |
48 | platform-$(CONFIG_MIPS_XXS1500) += alchemy/ | 48 | platform-$(CONFIG_MIPS_XXS1500) += alchemy/ |
49 | load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000 | 49 | load-$(CONFIG_MIPS_XXS1500) += 0xffffffff80100000 |
50 | 50 | ||
51 | # | 51 | # |
@@ -56,7 +56,7 @@ load-$(CONFIG_MIPS_GPR) += 0xffffffff80100000 | |||
56 | 56 | ||
57 | # boards can specify their own <gpio.h> in one of their include dirs. | 57 | # boards can specify their own <gpio.h> in one of their include dirs. |
58 | # If they do, placing this line here at the end will make sure the | 58 | # If they do, placing this line here at the end will make sure the |
59 | # compiler picks the board one. If they don't, it will make sure | 59 | # compiler picks the board one. If they don't, it will make sure |
60 | # the alchemy generic gpio header is picked up. | 60 | # the alchemy generic gpio header is picked up. |
61 | 61 | ||
62 | cflags-$(CONFIG_MIPS_ALCHEMY) += -I$(srctree)/arch/mips/include/asm/mach-au1x00 | 62 | cflags-$(CONFIG_MIPS_ALCHEMY) += -I$(srctree)/arch/mips/include/asm/mach-au1x00 |
diff --git a/arch/mips/alchemy/board-gpr.c b/arch/mips/alchemy/board-gpr.c index ba3259086b9d..cb0f6afb7389 100644 --- a/arch/mips/alchemy/board-gpr.c +++ b/arch/mips/alchemy/board-gpr.c | |||
@@ -135,33 +135,33 @@ static struct mtd_partition gpr_mtd_partitions[] = { | |||
135 | { | 135 | { |
136 | .name = "kernel", | 136 | .name = "kernel", |
137 | .size = 0x00200000, | 137 | .size = 0x00200000, |
138 | .offset = 0, | 138 | .offset = 0, |
139 | }, | 139 | }, |
140 | { | 140 | { |
141 | .name = "rootfs", | 141 | .name = "rootfs", |
142 | .size = 0x00800000, | 142 | .size = 0x00800000, |
143 | .offset = MTDPART_OFS_APPEND, | 143 | .offset = MTDPART_OFS_APPEND, |
144 | .mask_flags = MTD_WRITEABLE, | 144 | .mask_flags = MTD_WRITEABLE, |
145 | }, | 145 | }, |
146 | { | 146 | { |
147 | .name = "config", | 147 | .name = "config", |
148 | .size = 0x00200000, | 148 | .size = 0x00200000, |
149 | .offset = 0x01d00000, | 149 | .offset = 0x01d00000, |
150 | }, | 150 | }, |
151 | { | 151 | { |
152 | .name = "yamon", | 152 | .name = "yamon", |
153 | .size = 0x00100000, | 153 | .size = 0x00100000, |
154 | .offset = 0x01c00000, | 154 | .offset = 0x01c00000, |
155 | }, | 155 | }, |
156 | { | 156 | { |
157 | .name = "yamon env vars", | 157 | .name = "yamon env vars", |
158 | .size = 0x00040000, | 158 | .size = 0x00040000, |
159 | .offset = MTDPART_OFS_APPEND, | 159 | .offset = MTDPART_OFS_APPEND, |
160 | }, | 160 | }, |
161 | { | 161 | { |
162 | .name = "kernel+rootfs", | 162 | .name = "kernel+rootfs", |
163 | .size = 0x00a00000, | 163 | .size = 0x00a00000, |
164 | .offset = 0, | 164 | .offset = 0, |
165 | }, | 165 | }, |
166 | }; | 166 | }; |
167 | 167 | ||
diff --git a/arch/mips/alchemy/board-mtx1.c b/arch/mips/alchemy/board-mtx1.c index a124c251c0c9..4a9baa9f6330 100644 --- a/arch/mips/alchemy/board-mtx1.c +++ b/arch/mips/alchemy/board-mtx1.c | |||
@@ -173,23 +173,23 @@ static struct mtd_partition mtx1_mtd_partitions[] = { | |||
173 | { | 173 | { |
174 | .name = "filesystem", | 174 | .name = "filesystem", |
175 | .size = 0x01C00000, | 175 | .size = 0x01C00000, |
176 | .offset = 0, | 176 | .offset = 0, |
177 | }, | 177 | }, |
178 | { | 178 | { |
179 | .name = "yamon", | 179 | .name = "yamon", |
180 | .size = 0x00100000, | 180 | .size = 0x00100000, |
181 | .offset = MTDPART_OFS_APPEND, | 181 | .offset = MTDPART_OFS_APPEND, |
182 | .mask_flags = MTD_WRITEABLE, | 182 | .mask_flags = MTD_WRITEABLE, |
183 | }, | 183 | }, |
184 | { | 184 | { |
185 | .name = "kernel", | 185 | .name = "kernel", |
186 | .size = 0x002c0000, | 186 | .size = 0x002c0000, |
187 | .offset = MTDPART_OFS_APPEND, | 187 | .offset = MTDPART_OFS_APPEND, |
188 | }, | 188 | }, |
189 | { | 189 | { |
190 | .name = "yamon env", | 190 | .name = "yamon env", |
191 | .size = 0x00040000, | 191 | .size = 0x00040000, |
192 | .offset = MTDPART_OFS_APPEND, | 192 | .offset = MTDPART_OFS_APPEND, |
193 | }, | 193 | }, |
194 | }; | 194 | }; |
195 | 195 | ||
diff --git a/arch/mips/alchemy/common/dbdma.c b/arch/mips/alchemy/common/dbdma.c index cf02d7dc2df0..19d5642c16d9 100644 --- a/arch/mips/alchemy/common/dbdma.c +++ b/arch/mips/alchemy/common/dbdma.c | |||
@@ -252,7 +252,7 @@ EXPORT_SYMBOL(au1xxx_ddma_del_device); | |||
252 | u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, | 252 | u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, |
253 | void (*callback)(int, void *), void *callparam) | 253 | void (*callback)(int, void *), void *callparam) |
254 | { | 254 | { |
255 | unsigned long flags; | 255 | unsigned long flags; |
256 | u32 used, chan; | 256 | u32 used, chan; |
257 | u32 dcp; | 257 | u32 dcp; |
258 | int i; | 258 | int i; |
@@ -512,7 +512,7 @@ u32 au1xxx_dbdma_ring_alloc(u32 chanid, int entries) | |||
512 | break; | 512 | break; |
513 | } | 513 | } |
514 | 514 | ||
515 | /* If source input is FIFO, set static address. */ | 515 | /* If source input is FIFO, set static address. */ |
516 | if (stp->dev_flags & DEV_FLAGS_IN) { | 516 | if (stp->dev_flags & DEV_FLAGS_IN) { |
517 | if (stp->dev_flags & DEV_FLAGS_BURSTABLE) | 517 | if (stp->dev_flags & DEV_FLAGS_BURSTABLE) |
518 | src1 |= DSCR_SRC1_SAM(DSCR_xAM_BURST); | 518 | src1 |= DSCR_SRC1_SAM(DSCR_xAM_BURST); |
@@ -635,7 +635,7 @@ u32 au1xxx_dbdma_put_source(u32 chanid, dma_addr_t buf, int nbytes, u32 flags) | |||
635 | dma_cache_wback_inv((unsigned long)dp, sizeof(*dp)); | 635 | dma_cache_wback_inv((unsigned long)dp, sizeof(*dp)); |
636 | ctp->chan_ptr->ddma_dbell = 0; | 636 | ctp->chan_ptr->ddma_dbell = 0; |
637 | 637 | ||
638 | /* Get next descriptor pointer. */ | 638 | /* Get next descriptor pointer. */ |
639 | ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); | 639 | ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); |
640 | 640 | ||
641 | /* Return something non-zero. */ | 641 | /* Return something non-zero. */ |
@@ -697,7 +697,7 @@ u32 au1xxx_dbdma_put_dest(u32 chanid, dma_addr_t buf, int nbytes, u32 flags) | |||
697 | dma_cache_wback_inv((unsigned long)dp, sizeof(*dp)); | 697 | dma_cache_wback_inv((unsigned long)dp, sizeof(*dp)); |
698 | ctp->chan_ptr->ddma_dbell = 0; | 698 | ctp->chan_ptr->ddma_dbell = 0; |
699 | 699 | ||
700 | /* Get next descriptor pointer. */ | 700 | /* Get next descriptor pointer. */ |
701 | ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); | 701 | ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); |
702 | 702 | ||
703 | /* Return something non-zero. */ | 703 | /* Return something non-zero. */ |
@@ -742,7 +742,7 @@ u32 au1xxx_dbdma_get_dest(u32 chanid, void **buf, int *nbytes) | |||
742 | *nbytes = dp->dscr_cmd1; | 742 | *nbytes = dp->dscr_cmd1; |
743 | rv = dp->dscr_stat; | 743 | rv = dp->dscr_stat; |
744 | 744 | ||
745 | /* Get next descriptor pointer. */ | 745 | /* Get next descriptor pointer. */ |
746 | ctp->get_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); | 746 | ctp->get_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); |
747 | 747 | ||
748 | /* Return something non-zero. */ | 748 | /* Return something non-zero. */ |
@@ -891,7 +891,7 @@ void au1xxx_dbdma_dump(u32 chanid) | |||
891 | chan_tab_t *ctp; | 891 | chan_tab_t *ctp; |
892 | au1x_ddma_desc_t *dp; | 892 | au1x_ddma_desc_t *dp; |
893 | dbdev_tab_t *stp, *dtp; | 893 | dbdev_tab_t *stp, *dtp; |
894 | au1x_dma_chan_t *cp; | 894 | au1x_dma_chan_t *cp; |
895 | u32 i = 0; | 895 | u32 i = 0; |
896 | 896 | ||
897 | ctp = *((chan_tab_t **)chanid); | 897 | ctp = *((chan_tab_t **)chanid); |
@@ -969,7 +969,7 @@ u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr) | |||
969 | dp->dscr_cmd0 |= dscr->dscr_cmd0 | DSCR_CMD0_V; | 969 | dp->dscr_cmd0 |= dscr->dscr_cmd0 | DSCR_CMD0_V; |
970 | ctp->chan_ptr->ddma_dbell = 0; | 970 | ctp->chan_ptr->ddma_dbell = 0; |
971 | 971 | ||
972 | /* Get next descriptor pointer. */ | 972 | /* Get next descriptor pointer. */ |
973 | ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); | 973 | ctp->put_ptr = phys_to_virt(DSCR_GET_NXTPTR(dp->dscr_nxtptr)); |
974 | 974 | ||
975 | /* Return something non-zero. */ | 975 | /* Return something non-zero. */ |
diff --git a/arch/mips/alchemy/common/gpiolib.c b/arch/mips/alchemy/common/gpiolib.c index f1b50f0c01db..f9bc4f520440 100644 --- a/arch/mips/alchemy/common/gpiolib.c +++ b/arch/mips/alchemy/common/gpiolib.c | |||
@@ -106,14 +106,14 @@ struct gpio_chip alchemy_gpio_chip[] = { | |||
106 | .ngpio = ALCHEMY_GPIO1_NUM, | 106 | .ngpio = ALCHEMY_GPIO1_NUM, |
107 | }, | 107 | }, |
108 | [1] = { | 108 | [1] = { |
109 | .label = "alchemy-gpio2", | 109 | .label = "alchemy-gpio2", |
110 | .direction_input = gpio2_direction_input, | 110 | .direction_input = gpio2_direction_input, |
111 | .direction_output = gpio2_direction_output, | 111 | .direction_output = gpio2_direction_output, |
112 | .get = gpio2_get, | 112 | .get = gpio2_get, |
113 | .set = gpio2_set, | 113 | .set = gpio2_set, |
114 | .to_irq = gpio2_to_irq, | 114 | .to_irq = gpio2_to_irq, |
115 | .base = ALCHEMY_GPIO2_BASE, | 115 | .base = ALCHEMY_GPIO2_BASE, |
116 | .ngpio = ALCHEMY_GPIO2_NUM, | 116 | .ngpio = ALCHEMY_GPIO2_NUM, |
117 | }, | 117 | }, |
118 | }; | 118 | }; |
119 | 119 | ||
diff --git a/arch/mips/alchemy/common/irq.c b/arch/mips/alchemy/common/irq.c index 94fbcd19eb9c..63a71817a00c 100644 --- a/arch/mips/alchemy/common/irq.c +++ b/arch/mips/alchemy/common/irq.c | |||
@@ -84,20 +84,20 @@ static int au1300_gpic_settype(struct irq_data *d, unsigned int type); | |||
84 | * needs the highest priority. | 84 | * needs the highest priority. |
85 | */ | 85 | */ |
86 | struct alchemy_irqmap au1000_irqmap[] __initdata = { | 86 | struct alchemy_irqmap au1000_irqmap[] __initdata = { |
87 | { AU1000_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 87 | { AU1000_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
88 | { AU1000_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 88 | { AU1000_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
89 | { AU1000_UART2_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 89 | { AU1000_UART2_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
90 | { AU1000_UART3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 90 | { AU1000_UART3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
91 | { AU1000_SSI0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 91 | { AU1000_SSI0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
92 | { AU1000_SSI1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 92 | { AU1000_SSI1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
93 | { AU1000_DMA_INT_BASE, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 93 | { AU1000_DMA_INT_BASE, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
94 | { AU1000_DMA_INT_BASE+1, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 94 | { AU1000_DMA_INT_BASE+1, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
95 | { AU1000_DMA_INT_BASE+2, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 95 | { AU1000_DMA_INT_BASE+2, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
96 | { AU1000_DMA_INT_BASE+3, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 96 | { AU1000_DMA_INT_BASE+3, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
97 | { AU1000_DMA_INT_BASE+4, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 97 | { AU1000_DMA_INT_BASE+4, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
98 | { AU1000_DMA_INT_BASE+5, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 98 | { AU1000_DMA_INT_BASE+5, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
99 | { AU1000_DMA_INT_BASE+6, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 99 | { AU1000_DMA_INT_BASE+6, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
100 | { AU1000_DMA_INT_BASE+7, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 100 | { AU1000_DMA_INT_BASE+7, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
101 | { AU1000_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 101 | { AU1000_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
102 | { AU1000_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 102 | { AU1000_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
103 | { AU1000_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 103 | { AU1000_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
@@ -106,33 +106,33 @@ struct alchemy_irqmap au1000_irqmap[] __initdata = { | |||
106 | { AU1000_RTC_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 106 | { AU1000_RTC_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
107 | { AU1000_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 107 | { AU1000_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
108 | { AU1000_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, | 108 | { AU1000_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, |
109 | { AU1000_IRDA_TX_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 109 | { AU1000_IRDA_TX_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
110 | { AU1000_IRDA_RX_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 110 | { AU1000_IRDA_RX_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
111 | { AU1000_USB_DEV_REQ_INT, IRQ_TYPE_LEVEL_HIGH, 0, 0 }, | 111 | { AU1000_USB_DEV_REQ_INT, IRQ_TYPE_LEVEL_HIGH, 0, 0 }, |
112 | { AU1000_USB_DEV_SUS_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 112 | { AU1000_USB_DEV_SUS_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
113 | { AU1000_USB_HOST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 113 | { AU1000_USB_HOST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
114 | { AU1000_ACSYNC_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 114 | { AU1000_ACSYNC_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
115 | { AU1000_MAC0_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 115 | { AU1000_MAC0_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
116 | { AU1000_MAC1_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 116 | { AU1000_MAC1_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
117 | { AU1000_AC97C_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 117 | { AU1000_AC97C_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
118 | { -1, }, | 118 | { -1, }, |
119 | }; | 119 | }; |
120 | 120 | ||
121 | struct alchemy_irqmap au1500_irqmap[] __initdata = { | 121 | struct alchemy_irqmap au1500_irqmap[] __initdata = { |
122 | { AU1500_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 122 | { AU1500_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
123 | { AU1500_PCI_INTA, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 123 | { AU1500_PCI_INTA, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
124 | { AU1500_PCI_INTB, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 124 | { AU1500_PCI_INTB, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
125 | { AU1500_UART3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 125 | { AU1500_UART3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
126 | { AU1500_PCI_INTC, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 126 | { AU1500_PCI_INTC, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
127 | { AU1500_PCI_INTD, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 127 | { AU1500_PCI_INTD, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
128 | { AU1500_DMA_INT_BASE, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 128 | { AU1500_DMA_INT_BASE, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
129 | { AU1500_DMA_INT_BASE+1, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 129 | { AU1500_DMA_INT_BASE+1, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
130 | { AU1500_DMA_INT_BASE+2, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 130 | { AU1500_DMA_INT_BASE+2, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
131 | { AU1500_DMA_INT_BASE+3, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 131 | { AU1500_DMA_INT_BASE+3, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
132 | { AU1500_DMA_INT_BASE+4, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 132 | { AU1500_DMA_INT_BASE+4, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
133 | { AU1500_DMA_INT_BASE+5, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 133 | { AU1500_DMA_INT_BASE+5, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
134 | { AU1500_DMA_INT_BASE+6, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 134 | { AU1500_DMA_INT_BASE+6, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
135 | { AU1500_DMA_INT_BASE+7, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 135 | { AU1500_DMA_INT_BASE+7, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
136 | { AU1500_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 136 | { AU1500_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
137 | { AU1500_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 137 | { AU1500_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
138 | { AU1500_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 138 | { AU1500_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
@@ -141,31 +141,31 @@ struct alchemy_irqmap au1500_irqmap[] __initdata = { | |||
141 | { AU1500_RTC_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 141 | { AU1500_RTC_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
142 | { AU1500_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 142 | { AU1500_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
143 | { AU1500_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, | 143 | { AU1500_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, |
144 | { AU1500_USB_DEV_REQ_INT, IRQ_TYPE_LEVEL_HIGH, 0, 0 }, | 144 | { AU1500_USB_DEV_REQ_INT, IRQ_TYPE_LEVEL_HIGH, 0, 0 }, |
145 | { AU1500_USB_DEV_SUS_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 145 | { AU1500_USB_DEV_SUS_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
146 | { AU1500_USB_HOST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 146 | { AU1500_USB_HOST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
147 | { AU1500_ACSYNC_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 147 | { AU1500_ACSYNC_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
148 | { AU1500_MAC0_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 148 | { AU1500_MAC0_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
149 | { AU1500_MAC1_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 149 | { AU1500_MAC1_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
150 | { AU1500_AC97C_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 150 | { AU1500_AC97C_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
151 | { -1, }, | 151 | { -1, }, |
152 | }; | 152 | }; |
153 | 153 | ||
154 | struct alchemy_irqmap au1100_irqmap[] __initdata = { | 154 | struct alchemy_irqmap au1100_irqmap[] __initdata = { |
155 | { AU1100_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 155 | { AU1100_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
156 | { AU1100_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 156 | { AU1100_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
157 | { AU1100_SD_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 157 | { AU1100_SD_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
158 | { AU1100_UART3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 158 | { AU1100_UART3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
159 | { AU1100_SSI0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 159 | { AU1100_SSI0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
160 | { AU1100_SSI1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 160 | { AU1100_SSI1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
161 | { AU1100_DMA_INT_BASE, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 161 | { AU1100_DMA_INT_BASE, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
162 | { AU1100_DMA_INT_BASE+1, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 162 | { AU1100_DMA_INT_BASE+1, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
163 | { AU1100_DMA_INT_BASE+2, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 163 | { AU1100_DMA_INT_BASE+2, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
164 | { AU1100_DMA_INT_BASE+3, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 164 | { AU1100_DMA_INT_BASE+3, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
165 | { AU1100_DMA_INT_BASE+4, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 165 | { AU1100_DMA_INT_BASE+4, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
166 | { AU1100_DMA_INT_BASE+5, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 166 | { AU1100_DMA_INT_BASE+5, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
167 | { AU1100_DMA_INT_BASE+6, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 167 | { AU1100_DMA_INT_BASE+6, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
168 | { AU1100_DMA_INT_BASE+7, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 168 | { AU1100_DMA_INT_BASE+7, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
169 | { AU1100_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 169 | { AU1100_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
170 | { AU1100_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 170 | { AU1100_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
171 | { AU1100_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 171 | { AU1100_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
@@ -174,33 +174,33 @@ struct alchemy_irqmap au1100_irqmap[] __initdata = { | |||
174 | { AU1100_RTC_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 174 | { AU1100_RTC_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
175 | { AU1100_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 175 | { AU1100_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
176 | { AU1100_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, | 176 | { AU1100_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, |
177 | { AU1100_IRDA_TX_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 177 | { AU1100_IRDA_TX_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
178 | { AU1100_IRDA_RX_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 178 | { AU1100_IRDA_RX_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
179 | { AU1100_USB_DEV_REQ_INT, IRQ_TYPE_LEVEL_HIGH, 0, 0 }, | 179 | { AU1100_USB_DEV_REQ_INT, IRQ_TYPE_LEVEL_HIGH, 0, 0 }, |
180 | { AU1100_USB_DEV_SUS_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 180 | { AU1100_USB_DEV_SUS_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
181 | { AU1100_USB_HOST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 181 | { AU1100_USB_HOST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
182 | { AU1100_ACSYNC_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 182 | { AU1100_ACSYNC_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
183 | { AU1100_MAC0_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 183 | { AU1100_MAC0_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
184 | { AU1100_LCD_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 184 | { AU1100_LCD_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
185 | { AU1100_AC97C_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 185 | { AU1100_AC97C_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
186 | { -1, }, | 186 | { -1, }, |
187 | }; | 187 | }; |
188 | 188 | ||
189 | struct alchemy_irqmap au1550_irqmap[] __initdata = { | 189 | struct alchemy_irqmap au1550_irqmap[] __initdata = { |
190 | { AU1550_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 190 | { AU1550_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
191 | { AU1550_PCI_INTA, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 191 | { AU1550_PCI_INTA, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
192 | { AU1550_PCI_INTB, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 192 | { AU1550_PCI_INTB, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
193 | { AU1550_DDMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 193 | { AU1550_DDMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
194 | { AU1550_CRYPTO_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 194 | { AU1550_CRYPTO_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
195 | { AU1550_PCI_INTC, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 195 | { AU1550_PCI_INTC, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
196 | { AU1550_PCI_INTD, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 196 | { AU1550_PCI_INTD, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
197 | { AU1550_PCI_RST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 197 | { AU1550_PCI_RST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
198 | { AU1550_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 198 | { AU1550_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
199 | { AU1550_UART3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 199 | { AU1550_UART3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
200 | { AU1550_PSC0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 200 | { AU1550_PSC0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
201 | { AU1550_PSC1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 201 | { AU1550_PSC1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
202 | { AU1550_PSC2_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 202 | { AU1550_PSC2_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
203 | { AU1550_PSC3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 203 | { AU1550_PSC3_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
204 | { AU1550_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 204 | { AU1550_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
205 | { AU1550_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 205 | { AU1550_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
206 | { AU1550_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 206 | { AU1550_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
@@ -210,26 +210,26 @@ struct alchemy_irqmap au1550_irqmap[] __initdata = { | |||
210 | { AU1550_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 210 | { AU1550_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
211 | { AU1550_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, | 211 | { AU1550_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, |
212 | { AU1550_NAND_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 212 | { AU1550_NAND_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
213 | { AU1550_USB_DEV_REQ_INT, IRQ_TYPE_LEVEL_HIGH, 0, 0 }, | 213 | { AU1550_USB_DEV_REQ_INT, IRQ_TYPE_LEVEL_HIGH, 0, 0 }, |
214 | { AU1550_USB_DEV_SUS_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 214 | { AU1550_USB_DEV_SUS_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
215 | { AU1550_USB_HOST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, | 215 | { AU1550_USB_HOST_INT, IRQ_TYPE_LEVEL_LOW, 1, 0 }, |
216 | { AU1550_MAC0_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 216 | { AU1550_MAC0_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
217 | { AU1550_MAC1_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 217 | { AU1550_MAC1_DMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
218 | { -1, }, | 218 | { -1, }, |
219 | }; | 219 | }; |
220 | 220 | ||
221 | struct alchemy_irqmap au1200_irqmap[] __initdata = { | 221 | struct alchemy_irqmap au1200_irqmap[] __initdata = { |
222 | { AU1200_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 222 | { AU1200_UART0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
223 | { AU1200_SWT_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 223 | { AU1200_SWT_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
224 | { AU1200_SD_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 224 | { AU1200_SD_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
225 | { AU1200_DDMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 225 | { AU1200_DDMA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
226 | { AU1200_MAE_BE_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 226 | { AU1200_MAE_BE_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
227 | { AU1200_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 227 | { AU1200_UART1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
228 | { AU1200_MAE_FE_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 228 | { AU1200_MAE_FE_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
229 | { AU1200_PSC0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 229 | { AU1200_PSC0_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
230 | { AU1200_PSC1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 230 | { AU1200_PSC1_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
231 | { AU1200_AES_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 231 | { AU1200_AES_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
232 | { AU1200_CAMERA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 232 | { AU1200_CAMERA_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
233 | { AU1200_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 233 | { AU1200_TOY_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
234 | { AU1200_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 234 | { AU1200_TOY_MATCH0_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
235 | { AU1200_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 235 | { AU1200_TOY_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
@@ -239,9 +239,9 @@ struct alchemy_irqmap au1200_irqmap[] __initdata = { | |||
239 | { AU1200_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 239 | { AU1200_RTC_MATCH1_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
240 | { AU1200_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, | 240 | { AU1200_RTC_MATCH2_INT, IRQ_TYPE_EDGE_RISING, 0, 0 }, |
241 | { AU1200_NAND_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, | 241 | { AU1200_NAND_INT, IRQ_TYPE_EDGE_RISING, 1, 0 }, |
242 | { AU1200_USB_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 242 | { AU1200_USB_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
243 | { AU1200_LCD_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 243 | { AU1200_LCD_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
244 | { AU1200_MAE_BOTH_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, | 244 | { AU1200_MAE_BOTH_INT, IRQ_TYPE_LEVEL_HIGH, 1, 0 }, |
245 | { -1, }, | 245 | { -1, }, |
246 | }; | 246 | }; |
247 | 247 | ||
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 7af941d8e717..9837a134a6d6 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c | |||
@@ -53,7 +53,7 @@ static void alchemy_8250_pm(struct uart_port *port, unsigned int state, | |||
53 | .irq = _irq, \ | 53 | .irq = _irq, \ |
54 | .regshift = 2, \ | 54 | .regshift = 2, \ |
55 | .iotype = UPIO_AU, \ | 55 | .iotype = UPIO_AU, \ |
56 | .flags = UPF_SKIP_TEST | UPF_IOREMAP | \ | 56 | .flags = UPF_SKIP_TEST | UPF_IOREMAP | \ |
57 | UPF_FIXED_TYPE, \ | 57 | UPF_FIXED_TYPE, \ |
58 | .type = PORT_16550A, \ | 58 | .type = PORT_16550A, \ |
59 | .pm = alchemy_8250_pm, \ | 59 | .pm = alchemy_8250_pm, \ |
@@ -137,7 +137,7 @@ static void alchemy_ehci_power_off(struct platform_device *pdev) | |||
137 | } | 137 | } |
138 | 138 | ||
139 | static struct usb_ehci_pdata alchemy_ehci_pdata = { | 139 | static struct usb_ehci_pdata alchemy_ehci_pdata = { |
140 | .no_io_watchdog = 1, | 140 | .no_io_watchdog = 1, |
141 | .power_on = alchemy_ehci_power_on, | 141 | .power_on = alchemy_ehci_power_on, |
142 | .power_off = alchemy_ehci_power_off, | 142 | .power_off = alchemy_ehci_power_off, |
143 | .power_suspend = alchemy_ehci_power_off, | 143 | .power_suspend = alchemy_ehci_power_off, |
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c index 37ffd997c616..62b4e7bbeab9 100644 --- a/arch/mips/alchemy/common/setup.c +++ b/arch/mips/alchemy/common/setup.c | |||
@@ -59,7 +59,7 @@ void __init plat_mem_setup(void) | |||
59 | /* Clear to obtain best system bus performance */ | 59 | /* Clear to obtain best system bus performance */ |
60 | clear_c0_config(1 << 19); /* Clear Config[OD] */ | 60 | clear_c0_config(1 << 19); /* Clear Config[OD] */ |
61 | 61 | ||
62 | board_setup(); /* board specific setup */ | 62 | board_setup(); /* board specific setup */ |
63 | 63 | ||
64 | /* IO/MEM resources. */ | 64 | /* IO/MEM resources. */ |
65 | set_io_port_base(0); | 65 | set_io_port_base(0); |
diff --git a/arch/mips/alchemy/common/sleeper.S b/arch/mips/alchemy/common/sleeper.S index c7bcc7e5c822..706d933e0085 100644 --- a/arch/mips/alchemy/common/sleeper.S +++ b/arch/mips/alchemy/common/sleeper.S | |||
@@ -102,12 +102,12 @@ LEAF(alchemy_sleep_au1000) | |||
102 | cache 0x14, 96(t0) | 102 | cache 0x14, 96(t0) |
103 | .set mips0 | 103 | .set mips0 |
104 | 104 | ||
105 | 1: lui a0, 0xb400 /* mem_xxx */ | 105 | 1: lui a0, 0xb400 /* mem_xxx */ |
106 | sw zero, 0x001c(a0) /* Precharge */ | 106 | sw zero, 0x001c(a0) /* Precharge */ |
107 | sync | 107 | sync |
108 | sw zero, 0x0020(a0) /* Auto Refresh */ | 108 | sw zero, 0x0020(a0) /* Auto Refresh */ |
109 | sync | 109 | sync |
110 | sw zero, 0x0030(a0) /* Sleep */ | 110 | sw zero, 0x0030(a0) /* Sleep */ |
111 | sync | 111 | sync |
112 | 112 | ||
113 | DO_SLEEP | 113 | DO_SLEEP |
@@ -128,15 +128,15 @@ LEAF(alchemy_sleep_au1550) | |||
128 | cache 0x14, 96(t0) | 128 | cache 0x14, 96(t0) |
129 | .set mips0 | 129 | .set mips0 |
130 | 130 | ||
131 | 1: lui a0, 0xb400 /* mem_xxx */ | 131 | 1: lui a0, 0xb400 /* mem_xxx */ |
132 | sw zero, 0x08c0(a0) /* Precharge */ | 132 | sw zero, 0x08c0(a0) /* Precharge */ |
133 | sync | 133 | sync |
134 | sw zero, 0x08d0(a0) /* Self Refresh */ | 134 | sw zero, 0x08d0(a0) /* Self Refresh */ |
135 | sync | 135 | sync |
136 | 136 | ||
137 | /* wait for sdram to enter self-refresh mode */ | 137 | /* wait for sdram to enter self-refresh mode */ |
138 | lui t0, 0x0100 | 138 | lui t0, 0x0100 |
139 | 2: lw t1, 0x0850(a0) /* mem_sdstat */ | 139 | 2: lw t1, 0x0850(a0) /* mem_sdstat */ |
140 | and t2, t1, t0 | 140 | and t2, t1, t0 |
141 | beq t2, zero, 2b | 141 | beq t2, zero, 2b |
142 | nop | 142 | nop |
@@ -144,9 +144,9 @@ LEAF(alchemy_sleep_au1550) | |||
144 | /* disable SDRAM clocks */ | 144 | /* disable SDRAM clocks */ |
145 | lui t0, 0xcfff | 145 | lui t0, 0xcfff |
146 | ori t0, t0, 0xffff | 146 | ori t0, t0, 0xffff |
147 | lw t1, 0x0840(a0) /* mem_sdconfiga */ | 147 | lw t1, 0x0840(a0) /* mem_sdconfiga */ |
148 | and t1, t0, t1 /* clear CE[1:0] */ | 148 | and t1, t0, t1 /* clear CE[1:0] */ |
149 | sw t1, 0x0840(a0) /* mem_sdconfiga */ | 149 | sw t1, 0x0840(a0) /* mem_sdconfiga */ |
150 | sync | 150 | sync |
151 | 151 | ||
152 | DO_SLEEP | 152 | DO_SLEEP |
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index b67930d19325..38afb11ba2c4 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c | |||
@@ -85,7 +85,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = { | |||
85 | .name = "rtcmatch2", | 85 | .name = "rtcmatch2", |
86 | .features = CLOCK_EVT_FEAT_ONESHOT, | 86 | .features = CLOCK_EVT_FEAT_ONESHOT, |
87 | .rating = 1500, | 87 | .rating = 1500, |
88 | .set_next_event = au1x_rtcmatch2_set_next_event, | 88 | .set_next_event = au1x_rtcmatch2_set_next_event, |
89 | .set_mode = au1x_rtcmatch2_set_mode, | 89 | .set_mode = au1x_rtcmatch2_set_mode, |
90 | .cpumask = cpu_all_mask, | 90 | .cpumask = cpu_all_mask, |
91 | }; | 91 | }; |
diff --git a/arch/mips/alchemy/common/usb.c b/arch/mips/alchemy/common/usb.c index 936af8359fb2..fcc695626117 100644 --- a/arch/mips/alchemy/common/usb.c +++ b/arch/mips/alchemy/common/usb.c | |||
@@ -122,7 +122,7 @@ static inline void __au1300_ohci_control(void __iomem *base, int enable, int id) | |||
122 | unsigned long r; | 122 | unsigned long r; |
123 | 123 | ||
124 | if (enable) { | 124 | if (enable) { |
125 | __raw_writel(1, base + USB_DWC_CTRL7); /* start OHCI clock */ | 125 | __raw_writel(1, base + USB_DWC_CTRL7); /* start OHCI clock */ |
126 | wmb(); | 126 | wmb(); |
127 | 127 | ||
128 | r = __raw_readl(base + USB_DWC_CTRL3); /* enable OHCI block */ | 128 | r = __raw_readl(base + USB_DWC_CTRL3); /* enable OHCI block */ |
diff --git a/arch/mips/alchemy/devboards/bcsr.c b/arch/mips/alchemy/devboards/bcsr.c index f2039ef2c293..c98c9ea3372c 100644 --- a/arch/mips/alchemy/devboards/bcsr.c +++ b/arch/mips/alchemy/devboards/bcsr.c | |||
@@ -20,7 +20,7 @@ static struct bcsr_reg { | |||
20 | spinlock_t lock; | 20 | spinlock_t lock; |
21 | } bcsr_regs[BCSR_CNT]; | 21 | } bcsr_regs[BCSR_CNT]; |
22 | 22 | ||
23 | static void __iomem *bcsr_virt; /* KSEG1 addr of BCSR base */ | 23 | static void __iomem *bcsr_virt; /* KSEG1 addr of BCSR base */ |
24 | static int bcsr_csc_base; /* linux-irq of first cascaded irq */ | 24 | static int bcsr_csc_base; /* linux-irq of first cascaded irq */ |
25 | 25 | ||
26 | void __init bcsr_init(unsigned long bcsr1_phys, unsigned long bcsr2_phys) | 26 | void __init bcsr_init(unsigned long bcsr1_phys, unsigned long bcsr2_phys) |
diff --git a/arch/mips/alchemy/devboards/db1000.c b/arch/mips/alchemy/devboards/db1000.c index 8187845650f7..11f3ad20321c 100644 --- a/arch/mips/alchemy/devboards/db1000.c +++ b/arch/mips/alchemy/devboards/db1000.c | |||
@@ -276,7 +276,7 @@ static void db1100_mmcled_set(struct led_classdev *led, enum led_brightness b) | |||
276 | } | 276 | } |
277 | 277 | ||
278 | static struct led_classdev db1100_mmc_led = { | 278 | static struct led_classdev db1100_mmc_led = { |
279 | .brightness_set = db1100_mmcled_set, | 279 | .brightness_set = db1100_mmcled_set, |
280 | }; | 280 | }; |
281 | 281 | ||
282 | static int db1100_mmc1_card_readonly(void *mmc_host) | 282 | static int db1100_mmc1_card_readonly(void *mmc_host) |
@@ -314,7 +314,7 @@ static void db1100_mmc1led_set(struct led_classdev *led, enum led_brightness b) | |||
314 | } | 314 | } |
315 | 315 | ||
316 | static struct led_classdev db1100_mmc1_led = { | 316 | static struct led_classdev db1100_mmc1_led = { |
317 | .brightness_set = db1100_mmc1led_set, | 317 | .brightness_set = db1100_mmc1led_set, |
318 | }; | 318 | }; |
319 | 319 | ||
320 | static struct au1xmmc_platform_data db1100_mmc_platdata[2] = { | 320 | static struct au1xmmc_platform_data db1100_mmc_platdata[2] = { |
@@ -357,7 +357,7 @@ static struct resource au1100_mmc0_resources[] = { | |||
357 | } | 357 | } |
358 | }; | 358 | }; |
359 | 359 | ||
360 | static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32); | 360 | static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32); |
361 | 361 | ||
362 | static struct platform_device db1100_mmc0_dev = { | 362 | static struct platform_device db1100_mmc0_dev = { |
363 | .name = "au1xxx-mmc", | 363 | .name = "au1xxx-mmc", |
@@ -482,7 +482,7 @@ static struct spi_board_info db1100_spi_info[] __initdata = { | |||
482 | .mode = 0, | 482 | .mode = 0, |
483 | .irq = AU1100_GPIO21_INT, | 483 | .irq = AU1100_GPIO21_INT, |
484 | .platform_data = &db1100_touch_pd, | 484 | .platform_data = &db1100_touch_pd, |
485 | .controller_data = (void *)210, /* for spi_gpio: CS# GPIO210 */ | 485 | .controller_data = (void *)210, /* for spi_gpio: CS# GPIO210 */ |
486 | }, | 486 | }, |
487 | }; | 487 | }; |
488 | 488 | ||
@@ -572,7 +572,7 @@ static int __init db1000_dev_init(void) | |||
572 | irq_set_irq_type(AU1500_GPIO204_INT, IRQ_TYPE_LEVEL_LOW); | 572 | irq_set_irq_type(AU1500_GPIO204_INT, IRQ_TYPE_LEVEL_LOW); |
573 | irq_set_irq_type(AU1500_GPIO205_INT, IRQ_TYPE_LEVEL_LOW); | 573 | irq_set_irq_type(AU1500_GPIO205_INT, IRQ_TYPE_LEVEL_LOW); |
574 | /* EPSON S1D13806 0x1b000000 | 574 | /* EPSON S1D13806 0x1b000000 |
575 | * SRAM 1MB/2MB 0x1a000000 | 575 | * SRAM 1MB/2MB 0x1a000000 |
576 | * DS1693 RTC 0x0c000000 | 576 | * DS1693 RTC 0x0c000000 |
577 | */ | 577 | */ |
578 | } else if (board == BCSR_WHOAMI_PB1100) { | 578 | } else if (board == BCSR_WHOAMI_PB1100) { |
@@ -586,7 +586,7 @@ static int __init db1000_dev_init(void) | |||
586 | irq_set_irq_type(AU1100_GPIO12_INT, IRQ_TYPE_LEVEL_LOW); | 586 | irq_set_irq_type(AU1100_GPIO12_INT, IRQ_TYPE_LEVEL_LOW); |
587 | irq_set_irq_type(AU1100_GPIO13_INT, IRQ_TYPE_LEVEL_LOW); | 587 | irq_set_irq_type(AU1100_GPIO13_INT, IRQ_TYPE_LEVEL_LOW); |
588 | /* EPSON S1D13806 0x1b000000 | 588 | /* EPSON S1D13806 0x1b000000 |
589 | * SRAM 1MB/2MB 0x1a000000 | 589 | * SRAM 1MB/2MB 0x1a000000 |
590 | * DiskOnChip 0x0d000000 | 590 | * DiskOnChip 0x0d000000 |
591 | * DS1693 RTC 0x0c000000 | 591 | * DS1693 RTC 0x0c000000 |
592 | */ | 592 | */ |
@@ -605,7 +605,7 @@ static int __init db1000_dev_init(void) | |||
605 | AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, | 605 | AU1000_PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, |
606 | AU1000_PCMCIA_IO_PHYS_ADDR, | 606 | AU1000_PCMCIA_IO_PHYS_ADDR, |
607 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, | 607 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, |
608 | c0, d0, /*s0*/0, 0, 0); | 608 | c0, d0, /*s0*/0, 0, 0); |
609 | 609 | ||
610 | if (twosocks) { | 610 | if (twosocks) { |
611 | irq_set_irq_type(d1, IRQ_TYPE_EDGE_BOTH); | 611 | irq_set_irq_type(d1, IRQ_TYPE_EDGE_BOTH); |
@@ -619,7 +619,7 @@ static int __init db1000_dev_init(void) | |||
619 | AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1, | 619 | AU1000_PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1, |
620 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x004000000, | 620 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x004000000, |
621 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1, | 621 | AU1000_PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1, |
622 | c1, d1, /*s1*/0, 0, 1); | 622 | c1, d1, /*s1*/0, 0, 1); |
623 | } | 623 | } |
624 | 624 | ||
625 | platform_add_devices(db1x00_devs, ARRAY_SIZE(db1x00_devs)); | 625 | platform_add_devices(db1x00_devs, ARRAY_SIZE(db1x00_devs)); |
diff --git a/arch/mips/alchemy/devboards/db1200.c b/arch/mips/alchemy/devboards/db1200.c index 299b7d202bea..a84d98b8f96e 100644 --- a/arch/mips/alchemy/devboards/db1200.c +++ b/arch/mips/alchemy/devboards/db1200.c | |||
@@ -90,14 +90,14 @@ int __init db1200_board_setup(void) | |||
90 | 90 | ||
91 | whoami = bcsr_read(BCSR_WHOAMI); | 91 | whoami = bcsr_read(BCSR_WHOAMI); |
92 | printk(KERN_INFO "Alchemy/AMD/RMI %s Board, CPLD Rev %d" | 92 | printk(KERN_INFO "Alchemy/AMD/RMI %s Board, CPLD Rev %d" |
93 | " Board-ID %d Daughtercard ID %d\n", get_system_type(), | 93 | " Board-ID %d Daughtercard ID %d\n", get_system_type(), |
94 | (whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf); | 94 | (whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf); |
95 | 95 | ||
96 | /* SMBus/SPI on PSC0, Audio on PSC1 */ | 96 | /* SMBus/SPI on PSC0, Audio on PSC1 */ |
97 | pfc = __raw_readl((void __iomem *)SYS_PINFUNC); | 97 | pfc = __raw_readl((void __iomem *)SYS_PINFUNC); |
98 | pfc &= ~(SYS_PINFUNC_P0A | SYS_PINFUNC_P0B); | 98 | pfc &= ~(SYS_PINFUNC_P0A | SYS_PINFUNC_P0B); |
99 | pfc &= ~(SYS_PINFUNC_P1A | SYS_PINFUNC_P1B | SYS_PINFUNC_FS3); | 99 | pfc &= ~(SYS_PINFUNC_P1A | SYS_PINFUNC_P1B | SYS_PINFUNC_FS3); |
100 | pfc |= SYS_PINFUNC_P1C; /* SPI is configured later */ | 100 | pfc |= SYS_PINFUNC_P1C; /* SPI is configured later */ |
101 | __raw_writel(pfc, (void __iomem *)SYS_PINFUNC); | 101 | __raw_writel(pfc, (void __iomem *)SYS_PINFUNC); |
102 | wmb(); | 102 | wmb(); |
103 | 103 | ||
@@ -129,7 +129,7 @@ int __init db1200_board_setup(void) | |||
129 | static struct mtd_partition db1200_spiflash_parts[] = { | 129 | static struct mtd_partition db1200_spiflash_parts[] = { |
130 | { | 130 | { |
131 | .name = "spi_flash", | 131 | .name = "spi_flash", |
132 | .offset = 0, | 132 | .offset = 0, |
133 | .size = MTDPART_SIZ_FULL, | 133 | .size = MTDPART_SIZ_FULL, |
134 | }, | 134 | }, |
135 | }; | 135 | }; |
@@ -200,12 +200,12 @@ static int au1200_nand_device_ready(struct mtd_info *mtd) | |||
200 | static struct mtd_partition db1200_nand_parts[] = { | 200 | static struct mtd_partition db1200_nand_parts[] = { |
201 | { | 201 | { |
202 | .name = "NAND FS 0", | 202 | .name = "NAND FS 0", |
203 | .offset = 0, | 203 | .offset = 0, |
204 | .size = 8 * 1024 * 1024, | 204 | .size = 8 * 1024 * 1024, |
205 | }, | 205 | }, |
206 | { | 206 | { |
207 | .name = "NAND FS 1", | 207 | .name = "NAND FS 1", |
208 | .offset = MTDPART_OFS_APPEND, | 208 | .offset = MTDPART_OFS_APPEND, |
209 | .size = MTDPART_SIZ_FULL | 209 | .size = MTDPART_SIZ_FULL |
210 | }, | 210 | }, |
211 | }; | 211 | }; |
@@ -395,7 +395,7 @@ static void db1200_mmcled_set(struct led_classdev *led, | |||
395 | } | 395 | } |
396 | 396 | ||
397 | static struct led_classdev db1200_mmc_led = { | 397 | static struct led_classdev db1200_mmc_led = { |
398 | .brightness_set = db1200_mmcled_set, | 398 | .brightness_set = db1200_mmcled_set, |
399 | }; | 399 | }; |
400 | 400 | ||
401 | /* -- */ | 401 | /* -- */ |
@@ -463,7 +463,7 @@ static void pb1200_mmc1led_set(struct led_classdev *led, | |||
463 | } | 463 | } |
464 | 464 | ||
465 | static struct led_classdev pb1200_mmc1_led = { | 465 | static struct led_classdev pb1200_mmc1_led = { |
466 | .brightness_set = pb1200_mmc1led_set, | 466 | .brightness_set = pb1200_mmc1led_set, |
467 | }; | 467 | }; |
468 | 468 | ||
469 | static void pb1200_mmc1_set_power(void *mmc_host, int state) | 469 | static void pb1200_mmc1_set_power(void *mmc_host, int state) |
@@ -526,7 +526,7 @@ static struct resource au1200_mmc0_resources[] = { | |||
526 | } | 526 | } |
527 | }; | 527 | }; |
528 | 528 | ||
529 | static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32); | 529 | static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32); |
530 | 530 | ||
531 | static struct platform_device db1200_mmc0_dev = { | 531 | static struct platform_device db1200_mmc0_dev = { |
532 | .name = "au1xxx-mmc", | 532 | .name = "au1xxx-mmc", |
@@ -601,7 +601,7 @@ static int db1200fb_panel_shutdown(void) | |||
601 | static struct au1200fb_platdata db1200fb_pd = { | 601 | static struct au1200fb_platdata db1200fb_pd = { |
602 | .panel_index = db1200fb_panel_index, | 602 | .panel_index = db1200fb_panel_index, |
603 | .panel_init = db1200fb_panel_init, | 603 | .panel_init = db1200fb_panel_init, |
604 | .panel_shutdown = db1200fb_panel_shutdown, | 604 | .panel_shutdown = db1200fb_panel_shutdown, |
605 | }; | 605 | }; |
606 | 606 | ||
607 | static struct resource au1200_lcd_res[] = { | 607 | static struct resource au1200_lcd_res[] = { |
@@ -772,11 +772,11 @@ static int __init pb1200_res_fixup(void) | |||
772 | } | 772 | } |
773 | 773 | ||
774 | db1200_nand_res[0].start = PB1200_NAND_PHYS_ADDR; | 774 | db1200_nand_res[0].start = PB1200_NAND_PHYS_ADDR; |
775 | db1200_nand_res[0].end = PB1200_NAND_PHYS_ADDR + 0xff; | 775 | db1200_nand_res[0].end = PB1200_NAND_PHYS_ADDR + 0xff; |
776 | db1200_ide_res[0].start = PB1200_IDE_PHYS_ADDR; | 776 | db1200_ide_res[0].start = PB1200_IDE_PHYS_ADDR; |
777 | db1200_ide_res[0].end = PB1200_IDE_PHYS_ADDR + DB1200_IDE_PHYS_LEN - 1; | 777 | db1200_ide_res[0].end = PB1200_IDE_PHYS_ADDR + DB1200_IDE_PHYS_LEN - 1; |
778 | db1200_eth_res[0].start = PB1200_ETH_PHYS_ADDR; | 778 | db1200_eth_res[0].start = PB1200_ETH_PHYS_ADDR; |
779 | db1200_eth_res[0].end = PB1200_ETH_PHYS_ADDR + 0xff; | 779 | db1200_eth_res[0].end = PB1200_ETH_PHYS_ADDR + 0xff; |
780 | return 0; | 780 | return 0; |
781 | } | 781 | } |
782 | 782 | ||
@@ -797,7 +797,7 @@ int __init db1200_dev_setup(void) | |||
797 | irq_set_irq_type(AU1200_GPIO7_INT, IRQ_TYPE_LEVEL_LOW); | 797 | irq_set_irq_type(AU1200_GPIO7_INT, IRQ_TYPE_LEVEL_LOW); |
798 | bcsr_init_irq(DB1200_INT_BEGIN, DB1200_INT_END, AU1200_GPIO7_INT); | 798 | bcsr_init_irq(DB1200_INT_BEGIN, DB1200_INT_END, AU1200_GPIO7_INT); |
799 | 799 | ||
800 | /* insert/eject pairs: one of both is always screaming. To avoid | 800 | /* insert/eject pairs: one of both is always screaming. To avoid |
801 | * issues they must not be automatically enabled when initially | 801 | * issues they must not be automatically enabled when initially |
802 | * requested. | 802 | * requested. |
803 | */ | 803 | */ |
@@ -813,7 +813,7 @@ int __init db1200_dev_setup(void) | |||
813 | spi_register_board_info(db1200_spi_devs, | 813 | spi_register_board_info(db1200_spi_devs, |
814 | ARRAY_SIZE(db1200_i2c_devs)); | 814 | ARRAY_SIZE(db1200_i2c_devs)); |
815 | 815 | ||
816 | /* SWITCHES: S6.8 I2C/SPI selector (OFF=I2C ON=SPI) | 816 | /* SWITCHES: S6.8 I2C/SPI selector (OFF=I2C ON=SPI) |
817 | * S6.7 AC97/I2S selector (OFF=AC97 ON=I2S) | 817 | * S6.7 AC97/I2S selector (OFF=AC97 ON=I2S) |
818 | * or S12 on the PB1200. | 818 | * or S12 on the PB1200. |
819 | */ | 819 | */ |
diff --git a/arch/mips/alchemy/devboards/db1300.c b/arch/mips/alchemy/devboards/db1300.c index cdf37cbd3d1f..6167e73eef9c 100644 --- a/arch/mips/alchemy/devboards/db1300.c +++ b/arch/mips/alchemy/devboards/db1300.c | |||
@@ -80,7 +80,7 @@ static int db1300_dev_pins[] __initdata = { | |||
80 | AU1300_PIN_PSC0D1, | 80 | AU1300_PIN_PSC0D1, |
81 | AU1300_PIN_PSC1SYNC0, AU1300_PIN_PSC1SYNC1, AU1300_PIN_PSC1D0, | 81 | AU1300_PIN_PSC1SYNC0, AU1300_PIN_PSC1SYNC1, AU1300_PIN_PSC1D0, |
82 | AU1300_PIN_PSC1D1, | 82 | AU1300_PIN_PSC1D1, |
83 | AU1300_PIN_PSC2SYNC0, AU1300_PIN_PSC2D0, | 83 | AU1300_PIN_PSC2SYNC0, AU1300_PIN_PSC2D0, |
84 | AU1300_PIN_PSC2D1, | 84 | AU1300_PIN_PSC2D1, |
85 | AU1300_PIN_PSC3SYNC0, AU1300_PIN_PSC3SYNC1, AU1300_PIN_PSC3D0, | 85 | AU1300_PIN_PSC3SYNC0, AU1300_PIN_PSC3SYNC1, AU1300_PIN_PSC3D0, |
86 | AU1300_PIN_PSC3D1, | 86 | AU1300_PIN_PSC3D1, |
@@ -143,12 +143,12 @@ static int au1300_nand_device_ready(struct mtd_info *mtd) | |||
143 | static struct mtd_partition db1300_nand_parts[] = { | 143 | static struct mtd_partition db1300_nand_parts[] = { |
144 | { | 144 | { |
145 | .name = "NAND FS 0", | 145 | .name = "NAND FS 0", |
146 | .offset = 0, | 146 | .offset = 0, |
147 | .size = 8 * 1024 * 1024, | 147 | .size = 8 * 1024 * 1024, |
148 | }, | 148 | }, |
149 | { | 149 | { |
150 | .name = "NAND FS 1", | 150 | .name = "NAND FS 1", |
151 | .offset = MTDPART_OFS_APPEND, | 151 | .offset = MTDPART_OFS_APPEND, |
152 | .size = MTDPART_SIZ_FULL | 152 | .size = MTDPART_SIZ_FULL |
153 | }, | 153 | }, |
154 | }; | 154 | }; |
@@ -487,7 +487,7 @@ static void db1300_mmcled_set(struct led_classdev *led, | |||
487 | } | 487 | } |
488 | 488 | ||
489 | static struct led_classdev db1300_mmc_led = { | 489 | static struct led_classdev db1300_mmc_led = { |
490 | .brightness_set = db1300_mmcled_set, | 490 | .brightness_set = db1300_mmcled_set, |
491 | }; | 491 | }; |
492 | 492 | ||
493 | struct au1xmmc_platform_data db1300_sd1_platdata = { | 493 | struct au1xmmc_platform_data db1300_sd1_platdata = { |
@@ -646,7 +646,7 @@ static int db1300fb_panel_shutdown(void) | |||
646 | static struct au1200fb_platdata db1300fb_pd = { | 646 | static struct au1200fb_platdata db1300fb_pd = { |
647 | .panel_index = db1300fb_panel_index, | 647 | .panel_index = db1300fb_panel_index, |
648 | .panel_init = db1300fb_panel_init, | 648 | .panel_init = db1300fb_panel_init, |
649 | .panel_shutdown = db1300fb_panel_shutdown, | 649 | .panel_shutdown = db1300fb_panel_shutdown, |
650 | }; | 650 | }; |
651 | 651 | ||
652 | static struct resource au1300_lcd_res[] = { | 652 | static struct resource au1300_lcd_res[] = { |
diff --git a/arch/mips/alchemy/devboards/db1550.c b/arch/mips/alchemy/devboards/db1550.c index 5a9ae6095428..016cddacd7ea 100644 --- a/arch/mips/alchemy/devboards/db1550.c +++ b/arch/mips/alchemy/devboards/db1550.c | |||
@@ -67,7 +67,7 @@ int __init db1550_board_setup(void) | |||
67 | bcsr_init(PB1550_BCSR_PHYS_ADDR, | 67 | bcsr_init(PB1550_BCSR_PHYS_ADDR, |
68 | PB1550_BCSR_PHYS_ADDR + PB1550_BCSR_HEXLED_OFS); | 68 | PB1550_BCSR_PHYS_ADDR + PB1550_BCSR_HEXLED_OFS); |
69 | 69 | ||
70 | pr_info("Alchemy/AMD %s Board, CPLD Rev %d Board-ID %d " \ | 70 | pr_info("Alchemy/AMD %s Board, CPLD Rev %d Board-ID %d " \ |
71 | "Daughtercard ID %d\n", get_system_type(), | 71 | "Daughtercard ID %d\n", get_system_type(), |
72 | (whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf); | 72 | (whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf); |
73 | 73 | ||
@@ -80,7 +80,7 @@ int __init db1550_board_setup(void) | |||
80 | static struct mtd_partition db1550_spiflash_parts[] = { | 80 | static struct mtd_partition db1550_spiflash_parts[] = { |
81 | { | 81 | { |
82 | .name = "spi_flash", | 82 | .name = "spi_flash", |
83 | .offset = 0, | 83 | .offset = 0, |
84 | .size = MTDPART_SIZ_FULL, | 84 | .size = MTDPART_SIZ_FULL, |
85 | }, | 85 | }, |
86 | }; | 86 | }; |
@@ -151,12 +151,12 @@ static int au1550_nand_device_ready(struct mtd_info *mtd) | |||
151 | static struct mtd_partition db1550_nand_parts[] = { | 151 | static struct mtd_partition db1550_nand_parts[] = { |
152 | { | 152 | { |
153 | .name = "NAND FS 0", | 153 | .name = "NAND FS 0", |
154 | .offset = 0, | 154 | .offset = 0, |
155 | .size = 8 * 1024 * 1024, | 155 | .size = 8 * 1024 * 1024, |
156 | }, | 156 | }, |
157 | { | 157 | { |
158 | .name = "NAND FS 1", | 158 | .name = "NAND FS 1", |
159 | .offset = MTDPART_OFS_APPEND, | 159 | .offset = MTDPART_OFS_APPEND, |
160 | .size = MTDPART_SIZ_FULL | 160 | .size = MTDPART_SIZ_FULL |
161 | }, | 161 | }, |
162 | }; | 162 | }; |
@@ -495,10 +495,10 @@ static void __init db1550_devices(void) | |||
495 | { | 495 | { |
496 | alchemy_gpio_direction_output(203, 0); /* red led on */ | 496 | alchemy_gpio_direction_output(203, 0); /* red led on */ |
497 | 497 | ||
498 | irq_set_irq_type(AU1550_GPIO0_INT, IRQ_TYPE_EDGE_BOTH); /* CD0# */ | 498 | irq_set_irq_type(AU1550_GPIO0_INT, IRQ_TYPE_EDGE_BOTH); /* CD0# */ |
499 | irq_set_irq_type(AU1550_GPIO1_INT, IRQ_TYPE_EDGE_BOTH); /* CD1# */ | 499 | irq_set_irq_type(AU1550_GPIO1_INT, IRQ_TYPE_EDGE_BOTH); /* CD1# */ |
500 | irq_set_irq_type(AU1550_GPIO3_INT, IRQ_TYPE_LEVEL_LOW); /* CARD0# */ | 500 | irq_set_irq_type(AU1550_GPIO3_INT, IRQ_TYPE_LEVEL_LOW); /* CARD0# */ |
501 | irq_set_irq_type(AU1550_GPIO5_INT, IRQ_TYPE_LEVEL_LOW); /* CARD1# */ | 501 | irq_set_irq_type(AU1550_GPIO5_INT, IRQ_TYPE_LEVEL_LOW); /* CARD1# */ |
502 | irq_set_irq_type(AU1550_GPIO21_INT, IRQ_TYPE_LEVEL_LOW); /* STSCHG0# */ | 502 | irq_set_irq_type(AU1550_GPIO21_INT, IRQ_TYPE_LEVEL_LOW); /* STSCHG0# */ |
503 | irq_set_irq_type(AU1550_GPIO22_INT, IRQ_TYPE_LEVEL_LOW); /* STSCHG1# */ | 503 | irq_set_irq_type(AU1550_GPIO22_INT, IRQ_TYPE_LEVEL_LOW); /* STSCHG1# */ |
504 | 504 | ||
@@ -539,7 +539,7 @@ static void __init pb1550_devices(void) | |||
539 | 539 | ||
540 | /* Pb1550, like all others, also has statuschange irqs; however they're | 540 | /* Pb1550, like all others, also has statuschange irqs; however they're |
541 | * wired up on one of the Au1550's shared GPIO201_205 line, which also | 541 | * wired up on one of the Au1550's shared GPIO201_205 line, which also |
542 | * services the PCMCIA card interrupts. So we ignore statuschange and | 542 | * services the PCMCIA card interrupts. So we ignore statuschange and |
543 | * use the GPIO201_205 exclusively for card interrupts, since a) pcmcia | 543 | * use the GPIO201_205 exclusively for card interrupts, since a) pcmcia |
544 | * drivers are used to shared irqs and b) statuschange isn't really use- | 544 | * drivers are used to shared irqs and b) statuschange isn't really use- |
545 | * ful anyway. | 545 | * ful anyway. |
diff --git a/arch/mips/alchemy/devboards/pm.c b/arch/mips/alchemy/devboards/pm.c index acaf91b5e461..b86bff31d1d3 100644 --- a/arch/mips/alchemy/devboards/pm.c +++ b/arch/mips/alchemy/devboards/pm.c | |||
@@ -194,7 +194,7 @@ static ssize_t db1x_pmattr_store(struct kobject *kobj, | |||
194 | } | 194 | } |
195 | 195 | ||
196 | #define ATTR(x) \ | 196 | #define ATTR(x) \ |
197 | static struct kobj_attribute x##_attribute = \ | 197 | static struct kobj_attribute x##_attribute = \ |
198 | __ATTR(x, 0664, db1x_pmattr_show, \ | 198 | __ATTR(x, 0664, db1x_pmattr_show, \ |
199 | db1x_pmattr_store); | 199 | db1x_pmattr_store); |
200 | 200 | ||
diff --git a/arch/mips/ar7/Platform b/arch/mips/ar7/Platform index 0bf85c416c6c..21f9102d533c 100644 --- a/arch/mips/ar7/Platform +++ b/arch/mips/ar7/Platform | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Texas Instruments AR7 | 2 | # Texas Instruments AR7 |
3 | # | 3 | # |
4 | platform-$(CONFIG_AR7) += ar7/ | 4 | platform-$(CONFIG_AR7) += ar7/ |
5 | cflags-$(CONFIG_AR7) += -I$(srctree)/arch/mips/include/asm/mach-ar7 | 5 | cflags-$(CONFIG_AR7) += -I$(srctree)/arch/mips/include/asm/mach-ar7 |
6 | load-$(CONFIG_AR7) += 0xffffffff94100000 | 6 | load-$(CONFIG_AR7) += 0xffffffff94100000 |
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c index 7477fd2127ad..7e2356fd5fd6 100644 --- a/arch/mips/ar7/platform.c +++ b/arch/mips/ar7/platform.c | |||
@@ -492,11 +492,11 @@ static struct gpio_led gt701_leds[] = { | |||
492 | .active_low = 1, | 492 | .active_low = 1, |
493 | .default_trigger = "default-on", | 493 | .default_trigger = "default-on", |
494 | }, | 494 | }, |
495 | { | 495 | { |
496 | .name = "ethernet", | 496 | .name = "ethernet", |
497 | .gpio = 10, | 497 | .gpio = 10, |
498 | .active_low = 1, | 498 | .active_low = 1, |
499 | }, | 499 | }, |
500 | }; | 500 | }; |
501 | 501 | ||
502 | static struct gpio_led_platform_data ar7_led_data; | 502 | static struct gpio_led_platform_data ar7_led_data; |
@@ -512,7 +512,7 @@ static void __init detect_leds(void) | |||
512 | { | 512 | { |
513 | char *prid, *usb_prod; | 513 | char *prid, *usb_prod; |
514 | 514 | ||
515 | /* Default LEDs */ | 515 | /* Default LEDs */ |
516 | ar7_led_data.num_leds = ARRAY_SIZE(default_leds); | 516 | ar7_led_data.num_leds = ARRAY_SIZE(default_leds); |
517 | ar7_led_data.leds = default_leds; | 517 | ar7_led_data.leds = default_leds; |
518 | 518 | ||
diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c index 579f452c0b45..8c1b8bf9b32f 100644 --- a/arch/mips/ath79/clock.c +++ b/arch/mips/ath79/clock.c | |||
@@ -198,7 +198,7 @@ static void __init ar934x_clocks_init(void) | |||
198 | dpll_base = ioremap(AR934X_SRIF_BASE, AR934X_SRIF_SIZE); | 198 | dpll_base = ioremap(AR934X_SRIF_BASE, AR934X_SRIF_SIZE); |
199 | 199 | ||
200 | bootstrap = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP); | 200 | bootstrap = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP); |
201 | if (bootstrap & AR934X_BOOTSTRAP_REF_CLK_40) | 201 | if (bootstrap & AR934X_BOOTSTRAP_REF_CLK_40) |
202 | ath79_ref_clk.rate = 40 * 1000 * 1000; | 202 | ath79_ref_clk.rate = 40 * 1000 * 1000; |
203 | else | 203 | else |
204 | ath79_ref_clk.rate = 25 * 1000 * 1000; | 204 | ath79_ref_clk.rate = 25 * 1000 * 1000; |
diff --git a/arch/mips/ath79/mach-ap121.c b/arch/mips/ath79/mach-ap121.c index 4c20200d7c72..1bf73f2a069d 100644 --- a/arch/mips/ath79/mach-ap121.c +++ b/arch/mips/ath79/mach-ap121.c | |||
@@ -69,7 +69,7 @@ static struct spi_board_info ap121_spi_info[] = { | |||
69 | 69 | ||
70 | static struct ath79_spi_platform_data ap121_spi_data = { | 70 | static struct ath79_spi_platform_data ap121_spi_data = { |
71 | .bus_num = 0, | 71 | .bus_num = 0, |
72 | .num_chipselect = 1, | 72 | .num_chipselect = 1, |
73 | }; | 73 | }; |
74 | 74 | ||
75 | static void __init ap121_setup(void) | 75 | static void __init ap121_setup(void) |
diff --git a/arch/mips/ath79/mach-ap81.c b/arch/mips/ath79/mach-ap81.c index abe19836331c..1c78d497f930 100644 --- a/arch/mips/ath79/mach-ap81.c +++ b/arch/mips/ath79/mach-ap81.c | |||
@@ -78,7 +78,7 @@ static struct spi_board_info ap81_spi_info[] = { | |||
78 | 78 | ||
79 | static struct ath79_spi_platform_data ap81_spi_data = { | 79 | static struct ath79_spi_platform_data ap81_spi_data = { |
80 | .bus_num = 0, | 80 | .bus_num = 0, |
81 | .num_chipselect = 1, | 81 | .num_chipselect = 1, |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static void __init ap81_setup(void) | 84 | static void __init ap81_setup(void) |
diff --git a/arch/mips/ath79/mach-db120.c b/arch/mips/ath79/mach-db120.c index 42f540a724f4..4d661a1d2dae 100644 --- a/arch/mips/ath79/mach-db120.c +++ b/arch/mips/ath79/mach-db120.c | |||
@@ -87,7 +87,7 @@ static struct spi_board_info db120_spi_info[] = { | |||
87 | 87 | ||
88 | static struct ath79_spi_platform_data db120_spi_data = { | 88 | static struct ath79_spi_platform_data db120_spi_data = { |
89 | .bus_num = 0, | 89 | .bus_num = 0, |
90 | .num_chipselect = 1, | 90 | .num_chipselect = 1, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | #ifdef CONFIG_PCI | 93 | #ifdef CONFIG_PCI |
diff --git a/arch/mips/ath79/mach-pb44.c b/arch/mips/ath79/mach-pb44.c index c5f0ea5e00c3..67b980d94fb7 100644 --- a/arch/mips/ath79/mach-pb44.c +++ b/arch/mips/ath79/mach-pb44.c | |||
@@ -34,8 +34,8 @@ | |||
34 | #define PB44_KEYS_DEBOUNCE_INTERVAL (3 * PB44_KEYS_POLL_INTERVAL) | 34 | #define PB44_KEYS_DEBOUNCE_INTERVAL (3 * PB44_KEYS_POLL_INTERVAL) |
35 | 35 | ||
36 | static struct i2c_gpio_platform_data pb44_i2c_gpio_data = { | 36 | static struct i2c_gpio_platform_data pb44_i2c_gpio_data = { |
37 | .sda_pin = PB44_GPIO_I2C_SDA, | 37 | .sda_pin = PB44_GPIO_I2C_SDA, |
38 | .scl_pin = PB44_GPIO_I2C_SCL, | 38 | .scl_pin = PB44_GPIO_I2C_SCL, |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static struct platform_device pb44_i2c_gpio_device = { | 41 | static struct platform_device pb44_i2c_gpio_device = { |
@@ -53,7 +53,7 @@ static struct pcf857x_platform_data pb44_pcf857x_data = { | |||
53 | static struct i2c_board_info pb44_i2c_board_info[] __initdata = { | 53 | static struct i2c_board_info pb44_i2c_board_info[] __initdata = { |
54 | { | 54 | { |
55 | I2C_BOARD_INFO("pcf8575", 0x20), | 55 | I2C_BOARD_INFO("pcf8575", 0x20), |
56 | .platform_data = &pb44_pcf857x_data, | 56 | .platform_data = &pb44_pcf857x_data, |
57 | }, | 57 | }, |
58 | }; | 58 | }; |
59 | 59 | ||
diff --git a/arch/mips/bcm47xx/Makefile b/arch/mips/bcm47xx/Makefile index 1a3567f07e73..f3bf6d5bfb9d 100644 --- a/arch/mips/bcm47xx/Makefile +++ b/arch/mips/bcm47xx/Makefile | |||
@@ -3,5 +3,5 @@ | |||
3 | # under Linux. | 3 | # under Linux. |
4 | # | 4 | # |
5 | 5 | ||
6 | obj-y += irq.o nvram.o prom.o serial.o setup.o time.o sprom.o | 6 | obj-y += irq.o nvram.o prom.o serial.o setup.o time.o sprom.o |
7 | obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o | 7 | obj-$(CONFIG_BCM47XX_SSB) += wgt634u.o |
diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c index 48a4c70b3842..c37419c11c92 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> | 5 | * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> |
6 | * Copyright (C) 2010-2011 Hauke Mehrtens <hauke@hauke-m.de> | 6 | * Copyright (C) 2010-2011 Hauke Mehrtens <hauke@hauke-m.de> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 9 | * under the terms of the GNU General Public License as published by the |
10 | * Free Software Foundation; either version 2 of the License, or (at your | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
11 | * option) any later version. | 11 | * option) any later version. |
12 | */ | 12 | */ |
diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c index 289cc0a38638..b2a7c251e471 100644 --- a/arch/mips/bcm47xx/sprom.c +++ b/arch/mips/bcm47xx/sprom.c | |||
@@ -60,8 +60,8 @@ static int get_nvram_var(const char *prefix, const char *postfix, | |||
60 | 60 | ||
61 | #define NVRAM_READ_VAL(type) \ | 61 | #define NVRAM_READ_VAL(type) \ |
62 | static void nvram_read_ ## type (const char *prefix, \ | 62 | static void nvram_read_ ## type (const char *prefix, \ |
63 | const char *postfix, const char *name, \ | 63 | const char *postfix, const char *name, \ |
64 | type *val, type allset, bool fallback) \ | 64 | type *val, type allset, bool fallback) \ |
65 | { \ | 65 | { \ |
66 | char buf[100]; \ | 66 | char buf[100]; \ |
67 | int err; \ | 67 | int err; \ |
diff --git a/arch/mips/bcm47xx/wgt634u.c b/arch/mips/bcm47xx/wgt634u.c index 9d111e8087ec..c63a4c287b5c 100644 --- a/arch/mips/bcm47xx/wgt634u.c +++ b/arch/mips/bcm47xx/wgt634u.c | |||
@@ -36,13 +36,13 @@ static struct gpio_led wgt634u_leds[] = { | |||
36 | }; | 36 | }; |
37 | 37 | ||
38 | static struct gpio_led_platform_data wgt634u_led_data = { | 38 | static struct gpio_led_platform_data wgt634u_led_data = { |
39 | .num_leds = ARRAY_SIZE(wgt634u_leds), | 39 | .num_leds = ARRAY_SIZE(wgt634u_leds), |
40 | .leds = wgt634u_leds, | 40 | .leds = wgt634u_leds, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static struct platform_device wgt634u_gpio_leds = { | 43 | static struct platform_device wgt634u_gpio_leds = { |
44 | .name = "leds-gpio", | 44 | .name = "leds-gpio", |
45 | .id = -1, | 45 | .id = -1, |
46 | .dev = { | 46 | .dev = { |
47 | .platform_data = &wgt634u_led_data, | 47 | .platform_data = &wgt634u_led_data, |
48 | } | 48 | } |
@@ -53,35 +53,35 @@ static struct platform_device wgt634u_gpio_leds = { | |||
53 | firmware. */ | 53 | firmware. */ |
54 | static struct mtd_partition wgt634u_partitions[] = { | 54 | static struct mtd_partition wgt634u_partitions[] = { |
55 | { | 55 | { |
56 | .name = "cfe", | 56 | .name = "cfe", |
57 | .offset = 0, | 57 | .offset = 0, |
58 | .size = 0x60000, /* 384k */ | 58 | .size = 0x60000, /* 384k */ |
59 | .mask_flags = MTD_WRITEABLE /* force read-only */ | 59 | .mask_flags = MTD_WRITEABLE /* force read-only */ |
60 | }, | 60 | }, |
61 | { | 61 | { |
62 | .name = "config", | 62 | .name = "config", |
63 | .offset = 0x60000, | 63 | .offset = 0x60000, |
64 | .size = 0x20000 /* 128k */ | 64 | .size = 0x20000 /* 128k */ |
65 | }, | 65 | }, |
66 | { | 66 | { |
67 | .name = "linux", | 67 | .name = "linux", |
68 | .offset = 0x80000, | 68 | .offset = 0x80000, |
69 | .size = 0x140000 /* 1280k */ | 69 | .size = 0x140000 /* 1280k */ |
70 | }, | 70 | }, |
71 | { | 71 | { |
72 | .name = "jffs", | 72 | .name = "jffs", |
73 | .offset = 0x1c0000, | 73 | .offset = 0x1c0000, |
74 | .size = 0x620000 /* 6272k */ | 74 | .size = 0x620000 /* 6272k */ |
75 | }, | 75 | }, |
76 | { | 76 | { |
77 | .name = "nvram", | 77 | .name = "nvram", |
78 | .offset = 0x7e0000, | 78 | .offset = 0x7e0000, |
79 | .size = 0x20000 /* 128k */ | 79 | .size = 0x20000 /* 128k */ |
80 | }, | 80 | }, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static struct physmap_flash_data wgt634u_flash_data = { | 83 | static struct physmap_flash_data wgt634u_flash_data = { |
84 | .parts = wgt634u_partitions, | 84 | .parts = wgt634u_partitions, |
85 | .nr_parts = ARRAY_SIZE(wgt634u_partitions) | 85 | .nr_parts = ARRAY_SIZE(wgt634u_partitions) |
86 | }; | 86 | }; |
87 | 87 | ||
@@ -90,9 +90,9 @@ static struct resource wgt634u_flash_resource = { | |||
90 | }; | 90 | }; |
91 | 91 | ||
92 | static struct platform_device wgt634u_flash = { | 92 | static struct platform_device wgt634u_flash = { |
93 | .name = "physmap-flash", | 93 | .name = "physmap-flash", |
94 | .id = 0, | 94 | .id = 0, |
95 | .dev = { .platform_data = &wgt634u_flash_data, }, | 95 | .dev = { .platform_data = &wgt634u_flash_data, }, |
96 | .resource = &wgt634u_flash_resource, | 96 | .resource = &wgt634u_flash_resource, |
97 | .num_resources = 1, | 97 | .num_resources = 1, |
98 | }; | 98 | }; |
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c index 73be9b349690..ed1949c29508 100644 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c | |||
@@ -406,9 +406,9 @@ static struct board_info __initdata board_FAST2404 = { | |||
406 | .expected_cpu_id = 0x6348, | 406 | .expected_cpu_id = 0x6348, |
407 | 407 | ||
408 | .has_uart0 = 1, | 408 | .has_uart0 = 1, |
409 | .has_enet0 = 1, | 409 | .has_enet0 = 1, |
410 | .has_enet1 = 1, | 410 | .has_enet1 = 1, |
411 | .has_pci = 1, | 411 | .has_pci = 1, |
412 | 412 | ||
413 | .enet0 = { | 413 | .enet0 = { |
414 | .has_phy = 1, | 414 | .has_phy = 1, |
@@ -591,22 +591,22 @@ static struct board_info __initdata board_96358vw2 = { | |||
591 | }; | 591 | }; |
592 | 592 | ||
593 | static struct board_info __initdata board_AGPFS0 = { | 593 | static struct board_info __initdata board_AGPFS0 = { |
594 | .name = "AGPF-S0", | 594 | .name = "AGPF-S0", |
595 | .expected_cpu_id = 0x6358, | 595 | .expected_cpu_id = 0x6358, |
596 | 596 | ||
597 | .has_uart0 = 1, | 597 | .has_uart0 = 1, |
598 | .has_enet0 = 1, | 598 | .has_enet0 = 1, |
599 | .has_enet1 = 1, | 599 | .has_enet1 = 1, |
600 | .has_pci = 1, | 600 | .has_pci = 1, |
601 | 601 | ||
602 | .enet0 = { | 602 | .enet0 = { |
603 | .has_phy = 1, | 603 | .has_phy = 1, |
604 | .use_internal_phy = 1, | 604 | .use_internal_phy = 1, |
605 | }, | 605 | }, |
606 | 606 | ||
607 | .enet1 = { | 607 | .enet1 = { |
608 | .force_speed_100 = 1, | 608 | .force_speed_100 = 1, |
609 | .force_duplex_full = 1, | 609 | .force_duplex_full = 1, |
610 | }, | 610 | }, |
611 | 611 | ||
612 | .has_ohci0 = 1, | 612 | .has_ohci0 = 1, |
@@ -677,7 +677,7 @@ static struct ssb_sprom bcm63xx_sprom = { | |||
677 | .revision = 0x02, | 677 | .revision = 0x02, |
678 | .board_rev = 0x17, | 678 | .board_rev = 0x17, |
679 | .country_code = 0x0, | 679 | .country_code = 0x0, |
680 | .ant_available_bg = 0x3, | 680 | .ant_available_bg = 0x3, |
681 | .pa0b0 = 0x15ae, | 681 | .pa0b0 = 0x15ae, |
682 | .pa0b1 = 0xfa85, | 682 | .pa0b1 = 0xfa85, |
683 | .pa0b2 = 0xfe8d, | 683 | .pa0b2 = 0xfe8d, |
diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 85bcb5adc7cb..851261e9fdc0 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile | |||
@@ -24,7 +24,7 @@ strip-flags := $(addprefix --remove-section=,$(drop-sections)) | |||
24 | hostprogs-y := elf2ecoff | 24 | hostprogs-y := elf2ecoff |
25 | 25 | ||
26 | targets := vmlinux.ecoff | 26 | targets := vmlinux.ecoff |
27 | quiet_cmd_ecoff = ECOFF $@ | 27 | quiet_cmd_ecoff = ECOFF $@ |
28 | cmd_ecoff = $(obj)/elf2ecoff $(VMLINUX) $@ $(e2eflag) | 28 | cmd_ecoff = $(obj)/elf2ecoff $(VMLINUX) $@ $(e2eflag) |
29 | $(obj)/vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX) FORCE | 29 | $(obj)/vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX) FORCE |
30 | $(call if_changed,ecoff) | 30 | $(call if_changed,ecoff) |
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index c2a3fb0ffc87..bbaa1d4beb6d 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile | |||
@@ -51,7 +51,7 @@ $(obj)/vmlinux.bin.z: $(obj)/vmlinux.bin FORCE | |||
51 | 51 | ||
52 | targets += piggy.o | 52 | targets += piggy.o |
53 | OBJCOPYFLAGS_piggy.o := --add-section=.image=$(obj)/vmlinux.bin.z \ | 53 | OBJCOPYFLAGS_piggy.o := --add-section=.image=$(obj)/vmlinux.bin.z \ |
54 | --set-section-flags=.image=contents,alloc,load,readonly,data | 54 | --set-section-flags=.image=contents,alloc,load,readonly,data |
55 | $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE | 55 | $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE |
56 | $(call if_changed,objcopy) | 56 | $(call if_changed,objcopy) |
57 | 57 | ||
@@ -67,9 +67,9 @@ endif | |||
67 | 67 | ||
68 | vmlinuzobjs-y += $(obj)/piggy.o | 68 | vmlinuzobjs-y += $(obj)/piggy.o |
69 | 69 | ||
70 | quiet_cmd_zld = LD $@ | 70 | quiet_cmd_zld = LD $@ |
71 | cmd_zld = $(LD) $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ | 71 | cmd_zld = $(LD) $(LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ |
72 | quiet_cmd_strip = STRIP $@ | 72 | quiet_cmd_strip = STRIP $@ |
73 | cmd_strip = $(STRIP) -s $@ | 73 | cmd_strip = $(STRIP) -s $@ |
74 | vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr | 74 | vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr |
75 | $(call cmd,zld) | 75 | $(call cmd,zld) |
@@ -96,7 +96,7 @@ quiet_cmd_32 = OBJCOPY $@ | |||
96 | vmlinuz.32: vmlinuz | 96 | vmlinuz.32: vmlinuz |
97 | $(call cmd,32) | 97 | $(call cmd,32) |
98 | 98 | ||
99 | quiet_cmd_ecoff = ECOFF $@ | 99 | quiet_cmd_ecoff = ECOFF $@ |
100 | cmd_ecoff = $< $(VMLINUZ) $@ $(e2eflag) | 100 | cmd_ecoff = $< $(VMLINUZ) $@ $(e2eflag) |
101 | vmlinuz.ecoff: $(obj)/../elf2ecoff $(VMLINUZ) | 101 | vmlinuz.ecoff: $(obj)/../elf2ecoff $(VMLINUZ) |
102 | $(call cmd,ecoff) | 102 | $(call cmd,ecoff) |
diff --git a/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c b/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c index 9a6243676e22..37fe58c19a90 100644 --- a/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c +++ b/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2010 "Wu Zhangjin" <wuzhangjin@gmail.com> | 2 | * Copyright (C) 2010 "Wu Zhangjin" <wuzhangjin@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c index 5cad0faefa17..2c9573098c0d 100644 --- a/arch/mips/boot/compressed/decompress.c +++ b/arch/mips/boot/compressed/decompress.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * Copyright (C) 2009 Lemote, Inc. | 5 | * Copyright (C) 2009 Lemote, Inc. |
6 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | 6 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 9 | * under the terms of the GNU General Public License as published by the |
10 | * Free Software Foundation; either version 2 of the License, or (at your | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
11 | * option) any later version. | 11 | * option) any later version. |
12 | */ | 12 | */ |
diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S index 4e65a8420bee..409cb483a9ff 100644 --- a/arch/mips/boot/compressed/head.S +++ b/arch/mips/boot/compressed/head.S | |||
@@ -32,8 +32,8 @@ start: | |||
32 | bne a2, a0, 1b | 32 | bne a2, a0, 1b |
33 | addiu a0, a0, 4 | 33 | addiu a0, a0, 4 |
34 | 34 | ||
35 | PTR_LA a0, (.heap) /* heap address */ | 35 | PTR_LA a0, (.heap) /* heap address */ |
36 | PTR_LA sp, (.stack + 8192) /* stack address */ | 36 | PTR_LA sp, (.stack + 8192) /* stack address */ |
37 | 37 | ||
38 | PTR_LA ra, 2f | 38 | PTR_LA ra, 2f |
39 | PTR_LA k0, decompress_kernel | 39 | PTR_LA k0, decompress_kernel |
diff --git a/arch/mips/boot/ecoff.h b/arch/mips/boot/ecoff.h index 8c3eed2877f2..83e5c3813d67 100644 --- a/arch/mips/boot/ecoff.h +++ b/arch/mips/boot/ecoff.h | |||
@@ -2,48 +2,48 @@ | |||
2 | * Some ECOFF definitions. | 2 | * Some ECOFF definitions. |
3 | */ | 3 | */ |
4 | typedef struct filehdr { | 4 | typedef struct filehdr { |
5 | unsigned short f_magic; /* magic number */ | 5 | unsigned short f_magic; /* magic number */ |
6 | unsigned short f_nscns; /* number of sections */ | 6 | unsigned short f_nscns; /* number of sections */ |
7 | long f_timdat; /* time & date stamp */ | 7 | long f_timdat; /* time & date stamp */ |
8 | long f_symptr; /* file pointer to symbolic header */ | 8 | long f_symptr; /* file pointer to symbolic header */ |
9 | long f_nsyms; /* sizeof(symbolic hdr) */ | 9 | long f_nsyms; /* sizeof(symbolic hdr) */ |
10 | unsigned short f_opthdr; /* sizeof(optional hdr) */ | 10 | unsigned short f_opthdr; /* sizeof(optional hdr) */ |
11 | unsigned short f_flags; /* flags */ | 11 | unsigned short f_flags; /* flags */ |
12 | } FILHDR; | 12 | } FILHDR; |
13 | #define FILHSZ sizeof(FILHDR) | 13 | #define FILHSZ sizeof(FILHDR) |
14 | 14 | ||
15 | #define OMAGIC 0407 | 15 | #define OMAGIC 0407 |
16 | #define MIPSEBMAGIC 0x160 | 16 | #define MIPSEBMAGIC 0x160 |
17 | #define MIPSELMAGIC 0x162 | 17 | #define MIPSELMAGIC 0x162 |
18 | 18 | ||
19 | typedef struct scnhdr { | 19 | typedef struct scnhdr { |
20 | char s_name[8]; /* section name */ | 20 | char s_name[8]; /* section name */ |
21 | long s_paddr; /* physical address, aliased s_nlib */ | 21 | long s_paddr; /* physical address, aliased s_nlib */ |
22 | long s_vaddr; /* virtual address */ | 22 | long s_vaddr; /* virtual address */ |
23 | long s_size; /* section size */ | 23 | long s_size; /* section size */ |
24 | long s_scnptr; /* file ptr to raw data for section */ | 24 | long s_scnptr; /* file ptr to raw data for section */ |
25 | long s_relptr; /* file ptr to relocation */ | 25 | long s_relptr; /* file ptr to relocation */ |
26 | long s_lnnoptr; /* file ptr to gp histogram */ | 26 | long s_lnnoptr; /* file ptr to gp histogram */ |
27 | unsigned short s_nreloc; /* number of relocation entries */ | 27 | unsigned short s_nreloc; /* number of relocation entries */ |
28 | unsigned short s_nlnno; /* number of gp histogram entries */ | 28 | unsigned short s_nlnno; /* number of gp histogram entries */ |
29 | long s_flags; /* flags */ | 29 | long s_flags; /* flags */ |
30 | } SCNHDR; | 30 | } SCNHDR; |
31 | #define SCNHSZ sizeof(SCNHDR) | 31 | #define SCNHSZ sizeof(SCNHDR) |
32 | #define SCNROUND ((long)16) | 32 | #define SCNROUND ((long)16) |
33 | 33 | ||
34 | typedef struct aouthdr { | 34 | typedef struct aouthdr { |
35 | short magic; /* see above */ | 35 | short magic; /* see above */ |
36 | short vstamp; /* version stamp */ | 36 | short vstamp; /* version stamp */ |
37 | long tsize; /* text size in bytes, padded to DW bdry*/ | 37 | long tsize; /* text size in bytes, padded to DW bdry*/ |
38 | long dsize; /* initialized data " " */ | 38 | long dsize; /* initialized data " " */ |
39 | long bsize; /* uninitialized data " " */ | 39 | long bsize; /* uninitialized data " " */ |
40 | long entry; /* entry pt. */ | 40 | long entry; /* entry pt. */ |
41 | long text_start; /* base of text used for this file */ | 41 | long text_start; /* base of text used for this file */ |
42 | long data_start; /* base of data used for this file */ | 42 | long data_start; /* base of data used for this file */ |
43 | long bss_start; /* base of bss used for this file */ | 43 | long bss_start; /* base of bss used for this file */ |
44 | long gprmask; /* general purpose register mask */ | 44 | long gprmask; /* general purpose register mask */ |
45 | long cprmask[4]; /* co-processor register masks */ | 45 | long cprmask[4]; /* co-processor register masks */ |
46 | long gp_value; /* the gp value used for this object */ | 46 | long gp_value; /* the gp value used for this object */ |
47 | } AOUTHDR; | 47 | } AOUTHDR; |
48 | #define AOUTHSZ sizeof(AOUTHDR) | 48 | #define AOUTHSZ sizeof(AOUTHDR) |
49 | 49 | ||
@@ -51,7 +51,7 @@ typedef struct aouthdr { | |||
51 | #define NMAGIC 0410 | 51 | #define NMAGIC 0410 |
52 | #define ZMAGIC 0413 | 52 | #define ZMAGIC 0413 |
53 | #define SMAGIC 0411 | 53 | #define SMAGIC 0411 |
54 | #define LIBMAGIC 0443 | 54 | #define LIBMAGIC 0443 |
55 | 55 | ||
56 | #define N_TXTOFF(f, a) \ | 56 | #define N_TXTOFF(f, a) \ |
57 | ((a).magic == ZMAGIC || (a).magic == LIBMAGIC ? 0 : \ | 57 | ((a).magic == ZMAGIC || (a).magic == LIBMAGIC ? 0 : \ |
diff --git a/arch/mips/boot/elf2ecoff.c b/arch/mips/boot/elf2ecoff.c index e19d906236af..8585078ae50e 100644 --- a/arch/mips/boot/elf2ecoff.c +++ b/arch/mips/boot/elf2ecoff.c | |||
@@ -29,7 +29,7 @@ | |||
29 | /* elf2ecoff.c | 29 | /* elf2ecoff.c |
30 | 30 | ||
31 | This program converts an elf executable to an ECOFF executable. | 31 | This program converts an elf executable to an ECOFF executable. |
32 | No symbol table is retained. This is useful primarily in building | 32 | No symbol table is retained. This is useful primarily in building |
33 | net-bootable kernels for machines (e.g., DECstation and Alpha) which | 33 | net-bootable kernels for machines (e.g., DECstation and Alpha) which |
34 | only support the ECOFF object file format. */ | 34 | only support the ECOFF object file format. */ |
35 | 35 | ||
@@ -341,7 +341,7 @@ int main(int argc, char *argv[]) | |||
341 | 341 | ||
342 | /* Figure out if we can cram the program header into an ECOFF | 342 | /* Figure out if we can cram the program header into an ECOFF |
343 | header... Basically, we can't handle anything but loadable | 343 | header... Basically, we can't handle anything but loadable |
344 | segments, but we can ignore some kinds of segments. We can't | 344 | segments, but we can ignore some kinds of segments. We can't |
345 | handle holes in the address space. Segments may be out of order, | 345 | handle holes in the address space. Segments may be out of order, |
346 | so we sort them first. */ | 346 | so we sort them first. */ |
347 | 347 | ||
@@ -514,7 +514,7 @@ int main(int argc, char *argv[]) | |||
514 | 514 | ||
515 | for (i = 0; i < nosecs; i++) { | 515 | for (i = 0; i < nosecs; i++) { |
516 | printf | 516 | printf |
517 | ("Section %d: %s phys %lx size %lx file offset %lx\n", | 517 | ("Section %d: %s phys %lx size %lx file offset %lx\n", |
518 | i, esecs[i].s_name, esecs[i].s_paddr, | 518 | i, esecs[i].s_name, esecs[i].s_paddr, |
519 | esecs[i].s_size, esecs[i].s_scnptr); | 519 | esecs[i].s_size, esecs[i].s_scnptr); |
520 | } | 520 | } |
@@ -551,7 +551,7 @@ int main(int argc, char *argv[]) | |||
551 | } | 551 | } |
552 | 552 | ||
553 | /* | 553 | /* |
554 | * Copy the loadable sections. Zero-fill any gaps less than 64k; | 554 | * Copy the loadable sections. Zero-fill any gaps less than 64k; |
555 | * complain about any zero-filling, and die if we're asked to zero-fill | 555 | * complain about any zero-filling, and die if we're asked to zero-fill |
556 | * more than 64k. | 556 | * more than 64k. |
557 | */ | 557 | */ |
diff --git a/arch/mips/cavium-octeon/Makefile b/arch/mips/cavium-octeon/Makefile index 6e927cf20df2..3751c3918571 100644 --- a/arch/mips/cavium-octeon/Makefile +++ b/arch/mips/cavium-octeon/Makefile | |||
@@ -17,7 +17,7 @@ obj-y += dma-octeon.o flash_setup.o | |||
17 | obj-y += octeon-memcpy.o | 17 | obj-y += octeon-memcpy.o |
18 | obj-y += executive/ | 18 | obj-y += executive/ |
19 | 19 | ||
20 | obj-$(CONFIG_SMP) += smp.o | 20 | obj-$(CONFIG_SMP) += smp.o |
21 | 21 | ||
22 | DTS_FILES = octeon_3xxx.dts octeon_68xx.dts | 22 | DTS_FILES = octeon_3xxx.dts octeon_68xx.dts |
23 | DTB_FILES = $(patsubst %.dts, %.dtb, $(DTS_FILES)) | 23 | DTB_FILES = $(patsubst %.dts, %.dtb, $(DTS_FILES)) |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c index 6d5ddbc112cc..504ed61a47cd 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c +++ b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c | |||
@@ -155,8 +155,8 @@ int cvmx_bootmem_init(void *mem_desc_ptr) | |||
155 | * | 155 | * |
156 | * Linux 64 bit: Set XKPHYS bit | 156 | * Linux 64 bit: Set XKPHYS bit |
157 | * Linux 32 bit: use mmap to create mapping, use virtual address | 157 | * Linux 32 bit: use mmap to create mapping, use virtual address |
158 | * CVMX 64 bit: use physical address directly | 158 | * CVMX 64 bit: use physical address directly |
159 | * CVMX 32 bit: use physical address directly | 159 | * CVMX 32 bit: use physical address directly |
160 | * | 160 | * |
161 | * Note that the CVMX environment assumes the use of 1-1 TLB | 161 | * Note that the CVMX environment assumes the use of 1-1 TLB |
162 | * mappings so that the physical addresses can be used | 162 | * mappings so that the physical addresses can be used |
@@ -398,7 +398,7 @@ error_out: | |||
398 | int __cvmx_bootmem_phy_free(uint64_t phy_addr, uint64_t size, uint32_t flags) | 398 | int __cvmx_bootmem_phy_free(uint64_t phy_addr, uint64_t size, uint32_t flags) |
399 | { | 399 | { |
400 | uint64_t cur_addr; | 400 | uint64_t cur_addr; |
401 | uint64_t prev_addr = 0; /* zero is invalid */ | 401 | uint64_t prev_addr = 0; /* zero is invalid */ |
402 | int retval = 0; | 402 | int retval = 0; |
403 | 403 | ||
404 | #ifdef DEBUG | 404 | #ifdef DEBUG |
@@ -424,7 +424,7 @@ int __cvmx_bootmem_phy_free(uint64_t phy_addr, uint64_t size, uint32_t flags) | |||
424 | if (cur_addr == 0 || phy_addr < cur_addr) { | 424 | if (cur_addr == 0 || phy_addr < cur_addr) { |
425 | /* add at front of list - special case with changing head ptr */ | 425 | /* add at front of list - special case with changing head ptr */ |
426 | if (cur_addr && phy_addr + size > cur_addr) | 426 | if (cur_addr && phy_addr + size > cur_addr) |
427 | goto bootmem_free_done; /* error, overlapping section */ | 427 | goto bootmem_free_done; /* error, overlapping section */ |
428 | else if (phy_addr + size == cur_addr) { | 428 | else if (phy_addr + size == cur_addr) { |
429 | /* Add to front of existing first block */ | 429 | /* Add to front of existing first block */ |
430 | cvmx_bootmem_phy_set_next(phy_addr, | 430 | cvmx_bootmem_phy_set_next(phy_addr, |
@@ -611,7 +611,7 @@ int cvmx_bootmem_phy_named_block_free(char *name, uint32_t flags) | |||
611 | } | 611 | } |
612 | 612 | ||
613 | cvmx_bootmem_unlock(); | 613 | cvmx_bootmem_unlock(); |
614 | return named_block_ptr != NULL; /* 0 on failure, 1 on success */ | 614 | return named_block_ptr != NULL; /* 0 on failure, 1 on success */ |
615 | } | 615 | } |
616 | 616 | ||
617 | int64_t cvmx_bootmem_phy_named_block_alloc(uint64_t size, uint64_t min_addr, | 617 | int64_t cvmx_bootmem_phy_named_block_alloc(uint64_t size, uint64_t min_addr, |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c index fd2015331a20..7c6497781895 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c | |||
@@ -203,10 +203,10 @@ int cvmx_helper_board_get_mii_address(int ipd_port) | |||
203 | * enumeration from the bootloader. | 203 | * enumeration from the bootloader. |
204 | * | 204 | * |
205 | * @ipd_port: IPD input port associated with the port we want to get link | 205 | * @ipd_port: IPD input port associated with the port we want to get link |
206 | * status for. | 206 | * status for. |
207 | * | 207 | * |
208 | * Returns The ports link status. If the link isn't fully resolved, this must | 208 | * Returns The ports link status. If the link isn't fully resolved, this must |
209 | * return zero. | 209 | * return zero. |
210 | */ | 210 | */ |
211 | cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port) | 211 | cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port) |
212 | { | 212 | { |
@@ -357,16 +357,16 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port) | |||
357 | result.s.link_up = 1; | 357 | result.s.link_up = 1; |
358 | result.s.full_duplex = ((phy_status >> 13) & 1); | 358 | result.s.full_duplex = ((phy_status >> 13) & 1); |
359 | switch ((phy_status >> 14) & 3) { | 359 | switch ((phy_status >> 14) & 3) { |
360 | case 0: /* 10 Mbps */ | 360 | case 0: /* 10 Mbps */ |
361 | result.s.speed = 10; | 361 | result.s.speed = 10; |
362 | break; | 362 | break; |
363 | case 1: /* 100 Mbps */ | 363 | case 1: /* 100 Mbps */ |
364 | result.s.speed = 100; | 364 | result.s.speed = 100; |
365 | break; | 365 | break; |
366 | case 2: /* 1 Gbps */ | 366 | case 2: /* 1 Gbps */ |
367 | result.s.speed = 1000; | 367 | result.s.speed = 1000; |
368 | break; | 368 | break; |
369 | case 3: /* Illegal */ | 369 | case 3: /* Illegal */ |
370 | result.u64 = 0; | 370 | result.u64 = 0; |
371 | break; | 371 | break; |
372 | } | 372 | } |
@@ -391,16 +391,16 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port) | |||
391 | result.s.link_up = inband_status.s.status; | 391 | result.s.link_up = inband_status.s.status; |
392 | result.s.full_duplex = inband_status.s.duplex; | 392 | result.s.full_duplex = inband_status.s.duplex; |
393 | switch (inband_status.s.speed) { | 393 | switch (inband_status.s.speed) { |
394 | case 0: /* 10 Mbps */ | 394 | case 0: /* 10 Mbps */ |
395 | result.s.speed = 10; | 395 | result.s.speed = 10; |
396 | break; | 396 | break; |
397 | case 1: /* 100 Mbps */ | 397 | case 1: /* 100 Mbps */ |
398 | result.s.speed = 100; | 398 | result.s.speed = 100; |
399 | break; | 399 | break; |
400 | case 2: /* 1 Gbps */ | 400 | case 2: /* 1 Gbps */ |
401 | result.s.speed = 1000; | 401 | result.s.speed = 1000; |
402 | break; | 402 | break; |
403 | case 3: /* Illegal */ | 403 | case 3: /* Illegal */ |
404 | result.u64 = 0; | 404 | result.u64 = 0; |
405 | break; | 405 | break; |
406 | } | 406 | } |
@@ -429,9 +429,9 @@ cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port) | |||
429 | * | 429 | * |
430 | * @phy_addr: The address of the PHY to program | 430 | * @phy_addr: The address of the PHY to program |
431 | * @enable_autoneg: | 431 | * @enable_autoneg: |
432 | * Non zero if you want to enable auto-negotiation. | 432 | * Non zero if you want to enable auto-negotiation. |
433 | * @link_info: Link speed to program. If the speed is zero and auto-negotiation | 433 | * @link_info: Link speed to program. If the speed is zero and auto-negotiation |
434 | * is enabled, all possible negotiation speeds are advertised. | 434 | * is enabled, all possible negotiation speeds are advertised. |
435 | * | 435 | * |
436 | * Returns Zero on success, negative on failure | 436 | * Returns Zero on success, negative on failure |
437 | */ | 437 | */ |
@@ -607,10 +607,10 @@ int cvmx_helper_board_link_set_phy(int phy_addr, | |||
607 | * | 607 | * |
608 | * @interface: Interface to probe | 608 | * @interface: Interface to probe |
609 | * @supported_ports: | 609 | * @supported_ports: |
610 | * Number of ports Octeon supports. | 610 | * Number of ports Octeon supports. |
611 | * | 611 | * |
612 | * Returns Number of ports the actual board supports. Many times this will | 612 | * Returns Number of ports the actual board supports. Many times this will |
613 | * simple be "support_ports". | 613 | * simple be "support_ports". |
614 | */ | 614 | */ |
615 | int __cvmx_helper_board_interface_probe(int interface, int supported_ports) | 615 | int __cvmx_helper_board_interface_probe(int interface, int supported_ports) |
616 | { | 616 | { |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-jtag.c b/arch/mips/cavium-octeon/executive/cvmx-helper-jtag.c index c1c54890bae0..607b4e659579 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-jtag.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-jtag.c | |||
@@ -79,10 +79,10 @@ void cvmx_helper_qlm_jtag_init(void) | |||
79 | * @qlm: QLM to shift value into | 79 | * @qlm: QLM to shift value into |
80 | * @bits: Number of bits to shift in (1-32). | 80 | * @bits: Number of bits to shift in (1-32). |
81 | * @data: Data to shift in. Bit 0 enters the chain first, followed by | 81 | * @data: Data to shift in. Bit 0 enters the chain first, followed by |
82 | * bit 1, etc. | 82 | * bit 1, etc. |
83 | * | 83 | * |
84 | * Returns The low order bits of the JTAG chain that shifted out of the | 84 | * Returns The low order bits of the JTAG chain that shifted out of the |
85 | * circle. | 85 | * circle. |
86 | */ | 86 | */ |
87 | uint32_t cvmx_helper_qlm_jtag_shift(int qlm, int bits, uint32_t data) | 87 | uint32_t cvmx_helper_qlm_jtag_shift(int qlm, int bits, uint32_t data) |
88 | { | 88 | { |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c b/arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c index 82b21843421c..f59c88ee9b31 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c | |||
@@ -131,7 +131,7 @@ void cvmx_helper_rgmii_internal_loopback(int port) | |||
131 | * @interface: Interface to setup | 131 | * @interface: Interface to setup |
132 | * @port: Port to setup (0..3) | 132 | * @port: Port to setup (0..3) |
133 | * @cpu_clock_hz: | 133 | * @cpu_clock_hz: |
134 | * Chip frequency in Hertz | 134 | * Chip frequency in Hertz |
135 | * | 135 | * |
136 | * Returns Zero on success, negative on failure | 136 | * Returns Zero on success, negative on failure |
137 | */ | 137 | */ |
@@ -409,14 +409,14 @@ int __cvmx_helper_rgmii_link_set(int ipd_port, | |||
409 | mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface)); | 409 | mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface)); |
410 | 410 | ||
411 | /* | 411 | /* |
412 | * Port .en .type .p0mii Configuration | 412 | * Port .en .type .p0mii Configuration |
413 | * ---- --- ----- ------ ----------------------------------------- | 413 | * ---- --- ----- ------ ----------------------------------------- |
414 | * X 0 X X All links are disabled. | 414 | * X 0 X X All links are disabled. |
415 | * 0 1 X 0 Port 0 is RGMII | 415 | * 0 1 X 0 Port 0 is RGMII |
416 | * 0 1 X 1 Port 0 is MII | 416 | * 0 1 X 1 Port 0 is MII |
417 | * 1 1 0 X Ports 1 and 2 are configured as RGMII ports. | 417 | * 1 1 0 X Ports 1 and 2 are configured as RGMII ports. |
418 | * 1 1 1 X Port 1: GMII/MII; Port 2: disabled. GMII or | 418 | * 1 1 1 X Port 1: GMII/MII; Port 2: disabled. GMII or |
419 | * MII port is selected by GMX_PRT1_CFG[SPEED]. | 419 | * MII port is selected by GMX_PRT1_CFG[SPEED]. |
420 | */ | 420 | */ |
421 | 421 | ||
422 | /* In MII mode, CLK_CNT = 1. */ | 422 | /* In MII mode, CLK_CNT = 1. */ |
@@ -464,9 +464,9 @@ int __cvmx_helper_rgmii_link_set(int ipd_port, | |||
464 | * | 464 | * |
465 | * @ipd_port: IPD/PKO port to loopback. | 465 | * @ipd_port: IPD/PKO port to loopback. |
466 | * @enable_internal: | 466 | * @enable_internal: |
467 | * Non zero if you want internal loopback | 467 | * Non zero if you want internal loopback |
468 | * @enable_external: | 468 | * @enable_external: |
469 | * Non zero if you want external loopback | 469 | * Non zero if you want external loopback |
470 | * | 470 | * |
471 | * Returns Zero on success, negative on failure. | 471 | * Returns Zero on success, negative on failure. |
472 | */ | 472 | */ |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c b/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c index 0c0bf5d30e70..45f18cce31a9 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c | |||
@@ -523,9 +523,9 @@ int __cvmx_helper_sgmii_link_set(int ipd_port, | |||
523 | * | 523 | * |
524 | * @ipd_port: IPD/PKO port to loopback. | 524 | * @ipd_port: IPD/PKO port to loopback. |
525 | * @enable_internal: | 525 | * @enable_internal: |
526 | * Non zero if you want internal loopback | 526 | * Non zero if you want internal loopback |
527 | * @enable_external: | 527 | * @enable_external: |
528 | * Non zero if you want external loopback | 528 | * Non zero if you want external loopback |
529 | * | 529 | * |
530 | * Returns Zero on success, negative on failure. | 530 | * Returns Zero on success, negative on failure. |
531 | */ | 531 | */ |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c b/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c index 2830e4bdf7f3..1f3030c72d88 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-spi.c | |||
@@ -160,16 +160,16 @@ cvmx_helper_link_info_t __cvmx_helper_spi_link_get(int ipd_port) | |||
160 | result.s.link_up = inband.s.status; | 160 | result.s.link_up = inband.s.status; |
161 | result.s.full_duplex = inband.s.duplex; | 161 | result.s.full_duplex = inband.s.duplex; |
162 | switch (inband.s.speed) { | 162 | switch (inband.s.speed) { |
163 | case 0: /* 10 Mbps */ | 163 | case 0: /* 10 Mbps */ |
164 | result.s.speed = 10; | 164 | result.s.speed = 10; |
165 | break; | 165 | break; |
166 | case 1: /* 100 Mbps */ | 166 | case 1: /* 100 Mbps */ |
167 | result.s.speed = 100; | 167 | result.s.speed = 100; |
168 | break; | 168 | break; |
169 | case 2: /* 1 Gbps */ | 169 | case 2: /* 1 Gbps */ |
170 | result.s.speed = 1000; | 170 | result.s.speed = 1000; |
171 | break; | 171 | break; |
172 | case 3: /* Illegal */ | 172 | case 3: /* Illegal */ |
173 | result.s.speed = 0; | 173 | result.s.speed = 0; |
174 | result.s.link_up = 0; | 174 | result.s.link_up = 0; |
175 | break; | 175 | break; |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-util.c b/arch/mips/cavium-octeon/executive/cvmx-helper-util.c index 116dea17acf5..b72d9fbf97a3 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-util.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-util.c | |||
@@ -96,9 +96,9 @@ int cvmx_helper_dump_packet(cvmx_wqe_t *work) | |||
96 | uint8_t *end_of_data; | 96 | uint8_t *end_of_data; |
97 | 97 | ||
98 | cvmx_dprintf("Packet Length: %u\n", work->len); | 98 | cvmx_dprintf("Packet Length: %u\n", work->len); |
99 | cvmx_dprintf(" Input Port: %u\n", work->ipprt); | 99 | cvmx_dprintf(" Input Port: %u\n", work->ipprt); |
100 | cvmx_dprintf(" QoS: %u\n", work->qos); | 100 | cvmx_dprintf(" QoS: %u\n", work->qos); |
101 | cvmx_dprintf(" Buffers: %u\n", work->word2.s.bufs); | 101 | cvmx_dprintf(" Buffers: %u\n", work->word2.s.bufs); |
102 | 102 | ||
103 | if (work->word2.s.bufs == 0) { | 103 | if (work->word2.s.bufs == 0) { |
104 | union cvmx_ipd_wqe_fpa_queue wqe_pool; | 104 | union cvmx_ipd_wqe_fpa_queue wqe_pool; |
@@ -132,14 +132,14 @@ int cvmx_helper_dump_packet(cvmx_wqe_t *work) | |||
132 | while (remaining_bytes) { | 132 | while (remaining_bytes) { |
133 | start_of_buffer = | 133 | start_of_buffer = |
134 | ((buffer_ptr.s.addr >> 7) - buffer_ptr.s.back) << 7; | 134 | ((buffer_ptr.s.addr >> 7) - buffer_ptr.s.back) << 7; |
135 | cvmx_dprintf(" Buffer Start:%llx\n", | 135 | cvmx_dprintf(" Buffer Start:%llx\n", |
136 | (unsigned long long)start_of_buffer); | 136 | (unsigned long long)start_of_buffer); |
137 | cvmx_dprintf(" Buffer I : %u\n", buffer_ptr.s.i); | 137 | cvmx_dprintf(" Buffer I : %u\n", buffer_ptr.s.i); |
138 | cvmx_dprintf(" Buffer Back: %u\n", buffer_ptr.s.back); | 138 | cvmx_dprintf(" Buffer Back: %u\n", buffer_ptr.s.back); |
139 | cvmx_dprintf(" Buffer Pool: %u\n", buffer_ptr.s.pool); | 139 | cvmx_dprintf(" Buffer Pool: %u\n", buffer_ptr.s.pool); |
140 | cvmx_dprintf(" Buffer Data: %llx\n", | 140 | cvmx_dprintf(" Buffer Data: %llx\n", |
141 | (unsigned long long)buffer_ptr.s.addr); | 141 | (unsigned long long)buffer_ptr.s.addr); |
142 | cvmx_dprintf(" Buffer Size: %u\n", buffer_ptr.s.size); | 142 | cvmx_dprintf(" Buffer Size: %u\n", buffer_ptr.s.size); |
143 | 143 | ||
144 | cvmx_dprintf("\t\t"); | 144 | cvmx_dprintf("\t\t"); |
145 | data_address = (uint8_t *) cvmx_phys_to_ptr(buffer_ptr.s.addr); | 145 | data_address = (uint8_t *) cvmx_phys_to_ptr(buffer_ptr.s.addr); |
@@ -172,11 +172,11 @@ int cvmx_helper_dump_packet(cvmx_wqe_t *work) | |||
172 | * | 172 | * |
173 | * @queue: Input queue to setup RED on (0-7) | 173 | * @queue: Input queue to setup RED on (0-7) |
174 | * @pass_thresh: | 174 | * @pass_thresh: |
175 | * Packets will begin slowly dropping when there are less than | 175 | * Packets will begin slowly dropping when there are less than |
176 | * this many packet buffers free in FPA 0. | 176 | * this many packet buffers free in FPA 0. |
177 | * @drop_thresh: | 177 | * @drop_thresh: |
178 | * All incomming packets will be dropped when there are less | 178 | * All incomming packets will be dropped when there are less |
179 | * than this many free packet buffers in FPA 0. | 179 | * than this many free packet buffers in FPA 0. |
180 | * Returns Zero on success. Negative on failure | 180 | * Returns Zero on success. Negative on failure |
181 | */ | 181 | */ |
182 | int cvmx_helper_setup_red_queue(int queue, int pass_thresh, int drop_thresh) | 182 | int cvmx_helper_setup_red_queue(int queue, int pass_thresh, int drop_thresh) |
@@ -207,11 +207,11 @@ int cvmx_helper_setup_red_queue(int queue, int pass_thresh, int drop_thresh) | |||
207 | * Setup Random Early Drop to automatically begin dropping packets. | 207 | * Setup Random Early Drop to automatically begin dropping packets. |
208 | * | 208 | * |
209 | * @pass_thresh: | 209 | * @pass_thresh: |
210 | * Packets will begin slowly dropping when there are less than | 210 | * Packets will begin slowly dropping when there are less than |
211 | * this many packet buffers free in FPA 0. | 211 | * this many packet buffers free in FPA 0. |
212 | * @drop_thresh: | 212 | * @drop_thresh: |
213 | * All incomming packets will be dropped when there are less | 213 | * All incomming packets will be dropped when there are less |
214 | * than this many free packet buffers in FPA 0. | 214 | * than this many free packet buffers in FPA 0. |
215 | * Returns Zero on success. Negative on failure | 215 | * Returns Zero on success. Negative on failure |
216 | */ | 216 | */ |
217 | int cvmx_helper_setup_red(int pass_thresh, int drop_thresh) | 217 | int cvmx_helper_setup_red(int pass_thresh, int drop_thresh) |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c index 1723248e987d..7653b7e92197 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c | |||
@@ -321,9 +321,9 @@ int __cvmx_helper_xaui_link_set(int ipd_port, cvmx_helper_link_info_t link_info) | |||
321 | * | 321 | * |
322 | * @ipd_port: IPD/PKO port to loopback. | 322 | * @ipd_port: IPD/PKO port to loopback. |
323 | * @enable_internal: | 323 | * @enable_internal: |
324 | * Non zero if you want internal loopback | 324 | * Non zero if you want internal loopback |
325 | * @enable_external: | 325 | * @enable_external: |
326 | * Non zero if you want external loopback | 326 | * Non zero if you want external loopback |
327 | * | 327 | * |
328 | * Returns Zero on success, negative on failure. | 328 | * Returns Zero on success, negative on failure. |
329 | */ | 329 | */ |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c index fa4963856353..d63d20dfbfb0 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c | |||
@@ -111,7 +111,7 @@ int cvmx_helper_ports_on_interface(int interface) | |||
111 | * @interface: Interface to probe | 111 | * @interface: Interface to probe |
112 | * | 112 | * |
113 | * Returns Mode of the interface. Unknown or unsupported interfaces return | 113 | * Returns Mode of the interface. Unknown or unsupported interfaces return |
114 | * DISABLED. | 114 | * DISABLED. |
115 | */ | 115 | */ |
116 | cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int interface) | 116 | cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int interface) |
117 | { | 117 | { |
@@ -187,7 +187,7 @@ cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int interface) | |||
187 | * the defines in executive-config.h. | 187 | * the defines in executive-config.h. |
188 | * | 188 | * |
189 | * @ipd_port: Port to configure. This follows the IPD numbering, not the | 189 | * @ipd_port: Port to configure. This follows the IPD numbering, not the |
190 | * per interface numbering | 190 | * per interface numbering |
191 | * | 191 | * |
192 | * Returns Zero on success, negative on failure | 192 | * Returns Zero on success, negative on failure |
193 | */ | 193 | */ |
@@ -591,7 +591,7 @@ static int __cvmx_helper_packet_hardware_enable(int interface) | |||
591 | * Function to adjust internal IPD pointer alignments | 591 | * Function to adjust internal IPD pointer alignments |
592 | * | 592 | * |
593 | * Returns 0 on success | 593 | * Returns 0 on success |
594 | * !0 on failure | 594 | * !0 on failure |
595 | */ | 595 | */ |
596 | int __cvmx_helper_errata_fix_ipd_ptr_alignment(void) | 596 | int __cvmx_helper_errata_fix_ipd_ptr_alignment(void) |
597 | { | 597 | { |
@@ -1068,9 +1068,9 @@ int cvmx_helper_link_set(int ipd_port, cvmx_helper_link_info_t link_info) | |||
1068 | * | 1068 | * |
1069 | * @ipd_port: IPD/PKO port to loopback. | 1069 | * @ipd_port: IPD/PKO port to loopback. |
1070 | * @enable_internal: | 1070 | * @enable_internal: |
1071 | * Non zero if you want internal loopback | 1071 | * Non zero if you want internal loopback |
1072 | * @enable_external: | 1072 | * @enable_external: |
1073 | * Non zero if you want external loopback | 1073 | * Non zero if you want external loopback |
1074 | * | 1074 | * |
1075 | * Returns Zero on success, negative on failure. | 1075 | * Returns Zero on success, negative on failure. |
1076 | */ | 1076 | */ |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-interrupt-rsl.c b/arch/mips/cavium-octeon/executive/cvmx-interrupt-rsl.c index 560e034aa024..fa327ec891cd 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-interrupt-rsl.c +++ b/arch/mips/cavium-octeon/executive/cvmx-interrupt-rsl.c | |||
@@ -85,11 +85,11 @@ void __cvmx_interrupt_gmxx_enable(int interface) | |||
85 | if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX)) { | 85 | if (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX)) { |
86 | if (mode.s.en) { | 86 | if (mode.s.en) { |
87 | switch (mode.cn56xx.mode) { | 87 | switch (mode.cn56xx.mode) { |
88 | case 1: /* XAUI */ | 88 | case 1: /* XAUI */ |
89 | num_ports = 1; | 89 | num_ports = 1; |
90 | break; | 90 | break; |
91 | case 2: /* SGMII */ | 91 | case 2: /* SGMII */ |
92 | case 3: /* PICMG */ | 92 | case 3: /* PICMG */ |
93 | num_ports = 4; | 93 | num_ports = 4; |
94 | break; | 94 | break; |
95 | default: /* Disabled */ | 95 | default: /* Disabled */ |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-l2c.c b/arch/mips/cavium-octeon/executive/cvmx-l2c.c index 33b72144db31..42e38c30b540 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-l2c.c +++ b/arch/mips/cavium-octeon/executive/cvmx-l2c.c | |||
@@ -147,7 +147,7 @@ int cvmx_l2c_set_hw_way_partition(uint32_t mask) | |||
147 | mask &= valid_mask; | 147 | mask &= valid_mask; |
148 | 148 | ||
149 | /* A UMSK setting which blocks all L2C Ways is an error on some chips */ | 149 | /* A UMSK setting which blocks all L2C Ways is an error on some chips */ |
150 | if (mask == valid_mask && !OCTEON_IS_MODEL(OCTEON_CN63XX)) | 150 | if (mask == valid_mask && !OCTEON_IS_MODEL(OCTEON_CN63XX)) |
151 | return -1; | 151 | return -1; |
152 | 152 | ||
153 | if (OCTEON_IS_MODEL(OCTEON_CN63XX)) | 153 | if (OCTEON_IS_MODEL(OCTEON_CN63XX)) |
@@ -438,7 +438,7 @@ void cvmx_l2c_flush(void) | |||
438 | for (set = 0; set < n_set; set++) { | 438 | for (set = 0; set < n_set; set++) { |
439 | for (assoc = 0; assoc < n_assoc; assoc++) { | 439 | for (assoc = 0; assoc < n_assoc; assoc++) { |
440 | address = CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS, | 440 | address = CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS, |
441 | (assoc << assoc_shift) | (set << set_shift)); | 441 | (assoc << assoc_shift) | (set << set_shift)); |
442 | CVMX_CACHE_WBIL2I(address, 0); | 442 | CVMX_CACHE_WBIL2I(address, 0); |
443 | } | 443 | } |
444 | } | 444 | } |
@@ -573,8 +573,8 @@ union __cvmx_l2c_tag { | |||
573 | * @index: Index of the cacheline | 573 | * @index: Index of the cacheline |
574 | * | 574 | * |
575 | * Returns The Octeon model specific tag structure. This is | 575 | * Returns The Octeon model specific tag structure. This is |
576 | * translated by a wrapper function to a generic form that is | 576 | * translated by a wrapper function to a generic form that is |
577 | * easier for applications to use. | 577 | * easier for applications to use. |
578 | */ | 578 | */ |
579 | static union __cvmx_l2c_tag __read_l2_tag(uint64_t assoc, uint64_t index) | 579 | static union __cvmx_l2c_tag __read_l2_tag(uint64_t assoc, uint64_t index) |
580 | { | 580 | { |
@@ -618,12 +618,12 @@ static union __cvmx_l2c_tag __read_l2_tag(uint64_t assoc, uint64_t index) | |||
618 | ".set push\n\t" | 618 | ".set push\n\t" |
619 | ".set mips64\n\t" | 619 | ".set mips64\n\t" |
620 | ".set noreorder\n\t" | 620 | ".set noreorder\n\t" |
621 | "sd %[dbg_val], 0(%[dbg_addr])\n\t" /* Enter debug mode, wait for store */ | 621 | "sd %[dbg_val], 0(%[dbg_addr])\n\t" /* Enter debug mode, wait for store */ |
622 | "ld $0, 0(%[dbg_addr])\n\t" | 622 | "ld $0, 0(%[dbg_addr])\n\t" |
623 | "ld %[tag_val], 0(%[tag_addr])\n\t" /* Read L2C tag data */ | 623 | "ld %[tag_val], 0(%[tag_addr])\n\t" /* Read L2C tag data */ |
624 | "sd $0, 0(%[dbg_addr])\n\t" /* Exit debug mode, wait for store */ | 624 | "sd $0, 0(%[dbg_addr])\n\t" /* Exit debug mode, wait for store */ |
625 | "ld $0, 0(%[dbg_addr])\n\t" | 625 | "ld $0, 0(%[dbg_addr])\n\t" |
626 | "cache 9, 0($0)\n\t" /* Invalidate dcache to discard debug data */ | 626 | "cache 9, 0($0)\n\t" /* Invalidate dcache to discard debug data */ |
627 | ".set pop" | 627 | ".set pop" |
628 | : [tag_val] "=r" (tag_val) | 628 | : [tag_val] "=r" (tag_val) |
629 | : [dbg_addr] "r" (dbg_addr), [dbg_val] "r" (debug_val), [tag_addr] "r" (debug_tag_addr) | 629 | : [dbg_addr] "r" (dbg_addr), [dbg_val] "r" (debug_val), [tag_addr] "r" (debug_tag_addr) |
@@ -664,10 +664,10 @@ union cvmx_l2c_tag cvmx_l2c_get_tag(uint32_t association, uint32_t index) | |||
664 | CVMX_SYNC; /* make sure CVMX_L2C_TADX_TAG is updated */ | 664 | CVMX_SYNC; /* make sure CVMX_L2C_TADX_TAG is updated */ |
665 | l2c_tadx_tag.u64 = cvmx_read_csr(CVMX_L2C_TADX_TAG(0)); | 665 | l2c_tadx_tag.u64 = cvmx_read_csr(CVMX_L2C_TADX_TAG(0)); |
666 | 666 | ||
667 | tag.s.V = l2c_tadx_tag.s.valid; | 667 | tag.s.V = l2c_tadx_tag.s.valid; |
668 | tag.s.D = l2c_tadx_tag.s.dirty; | 668 | tag.s.D = l2c_tadx_tag.s.dirty; |
669 | tag.s.L = l2c_tadx_tag.s.lock; | 669 | tag.s.L = l2c_tadx_tag.s.lock; |
670 | tag.s.U = l2c_tadx_tag.s.use; | 670 | tag.s.U = l2c_tadx_tag.s.use; |
671 | tag.s.addr = l2c_tadx_tag.s.tag; | 671 | tag.s.addr = l2c_tadx_tag.s.tag; |
672 | } else { | 672 | } else { |
673 | union __cvmx_l2c_tag tmp_tag; | 673 | union __cvmx_l2c_tag tmp_tag; |
@@ -679,34 +679,34 @@ union cvmx_l2c_tag cvmx_l2c_get_tag(uint32_t association, uint32_t index) | |||
679 | * as it can represent all models. | 679 | * as it can represent all models. |
680 | */ | 680 | */ |
681 | if (OCTEON_IS_MODEL(OCTEON_CN58XX) || OCTEON_IS_MODEL(OCTEON_CN56XX)) { | 681 | if (OCTEON_IS_MODEL(OCTEON_CN58XX) || OCTEON_IS_MODEL(OCTEON_CN56XX)) { |
682 | tag.s.V = tmp_tag.cn58xx.V; | 682 | tag.s.V = tmp_tag.cn58xx.V; |
683 | tag.s.D = tmp_tag.cn58xx.D; | 683 | tag.s.D = tmp_tag.cn58xx.D; |
684 | tag.s.L = tmp_tag.cn58xx.L; | 684 | tag.s.L = tmp_tag.cn58xx.L; |
685 | tag.s.U = tmp_tag.cn58xx.U; | 685 | tag.s.U = tmp_tag.cn58xx.U; |
686 | tag.s.addr = tmp_tag.cn58xx.addr; | 686 | tag.s.addr = tmp_tag.cn58xx.addr; |
687 | } else if (OCTEON_IS_MODEL(OCTEON_CN38XX)) { | 687 | } else if (OCTEON_IS_MODEL(OCTEON_CN38XX)) { |
688 | tag.s.V = tmp_tag.cn38xx.V; | 688 | tag.s.V = tmp_tag.cn38xx.V; |
689 | tag.s.D = tmp_tag.cn38xx.D; | 689 | tag.s.D = tmp_tag.cn38xx.D; |
690 | tag.s.L = tmp_tag.cn38xx.L; | 690 | tag.s.L = tmp_tag.cn38xx.L; |
691 | tag.s.U = tmp_tag.cn38xx.U; | 691 | tag.s.U = tmp_tag.cn38xx.U; |
692 | tag.s.addr = tmp_tag.cn38xx.addr; | 692 | tag.s.addr = tmp_tag.cn38xx.addr; |
693 | } else if (OCTEON_IS_MODEL(OCTEON_CN31XX) || OCTEON_IS_MODEL(OCTEON_CN52XX)) { | 693 | } else if (OCTEON_IS_MODEL(OCTEON_CN31XX) || OCTEON_IS_MODEL(OCTEON_CN52XX)) { |
694 | tag.s.V = tmp_tag.cn31xx.V; | 694 | tag.s.V = tmp_tag.cn31xx.V; |
695 | tag.s.D = tmp_tag.cn31xx.D; | 695 | tag.s.D = tmp_tag.cn31xx.D; |
696 | tag.s.L = tmp_tag.cn31xx.L; | 696 | tag.s.L = tmp_tag.cn31xx.L; |
697 | tag.s.U = tmp_tag.cn31xx.U; | 697 | tag.s.U = tmp_tag.cn31xx.U; |
698 | tag.s.addr = tmp_tag.cn31xx.addr; | 698 | tag.s.addr = tmp_tag.cn31xx.addr; |
699 | } else if (OCTEON_IS_MODEL(OCTEON_CN30XX)) { | 699 | } else if (OCTEON_IS_MODEL(OCTEON_CN30XX)) { |
700 | tag.s.V = tmp_tag.cn30xx.V; | 700 | tag.s.V = tmp_tag.cn30xx.V; |
701 | tag.s.D = tmp_tag.cn30xx.D; | 701 | tag.s.D = tmp_tag.cn30xx.D; |
702 | tag.s.L = tmp_tag.cn30xx.L; | 702 | tag.s.L = tmp_tag.cn30xx.L; |
703 | tag.s.U = tmp_tag.cn30xx.U; | 703 | tag.s.U = tmp_tag.cn30xx.U; |
704 | tag.s.addr = tmp_tag.cn30xx.addr; | 704 | tag.s.addr = tmp_tag.cn30xx.addr; |
705 | } else if (OCTEON_IS_MODEL(OCTEON_CN50XX)) { | 705 | } else if (OCTEON_IS_MODEL(OCTEON_CN50XX)) { |
706 | tag.s.V = tmp_tag.cn50xx.V; | 706 | tag.s.V = tmp_tag.cn50xx.V; |
707 | tag.s.D = tmp_tag.cn50xx.D; | 707 | tag.s.D = tmp_tag.cn50xx.D; |
708 | tag.s.L = tmp_tag.cn50xx.L; | 708 | tag.s.L = tmp_tag.cn50xx.L; |
709 | tag.s.U = tmp_tag.cn50xx.U; | 709 | tag.s.U = tmp_tag.cn50xx.U; |
710 | tag.s.addr = tmp_tag.cn50xx.addr; | 710 | tag.s.addr = tmp_tag.cn50xx.addr; |
711 | } else { | 711 | } else { |
712 | cvmx_dprintf("Unsupported OCTEON Model in %s\n", __func__); | 712 | cvmx_dprintf("Unsupported OCTEON Model in %s\n", __func__); |
@@ -865,7 +865,7 @@ void cvmx_l2c_flush_line(uint32_t assoc, uint32_t index) | |||
865 | uint64_t address; | 865 | uint64_t address; |
866 | /* Create the address based on index and association. | 866 | /* Create the address based on index and association. |
867 | * Bits<20:17> select the way of the cache block involved in | 867 | * Bits<20:17> select the way of the cache block involved in |
868 | * the operation | 868 | * the operation |
869 | * Bits<16:7> of the effect address select the index | 869 | * Bits<16:7> of the effect address select the index |
870 | */ | 870 | */ |
871 | address = CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS, | 871 | address = CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS, |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-pko.c b/arch/mips/cavium-octeon/executive/cvmx-pko.c index f557084b1092..f2c877541597 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-pko.c +++ b/arch/mips/cavium-octeon/executive/cvmx-pko.c | |||
@@ -99,7 +99,7 @@ void cvmx_pko_initialize_global(void) | |||
99 | * be called after the FPA has been initialized and filled with pages. | 99 | * be called after the FPA has been initialized and filled with pages. |
100 | * | 100 | * |
101 | * Returns 0 on success | 101 | * Returns 0 on success |
102 | * !0 on failure | 102 | * !0 on failure |
103 | */ | 103 | */ |
104 | int cvmx_pko_initialize_local(void) | 104 | int cvmx_pko_initialize_local(void) |
105 | { | 105 | { |
@@ -186,19 +186,19 @@ void cvmx_pko_shutdown(void) | |||
186 | /** | 186 | /** |
187 | * Configure a output port and the associated queues for use. | 187 | * Configure a output port and the associated queues for use. |
188 | * | 188 | * |
189 | * @port: Port to configure. | 189 | * @port: Port to configure. |
190 | * @base_queue: First queue number to associate with this port. | 190 | * @base_queue: First queue number to associate with this port. |
191 | * @num_queues: Number of queues to associate with this port | 191 | * @num_queues: Number of queues to associate with this port |
192 | * @priority: Array of priority levels for each queue. Values are | 192 | * @priority: Array of priority levels for each queue. Values are |
193 | * allowed to be 0-8. A value of 8 get 8 times the traffic | 193 | * allowed to be 0-8. A value of 8 get 8 times the traffic |
194 | * of a value of 1. A value of 0 indicates that no rounds | 194 | * of a value of 1. A value of 0 indicates that no rounds |
195 | * will be participated in. These priorities can be changed | 195 | * will be participated in. These priorities can be changed |
196 | * on the fly while the pko is enabled. A priority of 9 | 196 | * on the fly while the pko is enabled. A priority of 9 |
197 | * indicates that static priority should be used. If static | 197 | * indicates that static priority should be used. If static |
198 | * priority is used all queues with static priority must be | 198 | * priority is used all queues with static priority must be |
199 | * contiguous starting at the base_queue, and lower numbered | 199 | * contiguous starting at the base_queue, and lower numbered |
200 | * queues have higher priority than higher numbered queues. | 200 | * queues have higher priority than higher numbered queues. |
201 | * There must be num_queues elements in the array. | 201 | * There must be num_queues elements in the array. |
202 | */ | 202 | */ |
203 | cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, uint64_t base_queue, | 203 | cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, uint64_t base_queue, |
204 | uint64_t num_queues, | 204 | uint64_t num_queues, |
@@ -440,7 +440,7 @@ void cvmx_pko_show_queue_map() | |||
440 | * @port: Port to rate limit | 440 | * @port: Port to rate limit |
441 | * @packets_s: Maximum packet/sec | 441 | * @packets_s: Maximum packet/sec |
442 | * @burst: Maximum number of packets to burst in a row before rate | 442 | * @burst: Maximum number of packets to burst in a row before rate |
443 | * limiting cuts in. | 443 | * limiting cuts in. |
444 | * | 444 | * |
445 | * Returns Zero on success, negative on failure | 445 | * Returns Zero on success, negative on failure |
446 | */ | 446 | */ |
@@ -473,7 +473,7 @@ int cvmx_pko_rate_limit_packets(int port, int packets_s, int burst) | |||
473 | * @port: Port to rate limit | 473 | * @port: Port to rate limit |
474 | * @bits_s: PKO rate limit in bits/sec | 474 | * @bits_s: PKO rate limit in bits/sec |
475 | * @burst: Maximum number of bits to burst before rate | 475 | * @burst: Maximum number of bits to burst before rate |
476 | * limiting cuts in. | 476 | * limiting cuts in. |
477 | * | 477 | * |
478 | * Returns Zero on success, negative on failure | 478 | * Returns Zero on success, negative on failure |
479 | */ | 479 | */ |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-spi.c b/arch/mips/cavium-octeon/executive/cvmx-spi.c index 74afb1710cd9..ef5198d13a0e 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-spi.c +++ b/arch/mips/cavium-octeon/executive/cvmx-spi.c | |||
@@ -69,7 +69,7 @@ static cvmx_spi_callbacks_t cvmx_spi_callbacks = { | |||
69 | /** | 69 | /** |
70 | * Get current SPI4 initialization callbacks | 70 | * Get current SPI4 initialization callbacks |
71 | * | 71 | * |
72 | * @callbacks: Pointer to the callbacks structure.to fill | 72 | * @callbacks: Pointer to the callbacks structure.to fill |
73 | * | 73 | * |
74 | * Returns Pointer to cvmx_spi_callbacks_t structure. | 74 | * Returns Pointer to cvmx_spi_callbacks_t structure. |
75 | */ | 75 | */ |
@@ -92,11 +92,11 @@ void cvmx_spi_set_callbacks(cvmx_spi_callbacks_t *new_callbacks) | |||
92 | * Initialize and start the SPI interface. | 92 | * Initialize and start the SPI interface. |
93 | * | 93 | * |
94 | * @interface: The identifier of the packet interface to configure and | 94 | * @interface: The identifier of the packet interface to configure and |
95 | * use as a SPI interface. | 95 | * use as a SPI interface. |
96 | * @mode: The operating mode for the SPI interface. The interface | 96 | * @mode: The operating mode for the SPI interface. The interface |
97 | * can operate as a full duplex (both Tx and Rx data paths | 97 | * can operate as a full duplex (both Tx and Rx data paths |
98 | * active) or as a halfplex (either the Tx data path is | 98 | * active) or as a halfplex (either the Tx data path is |
99 | * active or the Rx data path is active, but not both). | 99 | * active or the Rx data path is active, but not both). |
100 | * @timeout: Timeout to wait for clock synchronization in seconds | 100 | * @timeout: Timeout to wait for clock synchronization in seconds |
101 | * @num_ports: Number of SPI ports to configure | 101 | * @num_ports: Number of SPI ports to configure |
102 | * | 102 | * |
@@ -138,11 +138,11 @@ int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode, int timeout, | |||
138 | * with its correspondent system. | 138 | * with its correspondent system. |
139 | * | 139 | * |
140 | * @interface: The identifier of the packet interface to configure and | 140 | * @interface: The identifier of the packet interface to configure and |
141 | * use as a SPI interface. | 141 | * use as a SPI interface. |
142 | * @mode: The operating mode for the SPI interface. The interface | 142 | * @mode: The operating mode for the SPI interface. The interface |
143 | * can operate as a full duplex (both Tx and Rx data paths | 143 | * can operate as a full duplex (both Tx and Rx data paths |
144 | * active) or as a halfplex (either the Tx data path is | 144 | * active) or as a halfplex (either the Tx data path is |
145 | * active or the Rx data path is active, but not both). | 145 | * active or the Rx data path is active, but not both). |
146 | * @timeout: Timeout to wait for clock synchronization in seconds | 146 | * @timeout: Timeout to wait for clock synchronization in seconds |
147 | * | 147 | * |
148 | * Returns Zero on success, negative of failure. | 148 | * Returns Zero on success, negative of failure. |
@@ -160,7 +160,7 @@ int cvmx_spi_restart_interface(int interface, cvmx_spi_mode_t mode, int timeout) | |||
160 | INVOKE_CB(cvmx_spi_callbacks.reset_cb, interface, mode); | 160 | INVOKE_CB(cvmx_spi_callbacks.reset_cb, interface, mode); |
161 | 161 | ||
162 | /* NOTE: Calendar setup is not performed during restart */ | 162 | /* NOTE: Calendar setup is not performed during restart */ |
163 | /* Refer to cvmx_spi_start_interface() for the full sequence */ | 163 | /* Refer to cvmx_spi_start_interface() for the full sequence */ |
164 | 164 | ||
165 | /* Callback to perform clock detection */ | 165 | /* Callback to perform clock detection */ |
166 | INVOKE_CB(cvmx_spi_callbacks.clock_detect_cb, interface, mode, timeout); | 166 | INVOKE_CB(cvmx_spi_callbacks.clock_detect_cb, interface, mode, timeout); |
@@ -182,11 +182,11 @@ int cvmx_spi_restart_interface(int interface, cvmx_spi_mode_t mode, int timeout) | |||
182 | * Callback to perform SPI4 reset | 182 | * Callback to perform SPI4 reset |
183 | * | 183 | * |
184 | * @interface: The identifier of the packet interface to configure and | 184 | * @interface: The identifier of the packet interface to configure and |
185 | * use as a SPI interface. | 185 | * use as a SPI interface. |
186 | * @mode: The operating mode for the SPI interface. The interface | 186 | * @mode: The operating mode for the SPI interface. The interface |
187 | * can operate as a full duplex (both Tx and Rx data paths | 187 | * can operate as a full duplex (both Tx and Rx data paths |
188 | * active) or as a halfplex (either the Tx data path is | 188 | * active) or as a halfplex (either the Tx data path is |
189 | * active or the Rx data path is active, but not both). | 189 | * active or the Rx data path is active, but not both). |
190 | * | 190 | * |
191 | * Returns Zero on success, non-zero error code on failure (will cause | 191 | * Returns Zero on success, non-zero error code on failure (will cause |
192 | * SPI initialization to abort) | 192 | * SPI initialization to abort) |
@@ -297,11 +297,11 @@ int cvmx_spi_reset_cb(int interface, cvmx_spi_mode_t mode) | |||
297 | * Callback to setup calendar and miscellaneous settings before clock detection | 297 | * Callback to setup calendar and miscellaneous settings before clock detection |
298 | * | 298 | * |
299 | * @interface: The identifier of the packet interface to configure and | 299 | * @interface: The identifier of the packet interface to configure and |
300 | * use as a SPI interface. | 300 | * use as a SPI interface. |
301 | * @mode: The operating mode for the SPI interface. The interface | 301 | * @mode: The operating mode for the SPI interface. The interface |
302 | * can operate as a full duplex (both Tx and Rx data paths | 302 | * can operate as a full duplex (both Tx and Rx data paths |
303 | * active) or as a halfplex (either the Tx data path is | 303 | * active) or as a halfplex (either the Tx data path is |
304 | * active or the Rx data path is active, but not both). | 304 | * active or the Rx data path is active, but not both). |
305 | * @num_ports: Number of ports to configure on SPI | 305 | * @num_ports: Number of ports to configure on SPI |
306 | * | 306 | * |
307 | * Returns Zero on success, non-zero error code on failure (will cause | 307 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -382,7 +382,7 @@ int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode, | |||
382 | stxx_spi4_dat.u64 = 0; | 382 | stxx_spi4_dat.u64 = 0; |
383 | /*Minimum needed by dynamic alignment */ | 383 | /*Minimum needed by dynamic alignment */ |
384 | stxx_spi4_dat.s.alpha = 32; | 384 | stxx_spi4_dat.s.alpha = 32; |
385 | stxx_spi4_dat.s.max_t = 0xFFFF; /*Minimum interval is 0x20 */ | 385 | stxx_spi4_dat.s.max_t = 0xFFFF; /*Minimum interval is 0x20 */ |
386 | cvmx_write_csr(CVMX_STXX_SPI4_DAT(interface), | 386 | cvmx_write_csr(CVMX_STXX_SPI4_DAT(interface), |
387 | stxx_spi4_dat.u64); | 387 | stxx_spi4_dat.u64); |
388 | 388 | ||
@@ -416,11 +416,11 @@ int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode, | |||
416 | * Callback to perform clock detection | 416 | * Callback to perform clock detection |
417 | * | 417 | * |
418 | * @interface: The identifier of the packet interface to configure and | 418 | * @interface: The identifier of the packet interface to configure and |
419 | * use as a SPI interface. | 419 | * use as a SPI interface. |
420 | * @mode: The operating mode for the SPI interface. The interface | 420 | * @mode: The operating mode for the SPI interface. The interface |
421 | * can operate as a full duplex (both Tx and Rx data paths | 421 | * can operate as a full duplex (both Tx and Rx data paths |
422 | * active) or as a halfplex (either the Tx data path is | 422 | * active) or as a halfplex (either the Tx data path is |
423 | * active or the Rx data path is active, but not both). | 423 | * active or the Rx data path is active, but not both). |
424 | * @timeout: Timeout to wait for clock synchronization in seconds | 424 | * @timeout: Timeout to wait for clock synchronization in seconds |
425 | * | 425 | * |
426 | * Returns Zero on success, non-zero error code on failure (will cause | 426 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -494,11 +494,11 @@ int cvmx_spi_clock_detect_cb(int interface, cvmx_spi_mode_t mode, int timeout) | |||
494 | * Callback to perform link training | 494 | * Callback to perform link training |
495 | * | 495 | * |
496 | * @interface: The identifier of the packet interface to configure and | 496 | * @interface: The identifier of the packet interface to configure and |
497 | * use as a SPI interface. | 497 | * use as a SPI interface. |
498 | * @mode: The operating mode for the SPI interface. The interface | 498 | * @mode: The operating mode for the SPI interface. The interface |
499 | * can operate as a full duplex (both Tx and Rx data paths | 499 | * can operate as a full duplex (both Tx and Rx data paths |
500 | * active) or as a halfplex (either the Tx data path is | 500 | * active) or as a halfplex (either the Tx data path is |
501 | * active or the Rx data path is active, but not both). | 501 | * active or the Rx data path is active, but not both). |
502 | * @timeout: Timeout to wait for link to be trained (in seconds) | 502 | * @timeout: Timeout to wait for link to be trained (in seconds) |
503 | * | 503 | * |
504 | * Returns Zero on success, non-zero error code on failure (will cause | 504 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -563,11 +563,11 @@ int cvmx_spi_training_cb(int interface, cvmx_spi_mode_t mode, int timeout) | |||
563 | * Callback to perform calendar data synchronization | 563 | * Callback to perform calendar data synchronization |
564 | * | 564 | * |
565 | * @interface: The identifier of the packet interface to configure and | 565 | * @interface: The identifier of the packet interface to configure and |
566 | * use as a SPI interface. | 566 | * use as a SPI interface. |
567 | * @mode: The operating mode for the SPI interface. The interface | 567 | * @mode: The operating mode for the SPI interface. The interface |
568 | * can operate as a full duplex (both Tx and Rx data paths | 568 | * can operate as a full duplex (both Tx and Rx data paths |
569 | * active) or as a halfplex (either the Tx data path is | 569 | * active) or as a halfplex (either the Tx data path is |
570 | * active or the Rx data path is active, but not both). | 570 | * active or the Rx data path is active, but not both). |
571 | * @timeout: Timeout to wait for calendar data in seconds | 571 | * @timeout: Timeout to wait for calendar data in seconds |
572 | * | 572 | * |
573 | * Returns Zero on success, non-zero error code on failure (will cause | 573 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -620,11 +620,11 @@ int cvmx_spi_calendar_sync_cb(int interface, cvmx_spi_mode_t mode, int timeout) | |||
620 | * Callback to handle interface up | 620 | * Callback to handle interface up |
621 | * | 621 | * |
622 | * @interface: The identifier of the packet interface to configure and | 622 | * @interface: The identifier of the packet interface to configure and |
623 | * use as a SPI interface. | 623 | * use as a SPI interface. |
624 | * @mode: The operating mode for the SPI interface. The interface | 624 | * @mode: The operating mode for the SPI interface. The interface |
625 | * can operate as a full duplex (both Tx and Rx data paths | 625 | * can operate as a full duplex (both Tx and Rx data paths |
626 | * active) or as a halfplex (either the Tx data path is | 626 | * active) or as a halfplex (either the Tx data path is |
627 | * active or the Rx data path is active, but not both). | 627 | * active or the Rx data path is active, but not both). |
628 | * | 628 | * |
629 | * Returns Zero on success, non-zero error code on failure (will cause | 629 | * Returns Zero on success, non-zero error code on failure (will cause |
630 | * SPI initialization to abort) | 630 | * SPI initialization to abort) |
diff --git a/arch/mips/cavium-octeon/executive/cvmx-sysinfo.c b/arch/mips/cavium-octeon/executive/cvmx-sysinfo.c index 8b18a20cc7b3..3d17fac29359 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-sysinfo.c +++ b/arch/mips/cavium-octeon/executive/cvmx-sysinfo.c | |||
@@ -74,26 +74,26 @@ EXPORT_SYMBOL(cvmx_sysinfo_get); | |||
74 | 74 | ||
75 | /** | 75 | /** |
76 | * This function is used in non-simple executive environments (such as | 76 | * This function is used in non-simple executive environments (such as |
77 | * Linux kernel, u-boot, etc.) to configure the minimal fields that | 77 | * Linux kernel, u-boot, etc.) to configure the minimal fields that |
78 | * are required to use simple executive files directly. | 78 | * are required to use simple executive files directly. |
79 | * | 79 | * |
80 | * Locking (if required) must be handled outside of this | 80 | * Locking (if required) must be handled outside of this |
81 | * function | 81 | * function |
82 | * | 82 | * |
83 | * @phy_mem_desc_ptr: | 83 | * @phy_mem_desc_ptr: |
84 | * Pointer to global physical memory descriptor | 84 | * Pointer to global physical memory descriptor |
85 | * (bootmem descriptor) @board_type: Octeon board | 85 | * (bootmem descriptor) @board_type: Octeon board |
86 | * type enumeration | 86 | * type enumeration |
87 | * | 87 | * |
88 | * @board_rev_major: | 88 | * @board_rev_major: |
89 | * Board major revision | 89 | * Board major revision |
90 | * @board_rev_minor: | 90 | * @board_rev_minor: |
91 | * Board minor revision | 91 | * Board minor revision |
92 | * @cpu_clock_hz: | 92 | * @cpu_clock_hz: |
93 | * CPU clock freqency in hertz | 93 | * CPU clock freqency in hertz |
94 | * | 94 | * |
95 | * Returns 0: Failure | 95 | * Returns 0: Failure |
96 | * 1: success | 96 | * 1: success |
97 | */ | 97 | */ |
98 | int cvmx_sysinfo_minimal_initialize(void *phy_mem_desc_ptr, | 98 | int cvmx_sysinfo_minimal_initialize(void *phy_mem_desc_ptr, |
99 | uint16_t board_type, | 99 | uint16_t board_type, |
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c index 46f5dbceeecc..156aa6143e11 100644 --- a/arch/mips/cavium-octeon/octeon-irq.c +++ b/arch/mips/cavium-octeon/octeon-irq.c | |||
@@ -1542,7 +1542,7 @@ static bool octeon_irq_ciu2_is_edge(unsigned int line, unsigned int bit) | |||
1542 | 1542 | ||
1543 | if (line == 3) /* MIO */ | 1543 | if (line == 3) /* MIO */ |
1544 | switch (bit) { | 1544 | switch (bit) { |
1545 | case 2: /* IPD_DRP */ | 1545 | case 2: /* IPD_DRP */ |
1546 | case 8 ... 11: /* Timers */ | 1546 | case 8 ... 11: /* Timers */ |
1547 | case 48: /* PTP */ | 1547 | case 48: /* PTP */ |
1548 | edge = true; | 1548 | edge = true; |
@@ -1553,7 +1553,7 @@ static bool octeon_irq_ciu2_is_edge(unsigned int line, unsigned int bit) | |||
1553 | else if (line == 6) /* PKT */ | 1553 | else if (line == 6) /* PKT */ |
1554 | switch (bit) { | 1554 | switch (bit) { |
1555 | case 52 ... 53: /* ILK_DRP */ | 1555 | case 52 ... 53: /* ILK_DRP */ |
1556 | case 8 ... 12: /* GMX_DRP */ | 1556 | case 8 ... 12: /* GMX_DRP */ |
1557 | edge = true; | 1557 | edge = true; |
1558 | break; | 1558 | break; |
1559 | default: | 1559 | default: |
diff --git a/arch/mips/cavium-octeon/octeon-memcpy.S b/arch/mips/cavium-octeon/octeon-memcpy.S index 0ba0eb96d9ac..64e08df51d65 100644 --- a/arch/mips/cavium-octeon/octeon-memcpy.S +++ b/arch/mips/cavium-octeon/octeon-memcpy.S | |||
@@ -116,15 +116,15 @@ | |||
116 | 116 | ||
117 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 117 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
118 | #define LDFIRST LOADR | 118 | #define LDFIRST LOADR |
119 | #define LDREST LOADL | 119 | #define LDREST LOADL |
120 | #define STFIRST STORER | 120 | #define STFIRST STORER |
121 | #define STREST STOREL | 121 | #define STREST STOREL |
122 | #define SHIFT_DISCARD SLLV | 122 | #define SHIFT_DISCARD SLLV |
123 | #else | 123 | #else |
124 | #define LDFIRST LOADL | 124 | #define LDFIRST LOADL |
125 | #define LDREST LOADR | 125 | #define LDREST LOADR |
126 | #define STFIRST STOREL | 126 | #define STFIRST STOREL |
127 | #define STREST STORER | 127 | #define STREST STORER |
128 | #define SHIFT_DISCARD SRLV | 128 | #define SHIFT_DISCARD SRLV |
129 | #endif | 129 | #endif |
130 | 130 | ||
@@ -316,9 +316,9 @@ EXC( STORE t0, -8(dst), s_exc_p1u) | |||
316 | 316 | ||
317 | src_unaligned: | 317 | src_unaligned: |
318 | #define rem t8 | 318 | #define rem t8 |
319 | SRL t0, len, LOG_NBYTES+2 # +2 for 4 units/iter | 319 | SRL t0, len, LOG_NBYTES+2 # +2 for 4 units/iter |
320 | beqz t0, cleanup_src_unaligned | 320 | beqz t0, cleanup_src_unaligned |
321 | and rem, len, (4*NBYTES-1) # rem = len % 4*NBYTES | 321 | and rem, len, (4*NBYTES-1) # rem = len % 4*NBYTES |
322 | 1: | 322 | 1: |
323 | /* | 323 | /* |
324 | * Avoid consecutive LD*'s to the same register since some mips | 324 | * Avoid consecutive LD*'s to the same register since some mips |
@@ -326,13 +326,13 @@ src_unaligned: | |||
326 | * It's OK to load FIRST(N+1) before REST(N) because the two addresses | 326 | * It's OK to load FIRST(N+1) before REST(N) because the two addresses |
327 | * are to the same unit (unless src is aligned, but it's not). | 327 | * are to the same unit (unless src is aligned, but it's not). |
328 | */ | 328 | */ |
329 | EXC( LDFIRST t0, FIRST(0)(src), l_exc) | 329 | EXC( LDFIRST t0, FIRST(0)(src), l_exc) |
330 | EXC( LDFIRST t1, FIRST(1)(src), l_exc_copy) | 330 | EXC( LDFIRST t1, FIRST(1)(src), l_exc_copy) |
331 | SUB len, len, 4*NBYTES | 331 | SUB len, len, 4*NBYTES |
332 | EXC( LDREST t0, REST(0)(src), l_exc_copy) | 332 | EXC( LDREST t0, REST(0)(src), l_exc_copy) |
333 | EXC( LDREST t1, REST(1)(src), l_exc_copy) | 333 | EXC( LDREST t1, REST(1)(src), l_exc_copy) |
334 | EXC( LDFIRST t2, FIRST(2)(src), l_exc_copy) | 334 | EXC( LDFIRST t2, FIRST(2)(src), l_exc_copy) |
335 | EXC( LDFIRST t3, FIRST(3)(src), l_exc_copy) | 335 | EXC( LDFIRST t3, FIRST(3)(src), l_exc_copy) |
336 | EXC( LDREST t2, REST(2)(src), l_exc_copy) | 336 | EXC( LDREST t2, REST(2)(src), l_exc_copy) |
337 | EXC( LDREST t3, REST(3)(src), l_exc_copy) | 337 | EXC( LDREST t3, REST(3)(src), l_exc_copy) |
338 | ADD src, src, 4*NBYTES | 338 | ADD src, src, 4*NBYTES |
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c index 3c1b625a5859..389512e2abd6 100644 --- a/arch/mips/cavium-octeon/octeon-platform.c +++ b/arch/mips/cavium-octeon/octeon-platform.c | |||
@@ -410,7 +410,7 @@ int __init octeon_prune_device_tree(void) | |||
410 | pip_path = fdt_getprop(initial_boot_params, aliases, "pip", NULL); | 410 | pip_path = fdt_getprop(initial_boot_params, aliases, "pip", NULL); |
411 | if (pip_path) { | 411 | if (pip_path) { |
412 | int pip = fdt_path_offset(initial_boot_params, pip_path); | 412 | int pip = fdt_path_offset(initial_boot_params, pip_path); |
413 | if (pip >= 0) | 413 | if (pip >= 0) |
414 | for (i = 0; i <= 4; i++) | 414 | for (i = 0; i <= 4; i++) |
415 | octeon_fdt_pip_iface(pip, i, &mac_addr_base); | 415 | octeon_fdt_pip_iface(pip, i, &mac_addr_base); |
416 | } | 416 | } |
diff --git a/arch/mips/cavium-octeon/octeon_3xxx.dts b/arch/mips/cavium-octeon/octeon_3xxx.dts index f28b2d0fde22..88cb42d4cc49 100644 --- a/arch/mips/cavium-octeon/octeon_3xxx.dts +++ b/arch/mips/cavium-octeon/octeon_3xxx.dts | |||
@@ -3,7 +3,7 @@ | |||
3 | * OCTEON 3XXX, 5XXX, 63XX device tree skeleton. | 3 | * OCTEON 3XXX, 5XXX, 63XX device tree skeleton. |
4 | * | 4 | * |
5 | * This device tree is pruned and patched by early boot code before | 5 | * This device tree is pruned and patched by early boot code before |
6 | * use. Because of this, it contains a super-set of the available | 6 | * use. Because of this, it contains a super-set of the available |
7 | * devices and properties. | 7 | * devices and properties. |
8 | */ | 8 | */ |
9 | / { | 9 | / { |
@@ -433,12 +433,12 @@ | |||
433 | cavium,t-we = <45>; | 433 | cavium,t-we = <45>; |
434 | cavium,t-rd-hld = <35>; | 434 | cavium,t-rd-hld = <35>; |
435 | cavium,t-wr-hld = <45>; | 435 | cavium,t-wr-hld = <45>; |
436 | cavium,t-pause = <0>; | 436 | cavium,t-pause = <0>; |
437 | cavium,t-wait = <0>; | 437 | cavium,t-wait = <0>; |
438 | cavium,t-page = <35>; | 438 | cavium,t-page = <35>; |
439 | cavium,t-rd-dly = <0>; | 439 | cavium,t-rd-dly = <0>; |
440 | 440 | ||
441 | cavium,pages = <0>; | 441 | cavium,pages = <0>; |
442 | cavium,bus-width = <8>; | 442 | cavium,bus-width = <8>; |
443 | }; | 443 | }; |
444 | cavium,cs-config@4 { | 444 | cavium,cs-config@4 { |
@@ -450,12 +450,12 @@ | |||
450 | cavium,t-we = <320>; | 450 | cavium,t-we = <320>; |
451 | cavium,t-rd-hld = <320>; | 451 | cavium,t-rd-hld = <320>; |
452 | cavium,t-wr-hld = <320>; | 452 | cavium,t-wr-hld = <320>; |
453 | cavium,t-pause = <320>; | 453 | cavium,t-pause = <320>; |
454 | cavium,t-wait = <320>; | 454 | cavium,t-wait = <320>; |
455 | cavium,t-page = <320>; | 455 | cavium,t-page = <320>; |
456 | cavium,t-rd-dly = <0>; | 456 | cavium,t-rd-dly = <0>; |
457 | 457 | ||
458 | cavium,pages = <0>; | 458 | cavium,pages = <0>; |
459 | cavium,bus-width = <8>; | 459 | cavium,bus-width = <8>; |
460 | }; | 460 | }; |
461 | cavium,cs-config@5 { | 461 | cavium,cs-config@5 { |
@@ -467,12 +467,12 @@ | |||
467 | cavium,t-we = <150>; | 467 | cavium,t-we = <150>; |
468 | cavium,t-rd-hld = <100>; | 468 | cavium,t-rd-hld = <100>; |
469 | cavium,t-wr-hld = <30>; | 469 | cavium,t-wr-hld = <30>; |
470 | cavium,t-pause = <0>; | 470 | cavium,t-pause = <0>; |
471 | cavium,t-wait = <30>; | 471 | cavium,t-wait = <30>; |
472 | cavium,t-page = <320>; | 472 | cavium,t-page = <320>; |
473 | cavium,t-rd-dly = <0>; | 473 | cavium,t-rd-dly = <0>; |
474 | 474 | ||
475 | cavium,pages = <0>; | 475 | cavium,pages = <0>; |
476 | cavium,bus-width = <16>; | 476 | cavium,bus-width = <16>; |
477 | }; | 477 | }; |
478 | cavium,cs-config@6 { | 478 | cavium,cs-config@6 { |
@@ -484,12 +484,12 @@ | |||
484 | cavium,t-we = <150>; | 484 | cavium,t-we = <150>; |
485 | cavium,t-rd-hld = <100>; | 485 | cavium,t-rd-hld = <100>; |
486 | cavium,t-wr-hld = <70>; | 486 | cavium,t-wr-hld = <70>; |
487 | cavium,t-pause = <0>; | 487 | cavium,t-pause = <0>; |
488 | cavium,t-wait = <0>; | 488 | cavium,t-wait = <0>; |
489 | cavium,t-page = <320>; | 489 | cavium,t-page = <320>; |
490 | cavium,t-rd-dly = <0>; | 490 | cavium,t-rd-dly = <0>; |
491 | 491 | ||
492 | cavium,pages = <0>; | 492 | cavium,pages = <0>; |
493 | cavium,wait-mode; | 493 | cavium,wait-mode; |
494 | cavium,bus-width = <16>; | 494 | cavium,bus-width = <16>; |
495 | }; | 495 | }; |
diff --git a/arch/mips/cavium-octeon/octeon_68xx.dts b/arch/mips/cavium-octeon/octeon_68xx.dts index 1839468932b6..79b46fcb0a11 100644 --- a/arch/mips/cavium-octeon/octeon_68xx.dts +++ b/arch/mips/cavium-octeon/octeon_68xx.dts | |||
@@ -3,7 +3,7 @@ | |||
3 | * OCTEON 68XX device tree skeleton. | 3 | * OCTEON 68XX device tree skeleton. |
4 | * | 4 | * |
5 | * This device tree is pruned and patched by early boot code before | 5 | * This device tree is pruned and patched by early boot code before |
6 | * use. Because of this, it contains a super-set of the available | 6 | * use. Because of this, it contains a super-set of the available |
7 | * devices and properties. | 7 | * devices and properties. |
8 | */ | 8 | */ |
9 | / { | 9 | / { |
@@ -469,12 +469,12 @@ | |||
469 | cavium,t-we = <35>; | 469 | cavium,t-we = <35>; |
470 | cavium,t-rd-hld = <25>; | 470 | cavium,t-rd-hld = <25>; |
471 | cavium,t-wr-hld = <35>; | 471 | cavium,t-wr-hld = <35>; |
472 | cavium,t-pause = <0>; | 472 | cavium,t-pause = <0>; |
473 | cavium,t-wait = <300>; | 473 | cavium,t-wait = <300>; |
474 | cavium,t-page = <25>; | 474 | cavium,t-page = <25>; |
475 | cavium,t-rd-dly = <0>; | 475 | cavium,t-rd-dly = <0>; |
476 | 476 | ||
477 | cavium,pages = <0>; | 477 | cavium,pages = <0>; |
478 | cavium,bus-width = <8>; | 478 | cavium,bus-width = <8>; |
479 | }; | 479 | }; |
480 | cavium,cs-config@4 { | 480 | cavium,cs-config@4 { |
@@ -486,12 +486,12 @@ | |||
486 | cavium,t-we = <320>; | 486 | cavium,t-we = <320>; |
487 | cavium,t-rd-hld = <320>; | 487 | cavium,t-rd-hld = <320>; |
488 | cavium,t-wr-hld = <320>; | 488 | cavium,t-wr-hld = <320>; |
489 | cavium,t-pause = <320>; | 489 | cavium,t-pause = <320>; |
490 | cavium,t-wait = <320>; | 490 | cavium,t-wait = <320>; |
491 | cavium,t-page = <320>; | 491 | cavium,t-page = <320>; |
492 | cavium,t-rd-dly = <0>; | 492 | cavium,t-rd-dly = <0>; |
493 | 493 | ||
494 | cavium,pages = <0>; | 494 | cavium,pages = <0>; |
495 | cavium,bus-width = <8>; | 495 | cavium,bus-width = <8>; |
496 | }; | 496 | }; |
497 | cavium,cs-config@5 { | 497 | cavium,cs-config@5 { |
@@ -503,12 +503,12 @@ | |||
503 | cavium,t-we = <150>; | 503 | cavium,t-we = <150>; |
504 | cavium,t-rd-hld = <100>; | 504 | cavium,t-rd-hld = <100>; |
505 | cavium,t-wr-hld = <300>; | 505 | cavium,t-wr-hld = <300>; |
506 | cavium,t-pause = <0>; | 506 | cavium,t-pause = <0>; |
507 | cavium,t-wait = <300>; | 507 | cavium,t-wait = <300>; |
508 | cavium,t-page = <310>; | 508 | cavium,t-page = <310>; |
509 | cavium,t-rd-dly = <0>; | 509 | cavium,t-rd-dly = <0>; |
510 | 510 | ||
511 | cavium,pages = <0>; | 511 | cavium,pages = <0>; |
512 | cavium,bus-width = <16>; | 512 | cavium,bus-width = <16>; |
513 | }; | 513 | }; |
514 | cavium,cs-config@6 { | 514 | cavium,cs-config@6 { |
@@ -520,12 +520,12 @@ | |||
520 | cavium,t-we = <150>; | 520 | cavium,t-we = <150>; |
521 | cavium,t-rd-hld = <100>; | 521 | cavium,t-rd-hld = <100>; |
522 | cavium,t-wr-hld = <30>; | 522 | cavium,t-wr-hld = <30>; |
523 | cavium,t-pause = <0>; | 523 | cavium,t-pause = <0>; |
524 | cavium,t-wait = <30>; | 524 | cavium,t-wait = <30>; |
525 | cavium,t-page = <310>; | 525 | cavium,t-page = <310>; |
526 | cavium,t-rd-dly = <0>; | 526 | cavium,t-rd-dly = <0>; |
527 | 527 | ||
528 | cavium,pages = <0>; | 528 | cavium,pages = <0>; |
529 | cavium,wait-mode; | 529 | cavium,wait-mode; |
530 | cavium,bus-width = <16>; | 530 | cavium,bus-width = <16>; |
531 | }; | 531 | }; |
diff --git a/arch/mips/cavium-octeon/octeon_boot.h b/arch/mips/cavium-octeon/octeon_boot.h index 428864b2ba41..7b066bbca86d 100644 --- a/arch/mips/cavium-octeon/octeon_boot.h +++ b/arch/mips/cavium-octeon/octeon_boot.h | |||
@@ -31,7 +31,7 @@ struct boot_init_vector { | |||
31 | uint32_t k0_val; | 31 | uint32_t k0_val; |
32 | /* Address of boot info block structure */ | 32 | /* Address of boot info block structure */ |
33 | uint64_t boot_info_addr; | 33 | uint64_t boot_info_addr; |
34 | uint32_t flags; /* flags */ | 34 | uint32_t flags; /* flags */ |
35 | uint32_t pad; | 35 | uint32_t pad; |
36 | }; | 36 | }; |
37 | 37 | ||
@@ -53,20 +53,20 @@ struct linux_app_boot_info { | |||
53 | 53 | ||
54 | /* If not to copy a lot of bootloader's structures | 54 | /* If not to copy a lot of bootloader's structures |
55 | here is only offset of requested member */ | 55 | here is only offset of requested member */ |
56 | #define AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK 0x765c | 56 | #define AVAIL_COREMASK_OFFSET_IN_LINUX_APP_BOOT_BLOCK 0x765c |
57 | 57 | ||
58 | /* hardcoded in bootloader */ | 58 | /* hardcoded in bootloader */ |
59 | #define LABI_ADDR_IN_BOOTLOADER 0x700 | 59 | #define LABI_ADDR_IN_BOOTLOADER 0x700 |
60 | 60 | ||
61 | #define LINUX_APP_BOOT_BLOCK_NAME "linux-app-boot" | 61 | #define LINUX_APP_BOOT_BLOCK_NAME "linux-app-boot" |
62 | 62 | ||
63 | #define LABI_SIGNATURE 0xAABBCC01 | 63 | #define LABI_SIGNATURE 0xAABBCC01 |
64 | 64 | ||
65 | /* from uboot-headers/octeon_mem_map.h */ | 65 | /* from uboot-headers/octeon_mem_map.h */ |
66 | #define EXCEPTION_BASE_INCR (4 * 1024) | 66 | #define EXCEPTION_BASE_INCR (4 * 1024) |
67 | /* Increment size for exception base addresses (4k minimum) */ | 67 | /* Increment size for exception base addresses (4k minimum) */ |
68 | #define EXCEPTION_BASE_BASE 0 | 68 | #define EXCEPTION_BASE_BASE 0 |
69 | #define BOOTLOADER_PRIV_DATA_BASE (EXCEPTION_BASE_BASE + 0x800) | 69 | #define BOOTLOADER_PRIV_DATA_BASE (EXCEPTION_BASE_BASE + 0x800) |
70 | #define BOOTLOADER_BOOT_VECTOR (BOOTLOADER_PRIV_DATA_BASE) | 70 | #define BOOTLOADER_BOOT_VECTOR (BOOTLOADER_PRIV_DATA_BASE) |
71 | 71 | ||
72 | #endif /* __OCTEON_BOOT_H__ */ | 72 | #endif /* __OCTEON_BOOT_H__ */ |
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c index d7e0a09f77c2..c594a3d4f743 100644 --- a/arch/mips/cavium-octeon/setup.c +++ b/arch/mips/cavium-octeon/setup.c | |||
@@ -319,7 +319,7 @@ EXPORT_SYMBOL(octeon_get_io_clock_rate); | |||
319 | * exists on most Cavium evaluation boards. If it doesn't exist, then | 319 | * exists on most Cavium evaluation boards. If it doesn't exist, then |
320 | * this function doesn't do anything. | 320 | * this function doesn't do anything. |
321 | * | 321 | * |
322 | * @s: String to write | 322 | * @s: String to write |
323 | */ | 323 | */ |
324 | void octeon_write_lcd(const char *s) | 324 | void octeon_write_lcd(const char *s) |
325 | { | 325 | { |
@@ -341,7 +341,7 @@ void octeon_write_lcd(const char *s) | |||
341 | /** | 341 | /** |
342 | * Return the console uart passed by the bootloader | 342 | * Return the console uart passed by the bootloader |
343 | * | 343 | * |
344 | * Returns uart (0 or 1) | 344 | * Returns uart (0 or 1) |
345 | */ | 345 | */ |
346 | int octeon_get_boot_uart(void) | 346 | int octeon_get_boot_uart(void) |
347 | { | 347 | { |
@@ -805,7 +805,7 @@ void __init prom_init(void) | |||
805 | /* | 805 | /* |
806 | * To do: switch parsing to new style, something like: | 806 | * To do: switch parsing to new style, something like: |
807 | * parse_crashkernel(arg, sysinfo->system_dram_size, | 807 | * parse_crashkernel(arg, sysinfo->system_dram_size, |
808 | * &crashk_size, &crashk_base); | 808 | * &crashk_size, &crashk_base); |
809 | */ | 809 | */ |
810 | #endif | 810 | #endif |
811 | } else if (strlen(arcs_cmdline) + strlen(arg) + 1 < | 811 | } else if (strlen(arcs_cmdline) + strlen(arg) + 1 < |
@@ -1013,7 +1013,7 @@ void __init plat_mem_setup(void) | |||
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | /* | 1015 | /* |
1016 | * Emit one character to the boot UART. Exported for use by the | 1016 | * Emit one character to the boot UART. Exported for use by the |
1017 | * watchdog timer. | 1017 | * watchdog timer. |
1018 | */ | 1018 | */ |
1019 | int prom_putchar(char c) | 1019 | int prom_putchar(char c) |
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c index ee1fb9f7f517..295137dfdc37 100644 --- a/arch/mips/cavium-octeon/smp.c +++ b/arch/mips/cavium-octeon/smp.c | |||
@@ -55,7 +55,7 @@ static irqreturn_t mailbox_interrupt(int irq, void *dev_id) | |||
55 | 55 | ||
56 | /** | 56 | /** |
57 | * Cause the function described by call_data to be executed on the passed | 57 | * Cause the function described by call_data to be executed on the passed |
58 | * cpu. When the function has finished, increment the finished field of | 58 | * cpu. When the function has finished, increment the finished field of |
59 | * call_data. | 59 | * call_data. |
60 | */ | 60 | */ |
61 | void octeon_send_ipi_single(int cpu, unsigned int action) | 61 | void octeon_send_ipi_single(int cpu, unsigned int action) |
@@ -126,8 +126,8 @@ static void octeon_smp_setup(void) | |||
126 | 126 | ||
127 | #ifdef CONFIG_HOTPLUG_CPU | 127 | #ifdef CONFIG_HOTPLUG_CPU |
128 | /* | 128 | /* |
129 | * The possible CPUs are all those present on the chip. We | 129 | * The possible CPUs are all those present on the chip. We |
130 | * will assign CPU numbers for possible cores as well. Cores | 130 | * will assign CPU numbers for possible cores as well. Cores |
131 | * are always consecutively numberd from 0. | 131 | * are always consecutively numberd from 0. |
132 | */ | 132 | */ |
133 | for (id = 0; id < num_cores && id < NR_CPUS; id++) { | 133 | for (id = 0; id < num_cores && id < NR_CPUS; id++) { |
@@ -332,7 +332,7 @@ extern void kernel_entry(unsigned long arg1, ...); | |||
332 | 332 | ||
333 | static void start_after_reset(void) | 333 | static void start_after_reset(void) |
334 | { | 334 | { |
335 | kernel_entry(0, 0, 0); /* set a2 = 0 for secondary core */ | 335 | kernel_entry(0, 0, 0); /* set a2 = 0 for secondary core */ |
336 | } | 336 | } |
337 | 337 | ||
338 | static int octeon_update_boot_vector(unsigned int cpu) | 338 | static int octeon_update_boot_vector(unsigned int cpu) |
@@ -401,7 +401,7 @@ static int __cpuinit register_cavium_notifier(void) | |||
401 | } | 401 | } |
402 | late_initcall(register_cavium_notifier); | 402 | late_initcall(register_cavium_notifier); |
403 | 403 | ||
404 | #endif /* CONFIG_HOTPLUG_CPU */ | 404 | #endif /* CONFIG_HOTPLUG_CPU */ |
405 | 405 | ||
406 | struct plat_smp_ops octeon_smp_ops = { | 406 | struct plat_smp_ops octeon_smp_ops = { |
407 | .send_ipi_single = octeon_send_ipi_single, | 407 | .send_ipi_single = octeon_send_ipi_single, |
diff --git a/arch/mips/cobalt/led.c b/arch/mips/cobalt/led.c index d3ce6fa1dc74..32265f514e3f 100644 --- a/arch/mips/cobalt/led.c +++ b/arch/mips/cobalt/led.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Registration of Cobalt LED platform device. | 2 | * Registration of Cobalt LED platform device. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/cobalt/mtd.c b/arch/mips/cobalt/mtd.c index 691d620b6766..8db7b5d81560 100644 --- a/arch/mips/cobalt/mtd.c +++ b/arch/mips/cobalt/mtd.c | |||
@@ -25,7 +25,7 @@ | |||
25 | static struct mtd_partition cobalt_mtd_partitions[] = { | 25 | static struct mtd_partition cobalt_mtd_partitions[] = { |
26 | { | 26 | { |
27 | .name = "firmware", | 27 | .name = "firmware", |
28 | .offset = 0x0, | 28 | .offset = 0x0, |
29 | .size = 0x80000, | 29 | .size = 0x80000, |
30 | }, | 30 | }, |
31 | }; | 31 | }; |
diff --git a/arch/mips/cobalt/rtc.c b/arch/mips/cobalt/rtc.c index 3ab39898b4e4..a6bc75ada9df 100644 --- a/arch/mips/cobalt/rtc.c +++ b/arch/mips/cobalt/rtc.c | |||
@@ -46,7 +46,7 @@ static __init int cobalt_rtc_add(void) | |||
46 | return -ENOMEM; | 46 | return -ENOMEM; |
47 | 47 | ||
48 | retval = platform_device_add_resources(pdev, cobalt_rtc_resource, | 48 | retval = platform_device_add_resources(pdev, cobalt_rtc_resource, |
49 | ARRAY_SIZE(cobalt_rtc_resource)); | 49 | ARRAY_SIZE(cobalt_rtc_resource)); |
50 | if (retval) | 50 | if (retval) |
51 | goto err_free_device; | 51 | goto err_free_device; |
52 | 52 | ||
diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S index 82c852818781..22afed16ccde 100644 --- a/arch/mips/dec/int-handler.S +++ b/arch/mips/dec/int-handler.S | |||
@@ -55,70 +55,70 @@ | |||
55 | * DS2100/3100's, aka kn01, aka Pmax: | 55 | * DS2100/3100's, aka kn01, aka Pmax: |
56 | * | 56 | * |
57 | * MIPS IRQ Source | 57 | * MIPS IRQ Source |
58 | * -------- ------ | 58 | * -------- ------ |
59 | * 0 Software (ignored) | 59 | * 0 Software (ignored) |
60 | * 1 Software (ignored) | 60 | * 1 Software (ignored) |
61 | * 2 SCSI | 61 | * 2 SCSI |
62 | * 3 Lance Ethernet | 62 | * 3 Lance Ethernet |
63 | * 4 DZ11 serial | 63 | * 4 DZ11 serial |
64 | * 5 RTC | 64 | * 5 RTC |
65 | * 6 Memory Controller & Video | 65 | * 6 Memory Controller & Video |
66 | * 7 FPU | 66 | * 7 FPU |
67 | * | 67 | * |
68 | * DS5000/200, aka kn02, aka 3max: | 68 | * DS5000/200, aka kn02, aka 3max: |
69 | * | 69 | * |
70 | * MIPS IRQ Source | 70 | * MIPS IRQ Source |
71 | * -------- ------ | 71 | * -------- ------ |
72 | * 0 Software (ignored) | 72 | * 0 Software (ignored) |
73 | * 1 Software (ignored) | 73 | * 1 Software (ignored) |
74 | * 2 TurboChannel | 74 | * 2 TurboChannel |
75 | * 3 RTC | 75 | * 3 RTC |
76 | * 4 Reserved | 76 | * 4 Reserved |
77 | * 5 Memory Controller | 77 | * 5 Memory Controller |
78 | * 6 Reserved | 78 | * 6 Reserved |
79 | * 7 FPU | 79 | * 7 FPU |
80 | * | 80 | * |
81 | * DS5000/1xx's, aka kn02ba, aka 3min: | 81 | * DS5000/1xx's, aka kn02ba, aka 3min: |
82 | * | 82 | * |
83 | * MIPS IRQ Source | 83 | * MIPS IRQ Source |
84 | * -------- ------ | 84 | * -------- ------ |
85 | * 0 Software (ignored) | 85 | * 0 Software (ignored) |
86 | * 1 Software (ignored) | 86 | * 1 Software (ignored) |
87 | * 2 TurboChannel Slot 0 | 87 | * 2 TurboChannel Slot 0 |
88 | * 3 TurboChannel Slot 1 | 88 | * 3 TurboChannel Slot 1 |
89 | * 4 TurboChannel Slot 2 | 89 | * 4 TurboChannel Slot 2 |
90 | * 5 TurboChannel Slot 3 (ASIC) | 90 | * 5 TurboChannel Slot 3 (ASIC) |
91 | * 6 Halt button | 91 | * 6 Halt button |
92 | * 7 FPU/R4k timer | 92 | * 7 FPU/R4k timer |
93 | * | 93 | * |
94 | * DS5000/2x's, aka kn02ca, aka maxine: | 94 | * DS5000/2x's, aka kn02ca, aka maxine: |
95 | * | 95 | * |
96 | * MIPS IRQ Source | 96 | * MIPS IRQ Source |
97 | * -------- ------ | 97 | * -------- ------ |
98 | * 0 Software (ignored) | 98 | * 0 Software (ignored) |
99 | * 1 Software (ignored) | 99 | * 1 Software (ignored) |
100 | * 2 Periodic Interrupt (100usec) | 100 | * 2 Periodic Interrupt (100usec) |
101 | * 3 RTC | 101 | * 3 RTC |
102 | * 4 I/O write timeout | 102 | * 4 I/O write timeout |
103 | * 5 TurboChannel (ASIC) | 103 | * 5 TurboChannel (ASIC) |
104 | * 6 Halt Keycode from Access.Bus keyboard (CTRL-ALT-ENTER) | 104 | * 6 Halt Keycode from Access.Bus keyboard (CTRL-ALT-ENTER) |
105 | * 7 FPU/R4k timer | 105 | * 7 FPU/R4k timer |
106 | * | 106 | * |
107 | * DS5000/2xx's, aka kn03, aka 3maxplus: | 107 | * DS5000/2xx's, aka kn03, aka 3maxplus: |
108 | * | 108 | * |
109 | * MIPS IRQ Source | 109 | * MIPS IRQ Source |
110 | * -------- ------ | 110 | * -------- ------ |
111 | * 0 Software (ignored) | 111 | * 0 Software (ignored) |
112 | * 1 Software (ignored) | 112 | * 1 Software (ignored) |
113 | * 2 System Board (ASIC) | 113 | * 2 System Board (ASIC) |
114 | * 3 RTC | 114 | * 3 RTC |
115 | * 4 Reserved | 115 | * 4 Reserved |
116 | * 5 Memory | 116 | * 5 Memory |
117 | * 6 Halt Button | 117 | * 6 Halt Button |
118 | * 7 FPU/R4k timer | 118 | * 7 FPU/R4k timer |
119 | * | 119 | * |
120 | * We handle the IRQ according to _our_ priority (see setup.c), | 120 | * We handle the IRQ according to _our_ priority (see setup.c), |
121 | * then we just return. If multiple IRQs are pending then we will | 121 | * then we just return. If multiple IRQs are pending then we will |
122 | * just take another exception, big deal. | 122 | * just take another exception, big deal. |
123 | */ | 123 | */ |
124 | .align 5 | 124 | .align 5 |
@@ -146,7 +146,7 @@ | |||
146 | /* | 146 | /* |
147 | * Find irq with highest priority | 147 | * Find irq with highest priority |
148 | */ | 148 | */ |
149 | PTR_LA t1,cpu_mask_nr_tbl | 149 | PTR_LA t1,cpu_mask_nr_tbl |
150 | 1: lw t2,(t1) | 150 | 1: lw t2,(t1) |
151 | nop | 151 | nop |
152 | and t2,t0 | 152 | and t2,t0 |
@@ -195,7 +195,7 @@ | |||
195 | /* | 195 | /* |
196 | * Find irq with highest priority | 196 | * Find irq with highest priority |
197 | */ | 197 | */ |
198 | PTR_LA t1,asic_mask_nr_tbl | 198 | PTR_LA t1,asic_mask_nr_tbl |
199 | 2: lw t2,(t1) | 199 | 2: lw t2,(t1) |
200 | nop | 200 | nop |
201 | and t2,t0 | 201 | and t2,t0 |
@@ -221,7 +221,7 @@ | |||
221 | FEXPORT(cpu_all_int) # HALT, timers, software junk | 221 | FEXPORT(cpu_all_int) # HALT, timers, software junk |
222 | li a0,DEC_CPU_IRQ_BASE | 222 | li a0,DEC_CPU_IRQ_BASE |
223 | srl t0,CAUSEB_IP | 223 | srl t0,CAUSEB_IP |
224 | li t1,CAUSEF_IP>>CAUSEB_IP # mask | 224 | li t1,CAUSEF_IP>>CAUSEB_IP # mask |
225 | b 1f | 225 | b 1f |
226 | li t2,4 # nr of bits / 2 | 226 | li t2,4 # nr of bits / 2 |
227 | 227 | ||
diff --git a/arch/mips/dec/kn02xa-berr.c b/arch/mips/dec/kn02xa-berr.c index ebb73c51d821..f434b759e3b9 100644 --- a/arch/mips/dec/kn02xa-berr.c +++ b/arch/mips/dec/kn02xa-berr.c | |||
@@ -128,8 +128,8 @@ void __init dec_kn02xa_be_init(void) | |||
128 | { | 128 | { |
129 | volatile u32 *mbcs = (void *)CKSEG1ADDR(KN4K_SLOT_BASE + KN4K_MB_CSR); | 129 | volatile u32 *mbcs = (void *)CKSEG1ADDR(KN4K_SLOT_BASE + KN4K_MB_CSR); |
130 | 130 | ||
131 | /* For KN04 we need to make sure EE (?) is enabled in the MB. */ | 131 | /* For KN04 we need to make sure EE (?) is enabled in the MB. */ |
132 | if (current_cpu_type() == CPU_R4000SC) | 132 | if (current_cpu_type() == CPU_R4000SC) |
133 | *mbcs |= KN4K_MB_CSR_EE; | 133 | *mbcs |= KN4K_MB_CSR_EE; |
134 | fast_iob(); | 134 | fast_iob(); |
135 | 135 | ||
diff --git a/arch/mips/dec/prom/call_o32.S b/arch/mips/dec/prom/call_o32.S index 8c8498159e43..c0d1522d448f 100644 --- a/arch/mips/dec/prom/call_o32.S +++ b/arch/mips/dec/prom/call_o32.S | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | /* Maximum number of arguments supported. Must be even! */ | 15 | /* Maximum number of arguments supported. Must be even! */ |
16 | #define O32_ARGC 32 | 16 | #define O32_ARGC 32 |
17 | /* Number of static registers we save. */ | 17 | /* Number of static registers we save. */ |
18 | #define O32_STATC 11 | 18 | #define O32_STATC 11 |
19 | /* Frame size for both of the above. */ | 19 | /* Frame size for both of the above. */ |
20 | #define O32_FRAMESZ (4 * O32_ARGC + SZREG * O32_STATC) | 20 | #define O32_FRAMESZ (4 * O32_ARGC + SZREG * O32_STATC) |
diff --git a/arch/mips/dec/prom/dectypes.h b/arch/mips/dec/prom/dectypes.h index 707b6f1f5a9d..69ea5b9c8190 100644 --- a/arch/mips/dec/prom/dectypes.h +++ b/arch/mips/dec/prom/dectypes.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef DECTYPES | 1 | #ifndef DECTYPES |
2 | #define DECTYPES | 2 | #define DECTYPES |
3 | 3 | ||
4 | #define DS2100_3100 1 /* DS2100/3100 Pmax */ | 4 | #define DS2100_3100 1 /* DS2100/3100 Pmax */ |
5 | #define DS5000_200 2 /* DS5000/200 3max */ | 5 | #define DS5000_200 2 /* DS5000/200 3max */ |
diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c index 93f1239af524..ab169046e442 100644 --- a/arch/mips/dec/prom/init.c +++ b/arch/mips/dec/prom/init.c | |||
@@ -103,7 +103,7 @@ void __init prom_init(void) | |||
103 | if (prom_is_rex(magic)) | 103 | if (prom_is_rex(magic)) |
104 | rex_clear_cache(); | 104 | rex_clear_cache(); |
105 | 105 | ||
106 | /* Register the early console. */ | 106 | /* Register the early console. */ |
107 | register_prom_console(); | 107 | register_prom_console(); |
108 | 108 | ||
109 | /* Were we compiled with the right CPU option? */ | 109 | /* Were we compiled with the right CPU option? */ |
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c index 8c62316f22f4..0aadac742900 100644 --- a/arch/mips/dec/prom/memory.c +++ b/arch/mips/dec/prom/memory.c | |||
@@ -22,7 +22,7 @@ volatile unsigned long mem_err; /* So we know an error occurred */ | |||
22 | 22 | ||
23 | /* | 23 | /* |
24 | * Probe memory in 4MB chunks, waiting for an error to tell us we've fallen | 24 | * Probe memory in 4MB chunks, waiting for an error to tell us we've fallen |
25 | * off the end of real memory. Only suitable for the 2100/3100's (PMAX). | 25 | * off the end of real memory. Only suitable for the 2100/3100's (PMAX). |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define CHUNK_SIZE 0x400000 | 28 | #define CHUNK_SIZE 0x400000 |
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c index b874accd878a..741cb4235bde 100644 --- a/arch/mips/dec/setup.c +++ b/arch/mips/dec/setup.c | |||
@@ -65,7 +65,7 @@ EXPORT_SYMBOL(ioasic_base); | |||
65 | /* | 65 | /* |
66 | * IRQ routing and priority tables. Priorites are set as follows: | 66 | * IRQ routing and priority tables. Priorites are set as follows: |
67 | * | 67 | * |
68 | * KN01 KN230 KN02 KN02-BA KN02-CA KN03 | 68 | * KN01 KN230 KN02 KN02-BA KN02-CA KN03 |
69 | * | 69 | * |
70 | * MEMORY CPU CPU CPU ASIC CPU CPU | 70 | * MEMORY CPU CPU CPU ASIC CPU CPU |
71 | * RTC CPU CPU CPU ASIC CPU CPU | 71 | * RTC CPU CPU CPU ASIC CPU CPU |
@@ -413,7 +413,7 @@ static void __init dec_init_kn02(void) | |||
413 | 413 | ||
414 | /* | 414 | /* |
415 | * Machine-specific initialisation for KN02-BA, aka DS5000/1xx | 415 | * Machine-specific initialisation for KN02-BA, aka DS5000/1xx |
416 | * (xx = 20, 25, 33), aka 3min. Also applies to KN04(-BA), aka | 416 | * (xx = 20, 25, 33), aka 3min. Also applies to KN04(-BA), aka |
417 | * DS5000/150, aka 4min. | 417 | * DS5000/150, aka 4min. |
418 | */ | 418 | */ |
419 | static int kn02ba_interrupt[DEC_NR_INTS] __initdata = { | 419 | static int kn02ba_interrupt[DEC_NR_INTS] __initdata = { |
diff --git a/arch/mips/dec/wbflush.c b/arch/mips/dec/wbflush.c index 43feddd5e19c..56bda4a396b5 100644 --- a/arch/mips/dec/wbflush.c +++ b/arch/mips/dec/wbflush.c | |||
@@ -2,9 +2,9 @@ | |||
2 | * Setup the right wbflush routine for the different DECstations. | 2 | * Setup the right wbflush routine for the different DECstations. |
3 | * | 3 | * |
4 | * Created with information from: | 4 | * Created with information from: |
5 | * DECstation 3100 Desktop Workstation Functional Specification | 5 | * DECstation 3100 Desktop Workstation Functional Specification |
6 | * DECstation 5000/200 KN02 System Module Functional Specification | 6 | * DECstation 5000/200 KN02 System Module Functional Specification |
7 | * mipsel-linux-objdump --disassemble vmunix | grep "wbflush" :-) | 7 | * mipsel-linux-objdump --disassemble vmunix | grep "wbflush" :-) |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General Public | 9 | * This file is subject to the terms and conditions of the GNU General Public |
10 | * License. See the file "COPYING" in the main directory of this archive | 10 | * License. See the file "COPYING" in the main directory of this archive |
diff --git a/arch/mips/emma/markeins/irq.c b/arch/mips/emma/markeins/irq.c index b5f08255d9c7..b880a83e4d4e 100644 --- a/arch/mips/emma/markeins/irq.c +++ b/arch/mips/emma/markeins/irq.c | |||
@@ -292,7 +292,7 @@ void __init arch_init_irq(void) | |||
292 | 292 | ||
293 | asmlinkage void plat_irq_dispatch(void) | 293 | asmlinkage void plat_irq_dispatch(void) |
294 | { | 294 | { |
295 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; | 295 | unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; |
296 | 296 | ||
297 | if (pending & STATUSF_IP7) | 297 | if (pending & STATUSF_IP7) |
298 | do_IRQ(MIPS_CPU_IRQ_BASE + 7); | 298 | do_IRQ(MIPS_CPU_IRQ_BASE + 7); |
diff --git a/arch/mips/emma/markeins/platform.c b/arch/mips/emma/markeins/platform.c index b05b08b92a34..99ea004730a7 100644 --- a/arch/mips/emma/markeins/platform.c +++ b/arch/mips/emma/markeins/platform.c | |||
@@ -190,7 +190,7 @@ static struct platform_device markeins_flash_device = { | |||
190 | .name = "physmap-flash", | 190 | .name = "physmap-flash", |
191 | .id = 0, | 191 | .id = 0, |
192 | .dev = { | 192 | .dev = { |
193 | .platform_data = &markeins_flash_data, | 193 | .platform_data = &markeins_flash_data, |
194 | }, | 194 | }, |
195 | .num_resources = 1, | 195 | .num_resources = 1, |
196 | .resource = &markeins_flash_resource, | 196 | .resource = &markeins_flash_resource, |
diff --git a/arch/mips/emma/markeins/setup.c b/arch/mips/emma/markeins/setup.c index feceebcfff42..d71005835c00 100644 --- a/arch/mips/emma/markeins/setup.c +++ b/arch/mips/emma/markeins/setup.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #include <asm/emma/emma2rh.h> | 29 | #include <asm/emma/emma2rh.h> |
30 | 30 | ||
31 | #define USE_CPU_COUNTER_TIMER /* whether we use cpu counter */ | 31 | #define USE_CPU_COUNTER_TIMER /* whether we use cpu counter */ |
32 | 32 | ||
33 | extern void markeins_led(const char *); | 33 | extern void markeins_led(const char *); |
34 | 34 | ||
diff --git a/arch/mips/fw/arc/file.c b/arch/mips/fw/arc/file.c index 30335341b447..a8b08032348f 100644 --- a/arch/mips/fw/arc/file.c +++ b/arch/mips/fw/arc/file.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | LONG | 16 | LONG |
17 | ArcGetDirectoryEntry(ULONG FileID, struct linux_vdirent *Buffer, | 17 | ArcGetDirectoryEntry(ULONG FileID, struct linux_vdirent *Buffer, |
18 | ULONG N, ULONG *Count) | 18 | ULONG N, ULONG *Count) |
19 | { | 19 | { |
20 | return ARC_CALL4(get_vdirent, FileID, Buffer, N, Count); | 20 | return ARC_CALL4(get_vdirent, FileID, Buffer, N, Count); |
21 | } | 21 | } |
@@ -69,7 +69,7 @@ ArcGetFileInformation(ULONG FileID, struct linux_finfo *Information) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | LONG ArcSetFileInformation(ULONG FileID, ULONG AttributeFlags, | 71 | LONG ArcSetFileInformation(ULONG FileID, ULONG AttributeFlags, |
72 | ULONG AttributeMask) | 72 | ULONG AttributeMask) |
73 | { | 73 | { |
74 | return ARC_CALL3(set_finfo, FileID, AttributeFlags, AttributeMask); | 74 | return ARC_CALL3(set_finfo, FileID, AttributeFlags, AttributeMask); |
75 | } | 75 | } |
diff --git a/arch/mips/fw/arc/identify.c b/arch/mips/fw/arc/identify.c index 54a33c756f61..f90266c02c9d 100644 --- a/arch/mips/fw/arc/identify.c +++ b/arch/mips/fw/arc/identify.c | |||
@@ -100,7 +100,7 @@ void __init prom_identify_arch(void) | |||
100 | if (p == NULL) { | 100 | if (p == NULL) { |
101 | #ifdef CONFIG_SGI_IP27 | 101 | #ifdef CONFIG_SGI_IP27 |
102 | /* IP27 PROM misbehaves, seems to not implement ARC | 102 | /* IP27 PROM misbehaves, seems to not implement ARC |
103 | GetChild(). So we just assume it's an IP27. */ | 103 | GetChild(). So we just assume it's an IP27. */ |
104 | iname = "SGI-IP27"; | 104 | iname = "SGI-IP27"; |
105 | #else | 105 | #else |
106 | iname = "Unknown"; | 106 | iname = "Unknown"; |
diff --git a/arch/mips/fw/arc/memory.c b/arch/mips/fw/arc/memory.c index 8b8eea2b6cf6..5537b94572b2 100644 --- a/arch/mips/fw/arc/memory.c +++ b/arch/mips/fw/arc/memory.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * memory.c: PROM library functions for acquiring/using memory descriptors | 2 | * memory.c: PROM library functions for acquiring/using memory descriptors |
3 | * given to us from the ARCS firmware. | 3 | * given to us from the ARCS firmware. |
4 | * | 4 | * |
5 | * Copyright (C) 1996 by David S. Miller | 5 | * Copyright (C) 1996 by David S. Miller |
6 | * Copyright (C) 1999, 2000, 2001 by Ralf Baechle | 6 | * Copyright (C) 1999, 2000, 2001 by Ralf Baechle |
diff --git a/arch/mips/fw/arc/promlib.c b/arch/mips/fw/arc/promlib.c index b7f9dd3c93c6..7e8ba5ce95be 100644 --- a/arch/mips/fw/arc/promlib.c +++ b/arch/mips/fw/arc/promlib.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/bcache.h> | 11 | #include <asm/bcache.h> |
12 | 12 | ||
13 | /* | 13 | /* |
14 | * IP22 boardcache is not compatible with board caches. Thus we disable it | 14 | * IP22 boardcache is not compatible with board caches. Thus we disable it |
15 | * during romvec action. Since r4xx0.c is always compiled and linked with your | 15 | * during romvec action. Since r4xx0.c is always compiled and linked with your |
16 | * kernel, this shouldn't cause any harm regardless what MIPS processor you | 16 | * kernel, this shouldn't cause any harm regardless what MIPS processor you |
17 | * have. | 17 | * have. |
diff --git a/arch/mips/fw/lib/call_o32.S b/arch/mips/fw/lib/call_o32.S index e0a68713b3c3..b308b2a0613e 100644 --- a/arch/mips/fw/lib/call_o32.S +++ b/arch/mips/fw/lib/call_o32.S | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | /* Maximum number of arguments supported. Must be even! */ | 15 | /* Maximum number of arguments supported. Must be even! */ |
16 | #define O32_ARGC 32 | 16 | #define O32_ARGC 32 |
17 | /* Number of static registers we save. */ | 17 | /* Number of static registers we save. */ |
18 | #define O32_STATC 11 | 18 | #define O32_STATC 11 |
19 | /* Frame size for static register */ | 19 | /* Frame size for static register */ |
20 | #define O32_FRAMESZ (SZREG * O32_STATC) | 20 | #define O32_FRAMESZ (SZREG * O32_STATC) |
diff --git a/arch/mips/fw/sni/sniprom.c b/arch/mips/fw/sni/sniprom.c index 96ba99202758..2c2cb182af4e 100644 --- a/arch/mips/fw/sni/sniprom.c +++ b/arch/mips/fw/sni/sniprom.c | |||
@@ -28,20 +28,20 @@ | |||
28 | * registers | 28 | * registers |
29 | */ | 29 | */ |
30 | #define PROM_GET_MEMCONF 58 | 30 | #define PROM_GET_MEMCONF 58 |
31 | #define PROM_GET_HWCONF 61 | 31 | #define PROM_GET_HWCONF 61 |
32 | 32 | ||
33 | #define PROM_VEC (u64 *)CKSEG1ADDR(0x1fc00000) | 33 | #define PROM_VEC (u64 *)CKSEG1ADDR(0x1fc00000) |
34 | #define PROM_ENTRY(x) (PROM_VEC + (x)) | 34 | #define PROM_ENTRY(x) (PROM_VEC + (x)) |
35 | 35 | ||
36 | #define ___prom_putchar ((int *(*)(int))PROM_ENTRY(PROM_PUTCHAR)) | 36 | #define ___prom_putchar ((int *(*)(int))PROM_ENTRY(PROM_PUTCHAR)) |
37 | #define ___prom_getenv ((char *(*)(char *))PROM_ENTRY(PROM_GETENV)) | 37 | #define ___prom_getenv ((char *(*)(char *))PROM_ENTRY(PROM_GETENV)) |
38 | #define ___prom_get_memconf ((void (*)(void *))PROM_ENTRY(PROM_GET_MEMCONF)) | 38 | #define ___prom_get_memconf ((void (*)(void *))PROM_ENTRY(PROM_GET_MEMCONF)) |
39 | #define ___prom_get_hwconf ((u32 (*)(void))PROM_ENTRY(PROM_GET_HWCONF)) | 39 | #define ___prom_get_hwconf ((u32 (*)(void))PROM_ENTRY(PROM_GET_HWCONF)) |
40 | 40 | ||
41 | #ifdef CONFIG_64BIT | 41 | #ifdef CONFIG_64BIT |
42 | 42 | ||
43 | static u8 o32_stk[16384]; | 43 | static u8 o32_stk[16384]; |
44 | #define O32_STK &o32_stk[sizeof(o32_stk)] | 44 | #define O32_STK &o32_stk[sizeof(o32_stk)] |
45 | 45 | ||
46 | #define __PROM_O32(fun, arg) fun arg __asm__(#fun); \ | 46 | #define __PROM_O32(fun, arg) fun arg __asm__(#fun); \ |
47 | __asm__(#fun " = call_o32") | 47 | __asm__(#fun " = call_o32") |
@@ -52,13 +52,13 @@ void __PROM_O32(__prom_get_memconf, (void (*)(void *), void *, void *)); | |||
52 | u32 __PROM_O32(__prom_get_hwconf, (u32 (*)(void), void *)); | 52 | u32 __PROM_O32(__prom_get_hwconf, (u32 (*)(void), void *)); |
53 | 53 | ||
54 | #define _prom_putchar(x) __prom_putchar(___prom_putchar, O32_STK, x) | 54 | #define _prom_putchar(x) __prom_putchar(___prom_putchar, O32_STK, x) |
55 | #define _prom_getenv(x) __prom_getenv(___prom_getenv, O32_STK, x) | 55 | #define _prom_getenv(x) __prom_getenv(___prom_getenv, O32_STK, x) |
56 | #define _prom_get_memconf(x) __prom_get_memconf(___prom_get_memconf, O32_STK, x) | 56 | #define _prom_get_memconf(x) __prom_get_memconf(___prom_get_memconf, O32_STK, x) |
57 | #define _prom_get_hwconf() __prom_get_hwconf(___prom_get_hwconf, O32_STK) | 57 | #define _prom_get_hwconf() __prom_get_hwconf(___prom_get_hwconf, O32_STK) |
58 | 58 | ||
59 | #else | 59 | #else |
60 | #define _prom_putchar(x) ___prom_putchar(x) | 60 | #define _prom_putchar(x) ___prom_putchar(x) |
61 | #define _prom_getenv(x) ___prom_getenv(x) | 61 | #define _prom_getenv(x) ___prom_getenv(x) |
62 | #define _prom_get_memconf(x) ___prom_get_memconf(x) | 62 | #define _prom_get_memconf(x) ___prom_get_memconf(x) |
63 | #define _prom_get_hwconf(x) ___prom_get_hwconf(x) | 63 | #define _prom_get_hwconf(x) ___prom_get_hwconf(x) |
64 | #endif | 64 | #endif |
diff --git a/arch/mips/include/asm/abi.h b/arch/mips/include/asm/abi.h index 9252d9b50e59..909bb6984866 100644 --- a/arch/mips/include/asm/abi.h +++ b/arch/mips/include/asm/abi.h | |||
@@ -14,12 +14,12 @@ | |||
14 | 14 | ||
15 | struct mips_abi { | 15 | struct mips_abi { |
16 | int (* const setup_frame)(void *sig_return, struct k_sigaction *ka, | 16 | int (* const setup_frame)(void *sig_return, struct k_sigaction *ka, |
17 | struct pt_regs *regs, int signr, | 17 | struct pt_regs *regs, int signr, |
18 | sigset_t *set); | 18 | sigset_t *set); |
19 | const unsigned long signal_return_offset; | 19 | const unsigned long signal_return_offset; |
20 | int (* const setup_rt_frame)(void *sig_return, struct k_sigaction *ka, | 20 | int (* const setup_rt_frame)(void *sig_return, struct k_sigaction *ka, |
21 | struct pt_regs *regs, int signr, | 21 | struct pt_regs *regs, int signr, |
22 | sigset_t *set, siginfo_t *info); | 22 | sigset_t *set, siginfo_t *info); |
23 | const unsigned long rt_signal_return_offset; | 23 | const unsigned long rt_signal_return_offset; |
24 | const unsigned long restart; | 24 | const unsigned long restart; |
25 | }; | 25 | }; |
diff --git a/arch/mips/include/asm/addrspace.h b/arch/mips/include/asm/addrspace.h index 569f80aacbd2..13d61c002e4f 100644 --- a/arch/mips/include/asm/addrspace.h +++ b/arch/mips/include/asm/addrspace.h | |||
@@ -51,14 +51,14 @@ | |||
51 | * Returns the physical address of a CKSEGx / XKPHYS address | 51 | * Returns the physical address of a CKSEGx / XKPHYS address |
52 | */ | 52 | */ |
53 | #define CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff) | 53 | #define CPHYSADDR(a) ((_ACAST32_(a)) & 0x1fffffff) |
54 | #define XPHYSADDR(a) ((_ACAST64_(a)) & \ | 54 | #define XPHYSADDR(a) ((_ACAST64_(a)) & \ |
55 | _CONST64_(0x000000ffffffffff)) | 55 | _CONST64_(0x000000ffffffffff)) |
56 | 56 | ||
57 | #ifdef CONFIG_64BIT | 57 | #ifdef CONFIG_64BIT |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Memory segments (64bit kernel mode addresses) | 60 | * Memory segments (64bit kernel mode addresses) |
61 | * The compatibility segments use the full 64-bit sign extended value. Note | 61 | * The compatibility segments use the full 64-bit sign extended value. Note |
62 | * the R8000 doesn't have them so don't reference these in generic MIPS code. | 62 | * the R8000 doesn't have them so don't reference these in generic MIPS code. |
63 | */ | 63 | */ |
64 | #define XKUSEG _CONST64_(0x0000000000000000) | 64 | #define XKUSEG _CONST64_(0x0000000000000000) |
@@ -131,7 +131,7 @@ | |||
131 | 131 | ||
132 | /* | 132 | /* |
133 | * The ultimate limited of the 64-bit MIPS architecture: 2 bits for selecting | 133 | * The ultimate limited of the 64-bit MIPS architecture: 2 bits for selecting |
134 | * the region, 3 bits for the CCA mode. This leaves 59 bits of which the | 134 | * the region, 3 bits for the CCA mode. This leaves 59 bits of which the |
135 | * R8000 implements most with its 48-bit physical address space. | 135 | * R8000 implements most with its 48-bit physical address space. |
136 | */ | 136 | */ |
137 | #define TO_PHYS_MASK _CONST64_(0x07ffffffffffffff) /* 2^^59 - 1 */ | 137 | #define TO_PHYS_MASK _CONST64_(0x07ffffffffffffff) /* 2^^59 - 1 */ |
diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index 608cfcfbb3ea..164a21e65b42 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h | |||
@@ -33,12 +33,12 @@ | |||
33 | * Not used for the kernel but here seems to be the right place. | 33 | * Not used for the kernel but here seems to be the right place. |
34 | */ | 34 | */ |
35 | #ifdef __PIC__ | 35 | #ifdef __PIC__ |
36 | #define CPRESTORE(register) \ | 36 | #define CPRESTORE(register) \ |
37 | .cprestore register | 37 | .cprestore register |
38 | #define CPADD(register) \ | 38 | #define CPADD(register) \ |
39 | .cpadd register | 39 | .cpadd register |
40 | #define CPLOAD(register) \ | 40 | #define CPLOAD(register) \ |
41 | .cpload register | 41 | .cpload register |
42 | #else | 42 | #else |
43 | #define CPRESTORE(register) | 43 | #define CPRESTORE(register) |
44 | #define CPADD(register) | 44 | #define CPADD(register) |
@@ -48,35 +48,35 @@ | |||
48 | /* | 48 | /* |
49 | * LEAF - declare leaf routine | 49 | * LEAF - declare leaf routine |
50 | */ | 50 | */ |
51 | #define LEAF(symbol) \ | 51 | #define LEAF(symbol) \ |
52 | .globl symbol; \ | 52 | .globl symbol; \ |
53 | .align 2; \ | 53 | .align 2; \ |
54 | .type symbol, @function; \ | 54 | .type symbol, @function; \ |
55 | .ent symbol, 0; \ | 55 | .ent symbol, 0; \ |
56 | symbol: .frame sp, 0, ra | 56 | symbol: .frame sp, 0, ra |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * NESTED - declare nested routine entry point | 59 | * NESTED - declare nested routine entry point |
60 | */ | 60 | */ |
61 | #define NESTED(symbol, framesize, rpc) \ | 61 | #define NESTED(symbol, framesize, rpc) \ |
62 | .globl symbol; \ | 62 | .globl symbol; \ |
63 | .align 2; \ | 63 | .align 2; \ |
64 | .type symbol, @function; \ | 64 | .type symbol, @function; \ |
65 | .ent symbol, 0; \ | 65 | .ent symbol, 0; \ |
66 | symbol: .frame sp, framesize, rpc | 66 | symbol: .frame sp, framesize, rpc |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * END - mark end of function | 69 | * END - mark end of function |
70 | */ | 70 | */ |
71 | #define END(function) \ | 71 | #define END(function) \ |
72 | .end function; \ | 72 | .end function; \ |
73 | .size function, .-function | 73 | .size function, .-function |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * EXPORT - export definition of symbol | 76 | * EXPORT - export definition of symbol |
77 | */ | 77 | */ |
78 | #define EXPORT(symbol) \ | 78 | #define EXPORT(symbol) \ |
79 | .globl symbol; \ | 79 | .globl symbol; \ |
80 | symbol: | 80 | symbol: |
81 | 81 | ||
82 | /* | 82 | /* |
@@ -90,16 +90,16 @@ symbol: | |||
90 | /* | 90 | /* |
91 | * ABS - export absolute symbol | 91 | * ABS - export absolute symbol |
92 | */ | 92 | */ |
93 | #define ABS(symbol,value) \ | 93 | #define ABS(symbol,value) \ |
94 | .globl symbol; \ | 94 | .globl symbol; \ |
95 | symbol = value | 95 | symbol = value |
96 | 96 | ||
97 | #define PANIC(msg) \ | 97 | #define PANIC(msg) \ |
98 | .set push; \ | 98 | .set push; \ |
99 | .set reorder; \ | 99 | .set reorder; \ |
100 | PTR_LA a0, 8f; \ | 100 | PTR_LA a0, 8f; \ |
101 | jal panic; \ | 101 | jal panic; \ |
102 | 9: b 9b; \ | 102 | 9: b 9b; \ |
103 | .set pop; \ | 103 | .set pop; \ |
104 | TEXT(msg) | 104 | TEXT(msg) |
105 | 105 | ||
@@ -107,31 +107,31 @@ symbol = value | |||
107 | * Print formatted string | 107 | * Print formatted string |
108 | */ | 108 | */ |
109 | #ifdef CONFIG_PRINTK | 109 | #ifdef CONFIG_PRINTK |
110 | #define PRINT(string) \ | 110 | #define PRINT(string) \ |
111 | .set push; \ | 111 | .set push; \ |
112 | .set reorder; \ | 112 | .set reorder; \ |
113 | PTR_LA a0, 8f; \ | 113 | PTR_LA a0, 8f; \ |
114 | jal printk; \ | 114 | jal printk; \ |
115 | .set pop; \ | 115 | .set pop; \ |
116 | TEXT(string) | 116 | TEXT(string) |
117 | #else | 117 | #else |
118 | #define PRINT(string) | 118 | #define PRINT(string) |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | #define TEXT(msg) \ | 121 | #define TEXT(msg) \ |
122 | .pushsection .data; \ | 122 | .pushsection .data; \ |
123 | 8: .asciiz msg; \ | 123 | 8: .asciiz msg; \ |
124 | .popsection; | 124 | .popsection; |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * Build text tables | 127 | * Build text tables |
128 | */ | 128 | */ |
129 | #define TTABLE(string) \ | 129 | #define TTABLE(string) \ |
130 | .pushsection .text; \ | 130 | .pushsection .text; \ |
131 | .word 1f; \ | 131 | .word 1f; \ |
132 | .popsection \ | 132 | .popsection \ |
133 | .pushsection .data; \ | 133 | .pushsection .data; \ |
134 | 1: .asciiz string; \ | 134 | 1: .asciiz string; \ |
135 | .popsection | 135 | .popsection |
136 | 136 | ||
137 | /* | 137 | /* |
@@ -143,13 +143,13 @@ symbol = value | |||
143 | */ | 143 | */ |
144 | #ifdef CONFIG_CPU_HAS_PREFETCH | 144 | #ifdef CONFIG_CPU_HAS_PREFETCH |
145 | 145 | ||
146 | #define PREF(hint,addr) \ | 146 | #define PREF(hint,addr) \ |
147 | .set push; \ | 147 | .set push; \ |
148 | .set mips4; \ | 148 | .set mips4; \ |
149 | pref hint, addr; \ | 149 | pref hint, addr; \ |
150 | .set pop | 150 | .set pop |
151 | 151 | ||
152 | #define PREFX(hint,addr) \ | 152 | #define PREFX(hint,addr) \ |
153 | .set push; \ | 153 | .set push; \ |
154 | .set mips4; \ | 154 | .set mips4; \ |
155 | prefx hint, addr; \ | 155 | prefx hint, addr; \ |
@@ -166,42 +166,42 @@ symbol = value | |||
166 | * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. | 166 | * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. |
167 | */ | 167 | */ |
168 | #if (_MIPS_ISA == _MIPS_ISA_MIPS1) | 168 | #if (_MIPS_ISA == _MIPS_ISA_MIPS1) |
169 | #define MOVN(rd, rs, rt) \ | 169 | #define MOVN(rd, rs, rt) \ |
170 | .set push; \ | 170 | .set push; \ |
171 | .set reorder; \ | 171 | .set reorder; \ |
172 | beqz rt, 9f; \ | 172 | beqz rt, 9f; \ |
173 | move rd, rs; \ | 173 | move rd, rs; \ |
174 | .set pop; \ | 174 | .set pop; \ |
175 | 9: | 175 | 9: |
176 | #define MOVZ(rd, rs, rt) \ | 176 | #define MOVZ(rd, rs, rt) \ |
177 | .set push; \ | 177 | .set push; \ |
178 | .set reorder; \ | 178 | .set reorder; \ |
179 | bnez rt, 9f; \ | 179 | bnez rt, 9f; \ |
180 | move rd, rs; \ | 180 | move rd, rs; \ |
181 | .set pop; \ | 181 | .set pop; \ |
182 | 9: | 182 | 9: |
183 | #endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ | 183 | #endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ |
184 | #if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) | 184 | #if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) |
185 | #define MOVN(rd, rs, rt) \ | 185 | #define MOVN(rd, rs, rt) \ |
186 | .set push; \ | 186 | .set push; \ |
187 | .set noreorder; \ | 187 | .set noreorder; \ |
188 | bnezl rt, 9f; \ | 188 | bnezl rt, 9f; \ |
189 | move rd, rs; \ | 189 | move rd, rs; \ |
190 | .set pop; \ | 190 | .set pop; \ |
191 | 9: | 191 | 9: |
192 | #define MOVZ(rd, rs, rt) \ | 192 | #define MOVZ(rd, rs, rt) \ |
193 | .set push; \ | 193 | .set push; \ |
194 | .set noreorder; \ | 194 | .set noreorder; \ |
195 | beqzl rt, 9f; \ | 195 | beqzl rt, 9f; \ |
196 | move rd, rs; \ | 196 | move rd, rs; \ |
197 | .set pop; \ | 197 | .set pop; \ |
198 | 9: | 198 | 9: |
199 | #endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ | 199 | #endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ |
200 | #if (_MIPS_ISA == _MIPS_ISA_MIPS4 ) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \ | 200 | #if (_MIPS_ISA == _MIPS_ISA_MIPS4 ) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \ |
201 | (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) | 201 | (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) |
202 | #define MOVN(rd, rs, rt) \ | 202 | #define MOVN(rd, rs, rt) \ |
203 | movn rd, rs, rt | 203 | movn rd, rs, rt |
204 | #define MOVZ(rd, rs, rt) \ | 204 | #define MOVZ(rd, rs, rt) \ |
205 | movz rd, rs, rt | 205 | movz rd, rs, rt |
206 | #endif /* MIPS IV, MIPS V, MIPS32 or MIPS64 */ | 206 | #endif /* MIPS IV, MIPS V, MIPS32 or MIPS64 */ |
207 | 207 | ||
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index 01cc6ba64831..08b607969a16 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Atomic operations that C can't guarantee us. Useful for | 2 | * Atomic operations that C can't guarantee us. Useful for |
3 | * resource counting etc.. | 3 | * resource counting etc.. |
4 | * | 4 | * |
5 | * But use these as seldom as possible since they are much more slower | 5 | * But use these as seldom as possible since they are much more slower |
@@ -21,7 +21,7 @@ | |||
21 | #include <asm/cmpxchg.h> | 21 | #include <asm/cmpxchg.h> |
22 | #include <asm/war.h> | 22 | #include <asm/war.h> |
23 | 23 | ||
24 | #define ATOMIC_INIT(i) { (i) } | 24 | #define ATOMIC_INIT(i) { (i) } |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * atomic_read - read atomic variable | 27 | * atomic_read - read atomic variable |
diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h index f7fdc24e972d..314ab5532019 100644 --- a/arch/mips/include/asm/barrier.h +++ b/arch/mips/include/asm/barrier.h | |||
@@ -18,7 +18,7 @@ | |||
18 | * over this barrier. All reads preceding this primitive are guaranteed | 18 | * over this barrier. All reads preceding this primitive are guaranteed |
19 | * to access memory (but not necessarily other CPUs' caches) before any | 19 | * to access memory (but not necessarily other CPUs' caches) before any |
20 | * reads following this primitive that depend on the data return by | 20 | * reads following this primitive that depend on the data return by |
21 | * any of the preceding reads. This primitive is much lighter weight than | 21 | * any of the preceding reads. This primitive is much lighter weight than |
22 | * rmb() on most CPUs, and is never heavier weight than is | 22 | * rmb() on most CPUs, and is never heavier weight than is |
23 | * rmb(). | 23 | * rmb(). |
24 | * | 24 | * |
@@ -43,7 +43,7 @@ | |||
43 | * </programlisting> | 43 | * </programlisting> |
44 | * | 44 | * |
45 | * because the read of "*q" depends on the read of "p" and these | 45 | * because the read of "*q" depends on the read of "p" and these |
46 | * two reads are separated by a read_barrier_depends(). However, | 46 | * two reads are separated by a read_barrier_depends(). However, |
47 | * the following code, with the same initial values for "a" and "b": | 47 | * the following code, with the same initial values for "a" and "b": |
48 | * | 48 | * |
49 | * <programlisting> | 49 | * <programlisting> |
@@ -57,7 +57,7 @@ | |||
57 | * </programlisting> | 57 | * </programlisting> |
58 | * | 58 | * |
59 | * does not enforce ordering, since there is no data dependency between | 59 | * does not enforce ordering, since there is no data dependency between |
60 | * the read of "a" and the read of "b". Therefore, on some CPUs, such | 60 | * the read of "a" and the read of "b". Therefore, on some CPUs, such |
61 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() | 61 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() |
62 | * in cases like this where there are no data dependencies. | 62 | * in cases like this where there are no data dependencies. |
63 | */ | 63 | */ |
@@ -92,7 +92,7 @@ | |||
92 | : "memory") | 92 | : "memory") |
93 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | 93 | #ifdef CONFIG_CPU_CAVIUM_OCTEON |
94 | # define OCTEON_SYNCW_STR ".set push\n.set arch=octeon\nsyncw\nsyncw\n.set pop\n" | 94 | # define OCTEON_SYNCW_STR ".set push\n.set arch=octeon\nsyncw\nsyncw\n.set pop\n" |
95 | # define __syncw() __asm__ __volatile__(OCTEON_SYNCW_STR : : : "memory") | 95 | # define __syncw() __asm__ __volatile__(OCTEON_SYNCW_STR : : : "memory") |
96 | 96 | ||
97 | # define fast_wmb() __syncw() | 97 | # define fast_wmb() __syncw() |
98 | # define fast_rmb() barrier() | 98 | # define fast_rmb() barrier() |
@@ -158,7 +158,7 @@ | |||
158 | #endif | 158 | #endif |
159 | 159 | ||
160 | #if defined(CONFIG_WEAK_REORDERING_BEYOND_LLSC) && defined(CONFIG_SMP) | 160 | #if defined(CONFIG_WEAK_REORDERING_BEYOND_LLSC) && defined(CONFIG_SMP) |
161 | #define __WEAK_LLSC_MB " sync \n" | 161 | #define __WEAK_LLSC_MB " sync \n" |
162 | #else | 162 | #else |
163 | #define __WEAK_LLSC_MB " \n" | 163 | #define __WEAK_LLSC_MB " \n" |
164 | #endif | 164 | #endif |
diff --git a/arch/mips/include/asm/bcache.h b/arch/mips/include/asm/bcache.h index 0ba9d6ef76a7..8c34484cea82 100644 --- a/arch/mips/include/asm/bcache.h +++ b/arch/mips/include/asm/bcache.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | /* Some R4000 / R4400 / R4600 / R5000 machines may have a non-dma-coherent, | 13 | /* Some R4000 / R4400 / R4600 / R5000 machines may have a non-dma-coherent, |
14 | chipset implemented caches. On machines with other CPUs the CPU does the | 14 | chipset implemented caches. On machines with other CPUs the CPU does the |
15 | cache thing itself. */ | 15 | cache thing itself. */ |
16 | struct bcache_ops { | 16 | struct bcache_ops { |
17 | void (*bc_enable)(void); | 17 | void (*bc_enable)(void); |
diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h index 46ac73abd5ee..71305a8b3d78 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h | |||
@@ -26,15 +26,15 @@ | |||
26 | #define SZLONG_MASK 31UL | 26 | #define SZLONG_MASK 31UL |
27 | #define __LL "ll " | 27 | #define __LL "ll " |
28 | #define __SC "sc " | 28 | #define __SC "sc " |
29 | #define __INS "ins " | 29 | #define __INS "ins " |
30 | #define __EXT "ext " | 30 | #define __EXT "ext " |
31 | #elif _MIPS_SZLONG == 64 | 31 | #elif _MIPS_SZLONG == 64 |
32 | #define SZLONG_LOG 6 | 32 | #define SZLONG_LOG 6 |
33 | #define SZLONG_MASK 63UL | 33 | #define SZLONG_MASK 63UL |
34 | #define __LL "lld " | 34 | #define __LL "lld " |
35 | #define __SC "scd " | 35 | #define __SC "scd " |
36 | #define __INS "dins " | 36 | #define __INS "dins " |
37 | #define __EXT "dext " | 37 | #define __EXT "dext " |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /* | 40 | /* |
@@ -357,7 +357,7 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
357 | "1: " __LL "%0, %1 # test_and_clear_bit \n" | 357 | "1: " __LL "%0, %1 # test_and_clear_bit \n" |
358 | " or %2, %0, %3 \n" | 358 | " or %2, %0, %3 \n" |
359 | " xor %2, %3 \n" | 359 | " xor %2, %3 \n" |
360 | " " __SC "%2, %1 \n" | 360 | " " __SC "%2, %1 \n" |
361 | " beqzl %2, 1b \n" | 361 | " beqzl %2, 1b \n" |
362 | " and %2, %0, %3 \n" | 362 | " and %2, %0, %3 \n" |
363 | " .set mips0 \n" | 363 | " .set mips0 \n" |
@@ -371,10 +371,10 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
371 | 371 | ||
372 | do { | 372 | do { |
373 | __asm__ __volatile__( | 373 | __asm__ __volatile__( |
374 | " " __LL "%0, %1 # test_and_clear_bit \n" | 374 | " " __LL "%0, %1 # test_and_clear_bit \n" |
375 | " " __EXT "%2, %0, %3, 1 \n" | 375 | " " __EXT "%2, %0, %3, 1 \n" |
376 | " " __INS "%0, $0, %3, 1 \n" | 376 | " " __INS "%0, $0, %3, 1 \n" |
377 | " " __SC "%0, %1 \n" | 377 | " " __SC "%0, %1 \n" |
378 | : "=&r" (temp), "+m" (*m), "=&r" (res) | 378 | : "=&r" (temp), "+m" (*m), "=&r" (res) |
379 | : "ir" (bit) | 379 | : "ir" (bit) |
380 | : "memory"); | 380 | : "memory"); |
@@ -387,10 +387,10 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
387 | do { | 387 | do { |
388 | __asm__ __volatile__( | 388 | __asm__ __volatile__( |
389 | " .set mips3 \n" | 389 | " .set mips3 \n" |
390 | " " __LL "%0, %1 # test_and_clear_bit \n" | 390 | " " __LL "%0, %1 # test_and_clear_bit \n" |
391 | " or %2, %0, %3 \n" | 391 | " or %2, %0, %3 \n" |
392 | " xor %2, %3 \n" | 392 | " xor %2, %3 \n" |
393 | " " __SC "%2, %1 \n" | 393 | " " __SC "%2, %1 \n" |
394 | " .set mips0 \n" | 394 | " .set mips0 \n" |
395 | : "=&r" (temp), "+m" (*m), "=&r" (res) | 395 | : "=&r" (temp), "+m" (*m), "=&r" (res) |
396 | : "r" (1UL << bit) | 396 | : "r" (1UL << bit) |
@@ -444,7 +444,7 @@ static inline int test_and_change_bit(unsigned long nr, | |||
444 | do { | 444 | do { |
445 | __asm__ __volatile__( | 445 | __asm__ __volatile__( |
446 | " .set mips3 \n" | 446 | " .set mips3 \n" |
447 | " " __LL "%0, %1 # test_and_change_bit \n" | 447 | " " __LL "%0, %1 # test_and_change_bit \n" |
448 | " xor %2, %0, %3 \n" | 448 | " xor %2, %0, %3 \n" |
449 | " " __SC "\t%2, %1 \n" | 449 | " " __SC "\t%2, %1 \n" |
450 | " .set mips0 \n" | 450 | " .set mips0 \n" |
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h index 7a51d879e6ca..b71dd5b16085 100644 --- a/arch/mips/include/asm/bootinfo.h +++ b/arch/mips/include/asm/bootinfo.h | |||
@@ -44,19 +44,19 @@ | |||
44 | /* | 44 | /* |
45 | * Valid machtype for group PMC-MSP | 45 | * Valid machtype for group PMC-MSP |
46 | */ | 46 | */ |
47 | #define MACH_MSP4200_EVAL 0 /* PMC-Sierra MSP4200 Evaluation */ | 47 | #define MACH_MSP4200_EVAL 0 /* PMC-Sierra MSP4200 Evaluation */ |
48 | #define MACH_MSP4200_GW 1 /* PMC-Sierra MSP4200 Gateway demo */ | 48 | #define MACH_MSP4200_GW 1 /* PMC-Sierra MSP4200 Gateway demo */ |
49 | #define MACH_MSP4200_FPGA 2 /* PMC-Sierra MSP4200 Emulation */ | 49 | #define MACH_MSP4200_FPGA 2 /* PMC-Sierra MSP4200 Emulation */ |
50 | #define MACH_MSP7120_EVAL 3 /* PMC-Sierra MSP7120 Evaluation */ | 50 | #define MACH_MSP7120_EVAL 3 /* PMC-Sierra MSP7120 Evaluation */ |
51 | #define MACH_MSP7120_GW 4 /* PMC-Sierra MSP7120 Residential GW */ | 51 | #define MACH_MSP7120_GW 4 /* PMC-Sierra MSP7120 Residential GW */ |
52 | #define MACH_MSP7120_FPGA 5 /* PMC-Sierra MSP7120 Emulation */ | 52 | #define MACH_MSP7120_FPGA 5 /* PMC-Sierra MSP7120 Emulation */ |
53 | #define MACH_MSP_OTHER 255 /* PMC-Sierra unknown board type */ | 53 | #define MACH_MSP_OTHER 255 /* PMC-Sierra unknown board type */ |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * Valid machtype for group Mikrotik | 56 | * Valid machtype for group Mikrotik |
57 | */ | 57 | */ |
58 | #define MACH_MIKROTIK_RB532 0 /* Mikrotik RouterBoard 532 */ | 58 | #define MACH_MIKROTIK_RB532 0 /* Mikrotik RouterBoard 532 */ |
59 | #define MACH_MIKROTIK_RB532A 1 /* Mikrotik RouterBoard 532A */ | 59 | #define MACH_MIKROTIK_RB532A 1 /* Mikrotik RouterBoard 532A */ |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * Valid machtype for Loongson family | 62 | * Valid machtype for Loongson family |
@@ -67,7 +67,7 @@ | |||
67 | #define MACH_LEMOTE_ML2F7 3 | 67 | #define MACH_LEMOTE_ML2F7 3 |
68 | #define MACH_LEMOTE_YL2F89 4 | 68 | #define MACH_LEMOTE_YL2F89 4 |
69 | #define MACH_DEXXON_GDIUM2F10 5 | 69 | #define MACH_DEXXON_GDIUM2F10 5 |
70 | #define MACH_LEMOTE_NAS 6 | 70 | #define MACH_LEMOTE_NAS 6 |
71 | #define MACH_LEMOTE_LL2F 7 | 71 | #define MACH_LEMOTE_LL2F 7 |
72 | #define MACH_LOONGSON_END 8 | 72 | #define MACH_LOONGSON_END 8 |
73 | 73 | ||
diff --git a/arch/mips/include/asm/cacheops.h b/arch/mips/include/asm/cacheops.h index 8f99c11ab665..68f37e3eccc7 100644 --- a/arch/mips/include/asm/cacheops.h +++ b/arch/mips/include/asm/cacheops.h | |||
@@ -8,20 +8,20 @@ | |||
8 | * (C) Copyright 1996, 97, 99, 2002, 03 Ralf Baechle | 8 | * (C) Copyright 1996, 97, 99, 2002, 03 Ralf Baechle |
9 | * (C) Copyright 1999 Silicon Graphics, Inc. | 9 | * (C) Copyright 1999 Silicon Graphics, Inc. |
10 | */ | 10 | */ |
11 | #ifndef __ASM_CACHEOPS_H | 11 | #ifndef __ASM_CACHEOPS_H |
12 | #define __ASM_CACHEOPS_H | 12 | #define __ASM_CACHEOPS_H |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * Cache Operations available on all MIPS processors with R4000-style caches | 15 | * Cache Operations available on all MIPS processors with R4000-style caches |
16 | */ | 16 | */ |
17 | #define Index_Invalidate_I 0x00 | 17 | #define Index_Invalidate_I 0x00 |
18 | #define Index_Writeback_Inv_D 0x01 | 18 | #define Index_Writeback_Inv_D 0x01 |
19 | #define Index_Load_Tag_I 0x04 | 19 | #define Index_Load_Tag_I 0x04 |
20 | #define Index_Load_Tag_D 0x05 | 20 | #define Index_Load_Tag_D 0x05 |
21 | #define Index_Store_Tag_I 0x08 | 21 | #define Index_Store_Tag_I 0x08 |
22 | #define Index_Store_Tag_D 0x09 | 22 | #define Index_Store_Tag_D 0x09 |
23 | #if defined(CONFIG_CPU_LOONGSON2) | 23 | #if defined(CONFIG_CPU_LOONGSON2) |
24 | #define Hit_Invalidate_I 0x00 | 24 | #define Hit_Invalidate_I 0x00 |
25 | #else | 25 | #else |
26 | #define Hit_Invalidate_I 0x10 | 26 | #define Hit_Invalidate_I 0x10 |
27 | #endif | 27 | #endif |
@@ -39,8 +39,8 @@ | |||
39 | /* | 39 | /* |
40 | * R4000SC and R4400SC-specific cacheops | 40 | * R4000SC and R4400SC-specific cacheops |
41 | */ | 41 | */ |
42 | #define Index_Invalidate_SI 0x02 | 42 | #define Index_Invalidate_SI 0x02 |
43 | #define Index_Writeback_Inv_SD 0x03 | 43 | #define Index_Writeback_Inv_SD 0x03 |
44 | #define Index_Load_Tag_SI 0x06 | 44 | #define Index_Load_Tag_SI 0x06 |
45 | #define Index_Load_Tag_SD 0x07 | 45 | #define Index_Load_Tag_SD 0x07 |
46 | #define Index_Store_Tag_SI 0x0A | 46 | #define Index_Store_Tag_SI 0x0A |
diff --git a/arch/mips/include/asm/checksum.h b/arch/mips/include/asm/checksum.h index f2f7c6c264da..ac3d2b8a20d4 100644 --- a/arch/mips/include/asm/checksum.h +++ b/arch/mips/include/asm/checksum.h | |||
@@ -194,7 +194,7 @@ static inline __sum16 ip_compute_csum(const void *buff, int len) | |||
194 | 194 | ||
195 | #define _HAVE_ARCH_IPV6_CSUM | 195 | #define _HAVE_ARCH_IPV6_CSUM |
196 | static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, | 196 | static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, |
197 | const struct in6_addr *daddr, | 197 | const struct in6_addr *daddr, |
198 | __u32 len, unsigned short proto, | 198 | __u32 len, unsigned short proto, |
199 | __wsum sum) | 199 | __wsum sum) |
200 | { | 200 | { |
diff --git a/arch/mips/include/asm/cmpxchg.h b/arch/mips/include/asm/cmpxchg.h index eee10dc07ac1..466069bd8465 100644 --- a/arch/mips/include/asm/cmpxchg.h +++ b/arch/mips/include/asm/cmpxchg.h | |||
@@ -146,7 +146,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
146 | " .set push \n" \ | 146 | " .set push \n" \ |
147 | " .set noat \n" \ | 147 | " .set noat \n" \ |
148 | " .set mips3 \n" \ | 148 | " .set mips3 \n" \ |
149 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ | 149 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ |
150 | " bne %0, %z3, 2f \n" \ | 150 | " bne %0, %z3, 2f \n" \ |
151 | " .set mips0 \n" \ | 151 | " .set mips0 \n" \ |
152 | " move $1, %z4 \n" \ | 152 | " move $1, %z4 \n" \ |
@@ -163,7 +163,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
163 | " .set push \n" \ | 163 | " .set push \n" \ |
164 | " .set noat \n" \ | 164 | " .set noat \n" \ |
165 | " .set mips3 \n" \ | 165 | " .set mips3 \n" \ |
166 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ | 166 | "1: " ld " %0, %2 # __cmpxchg_asm \n" \ |
167 | " bne %0, %z3, 2f \n" \ | 167 | " bne %0, %z3, 2f \n" \ |
168 | " .set mips0 \n" \ | 168 | " .set mips0 \n" \ |
169 | " move $1, %z4 \n" \ | 169 | " move $1, %z4 \n" \ |
@@ -205,7 +205,7 @@ extern void __cmpxchg_called_with_bad_pointer(void); | |||
205 | \ | 205 | \ |
206 | switch (sizeof(*(__ptr))) { \ | 206 | switch (sizeof(*(__ptr))) { \ |
207 | case 4: \ | 207 | case 4: \ |
208 | __res = __cmpxchg_asm("ll", "sc", __ptr, __old, __new); \ | 208 | __res = __cmpxchg_asm("ll", "sc", __ptr, __old, __new); \ |
209 | break; \ | 209 | break; \ |
210 | case 8: \ | 210 | case 8: \ |
211 | if (sizeof(long) == 8) { \ | 211 | if (sizeof(long) == 8) { \ |
diff --git a/arch/mips/include/asm/compat-signal.h b/arch/mips/include/asm/compat-signal.h index 6599a901b63e..64e0b9343b8c 100644 --- a/arch/mips/include/asm/compat-signal.h +++ b/arch/mips/include/asm/compat-signal.h | |||
@@ -18,9 +18,9 @@ static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, | |||
18 | BUG_ON(sizeof(*d) != sizeof(*s)); | 18 | BUG_ON(sizeof(*d) != sizeof(*s)); |
19 | BUG_ON(_NSIG_WORDS != 2); | 19 | BUG_ON(_NSIG_WORDS != 2); |
20 | 20 | ||
21 | err = __put_user(s->sig[0], &d->sig[0]); | 21 | err = __put_user(s->sig[0], &d->sig[0]); |
22 | err |= __put_user(s->sig[0] >> 32, &d->sig[1]); | 22 | err |= __put_user(s->sig[0] >> 32, &d->sig[1]); |
23 | err |= __put_user(s->sig[1], &d->sig[2]); | 23 | err |= __put_user(s->sig[1], &d->sig[2]); |
24 | err |= __put_user(s->sig[1] >> 32, &d->sig[3]); | 24 | err |= __put_user(s->sig[1] >> 32, &d->sig[3]); |
25 | 25 | ||
26 | return err; | 26 | return err; |
diff --git a/arch/mips/include/asm/compat.h b/arch/mips/include/asm/compat.h index 3c5d1464b7bd..988477e492b3 100644 --- a/arch/mips/include/asm/compat.h +++ b/arch/mips/include/asm/compat.h | |||
@@ -120,7 +120,7 @@ struct compat_statfs { | |||
120 | 120 | ||
121 | typedef u32 compat_old_sigset_t; /* at least 32 bits */ | 121 | typedef u32 compat_old_sigset_t; /* at least 32 bits */ |
122 | 122 | ||
123 | #define _COMPAT_NSIG 128 /* Don't ask !$@#% ... */ | 123 | #define _COMPAT_NSIG 128 /* Don't ask !$@#% ... */ |
124 | #define _COMPAT_NSIG_BPW 32 | 124 | #define _COMPAT_NSIG_BPW 32 |
125 | 125 | ||
126 | typedef u32 compat_sigset_word; | 126 | typedef u32 compat_sigset_word; |
@@ -168,7 +168,7 @@ typedef struct compat_siginfo { | |||
168 | s32 _addr; /* faulting insn/memory ref. */ | 168 | s32 _addr; /* faulting insn/memory ref. */ |
169 | } _sigfault; | 169 | } _sigfault; |
170 | 170 | ||
171 | /* SIGPOLL, SIGXFSZ (To do ...) */ | 171 | /* SIGPOLL, SIGXFSZ (To do ...) */ |
172 | struct { | 172 | struct { |
173 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | 173 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
174 | int _fd; | 174 | int _fd; |
@@ -179,7 +179,7 @@ typedef struct compat_siginfo { | |||
179 | timer_t _tid; /* timer id */ | 179 | timer_t _tid; /* timer id */ |
180 | int _overrun; /* overrun count */ | 180 | int _overrun; /* overrun count */ |
181 | compat_sigval_t _sigval;/* same as below */ | 181 | compat_sigval_t _sigval;/* same as below */ |
182 | int _sys_private; /* not to be passed to user */ | 182 | int _sys_private; /* not to be passed to user */ |
183 | } _timer; | 183 | } _timer; |
184 | 184 | ||
185 | /* POSIX.1b signals */ | 185 | /* POSIX.1b signals */ |
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index c507b931b484..e0ac24759d92 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <cpu-feature-overrides.h> | 14 | #include <cpu-feature-overrides.h> |
15 | 15 | ||
16 | #ifndef current_cpu_type | 16 | #ifndef current_cpu_type |
17 | #define current_cpu_type() current_cpu_data.cputype | 17 | #define current_cpu_type() current_cpu_data.cputype |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | /* | 20 | /* |
@@ -87,10 +87,10 @@ | |||
87 | #define cpu_has_mips16 (cpu_data[0].ases & MIPS_ASE_MIPS16) | 87 | #define cpu_has_mips16 (cpu_data[0].ases & MIPS_ASE_MIPS16) |
88 | #endif | 88 | #endif |
89 | #ifndef cpu_has_mdmx | 89 | #ifndef cpu_has_mdmx |
90 | #define cpu_has_mdmx (cpu_data[0].ases & MIPS_ASE_MDMX) | 90 | #define cpu_has_mdmx (cpu_data[0].ases & MIPS_ASE_MDMX) |
91 | #endif | 91 | #endif |
92 | #ifndef cpu_has_mips3d | 92 | #ifndef cpu_has_mips3d |
93 | #define cpu_has_mips3d (cpu_data[0].ases & MIPS_ASE_MIPS3D) | 93 | #define cpu_has_mips3d (cpu_data[0].ases & MIPS_ASE_MIPS3D) |
94 | #endif | 94 | #endif |
95 | #ifndef cpu_has_smartmips | 95 | #ifndef cpu_has_smartmips |
96 | #define cpu_has_smartmips (cpu_data[0].ases & MIPS_ASE_SMARTMIPS) | 96 | #define cpu_has_smartmips (cpu_data[0].ases & MIPS_ASE_SMARTMIPS) |
@@ -108,11 +108,11 @@ | |||
108 | #define cpu_has_ic_fills_f_dc (cpu_data[0].icache.flags & MIPS_CACHE_IC_F_DC) | 108 | #define cpu_has_ic_fills_f_dc (cpu_data[0].icache.flags & MIPS_CACHE_IC_F_DC) |
109 | #endif | 109 | #endif |
110 | #ifndef cpu_has_pindexed_dcache | 110 | #ifndef cpu_has_pindexed_dcache |
111 | #define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX) | 111 | #define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX) |
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | /* | 114 | /* |
115 | * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors | 115 | * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors |
116 | * such as the R10000 have I-Caches that snoop local stores; the embedded ones | 116 | * such as the R10000 have I-Caches that snoop local stores; the embedded ones |
117 | * don't. For maintaining I-cache coherency this means we need to flush the | 117 | * don't. For maintaining I-cache coherency this means we need to flush the |
118 | * D-cache all the way back to whever the I-cache does refills from, so the | 118 | * D-cache all the way back to whever the I-cache does refills from, so the |
@@ -148,8 +148,8 @@ | |||
148 | */ | 148 | */ |
149 | #define cpu_has_mips32 (cpu_has_mips32r1 | cpu_has_mips32r2) | 149 | #define cpu_has_mips32 (cpu_has_mips32r1 | cpu_has_mips32r2) |
150 | #define cpu_has_mips64 (cpu_has_mips64r1 | cpu_has_mips64r2) | 150 | #define cpu_has_mips64 (cpu_has_mips64r1 | cpu_has_mips64r2) |
151 | #define cpu_has_mips_r1 (cpu_has_mips32r1 | cpu_has_mips64r1) | 151 | #define cpu_has_mips_r1 (cpu_has_mips32r1 | cpu_has_mips64r1) |
152 | #define cpu_has_mips_r2 (cpu_has_mips32r2 | cpu_has_mips64r2) | 152 | #define cpu_has_mips_r2 (cpu_has_mips32r2 | cpu_has_mips64r2) |
153 | #define cpu_has_mips_r (cpu_has_mips32r1 | cpu_has_mips32r2 | \ | 153 | #define cpu_has_mips_r (cpu_has_mips32r1 | cpu_has_mips32r2 | \ |
154 | cpu_has_mips64r1 | cpu_has_mips64r2) | 154 | cpu_has_mips64r1 | cpu_has_mips64r2) |
155 | 155 | ||
@@ -159,7 +159,7 @@ | |||
159 | 159 | ||
160 | /* | 160 | /* |
161 | * MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other | 161 | * MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other |
162 | * pre-MIPS32/MIPS53 processors have CLO, CLZ. The IDT RC64574 is 64-bit and | 162 | * pre-MIPS32/MIPS53 processors have CLO, CLZ. The IDT RC64574 is 64-bit and |
163 | * has CLO and CLZ but not DCLO nor DCLZ. For 64-bit kernels | 163 | * has CLO and CLZ but not DCLO nor DCLZ. For 64-bit kernels |
164 | * cpu_has_clo_clz also indicates the availability of DCLO and DCLZ. | 164 | * cpu_has_clo_clz also indicates the availability of DCLO and DCLZ. |
165 | */ | 165 | */ |
@@ -191,7 +191,7 @@ | |||
191 | # define cpu_has_64bits (cpu_data[0].isa_level & MIPS_CPU_ISA_64BIT) | 191 | # define cpu_has_64bits (cpu_data[0].isa_level & MIPS_CPU_ISA_64BIT) |
192 | # endif | 192 | # endif |
193 | # ifndef cpu_has_64bit_zero_reg | 193 | # ifndef cpu_has_64bit_zero_reg |
194 | # define cpu_has_64bit_zero_reg (cpu_data[0].isa_level & MIPS_CPU_ISA_64BIT) | 194 | # define cpu_has_64bit_zero_reg (cpu_data[0].isa_level & MIPS_CPU_ISA_64BIT) |
195 | # endif | 195 | # endif |
196 | # ifndef cpu_has_64bit_gp_regs | 196 | # ifndef cpu_has_64bit_gp_regs |
197 | # define cpu_has_64bit_gp_regs 0 | 197 | # define cpu_has_64bit_gp_regs 0 |
diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h index c454550eb0c0..41401d8eb7d1 100644 --- a/arch/mips/include/asm/cpu-info.h +++ b/arch/mips/include/asm/cpu-info.h | |||
@@ -52,14 +52,14 @@ struct cpuinfo_mips { | |||
52 | unsigned int cputype; | 52 | unsigned int cputype; |
53 | int isa_level; | 53 | int isa_level; |
54 | int tlbsize; | 54 | int tlbsize; |
55 | struct cache_desc icache; /* Primary I-cache */ | 55 | struct cache_desc icache; /* Primary I-cache */ |
56 | struct cache_desc dcache; /* Primary D or combined I/D cache */ | 56 | struct cache_desc dcache; /* Primary D or combined I/D cache */ |
57 | struct cache_desc scache; /* Secondary cache */ | 57 | struct cache_desc scache; /* Secondary cache */ |
58 | struct cache_desc tcache; /* Tertiary/split secondary cache */ | 58 | struct cache_desc tcache; /* Tertiary/split secondary cache */ |
59 | int srsets; /* Shadow register sets */ | 59 | int srsets; /* Shadow register sets */ |
60 | int core; /* physical core number */ | 60 | int core; /* physical core number */ |
61 | #ifdef CONFIG_64BIT | 61 | #ifdef CONFIG_64BIT |
62 | int vmbits; /* Virtual memory size in bits */ | 62 | int vmbits; /* Virtual memory size in bits */ |
63 | #endif | 63 | #endif |
64 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) | 64 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) |
65 | /* | 65 | /* |
@@ -68,12 +68,12 @@ struct cpuinfo_mips { | |||
68 | * exception resources, ASID spaces, etc, are common | 68 | * exception resources, ASID spaces, etc, are common |
69 | * to all TCs within the same VPE. | 69 | * to all TCs within the same VPE. |
70 | */ | 70 | */ |
71 | int vpe_id; /* Virtual Processor number */ | 71 | int vpe_id; /* Virtual Processor number */ |
72 | #endif | 72 | #endif |
73 | #ifdef CONFIG_MIPS_MT_SMTC | 73 | #ifdef CONFIG_MIPS_MT_SMTC |
74 | int tc_id; /* Thread Context number */ | 74 | int tc_id; /* Thread Context number */ |
75 | #endif | 75 | #endif |
76 | void *data; /* Additional data */ | 76 | void *data; /* Additional data */ |
77 | unsigned int watch_reg_count; /* Number that exist */ | 77 | unsigned int watch_reg_count; /* Number that exist */ |
78 | unsigned int watch_reg_use_cnt; /* Usable by ptrace */ | 78 | unsigned int watch_reg_use_cnt; /* Usable by ptrace */ |
79 | #define NUM_WATCH_REGS 4 | 79 | #define NUM_WATCH_REGS 4 |
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index 90112adb1940..9904697bd792 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * cpu.h: Values of the PRId register used to match up | 2 | * cpu.h: Values of the PRId register used to match up |
3 | * various MIPS cpu types. | 3 | * various MIPS cpu types. |
4 | * | 4 | * |
5 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) | 5 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) |
6 | * Copyright (C) 2004 Maciej W. Rozycki | 6 | * Copyright (C) 2004 Maciej W. Rozycki |
@@ -9,14 +9,14 @@ | |||
9 | #define _ASM_CPU_H | 9 | #define _ASM_CPU_H |
10 | 10 | ||
11 | /* Assigned Company values for bits 23:16 of the PRId Register | 11 | /* Assigned Company values for bits 23:16 of the PRId Register |
12 | (CP0 register 15, select 0). As of the MIPS32 and MIPS64 specs from | 12 | (CP0 register 15, select 0). As of the MIPS32 and MIPS64 specs from |
13 | MTI, the PRId register is defined in this (backwards compatible) | 13 | MTI, the PRId register is defined in this (backwards compatible) |
14 | way: | 14 | way: |
15 | 15 | ||
16 | +----------------+----------------+----------------+----------------+ | 16 | +----------------+----------------+----------------+----------------+ |
17 | | Company Options| Company ID | Processor ID | Revision | | 17 | | Company Options| Company ID | Processor ID | Revision | |
18 | +----------------+----------------+----------------+----------------+ | 18 | +----------------+----------------+----------------+----------------+ |
19 | 31 24 23 16 15 8 7 | 19 | 31 24 23 16 15 8 7 |
20 | 20 | ||
21 | I don't have docs for all the previous processors, but my impression is | 21 | I don't have docs for all the previous processors, but my impression is |
22 | that bits 16-23 have been 0 for all MIPS processors before the MIPS32/64 | 22 | that bits 16-23 have been 0 for all MIPS processors before the MIPS32/64 |
@@ -29,7 +29,7 @@ | |||
29 | #define PRID_COMP_ALCHEMY 0x030000 | 29 | #define PRID_COMP_ALCHEMY 0x030000 |
30 | #define PRID_COMP_SIBYTE 0x040000 | 30 | #define PRID_COMP_SIBYTE 0x040000 |
31 | #define PRID_COMP_SANDCRAFT 0x050000 | 31 | #define PRID_COMP_SANDCRAFT 0x050000 |
32 | #define PRID_COMP_NXP 0x060000 | 32 | #define PRID_COMP_NXP 0x060000 |
33 | #define PRID_COMP_TOSHIBA 0x070000 | 33 | #define PRID_COMP_TOSHIBA 0x070000 |
34 | #define PRID_COMP_LSI 0x080000 | 34 | #define PRID_COMP_LSI 0x080000 |
35 | #define PRID_COMP_LEXRA 0x0b0000 | 35 | #define PRID_COMP_LEXRA 0x0b0000 |
@@ -38,9 +38,9 @@ | |||
38 | #define PRID_COMP_INGENIC 0xd00000 | 38 | #define PRID_COMP_INGENIC 0xd00000 |
39 | 39 | ||
40 | /* | 40 | /* |
41 | * Assigned values for the product ID register. In order to detect a | 41 | * Assigned values for the product ID register. In order to detect a |
42 | * certain CPU type exactly eventually additional registers may need to | 42 | * certain CPU type exactly eventually additional registers may need to |
43 | * be examined. These are valid when 23:16 == PRID_COMP_LEGACY | 43 | * be examined. These are valid when 23:16 == PRID_COMP_LEGACY |
44 | */ | 44 | */ |
45 | #define PRID_IMP_R2000 0x0100 | 45 | #define PRID_IMP_R2000 0x0100 |
46 | #define PRID_IMP_AU1_REV1 0x0100 | 46 | #define PRID_IMP_AU1_REV1 0x0100 |
@@ -101,14 +101,14 @@ | |||
101 | * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE | 101 | * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE |
102 | */ | 102 | */ |
103 | 103 | ||
104 | #define PRID_IMP_SB1 0x0100 | 104 | #define PRID_IMP_SB1 0x0100 |
105 | #define PRID_IMP_SB1A 0x1100 | 105 | #define PRID_IMP_SB1A 0x1100 |
106 | 106 | ||
107 | /* | 107 | /* |
108 | * These are the PRID's for when 23:16 == PRID_COMP_SANDCRAFT | 108 | * These are the PRID's for when 23:16 == PRID_COMP_SANDCRAFT |
109 | */ | 109 | */ |
110 | 110 | ||
111 | #define PRID_IMP_SR71000 0x0400 | 111 | #define PRID_IMP_SR71000 0x0400 |
112 | 112 | ||
113 | /* | 113 | /* |
114 | * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM | 114 | * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM |
@@ -145,7 +145,7 @@ | |||
145 | * These are the PRID's for when 23:16 == PRID_COMP_INGENIC | 145 | * These are the PRID's for when 23:16 == PRID_COMP_INGENIC |
146 | */ | 146 | */ |
147 | 147 | ||
148 | #define PRID_IMP_JZRISC 0x0200 | 148 | #define PRID_IMP_JZRISC 0x0200 |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * These are the PRID's for when 23:16 == PRID_COMP_NETLOGIC | 151 | * These are the PRID's for when 23:16 == PRID_COMP_NETLOGIC |
@@ -188,9 +188,9 @@ | |||
188 | #define PRID_REV_R3000A 0x0030 | 188 | #define PRID_REV_R3000A 0x0030 |
189 | #define PRID_REV_R3000 0x0020 | 189 | #define PRID_REV_R3000 0x0020 |
190 | #define PRID_REV_R2000A 0x0010 | 190 | #define PRID_REV_R2000A 0x0010 |
191 | #define PRID_REV_TX3912 0x0010 | 191 | #define PRID_REV_TX3912 0x0010 |
192 | #define PRID_REV_TX3922 0x0030 | 192 | #define PRID_REV_TX3922 0x0030 |
193 | #define PRID_REV_TX3927 0x0040 | 193 | #define PRID_REV_TX3927 0x0040 |
194 | #define PRID_REV_VR4111 0x0050 | 194 | #define PRID_REV_VR4111 0x0050 |
195 | #define PRID_REV_VR4181 0x0050 /* Same as VR4111 */ | 195 | #define PRID_REV_VR4181 0x0050 /* Same as VR4111 */ |
196 | #define PRID_REV_VR4121 0x0060 | 196 | #define PRID_REV_VR4121 0x0060 |
@@ -217,9 +217,9 @@ | |||
217 | * FPU implementation/revision register (CP1 control register 0). | 217 | * FPU implementation/revision register (CP1 control register 0). |
218 | * | 218 | * |
219 | * +---------------------------------+----------------+----------------+ | 219 | * +---------------------------------+----------------+----------------+ |
220 | * | 0 | Implementation | Revision | | 220 | * | 0 | Implementation | Revision | |
221 | * +---------------------------------+----------------+----------------+ | 221 | * +---------------------------------+----------------+----------------+ |
222 | * 31 16 15 8 7 0 | 222 | * 31 16 15 8 7 0 |
223 | */ | 223 | */ |
224 | 224 | ||
225 | #define FPIR_IMP_NONE 0x0000 | 225 | #define FPIR_IMP_NONE 0x0000 |
diff --git a/arch/mips/include/asm/dec/ioasic_addrs.h b/arch/mips/include/asm/dec/ioasic_addrs.h index 4cbc1f8a1129..a8665a7611c2 100644 --- a/arch/mips/include/asm/dec/ioasic_addrs.h +++ b/arch/mips/include/asm/dec/ioasic_addrs.h | |||
@@ -25,22 +25,22 @@ | |||
25 | */ | 25 | */ |
26 | #define IOASIC_SYS_ROM (0*IOASIC_SLOT_SIZE) /* system board ROM */ | 26 | #define IOASIC_SYS_ROM (0*IOASIC_SLOT_SIZE) /* system board ROM */ |
27 | #define IOASIC_IOCTL (1*IOASIC_SLOT_SIZE) /* I/O ASIC */ | 27 | #define IOASIC_IOCTL (1*IOASIC_SLOT_SIZE) /* I/O ASIC */ |
28 | #define IOASIC_ESAR (2*IOASIC_SLOT_SIZE) /* LANCE MAC address chip */ | 28 | #define IOASIC_ESAR (2*IOASIC_SLOT_SIZE) /* LANCE MAC address chip */ |
29 | #define IOASIC_LANCE (3*IOASIC_SLOT_SIZE) /* LANCE Ethernet */ | 29 | #define IOASIC_LANCE (3*IOASIC_SLOT_SIZE) /* LANCE Ethernet */ |
30 | #define IOASIC_SCC0 (4*IOASIC_SLOT_SIZE) /* SCC #0 */ | 30 | #define IOASIC_SCC0 (4*IOASIC_SLOT_SIZE) /* SCC #0 */ |
31 | #define IOASIC_VDAC_HI (5*IOASIC_SLOT_SIZE) /* VDAC (maxine) */ | 31 | #define IOASIC_VDAC_HI (5*IOASIC_SLOT_SIZE) /* VDAC (maxine) */ |
32 | #define IOASIC_SCC1 (6*IOASIC_SLOT_SIZE) /* SCC #1 (3min, 3max+) */ | 32 | #define IOASIC_SCC1 (6*IOASIC_SLOT_SIZE) /* SCC #1 (3min, 3max+) */ |
33 | #define IOASIC_VDAC_LO (7*IOASIC_SLOT_SIZE) /* VDAC (maxine) */ | 33 | #define IOASIC_VDAC_LO (7*IOASIC_SLOT_SIZE) /* VDAC (maxine) */ |
34 | #define IOASIC_TOY (8*IOASIC_SLOT_SIZE) /* RTC */ | 34 | #define IOASIC_TOY (8*IOASIC_SLOT_SIZE) /* RTC */ |
35 | #define IOASIC_ISDN (9*IOASIC_SLOT_SIZE) /* ISDN (maxine) */ | 35 | #define IOASIC_ISDN (9*IOASIC_SLOT_SIZE) /* ISDN (maxine) */ |
36 | #define IOASIC_ERRADDR (9*IOASIC_SLOT_SIZE) /* bus error address (3max+) */ | 36 | #define IOASIC_ERRADDR (9*IOASIC_SLOT_SIZE) /* bus error address (3max+) */ |
37 | #define IOASIC_CHKSYN (10*IOASIC_SLOT_SIZE) /* ECC syndrome (3max+) */ | 37 | #define IOASIC_CHKSYN (10*IOASIC_SLOT_SIZE) /* ECC syndrome (3max+) */ |
38 | #define IOASIC_ACC_BUS (10*IOASIC_SLOT_SIZE) /* ACCESS.bus (maxine) */ | 38 | #define IOASIC_ACC_BUS (10*IOASIC_SLOT_SIZE) /* ACCESS.bus (maxine) */ |
39 | #define IOASIC_MCR (11*IOASIC_SLOT_SIZE) /* memory control (3max+) */ | 39 | #define IOASIC_MCR (11*IOASIC_SLOT_SIZE) /* memory control (3max+) */ |
40 | #define IOASIC_FLOPPY (11*IOASIC_SLOT_SIZE) /* FDC (maxine) */ | 40 | #define IOASIC_FLOPPY (11*IOASIC_SLOT_SIZE) /* FDC (maxine) */ |
41 | #define IOASIC_SCSI (12*IOASIC_SLOT_SIZE) /* ASC SCSI */ | 41 | #define IOASIC_SCSI (12*IOASIC_SLOT_SIZE) /* ASC SCSI */ |
42 | #define IOASIC_FDC_DMA (13*IOASIC_SLOT_SIZE) /* FDC DMA (maxine) */ | 42 | #define IOASIC_FDC_DMA (13*IOASIC_SLOT_SIZE) /* FDC DMA (maxine) */ |
43 | #define IOASIC_SCSI_DMA (14*IOASIC_SLOT_SIZE) /* ??? */ | 43 | #define IOASIC_SCSI_DMA (14*IOASIC_SLOT_SIZE) /* ??? */ |
44 | #define IOASIC_RES_15 (15*IOASIC_SLOT_SIZE) /* unused? */ | 44 | #define IOASIC_RES_15 (15*IOASIC_SLOT_SIZE) /* unused? */ |
45 | 45 | ||
46 | 46 | ||
diff --git a/arch/mips/include/asm/dec/kn01.h b/arch/mips/include/asm/dec/kn01.h index 88d9ffd74258..0eb3241de706 100644 --- a/arch/mips/include/asm/dec/kn01.h +++ b/arch/mips/include/asm/dec/kn01.h | |||
@@ -57,12 +57,12 @@ | |||
57 | /* | 57 | /* |
58 | * System Control & Status Register bits. | 58 | * System Control & Status Register bits. |
59 | */ | 59 | */ |
60 | #define KN01_CSR_MNFMOD (1<<15) /* MNFMOD manufacturing jumper */ | 60 | #define KN01_CSR_MNFMOD (1<<15) /* MNFMOD manufacturing jumper */ |
61 | #define KN01_CSR_STATUS (1<<14) /* self-test result status output */ | 61 | #define KN01_CSR_STATUS (1<<14) /* self-test result status output */ |
62 | #define KN01_CSR_PARDIS (1<<13) /* parity error disable */ | 62 | #define KN01_CSR_PARDIS (1<<13) /* parity error disable */ |
63 | #define KN01_CSR_CRSRTST (1<<12) /* PCC test output */ | 63 | #define KN01_CSR_CRSRTST (1<<12) /* PCC test output */ |
64 | #define KN01_CSR_MONO (1<<11) /* mono/color fb SIMM installed */ | 64 | #define KN01_CSR_MONO (1<<11) /* mono/color fb SIMM installed */ |
65 | #define KN01_CSR_MEMERR (1<<10) /* write timeout error status & ack*/ | 65 | #define KN01_CSR_MEMERR (1<<10) /* write timeout error status & ack*/ |
66 | #define KN01_CSR_VINT (1<<9) /* PCC area detect #2 status & ack */ | 66 | #define KN01_CSR_VINT (1<<9) /* PCC area detect #2 status & ack */ |
67 | #define KN01_CSR_TXDIS (1<<8) /* DZ11 transmit disable */ | 67 | #define KN01_CSR_TXDIS (1<<8) /* DZ11 transmit disable */ |
68 | #define KN01_CSR_VBGTRG (1<<2) /* blue DAC voltage over green (r/o) */ | 68 | #define KN01_CSR_VBGTRG (1<<2) /* blue DAC voltage over green (r/o) */ |
diff --git a/arch/mips/include/asm/dec/kn02ca.h b/arch/mips/include/asm/dec/kn02ca.h index 92c0fe256099..69dc2a9a2d0f 100644 --- a/arch/mips/include/asm/dec/kn02ca.h +++ b/arch/mips/include/asm/dec/kn02ca.h | |||
@@ -68,7 +68,7 @@ | |||
68 | #define KN03CA_IO_SSR_ISDN_RST (1<<12) /* ~ISDN (Am79C30A) reset */ | 68 | #define KN03CA_IO_SSR_ISDN_RST (1<<12) /* ~ISDN (Am79C30A) reset */ |
69 | 69 | ||
70 | #define KN03CA_IO_SSR_FLOPPY_RST (1<<7) /* ~FDC (82077) reset */ | 70 | #define KN03CA_IO_SSR_FLOPPY_RST (1<<7) /* ~FDC (82077) reset */ |
71 | #define KN03CA_IO_SSR_VIDEO_RST (1<<6) /* ~framebuffer reset */ | 71 | #define KN03CA_IO_SSR_VIDEO_RST (1<<6) /* ~framebuffer reset */ |
72 | #define KN03CA_IO_SSR_AB_RST (1<<5) /* ACCESS.bus reset */ | 72 | #define KN03CA_IO_SSR_AB_RST (1<<5) /* ACCESS.bus reset */ |
73 | #define KN03CA_IO_SSR_RES_4 (1<<4) /* unused */ | 73 | #define KN03CA_IO_SSR_RES_4 (1<<4) /* unused */ |
74 | #define KN03CA_IO_SSR_RES_3 (1<<4) /* unused */ | 74 | #define KN03CA_IO_SSR_RES_3 (1<<4) /* unused */ |
diff --git a/arch/mips/include/asm/dec/prom.h b/arch/mips/include/asm/dec/prom.h index c0ead6313845..446577712bee 100644 --- a/arch/mips/include/asm/dec/prom.h +++ b/arch/mips/include/asm/dec/prom.h | |||
@@ -49,7 +49,7 @@ | |||
49 | 49 | ||
50 | #ifdef CONFIG_64BIT | 50 | #ifdef CONFIG_64BIT |
51 | 51 | ||
52 | #define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ | 52 | #define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ |
53 | 53 | ||
54 | #else /* !CONFIG_64BIT */ | 54 | #else /* !CONFIG_64BIT */ |
55 | 55 | ||
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index 006b43e38a9c..f8fc74b6cb47 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <asm/cache.h> | 5 | #include <asm/cache.h> |
6 | #include <asm-generic/dma-coherent.h> | 6 | #include <asm-generic/dma-coherent.h> |
7 | 7 | ||
8 | #ifndef CONFIG_SGI_IP27 /* Kludge to fix 2.6.39 build for IP27 */ | 8 | #ifndef CONFIG_SGI_IP27 /* Kludge to fix 2.6.39 build for IP27 */ |
9 | #include <dma-coherence.h> | 9 | #include <dma-coherence.h> |
10 | #endif | 10 | #endif |
11 | 11 | ||
diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h index f5097f65a8ab..5b9ed1bffdbc 100644 --- a/arch/mips/include/asm/dma.h +++ b/arch/mips/include/asm/dma.h | |||
@@ -47,21 +47,21 @@ | |||
47 | * | 47 | * |
48 | * Address mapping for channels 0-3: | 48 | * Address mapping for channels 0-3: |
49 | * | 49 | * |
50 | * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses) | 50 | * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses) |
51 | * | ... | | ... | | ... | | 51 | * | ... | | ... | | ... | |
52 | * | ... | | ... | | ... | | 52 | * | ... | | ... | | ... | |
53 | * | ... | | ... | | ... | | 53 | * | ... | | ... | | ... | |
54 | * P7 ... P0 A7 ... A0 A7 ... A0 | 54 | * P7 ... P0 A7 ... A0 A7 ... A0 |
55 | * | Page | Addr MSB | Addr LSB | (DMA registers) | 55 | * | Page | Addr MSB | Addr LSB | (DMA registers) |
56 | * | 56 | * |
57 | * Address mapping for channels 5-7: | 57 | * Address mapping for channels 5-7: |
58 | * | 58 | * |
59 | * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses) | 59 | * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses) |
60 | * | ... | \ \ ... \ \ \ ... \ \ | 60 | * | ... | \ \ ... \ \ \ ... \ \ |
61 | * | ... | \ \ ... \ \ \ ... \ (not used) | 61 | * | ... | \ \ ... \ \ \ ... \ (not used) |
62 | * | ... | \ \ ... \ \ \ ... \ | 62 | * | ... | \ \ ... \ \ \ ... \ |
63 | * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0 | 63 | * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0 |
64 | * | Page | Addr MSB | Addr LSB | (DMA registers) | 64 | * | Page | Addr MSB | Addr LSB | (DMA registers) |
65 | * | 65 | * |
66 | * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses | 66 | * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses |
67 | * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at | 67 | * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at |
@@ -102,55 +102,55 @@ | |||
102 | /* DMA controller registers */ | 102 | /* DMA controller registers */ |
103 | #define DMA1_CMD_REG 0x08 /* command register (w) */ | 103 | #define DMA1_CMD_REG 0x08 /* command register (w) */ |
104 | #define DMA1_STAT_REG 0x08 /* status register (r) */ | 104 | #define DMA1_STAT_REG 0x08 /* status register (r) */ |
105 | #define DMA1_REQ_REG 0x09 /* request register (w) */ | 105 | #define DMA1_REQ_REG 0x09 /* request register (w) */ |
106 | #define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ | 106 | #define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ |
107 | #define DMA1_MODE_REG 0x0B /* mode register (w) */ | 107 | #define DMA1_MODE_REG 0x0B /* mode register (w) */ |
108 | #define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ | 108 | #define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ |
109 | #define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ | 109 | #define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ |
110 | #define DMA1_RESET_REG 0x0D /* Master Clear (w) */ | 110 | #define DMA1_RESET_REG 0x0D /* Master Clear (w) */ |
111 | #define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ | 111 | #define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ |
112 | #define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ | 112 | #define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ |
113 | 113 | ||
114 | #define DMA2_CMD_REG 0xD0 /* command register (w) */ | 114 | #define DMA2_CMD_REG 0xD0 /* command register (w) */ |
115 | #define DMA2_STAT_REG 0xD0 /* status register (r) */ | 115 | #define DMA2_STAT_REG 0xD0 /* status register (r) */ |
116 | #define DMA2_REQ_REG 0xD2 /* request register (w) */ | 116 | #define DMA2_REQ_REG 0xD2 /* request register (w) */ |
117 | #define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ | 117 | #define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ |
118 | #define DMA2_MODE_REG 0xD6 /* mode register (w) */ | 118 | #define DMA2_MODE_REG 0xD6 /* mode register (w) */ |
119 | #define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ | 119 | #define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ |
120 | #define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ | 120 | #define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ |
121 | #define DMA2_RESET_REG 0xDA /* Master Clear (w) */ | 121 | #define DMA2_RESET_REG 0xDA /* Master Clear (w) */ |
122 | #define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ | 122 | #define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ |
123 | #define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ | 123 | #define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ |
124 | 124 | ||
125 | #define DMA_ADDR_0 0x00 /* DMA address registers */ | 125 | #define DMA_ADDR_0 0x00 /* DMA address registers */ |
126 | #define DMA_ADDR_1 0x02 | 126 | #define DMA_ADDR_1 0x02 |
127 | #define DMA_ADDR_2 0x04 | 127 | #define DMA_ADDR_2 0x04 |
128 | #define DMA_ADDR_3 0x06 | 128 | #define DMA_ADDR_3 0x06 |
129 | #define DMA_ADDR_4 0xC0 | 129 | #define DMA_ADDR_4 0xC0 |
130 | #define DMA_ADDR_5 0xC4 | 130 | #define DMA_ADDR_5 0xC4 |
131 | #define DMA_ADDR_6 0xC8 | 131 | #define DMA_ADDR_6 0xC8 |
132 | #define DMA_ADDR_7 0xCC | 132 | #define DMA_ADDR_7 0xCC |
133 | 133 | ||
134 | #define DMA_CNT_0 0x01 /* DMA count registers */ | 134 | #define DMA_CNT_0 0x01 /* DMA count registers */ |
135 | #define DMA_CNT_1 0x03 | 135 | #define DMA_CNT_1 0x03 |
136 | #define DMA_CNT_2 0x05 | 136 | #define DMA_CNT_2 0x05 |
137 | #define DMA_CNT_3 0x07 | 137 | #define DMA_CNT_3 0x07 |
138 | #define DMA_CNT_4 0xC2 | 138 | #define DMA_CNT_4 0xC2 |
139 | #define DMA_CNT_5 0xC6 | 139 | #define DMA_CNT_5 0xC6 |
140 | #define DMA_CNT_6 0xCA | 140 | #define DMA_CNT_6 0xCA |
141 | #define DMA_CNT_7 0xCE | 141 | #define DMA_CNT_7 0xCE |
142 | 142 | ||
143 | #define DMA_PAGE_0 0x87 /* DMA page registers */ | 143 | #define DMA_PAGE_0 0x87 /* DMA page registers */ |
144 | #define DMA_PAGE_1 0x83 | 144 | #define DMA_PAGE_1 0x83 |
145 | #define DMA_PAGE_2 0x81 | 145 | #define DMA_PAGE_2 0x81 |
146 | #define DMA_PAGE_3 0x82 | 146 | #define DMA_PAGE_3 0x82 |
147 | #define DMA_PAGE_5 0x8B | 147 | #define DMA_PAGE_5 0x8B |
148 | #define DMA_PAGE_6 0x89 | 148 | #define DMA_PAGE_6 0x89 |
149 | #define DMA_PAGE_7 0x8A | 149 | #define DMA_PAGE_7 0x8A |
150 | 150 | ||
151 | #define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ | 151 | #define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ |
152 | #define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ | 152 | #define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ |
153 | #define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ | 153 | #define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ |
154 | 154 | ||
155 | #define DMA_AUTOINIT 0x10 | 155 | #define DMA_AUTOINIT 0x10 |
156 | 156 | ||
@@ -172,7 +172,7 @@ static __inline__ void release_dma_lock(unsigned long flags) | |||
172 | static __inline__ void enable_dma(unsigned int dmanr) | 172 | static __inline__ void enable_dma(unsigned int dmanr) |
173 | { | 173 | { |
174 | if (dmanr<=3) | 174 | if (dmanr<=3) |
175 | dma_outb(dmanr, DMA1_MASK_REG); | 175 | dma_outb(dmanr, DMA1_MASK_REG); |
176 | else | 176 | else |
177 | dma_outb(dmanr & 3, DMA2_MASK_REG); | 177 | dma_outb(dmanr & 3, DMA2_MASK_REG); |
178 | } | 178 | } |
@@ -204,7 +204,7 @@ static __inline__ void clear_dma_ff(unsigned int dmanr) | |||
204 | static __inline__ void set_dma_mode(unsigned int dmanr, char mode) | 204 | static __inline__ void set_dma_mode(unsigned int dmanr, char mode) |
205 | { | 205 | { |
206 | if (dmanr<=3) | 206 | if (dmanr<=3) |
207 | dma_outb(mode | dmanr, DMA1_MODE_REG); | 207 | dma_outb(mode | dmanr, DMA1_MODE_REG); |
208 | else | 208 | else |
209 | dma_outb(mode | (dmanr&3), DMA2_MODE_REG); | 209 | dma_outb(mode | (dmanr&3), DMA2_MODE_REG); |
210 | } | 210 | } |
@@ -248,10 +248,10 @@ static __inline__ void set_dma_page(unsigned int dmanr, char pagenr) | |||
248 | static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) | 248 | static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) |
249 | { | 249 | { |
250 | set_dma_page(dmanr, a>>16); | 250 | set_dma_page(dmanr, a>>16); |
251 | if (dmanr <= 3) { | 251 | if (dmanr <= 3) { |
252 | dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); | 252 | dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); |
253 | dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); | 253 | dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); |
254 | } else { | 254 | } else { |
255 | dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); | 255 | dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); |
256 | dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); | 256 | dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); |
257 | } | 257 | } |
@@ -268,14 +268,14 @@ static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) | |||
268 | */ | 268 | */ |
269 | static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) | 269 | static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) |
270 | { | 270 | { |
271 | count--; | 271 | count--; |
272 | if (dmanr <= 3) { | 272 | if (dmanr <= 3) { |
273 | dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); | 273 | dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); |
274 | dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); | 274 | dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); |
275 | } else { | 275 | } else { |
276 | dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); | 276 | dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); |
277 | dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); | 277 | dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); |
278 | } | 278 | } |
279 | } | 279 | } |
280 | 280 | ||
281 | 281 | ||
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h index 455c0ac7d4ea..cf3ae2480b1d 100644 --- a/arch/mips/include/asm/elf.h +++ b/arch/mips/include/asm/elf.h | |||
@@ -11,13 +11,13 @@ | |||
11 | 11 | ||
12 | /* ELF header e_flags defines. */ | 12 | /* ELF header e_flags defines. */ |
13 | /* MIPS architecture level. */ | 13 | /* MIPS architecture level. */ |
14 | #define EF_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ | 14 | #define EF_MIPS_ARCH_1 0x00000000 /* -mips1 code. */ |
15 | #define EF_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ | 15 | #define EF_MIPS_ARCH_2 0x10000000 /* -mips2 code. */ |
16 | #define EF_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ | 16 | #define EF_MIPS_ARCH_3 0x20000000 /* -mips3 code. */ |
17 | #define EF_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ | 17 | #define EF_MIPS_ARCH_4 0x30000000 /* -mips4 code. */ |
18 | #define EF_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ | 18 | #define EF_MIPS_ARCH_5 0x40000000 /* -mips5 code. */ |
19 | #define EF_MIPS_ARCH_32 0x50000000 /* MIPS32 code. */ | 19 | #define EF_MIPS_ARCH_32 0x50000000 /* MIPS32 code. */ |
20 | #define EF_MIPS_ARCH_64 0x60000000 /* MIPS64 code. */ | 20 | #define EF_MIPS_ARCH_64 0x60000000 /* MIPS64 code. */ |
21 | #define EF_MIPS_ARCH_32R2 0x70000000 /* MIPS32 R2 code. */ | 21 | #define EF_MIPS_ARCH_32R2 0x70000000 /* MIPS32 R2 code. */ |
22 | #define EF_MIPS_ARCH_64R2 0x80000000 /* MIPS64 R2 code. */ | 22 | #define EF_MIPS_ARCH_64R2 0x80000000 /* MIPS64 R2 code. */ |
23 | 23 | ||
@@ -74,7 +74,7 @@ | |||
74 | #define R_MIPS_CALL16 11 | 74 | #define R_MIPS_CALL16 11 |
75 | #define R_MIPS_GPREL32 12 | 75 | #define R_MIPS_GPREL32 12 |
76 | /* The remaining relocs are defined on Irix, although they are not | 76 | /* The remaining relocs are defined on Irix, although they are not |
77 | in the MIPS ELF ABI. */ | 77 | in the MIPS ELF ABI. */ |
78 | #define R_MIPS_UNUSED1 13 | 78 | #define R_MIPS_UNUSED1 13 |
79 | #define R_MIPS_UNUSED2 14 | 79 | #define R_MIPS_UNUSED2 14 |
80 | #define R_MIPS_UNUSED3 15 | 80 | #define R_MIPS_UNUSED3 15 |
@@ -214,7 +214,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
214 | \ | 214 | \ |
215 | if (__h->e_machine != EM_MIPS) \ | 215 | if (__h->e_machine != EM_MIPS) \ |
216 | __res = 0; \ | 216 | __res = 0; \ |
217 | if (__h->e_ident[EI_CLASS] != ELFCLASS64) \ | 217 | if (__h->e_ident[EI_CLASS] != ELFCLASS64) \ |
218 | __res = 0; \ | 218 | __res = 0; \ |
219 | \ | 219 | \ |
220 | __res; \ | 220 | __res; \ |
@@ -292,7 +292,7 @@ do { \ | |||
292 | __SET_PERSONALITY32_O32(); \ | 292 | __SET_PERSONALITY32_O32(); \ |
293 | } while (0) | 293 | } while (0) |
294 | #else | 294 | #else |
295 | #define __SET_PERSONALITY32(ex) do { } while (0) | 295 | #define __SET_PERSONALITY32(ex) do { } while (0) |
296 | #endif | 296 | #endif |
297 | 297 | ||
298 | #define SET_PERSONALITY(ex) \ | 298 | #define SET_PERSONALITY(ex) \ |
@@ -337,11 +337,11 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); | |||
337 | instruction set this cpu supports. This could be done in userspace, | 337 | instruction set this cpu supports. This could be done in userspace, |
338 | but it's not easy, and we've already done it here. */ | 338 | but it's not easy, and we've already done it here. */ |
339 | 339 | ||
340 | #define ELF_HWCAP (0) | 340 | #define ELF_HWCAP (0) |
341 | 341 | ||
342 | /* | 342 | /* |
343 | * This yields a string that ld.so will use to load implementation | 343 | * This yields a string that ld.so will use to load implementation |
344 | * specific libraries for optimization. This is more specific in | 344 | * specific libraries for optimization. This is more specific in |
345 | * intent than poking at uname or /proc/cpuinfo. | 345 | * intent than poking at uname or /proc/cpuinfo. |
346 | */ | 346 | */ |
347 | 347 | ||
@@ -365,11 +365,11 @@ extern const char *__elf_platform; | |||
365 | 365 | ||
366 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | 366 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical |
367 | use of this is to invoke "./ld.so someprog" to test out a new version of | 367 | use of this is to invoke "./ld.so someprog" to test out a new version of |
368 | the loader. We need to make sure that it is out of the way of the program | 368 | the loader. We need to make sure that it is out of the way of the program |
369 | that it will "exec", and that there is sufficient room for the brk. */ | 369 | that it will "exec", and that there is sufficient room for the brk. */ |
370 | 370 | ||
371 | #ifndef ELF_ET_DYN_BASE | 371 | #ifndef ELF_ET_DYN_BASE |
372 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) | 372 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) |
373 | #endif | 373 | #endif |
374 | 374 | ||
375 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | 375 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 |
diff --git a/arch/mips/include/asm/emma/emma2rh.h b/arch/mips/include/asm/emma/emma2rh.h index c1449d20ef0e..ecf059608bd8 100644 --- a/arch/mips/include/asm/emma/emma2rh.h +++ b/arch/mips/include/asm/emma/emma2rh.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Copyright (C) NEC Electronics Corporation 2005-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2005-2006 |
3 | * | 3 | * |
4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h | 4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h |
5 | * Copyright 2001 MontaVista Software Inc. | 5 | * Copyright 2001 MontaVista Software Inc. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 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 | 8 | * it under the terms of the GNU General Public License as published by |
@@ -40,7 +40,7 @@ | |||
40 | #define EMMA2RH_BHIF_INT1_EN_2 (0x000058+REGBASE) | 40 | #define EMMA2RH_BHIF_INT1_EN_2 (0x000058+REGBASE) |
41 | #define EMMA2RH_BHIF_SW_INT (0x000070+REGBASE) | 41 | #define EMMA2RH_BHIF_SW_INT (0x000070+REGBASE) |
42 | #define EMMA2RH_BHIF_SW_INT_EN (0x000080+REGBASE) | 42 | #define EMMA2RH_BHIF_SW_INT_EN (0x000080+REGBASE) |
43 | #define EMMA2RH_BHIF_SW_INT_CLR (0x000090+REGBASE) | 43 | #define EMMA2RH_BHIF_SW_INT_CLR (0x000090+REGBASE) |
44 | #define EMMA2RH_BHIF_MAIN_CTRL (0x0000b4+REGBASE) | 44 | #define EMMA2RH_BHIF_MAIN_CTRL (0x0000b4+REGBASE) |
45 | #define EMMA2RH_BHIF_EXCEPT_VECT_BASE_ADDRESS (0x0000c0+REGBASE) | 45 | #define EMMA2RH_BHIF_EXCEPT_VECT_BASE_ADDRESS (0x0000c0+REGBASE) |
46 | #define EMMA2RH_GPIO_DIR (0x110d20+REGBASE) | 46 | #define EMMA2RH_GPIO_DIR (0x110d20+REGBASE) |
@@ -73,7 +73,7 @@ | |||
73 | * Memory map (physical address) | 73 | * Memory map (physical address) |
74 | * | 74 | * |
75 | * Note most of the following address must be properly aligned by the | 75 | * Note most of the following address must be properly aligned by the |
76 | * corresponding size. For example, if PCI_IO_SIZE is 16MB, then | 76 | * corresponding size. For example, if PCI_IO_SIZE is 16MB, then |
77 | * PCI_IO_BASE must be aligned along 16MB boundary. | 77 | * PCI_IO_BASE must be aligned along 16MB boundary. |
78 | */ | 78 | */ |
79 | 79 | ||
@@ -96,8 +96,8 @@ | |||
96 | #define EMMA2RH_ROM_BASE 0x1c000000 | 96 | #define EMMA2RH_ROM_BASE 0x1c000000 |
97 | #define EMMA2RH_ROM_SIZE 0x04000000 /* 64 MB */ | 97 | #define EMMA2RH_ROM_SIZE 0x04000000 /* 64 MB */ |
98 | 98 | ||
99 | #define EMMA2RH_PCI_CONFIG_BASE EMMA2RH_PCI_IO_BASE | 99 | #define EMMA2RH_PCI_CONFIG_BASE EMMA2RH_PCI_IO_BASE |
100 | #define EMMA2RH_PCI_CONFIG_SIZE EMMA2RH_PCI_IO_SIZE | 100 | #define EMMA2RH_PCI_CONFIG_SIZE EMMA2RH_PCI_IO_SIZE |
101 | 101 | ||
102 | #define NUM_EMMA2RH_IRQ 96 | 102 | #define NUM_EMMA2RH_IRQ 96 |
103 | 103 | ||
@@ -169,51 +169,51 @@ static inline u8 emma2rh_in8(u32 offset) | |||
169 | **/ | 169 | **/ |
170 | 170 | ||
171 | /*---------------------------------------------------------------------------*/ | 171 | /*---------------------------------------------------------------------------*/ |
172 | /* CNT - Control register (00H R/W) */ | 172 | /* CNT - Control register (00H R/W) */ |
173 | /*---------------------------------------------------------------------------*/ | 173 | /*---------------------------------------------------------------------------*/ |
174 | #define SPT 0x00000001 | 174 | #define SPT 0x00000001 |
175 | #define STT 0x00000002 | 175 | #define STT 0x00000002 |
176 | #define ACKE 0x00000004 | 176 | #define ACKE 0x00000004 |
177 | #define WTIM 0x00000008 | 177 | #define WTIM 0x00000008 |
178 | #define SPIE 0x00000010 | 178 | #define SPIE 0x00000010 |
179 | #define WREL 0x00000020 | 179 | #define WREL 0x00000020 |
180 | #define LREL 0x00000040 | 180 | #define LREL 0x00000040 |
181 | #define IICE 0x00000080 | 181 | #define IICE 0x00000080 |
182 | #define CNT_RESERVED 0x000000ff /* reserved bit 0 */ | 182 | #define CNT_RESERVED 0x000000ff /* reserved bit 0 */ |
183 | 183 | ||
184 | #define I2C_EMMA_START (IICE | STT) | 184 | #define I2C_EMMA_START (IICE | STT) |
185 | #define I2C_EMMA_STOP (IICE | SPT) | 185 | #define I2C_EMMA_STOP (IICE | SPT) |
186 | #define I2C_EMMA_REPSTART I2C_EMMA_START | 186 | #define I2C_EMMA_REPSTART I2C_EMMA_START |
187 | 187 | ||
188 | /*---------------------------------------------------------------------------*/ | 188 | /*---------------------------------------------------------------------------*/ |
189 | /* STA - Status register (10H Read) */ | 189 | /* STA - Status register (10H Read) */ |
190 | /*---------------------------------------------------------------------------*/ | 190 | /*---------------------------------------------------------------------------*/ |
191 | #define MSTS 0x00000080 | 191 | #define MSTS 0x00000080 |
192 | #define ALD 0x00000040 | 192 | #define ALD 0x00000040 |
193 | #define EXC 0x00000020 | 193 | #define EXC 0x00000020 |
194 | #define COI 0x00000010 | 194 | #define COI 0x00000010 |
195 | #define TRC 0x00000008 | 195 | #define TRC 0x00000008 |
196 | #define ACKD 0x00000004 | 196 | #define ACKD 0x00000004 |
197 | #define STD 0x00000002 | 197 | #define STD 0x00000002 |
198 | #define SPD 0x00000001 | 198 | #define SPD 0x00000001 |
199 | 199 | ||
200 | /*---------------------------------------------------------------------------*/ | 200 | /*---------------------------------------------------------------------------*/ |
201 | /* CSEL - Clock select register (20H R/W) */ | 201 | /* CSEL - Clock select register (20H R/W) */ |
202 | /*---------------------------------------------------------------------------*/ | 202 | /*---------------------------------------------------------------------------*/ |
203 | #define FCL 0x00000080 | 203 | #define FCL 0x00000080 |
204 | #define ND50 0x00000040 | 204 | #define ND50 0x00000040 |
205 | #define CLD 0x00000020 | 205 | #define CLD 0x00000020 |
206 | #define DAD 0x00000010 | 206 | #define DAD 0x00000010 |
207 | #define SMC 0x00000008 | 207 | #define SMC 0x00000008 |
208 | #define DFC 0x00000004 | 208 | #define DFC 0x00000004 |
209 | #define CL 0x00000003 | 209 | #define CL 0x00000003 |
210 | #define CSEL_RESERVED 0x000000ff /* reserved bit 0 */ | 210 | #define CSEL_RESERVED 0x000000ff /* reserved bit 0 */ |
211 | 211 | ||
212 | #define FAST397 0x0000008b | 212 | #define FAST397 0x0000008b |
213 | #define FAST297 0x0000008a | 213 | #define FAST297 0x0000008a |
214 | #define FAST347 0x0000000b | 214 | #define FAST347 0x0000000b |
215 | #define FAST260 0x0000000a | 215 | #define FAST260 0x0000000a |
216 | #define FAST130 0x00000008 | 216 | #define FAST130 0x00000008 |
217 | #define STANDARD108 0x00000083 | 217 | #define STANDARD108 0x00000083 |
218 | #define STANDARD83 0x00000082 | 218 | #define STANDARD83 0x00000082 |
219 | #define STANDARD95 0x00000003 | 219 | #define STANDARD95 0x00000003 |
@@ -222,32 +222,32 @@ static inline u8 emma2rh_in8(u32 offset) | |||
222 | #define STANDARD71 0x00000000 | 222 | #define STANDARD71 0x00000000 |
223 | 223 | ||
224 | /*---------------------------------------------------------------------------*/ | 224 | /*---------------------------------------------------------------------------*/ |
225 | /* SVA - Slave address register (30H R/W) */ | 225 | /* SVA - Slave address register (30H R/W) */ |
226 | /*---------------------------------------------------------------------------*/ | 226 | /*---------------------------------------------------------------------------*/ |
227 | #define SVA 0x000000fe | 227 | #define SVA 0x000000fe |
228 | 228 | ||
229 | /*---------------------------------------------------------------------------*/ | 229 | /*---------------------------------------------------------------------------*/ |
230 | /* SHR - Shift register (40H R/W) */ | 230 | /* SHR - Shift register (40H R/W) */ |
231 | /*---------------------------------------------------------------------------*/ | 231 | /*---------------------------------------------------------------------------*/ |
232 | #define SR 0x000000ff | 232 | #define SR 0x000000ff |
233 | 233 | ||
234 | /*---------------------------------------------------------------------------*/ | 234 | /*---------------------------------------------------------------------------*/ |
235 | /* INT - Interrupt register (50H R/W) */ | 235 | /* INT - Interrupt register (50H R/W) */ |
236 | /* INTM - Interrupt mask register (60H R/W) */ | 236 | /* INTM - Interrupt mask register (60H R/W) */ |
237 | /*---------------------------------------------------------------------------*/ | 237 | /*---------------------------------------------------------------------------*/ |
238 | #define INTE0 0x00000001 | 238 | #define INTE0 0x00000001 |
239 | 239 | ||
240 | /*********************************************************************** | 240 | /*********************************************************************** |
241 | * I2C registers | 241 | * I2C registers |
242 | *********************************************************************** | 242 | *********************************************************************** |
243 | */ | 243 | */ |
244 | #define I2C_EMMA_CNT 0x00 | 244 | #define I2C_EMMA_CNT 0x00 |
245 | #define I2C_EMMA_STA 0x10 | 245 | #define I2C_EMMA_STA 0x10 |
246 | #define I2C_EMMA_CSEL 0x20 | 246 | #define I2C_EMMA_CSEL 0x20 |
247 | #define I2C_EMMA_SVA 0x30 | 247 | #define I2C_EMMA_SVA 0x30 |
248 | #define I2C_EMMA_SHR 0x40 | 248 | #define I2C_EMMA_SHR 0x40 |
249 | #define I2C_EMMA_INT 0x50 | 249 | #define I2C_EMMA_INT 0x50 |
250 | #define I2C_EMMA_INTM 0x60 | 250 | #define I2C_EMMA_INTM 0x60 |
251 | 251 | ||
252 | /* | 252 | /* |
253 | * include the board dependent part | 253 | * include the board dependent part |
diff --git a/arch/mips/include/asm/emma/markeins.h b/arch/mips/include/asm/emma/markeins.h index bf2d229c2dae..e55a67477820 100644 --- a/arch/mips/include/asm/emma/markeins.h +++ b/arch/mips/include/asm/emma/markeins.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Copyright (C) NEC Electronics Corporation 2005-2006 | 2 | * Copyright (C) NEC Electronics Corporation 2005-2006 |
3 | * | 3 | * |
4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h | 4 | * This file based on include/asm-mips/ddb5xxx/ddb5xxx.h |
5 | * Copyright 2001 MontaVista Software Inc. | 5 | * Copyright 2001 MontaVista Software Inc. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 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 | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/fixmap.h b/arch/mips/include/asm/fixmap.h index 98bcc98cf29b..dfaaf493e9d4 100644 --- a/arch/mips/include/asm/fixmap.h +++ b/arch/mips/include/asm/fixmap.h | |||
@@ -95,7 +95,7 @@ static inline unsigned long fix_to_virt(const unsigned int idx) | |||
95 | if (idx >= __end_of_fixed_addresses) | 95 | if (idx >= __end_of_fixed_addresses) |
96 | __this_fixmap_does_not_exist(); | 96 | __this_fixmap_does_not_exist(); |
97 | 97 | ||
98 | return __fix_to_virt(idx); | 98 | return __fix_to_virt(idx); |
99 | } | 99 | } |
100 | 100 | ||
101 | static inline unsigned long virt_to_fix(const unsigned long vaddr) | 101 | static inline unsigned long virt_to_fix(const unsigned long vaddr) |
@@ -111,7 +111,7 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) | |||
111 | * Called from pgtable_init() | 111 | * Called from pgtable_init() |
112 | */ | 112 | */ |
113 | extern void fixrange_init(unsigned long start, unsigned long end, | 113 | extern void fixrange_init(unsigned long start, unsigned long end, |
114 | pgd_t *pgd_base); | 114 | pgd_t *pgd_base); |
115 | 115 | ||
116 | 116 | ||
117 | #endif | 117 | #endif |
diff --git a/arch/mips/include/asm/floppy.h b/arch/mips/include/asm/floppy.h index 4456c9c47e21..d75aed36480a 100644 --- a/arch/mips/include/asm/floppy.h +++ b/arch/mips/include/asm/floppy.h | |||
@@ -24,9 +24,9 @@ static inline void fd_cacheflush(char * addr, long size) | |||
24 | * And on Mips's the CMOS info fails also ... | 24 | * And on Mips's the CMOS info fails also ... |
25 | * | 25 | * |
26 | * FIXME: This information should come from the ARC configuration tree | 26 | * FIXME: This information should come from the ARC configuration tree |
27 | * or wherever a particular machine has stored this ... | 27 | * or wherever a particular machine has stored this ... |
28 | */ | 28 | */ |
29 | #define FLOPPY0_TYPE fd_drive_type(0) | 29 | #define FLOPPY0_TYPE fd_drive_type(0) |
30 | #define FLOPPY1_TYPE fd_drive_type(1) | 30 | #define FLOPPY1_TYPE fd_drive_type(1) |
31 | 31 | ||
32 | #define FDC1 fd_getfdaddr1() | 32 | #define FDC1 fd_getfdaddr1() |
diff --git a/arch/mips/include/asm/fpregdef.h b/arch/mips/include/asm/fpregdef.h index 2b5fddc8f487..429481f9028d 100644 --- a/arch/mips/include/asm/fpregdef.h +++ b/arch/mips/include/asm/fpregdef.h | |||
@@ -20,15 +20,15 @@ | |||
20 | * These definitions only cover the R3000-ish 16/32 register model. | 20 | * These definitions only cover the R3000-ish 16/32 register model. |
21 | * But we're trying to be R3000 friendly anyway ... | 21 | * But we're trying to be R3000 friendly anyway ... |
22 | */ | 22 | */ |
23 | #define fv0 $f0 /* return value */ | 23 | #define fv0 $f0 /* return value */ |
24 | #define fv0f $f1 | 24 | #define fv0f $f1 |
25 | #define fv1 $f2 | 25 | #define fv1 $f2 |
26 | #define fv1f $f3 | 26 | #define fv1f $f3 |
27 | #define fa0 $f12 /* argument registers */ | 27 | #define fa0 $f12 /* argument registers */ |
28 | #define fa0f $f13 | 28 | #define fa0f $f13 |
29 | #define fa1 $f14 | 29 | #define fa1 $f14 |
30 | #define fa1f $f15 | 30 | #define fa1f $f15 |
31 | #define ft0 $f4 /* caller saved */ | 31 | #define ft0 $f4 /* caller saved */ |
32 | #define ft0f $f5 | 32 | #define ft0f $f5 |
33 | #define ft1 $f6 | 33 | #define ft1 $f6 |
34 | #define ft1f $f7 | 34 | #define ft1f $f7 |
@@ -40,7 +40,7 @@ | |||
40 | #define ft4f $f17 | 40 | #define ft4f $f17 |
41 | #define ft5 $f18 | 41 | #define ft5 $f18 |
42 | #define ft5f $f19 | 42 | #define ft5f $f19 |
43 | #define fs0 $f20 /* callee saved */ | 43 | #define fs0 $f20 /* callee saved */ |
44 | #define fs0f $f21 | 44 | #define fs0f $f21 |
45 | #define fs1 $f22 | 45 | #define fs1 $f22 |
46 | #define fs1f $f23 | 46 | #define fs1f $f23 |
@@ -53,7 +53,7 @@ | |||
53 | #define fs5 $f30 | 53 | #define fs5 $f30 |
54 | #define fs5f $f31 | 54 | #define fs5f $f31 |
55 | 55 | ||
56 | #define fcr31 $31 /* FPU status register */ | 56 | #define fcr31 $31 /* FPU status register */ |
57 | 57 | ||
58 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 58 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
59 | 59 | ||
diff --git a/arch/mips/include/asm/fpu.h b/arch/mips/include/asm/fpu.h index 7fcef8ef3fab..d088e5db4903 100644 --- a/arch/mips/include/asm/fpu.h +++ b/arch/mips/include/asm/fpu.h | |||
@@ -35,14 +35,14 @@ extern void _restore_fp(struct task_struct *); | |||
35 | 35 | ||
36 | #define __enable_fpu() \ | 36 | #define __enable_fpu() \ |
37 | do { \ | 37 | do { \ |
38 | set_c0_status(ST0_CU1); \ | 38 | set_c0_status(ST0_CU1); \ |
39 | enable_fpu_hazard(); \ | 39 | enable_fpu_hazard(); \ |
40 | } while (0) | 40 | } while (0) |
41 | 41 | ||
42 | #define __disable_fpu() \ | 42 | #define __disable_fpu() \ |
43 | do { \ | 43 | do { \ |
44 | clear_c0_status(ST0_CU1); \ | 44 | clear_c0_status(ST0_CU1); \ |
45 | disable_fpu_hazard(); \ | 45 | disable_fpu_hazard(); \ |
46 | } while (0) | 46 | } while (0) |
47 | 47 | ||
48 | #define enable_fpu() \ | 48 | #define enable_fpu() \ |
diff --git a/arch/mips/include/asm/futex.h b/arch/mips/include/asm/futex.h index 6ebf1734b411..6ea15815d3ee 100644 --- a/arch/mips/include/asm/futex.h +++ b/arch/mips/include/asm/futex.h | |||
@@ -92,24 +92,24 @@ futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr) | |||
92 | 92 | ||
93 | switch (op) { | 93 | switch (op) { |
94 | case FUTEX_OP_SET: | 94 | case FUTEX_OP_SET: |
95 | __futex_atomic_op("move $1, %z5", ret, oldval, uaddr, oparg); | 95 | __futex_atomic_op("move $1, %z5", ret, oldval, uaddr, oparg); |
96 | break; | 96 | break; |
97 | 97 | ||
98 | case FUTEX_OP_ADD: | 98 | case FUTEX_OP_ADD: |
99 | __futex_atomic_op("addu $1, %1, %z5", | 99 | __futex_atomic_op("addu $1, %1, %z5", |
100 | ret, oldval, uaddr, oparg); | 100 | ret, oldval, uaddr, oparg); |
101 | break; | 101 | break; |
102 | case FUTEX_OP_OR: | 102 | case FUTEX_OP_OR: |
103 | __futex_atomic_op("or $1, %1, %z5", | 103 | __futex_atomic_op("or $1, %1, %z5", |
104 | ret, oldval, uaddr, oparg); | 104 | ret, oldval, uaddr, oparg); |
105 | break; | 105 | break; |
106 | case FUTEX_OP_ANDN: | 106 | case FUTEX_OP_ANDN: |
107 | __futex_atomic_op("and $1, %1, %z5", | 107 | __futex_atomic_op("and $1, %1, %z5", |
108 | ret, oldval, uaddr, ~oparg); | 108 | ret, oldval, uaddr, ~oparg); |
109 | break; | 109 | break; |
110 | case FUTEX_OP_XOR: | 110 | case FUTEX_OP_XOR: |
111 | __futex_atomic_op("xor $1, %1, %z5", | 111 | __futex_atomic_op("xor $1, %1, %z5", |
112 | ret, oldval, uaddr, oparg); | 112 | ret, oldval, uaddr, oparg); |
113 | break; | 113 | break; |
114 | default: | 114 | default: |
115 | ret = -ENOSYS; | 115 | ret = -ENOSYS; |
diff --git a/arch/mips/include/asm/fw/arc/hinv.h b/arch/mips/include/asm/fw/arc/hinv.h index e6ff4add04e2..f8d37d1df5de 100644 --- a/arch/mips/include/asm/fw/arc/hinv.h +++ b/arch/mips/include/asm/fw/arc/hinv.h | |||
@@ -12,7 +12,7 @@ typedef enum configclass { | |||
12 | SystemClass, | 12 | SystemClass, |
13 | ProcessorClass, | 13 | ProcessorClass, |
14 | CacheClass, | 14 | CacheClass, |
15 | #ifndef _NT_PROM | 15 | #ifndef _NT_PROM |
16 | MemoryClass, | 16 | MemoryClass, |
17 | AdapterClass, | 17 | AdapterClass, |
18 | ControllerClass, | 18 | ControllerClass, |
@@ -34,7 +34,7 @@ typedef enum configtype { | |||
34 | SecondaryICache, | 34 | SecondaryICache, |
35 | SecondaryDCache, | 35 | SecondaryDCache, |
36 | SecondaryCache, | 36 | SecondaryCache, |
37 | #ifndef _NT_PROM | 37 | #ifndef _NT_PROM |
38 | Memory, | 38 | Memory, |
39 | #endif | 39 | #endif |
40 | EISAAdapter, | 40 | EISAAdapter, |
@@ -93,7 +93,7 @@ typedef enum { | |||
93 | } IDENTIFIERFLAG; | 93 | } IDENTIFIERFLAG; |
94 | 94 | ||
95 | #ifndef NULL /* for GetChild(NULL); */ | 95 | #ifndef NULL /* for GetChild(NULL); */ |
96 | #define NULL 0 | 96 | #define NULL 0 |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | union key_u { | 99 | union key_u { |
@@ -125,7 +125,7 @@ typedef struct component { | |||
125 | IDENTIFIERFLAG Flags; | 125 | IDENTIFIERFLAG Flags; |
126 | USHORT Version; | 126 | USHORT Version; |
127 | USHORT Revision; | 127 | USHORT Revision; |
128 | ULONG Key; | 128 | ULONG Key; |
129 | ULONG AffinityMask; | 129 | ULONG AffinityMask; |
130 | ULONG ConfigurationDataSize; | 130 | ULONG ConfigurationDataSize; |
131 | ULONG IdentifierLength; | 131 | ULONG IdentifierLength; |
@@ -149,7 +149,7 @@ typedef struct systemid { | |||
149 | typedef enum memorytype { | 149 | typedef enum memorytype { |
150 | ExceptionBlock, | 150 | ExceptionBlock, |
151 | SPBPage, /* ARCS == SystemParameterBlock */ | 151 | SPBPage, /* ARCS == SystemParameterBlock */ |
152 | #ifndef _NT_PROM | 152 | #ifndef _NT_PROM |
153 | FreeContiguous, | 153 | FreeContiguous, |
154 | FreeMemory, | 154 | FreeMemory, |
155 | BadMemory, | 155 | BadMemory, |
diff --git a/arch/mips/include/asm/fw/arc/types.h b/arch/mips/include/asm/fw/arc/types.h index 2b11f87d6fb3..ad163806148a 100644 --- a/arch/mips/include/asm/fw/arc/types.h +++ b/arch/mips/include/asm/fw/arc/types.h | |||
@@ -15,7 +15,7 @@ | |||
15 | typedef char CHAR; | 15 | typedef char CHAR; |
16 | typedef short SHORT; | 16 | typedef short SHORT; |
17 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); | 17 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); |
18 | typedef long LONG __attribute__ ((__mode__ (__SI__))); | 18 | typedef long LONG __attribute__ ((__mode__ (__SI__))); |
19 | typedef unsigned char UCHAR; | 19 | typedef unsigned char UCHAR; |
20 | typedef unsigned short USHORT; | 20 | typedef unsigned short USHORT; |
21 | typedef unsigned long ULONG __attribute__ ((__mode__ (__SI__))); | 21 | typedef unsigned long ULONG __attribute__ ((__mode__ (__SI__))); |
@@ -23,11 +23,11 @@ typedef void VOID; | |||
23 | 23 | ||
24 | /* The pointer types. Note that we're using a 64-bit compiler but all | 24 | /* The pointer types. Note that we're using a 64-bit compiler but all |
25 | pointer in the ARC structures are only 32-bit, so we need some disgusting | 25 | pointer in the ARC structures are only 32-bit, so we need some disgusting |
26 | workarounds. Keep your vomit bag handy. */ | 26 | workarounds. Keep your vomit bag handy. */ |
27 | typedef LONG _PCHAR; | 27 | typedef LONG _PCHAR; |
28 | typedef LONG _PSHORT; | 28 | typedef LONG _PSHORT; |
29 | typedef LONG _PLARGE_INTEGER; | 29 | typedef LONG _PLARGE_INTEGER; |
30 | typedef LONG _PLONG; | 30 | typedef LONG _PLONG; |
31 | typedef LONG _PUCHAR; | 31 | typedef LONG _PUCHAR; |
32 | typedef LONG _PUSHORT; | 32 | typedef LONG _PUSHORT; |
33 | typedef LONG _PULONG; | 33 | typedef LONG _PULONG; |
@@ -40,7 +40,7 @@ typedef LONG _PVOID; | |||
40 | typedef char CHAR; | 40 | typedef char CHAR; |
41 | typedef short SHORT; | 41 | typedef short SHORT; |
42 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); | 42 | typedef long LARGE_INTEGER __attribute__ ((__mode__ (__DI__))); |
43 | typedef long LONG __attribute__ ((__mode__ (__DI__))); | 43 | typedef long LONG __attribute__ ((__mode__ (__DI__))); |
44 | typedef unsigned char UCHAR; | 44 | typedef unsigned char UCHAR; |
45 | typedef unsigned short USHORT; | 45 | typedef unsigned short USHORT; |
46 | typedef unsigned long ULONG __attribute__ ((__mode__ (__DI__))); | 46 | typedef unsigned long ULONG __attribute__ ((__mode__ (__DI__))); |
@@ -51,7 +51,7 @@ typedef void VOID; | |||
51 | typedef CHAR *_PCHAR; | 51 | typedef CHAR *_PCHAR; |
52 | typedef SHORT *_PSHORT; | 52 | typedef SHORT *_PSHORT; |
53 | typedef LARGE_INTEGER *_PLARGE_INTEGER; | 53 | typedef LARGE_INTEGER *_PLARGE_INTEGER; |
54 | typedef LONG *_PLONG; | 54 | typedef LONG *_PLONG; |
55 | typedef UCHAR *_PUCHAR; | 55 | typedef UCHAR *_PUCHAR; |
56 | typedef USHORT *_PUSHORT; | 56 | typedef USHORT *_PUSHORT; |
57 | typedef ULONG *_PULONG; | 57 | typedef ULONG *_PULONG; |
@@ -62,7 +62,7 @@ typedef VOID *_PVOID; | |||
62 | typedef CHAR *PCHAR; | 62 | typedef CHAR *PCHAR; |
63 | typedef SHORT *PSHORT; | 63 | typedef SHORT *PSHORT; |
64 | typedef LARGE_INTEGER *PLARGE_INTEGER; | 64 | typedef LARGE_INTEGER *PLARGE_INTEGER; |
65 | typedef LONG *PLONG; | 65 | typedef LONG *PLONG; |
66 | typedef UCHAR *PUCHAR; | 66 | typedef UCHAR *PUCHAR; |
67 | typedef USHORT *PUSHORT; | 67 | typedef USHORT *PUSHORT; |
68 | typedef ULONG *PULONG; | 68 | typedef ULONG *PULONG; |
diff --git a/arch/mips/include/asm/fw/cfe/cfe_api.h b/arch/mips/include/asm/fw/cfe/cfe_api.h index 0995575db320..17347551a1b2 100644 --- a/arch/mips/include/asm/fw/cfe/cfe_api.h +++ b/arch/mips/include/asm/fw/cfe/cfe_api.h | |||
@@ -40,7 +40,7 @@ typedef long intptr_t; | |||
40 | /* Seal indicating CFE's presence, passed to user program. */ | 40 | /* Seal indicating CFE's presence, passed to user program. */ |
41 | #define CFE_EPTSEAL 0x43464531 | 41 | #define CFE_EPTSEAL 0x43464531 |
42 | 42 | ||
43 | #define CFE_MI_RESERVED 0 /* memory is reserved, do not use */ | 43 | #define CFE_MI_RESERVED 0 /* memory is reserved, do not use */ |
44 | #define CFE_MI_AVAILABLE 1 /* memory is available */ | 44 | #define CFE_MI_AVAILABLE 1 /* memory is available */ |
45 | 45 | ||
46 | #define CFE_FLG_WARMSTART 0x00000001 | 46 | #define CFE_FLG_WARMSTART 0x00000001 |
@@ -52,13 +52,13 @@ typedef long intptr_t; | |||
52 | 52 | ||
53 | #define CFE_STDHANDLE_CONSOLE 0 | 53 | #define CFE_STDHANDLE_CONSOLE 0 |
54 | 54 | ||
55 | #define CFE_DEV_NETWORK 1 | 55 | #define CFE_DEV_NETWORK 1 |
56 | #define CFE_DEV_DISK 2 | 56 | #define CFE_DEV_DISK 2 |
57 | #define CFE_DEV_FLASH 3 | 57 | #define CFE_DEV_FLASH 3 |
58 | #define CFE_DEV_SERIAL 4 | 58 | #define CFE_DEV_SERIAL 4 |
59 | #define CFE_DEV_CPU 5 | 59 | #define CFE_DEV_CPU 5 |
60 | #define CFE_DEV_NVRAM 6 | 60 | #define CFE_DEV_NVRAM 6 |
61 | #define CFE_DEV_CLOCK 7 | 61 | #define CFE_DEV_CLOCK 7 |
62 | #define CFE_DEV_OTHER 8 | 62 | #define CFE_DEV_OTHER 8 |
63 | #define CFE_DEV_MASK 0x0F | 63 | #define CFE_DEV_MASK 0x0F |
64 | 64 | ||
diff --git a/arch/mips/include/asm/fw/cfe/cfe_error.h b/arch/mips/include/asm/fw/cfe/cfe_error.h index b80374636279..fc0e91f07e22 100644 --- a/arch/mips/include/asm/fw/cfe/cfe_error.h +++ b/arch/mips/include/asm/fw/cfe/cfe_error.h | |||
@@ -25,7 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #define CFE_OK 0 | 27 | #define CFE_OK 0 |
28 | #define CFE_ERR -1 /* generic error */ | 28 | #define CFE_ERR -1 /* generic error */ |
29 | #define CFE_ERR_INV_COMMAND -2 | 29 | #define CFE_ERR_INV_COMMAND -2 |
30 | #define CFE_ERR_EOF -3 | 30 | #define CFE_ERR_EOF -3 |
31 | #define CFE_ERR_IOERR -4 | 31 | #define CFE_ERR_IOERR -4 |
@@ -37,12 +37,12 @@ | |||
37 | #define CFE_ERR_ENVREADONLY -10 | 37 | #define CFE_ERR_ENVREADONLY -10 |
38 | 38 | ||
39 | #define CFE_ERR_NOTELF -11 | 39 | #define CFE_ERR_NOTELF -11 |
40 | #define CFE_ERR_NOT32BIT -12 | 40 | #define CFE_ERR_NOT32BIT -12 |
41 | #define CFE_ERR_WRONGENDIAN -13 | 41 | #define CFE_ERR_WRONGENDIAN -13 |
42 | #define CFE_ERR_BADELFVERS -14 | 42 | #define CFE_ERR_BADELFVERS -14 |
43 | #define CFE_ERR_NOTMIPS -15 | 43 | #define CFE_ERR_NOTMIPS -15 |
44 | #define CFE_ERR_BADELFFMT -16 | 44 | #define CFE_ERR_BADELFFMT -16 |
45 | #define CFE_ERR_BADADDR -17 | 45 | #define CFE_ERR_BADADDR -17 |
46 | 46 | ||
47 | #define CFE_ERR_FILENOTFOUND -18 | 47 | #define CFE_ERR_FILENOTFOUND -18 |
48 | #define CFE_ERR_UNSUPPORTED -19 | 48 | #define CFE_ERR_UNSUPPORTED -19 |
@@ -73,8 +73,8 @@ | |||
73 | 73 | ||
74 | #define CFE_ERR_NOTREADY -36 | 74 | #define CFE_ERR_NOTREADY -36 |
75 | 75 | ||
76 | #define CFE_ERR_GETMEM -37 | 76 | #define CFE_ERR_GETMEM -37 |
77 | #define CFE_ERR_SETMEM -38 | 77 | #define CFE_ERR_SETMEM -38 |
78 | 78 | ||
79 | #define CFE_ERR_NOTCONN -39 | 79 | #define CFE_ERR_NOTCONN -39 |
80 | #define CFE_ERR_ADDRINUSE -40 | 80 | #define CFE_ERR_ADDRINUSE -40 |
diff --git a/arch/mips/include/asm/gcmpregs.h b/arch/mips/include/asm/gcmpregs.h index c0cf76a2ca89..a7359f77a48e 100644 --- a/arch/mips/include/asm/gcmpregs.h +++ b/arch/mips/include/asm/gcmpregs.h | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | /* GCMP register access */ | 33 | /* GCMP register access */ |
34 | #define GCMPGCB(reg) REGP(_gcmp_base, GCMPGCBOFS(reg)) | 34 | #define GCMPGCB(reg) REGP(_gcmp_base, GCMPGCBOFS(reg)) |
35 | #define GCMPGCBn(reg, n) REGP(_gcmp_base, GCMPGCBOFSn(reg, n)) | 35 | #define GCMPGCBn(reg, n) REGP(_gcmp_base, GCMPGCBOFSn(reg, n)) |
36 | #define GCMPCLCB(reg) REGP(_gcmp_base, GCMPCLCBOFS(reg)) | 36 | #define GCMPCLCB(reg) REGP(_gcmp_base, GCMPCLCBOFS(reg)) |
37 | #define GCMPCOCB(reg) REGP(_gcmp_base, GCMPCOCBOFS(reg)) | 37 | #define GCMPCOCB(reg) REGP(_gcmp_base, GCMPCOCBOFS(reg)) |
38 | #define GCMPGDB(reg) REGP(_gcmp_base, GCMPGDBOFS(reg)) | 38 | #define GCMPGDB(reg) REGP(_gcmp_base, GCMPGDBOFS(reg)) |
@@ -45,76 +45,76 @@ | |||
45 | 45 | ||
46 | /* GCB registers */ | 46 | /* GCB registers */ |
47 | #define GCMP_GCB_GC_OFS 0x0000 /* Global Config Register */ | 47 | #define GCMP_GCB_GC_OFS 0x0000 /* Global Config Register */ |
48 | #define GCMP_GCB_GC_NUMIOCU_SHF 8 | 48 | #define GCMP_GCB_GC_NUMIOCU_SHF 8 |
49 | #define GCMP_GCB_GC_NUMIOCU_MSK GCMPGCBMSK(GC_NUMIOCU, 4) | 49 | #define GCMP_GCB_GC_NUMIOCU_MSK GCMPGCBMSK(GC_NUMIOCU, 4) |
50 | #define GCMP_GCB_GC_NUMCORES_SHF 0 | 50 | #define GCMP_GCB_GC_NUMCORES_SHF 0 |
51 | #define GCMP_GCB_GC_NUMCORES_MSK GCMPGCBMSK(GC_NUMCORES, 8) | 51 | #define GCMP_GCB_GC_NUMCORES_MSK GCMPGCBMSK(GC_NUMCORES, 8) |
52 | #define GCMP_GCB_GCMPB_OFS 0x0008 /* Global GCMP Base */ | 52 | #define GCMP_GCB_GCMPB_OFS 0x0008 /* Global GCMP Base */ |
53 | #define GCMP_GCB_GCMPB_GCMPBASE_SHF 15 | 53 | #define GCMP_GCB_GCMPB_GCMPBASE_SHF 15 |
54 | #define GCMP_GCB_GCMPB_GCMPBASE_MSK GCMPGCBMSK(GCMPB_GCMPBASE, 17) | 54 | #define GCMP_GCB_GCMPB_GCMPBASE_MSK GCMPGCBMSK(GCMPB_GCMPBASE, 17) |
55 | #define GCMP_GCB_GCMPB_CMDEFTGT_SHF 0 | 55 | #define GCMP_GCB_GCMPB_CMDEFTGT_SHF 0 |
56 | #define GCMP_GCB_GCMPB_CMDEFTGT_MSK GCMPGCBMSK(GCMPB_CMDEFTGT, 2) | 56 | #define GCMP_GCB_GCMPB_CMDEFTGT_MSK GCMPGCBMSK(GCMPB_CMDEFTGT, 2) |
57 | #define GCMP_GCB_GCMPB_CMDEFTGT_DISABLED 0 | 57 | #define GCMP_GCB_GCMPB_CMDEFTGT_DISABLED 0 |
58 | #define GCMP_GCB_GCMPB_CMDEFTGT_MEM 1 | 58 | #define GCMP_GCB_GCMPB_CMDEFTGT_MEM 1 |
59 | #define GCMP_GCB_GCMPB_CMDEFTGT_IOCU1 2 | 59 | #define GCMP_GCB_GCMPB_CMDEFTGT_IOCU1 2 |
60 | #define GCMP_GCB_GCMPB_CMDEFTGT_IOCU2 3 | 60 | #define GCMP_GCB_GCMPB_CMDEFTGT_IOCU2 3 |
61 | #define GCMP_GCB_CCMC_OFS 0x0010 /* Global CM Control */ | 61 | #define GCMP_GCB_CCMC_OFS 0x0010 /* Global CM Control */ |
62 | #define GCMP_GCB_GCSRAP_OFS 0x0020 /* Global CSR Access Privilege */ | 62 | #define GCMP_GCB_GCSRAP_OFS 0x0020 /* Global CSR Access Privilege */ |
63 | #define GCMP_GCB_GCSRAP_CMACCESS_SHF 0 | 63 | #define GCMP_GCB_GCSRAP_CMACCESS_SHF 0 |
64 | #define GCMP_GCB_GCSRAP_CMACCESS_MSK GCMPGCBMSK(GCSRAP_CMACCESS, 8) | 64 | #define GCMP_GCB_GCSRAP_CMACCESS_MSK GCMPGCBMSK(GCSRAP_CMACCESS, 8) |
65 | #define GCMP_GCB_GCMPREV_OFS 0x0030 /* GCMP Revision Register */ | 65 | #define GCMP_GCB_GCMPREV_OFS 0x0030 /* GCMP Revision Register */ |
66 | #define GCMP_GCB_GCMEM_OFS 0x0040 /* Global CM Error Mask */ | 66 | #define GCMP_GCB_GCMEM_OFS 0x0040 /* Global CM Error Mask */ |
67 | #define GCMP_GCB_GCMEC_OFS 0x0048 /* Global CM Error Cause */ | 67 | #define GCMP_GCB_GCMEC_OFS 0x0048 /* Global CM Error Cause */ |
68 | #define GCMP_GCB_GMEC_ERROR_TYPE_SHF 27 | 68 | #define GCMP_GCB_GMEC_ERROR_TYPE_SHF 27 |
69 | #define GCMP_GCB_GMEC_ERROR_TYPE_MSK GCMPGCBMSK(GMEC_ERROR_TYPE, 5) | 69 | #define GCMP_GCB_GMEC_ERROR_TYPE_MSK GCMPGCBMSK(GMEC_ERROR_TYPE, 5) |
70 | #define GCMP_GCB_GMEC_ERROR_INFO_SHF 0 | 70 | #define GCMP_GCB_GMEC_ERROR_INFO_SHF 0 |
71 | #define GCMP_GCB_GMEC_ERROR_INFO_MSK GCMPGCBMSK(GMEC_ERROR_INFO, 27) | 71 | #define GCMP_GCB_GMEC_ERROR_INFO_MSK GCMPGCBMSK(GMEC_ERROR_INFO, 27) |
72 | #define GCMP_GCB_GCMEA_OFS 0x0050 /* Global CM Error Address */ | 72 | #define GCMP_GCB_GCMEA_OFS 0x0050 /* Global CM Error Address */ |
73 | #define GCMP_GCB_GCMEO_OFS 0x0058 /* Global CM Error Multiple */ | 73 | #define GCMP_GCB_GCMEO_OFS 0x0058 /* Global CM Error Multiple */ |
74 | #define GCMP_GCB_GMEO_ERROR_2ND_SHF 0 | 74 | #define GCMP_GCB_GMEO_ERROR_2ND_SHF 0 |
75 | #define GCMP_GCB_GMEO_ERROR_2ND_MSK GCMPGCBMSK(GMEO_ERROR_2ND, 5) | 75 | #define GCMP_GCB_GMEO_ERROR_2ND_MSK GCMPGCBMSK(GMEO_ERROR_2ND, 5) |
76 | #define GCMP_GCB_GICBA_OFS 0x0080 /* Global Interrupt Controller Base Address */ | 76 | #define GCMP_GCB_GICBA_OFS 0x0080 /* Global Interrupt Controller Base Address */ |
77 | #define GCMP_GCB_GICBA_BASE_SHF 17 | 77 | #define GCMP_GCB_GICBA_BASE_SHF 17 |
78 | #define GCMP_GCB_GICBA_BASE_MSK GCMPGCBMSK(GICBA_BASE, 15) | 78 | #define GCMP_GCB_GICBA_BASE_MSK GCMPGCBMSK(GICBA_BASE, 15) |
79 | #define GCMP_GCB_GICBA_EN_SHF 0 | 79 | #define GCMP_GCB_GICBA_EN_SHF 0 |
80 | #define GCMP_GCB_GICBA_EN_MSK GCMPGCBMSK(GICBA_EN, 1) | 80 | #define GCMP_GCB_GICBA_EN_MSK GCMPGCBMSK(GICBA_EN, 1) |
81 | 81 | ||
82 | /* GCB Regions */ | 82 | /* GCB Regions */ |
83 | #define GCMP_GCB_CMxBASE_OFS(n) (0x0090+16*(n)) /* Global Region[0-3] Base Address */ | 83 | #define GCMP_GCB_CMxBASE_OFS(n) (0x0090+16*(n)) /* Global Region[0-3] Base Address */ |
84 | #define GCMP_GCB_CMxBASE_BASE_SHF 16 | 84 | #define GCMP_GCB_CMxBASE_BASE_SHF 16 |
85 | #define GCMP_GCB_CMxBASE_BASE_MSK GCMPGCBMSK(CMxBASE_BASE, 16) | 85 | #define GCMP_GCB_CMxBASE_BASE_MSK GCMPGCBMSK(CMxBASE_BASE, 16) |
86 | #define GCMP_GCB_CMxMASK_OFS(n) (0x0098+16*(n)) /* Global Region[0-3] Address Mask */ | 86 | #define GCMP_GCB_CMxMASK_OFS(n) (0x0098+16*(n)) /* Global Region[0-3] Address Mask */ |
87 | #define GCMP_GCB_CMxMASK_MASK_SHF 16 | 87 | #define GCMP_GCB_CMxMASK_MASK_SHF 16 |
88 | #define GCMP_GCB_CMxMASK_MASK_MSK GCMPGCBMSK(CMxMASK_MASK, 16) | 88 | #define GCMP_GCB_CMxMASK_MASK_MSK GCMPGCBMSK(CMxMASK_MASK, 16) |
89 | #define GCMP_GCB_CMxMASK_CMREGTGT_SHF 0 | 89 | #define GCMP_GCB_CMxMASK_CMREGTGT_SHF 0 |
90 | #define GCMP_GCB_CMxMASK_CMREGTGT_MSK GCMPGCBMSK(CMxMASK_CMREGTGT, 2) | 90 | #define GCMP_GCB_CMxMASK_CMREGTGT_MSK GCMPGCBMSK(CMxMASK_CMREGTGT, 2) |
91 | #define GCMP_GCB_CMxMASK_CMREGTGT_MEM 0 | 91 | #define GCMP_GCB_CMxMASK_CMREGTGT_MEM 0 |
92 | #define GCMP_GCB_CMxMASK_CMREGTGT_MEM1 1 | 92 | #define GCMP_GCB_CMxMASK_CMREGTGT_MEM1 1 |
93 | #define GCMP_GCB_CMxMASK_CMREGTGT_IOCU1 2 | 93 | #define GCMP_GCB_CMxMASK_CMREGTGT_IOCU1 2 |
94 | #define GCMP_GCB_CMxMASK_CMREGTGT_IOCU2 3 | 94 | #define GCMP_GCB_CMxMASK_CMREGTGT_IOCU2 3 |
95 | 95 | ||
96 | 96 | ||
97 | /* Core local/Core other control block registers */ | 97 | /* Core local/Core other control block registers */ |
98 | #define GCMP_CCB_RESETR_OFS 0x0000 /* Reset Release */ | 98 | #define GCMP_CCB_RESETR_OFS 0x0000 /* Reset Release */ |
99 | #define GCMP_CCB_RESETR_INRESET_SHF 0 | 99 | #define GCMP_CCB_RESETR_INRESET_SHF 0 |
100 | #define GCMP_CCB_RESETR_INRESET_MSK GCMPCCBMSK(RESETR_INRESET, 16) | 100 | #define GCMP_CCB_RESETR_INRESET_MSK GCMPCCBMSK(RESETR_INRESET, 16) |
101 | #define GCMP_CCB_COHCTL_OFS 0x0008 /* Coherence Control */ | 101 | #define GCMP_CCB_COHCTL_OFS 0x0008 /* Coherence Control */ |
102 | #define GCMP_CCB_COHCTL_DOMAIN_SHF 0 | 102 | #define GCMP_CCB_COHCTL_DOMAIN_SHF 0 |
103 | #define GCMP_CCB_COHCTL_DOMAIN_MSK GCMPCCBMSK(COHCTL_DOMAIN, 8) | 103 | #define GCMP_CCB_COHCTL_DOMAIN_MSK GCMPCCBMSK(COHCTL_DOMAIN, 8) |
104 | #define GCMP_CCB_CFG_OFS 0x0010 /* Config */ | 104 | #define GCMP_CCB_CFG_OFS 0x0010 /* Config */ |
105 | #define GCMP_CCB_CFG_IOCUTYPE_SHF 10 | 105 | #define GCMP_CCB_CFG_IOCUTYPE_SHF 10 |
106 | #define GCMP_CCB_CFG_IOCUTYPE_MSK GCMPCCBMSK(CFG_IOCUTYPE, 2) | 106 | #define GCMP_CCB_CFG_IOCUTYPE_MSK GCMPCCBMSK(CFG_IOCUTYPE, 2) |
107 | #define GCMP_CCB_CFG_IOCUTYPE_CPU 0 | 107 | #define GCMP_CCB_CFG_IOCUTYPE_CPU 0 |
108 | #define GCMP_CCB_CFG_IOCUTYPE_NCIOCU 1 | 108 | #define GCMP_CCB_CFG_IOCUTYPE_NCIOCU 1 |
109 | #define GCMP_CCB_CFG_IOCUTYPE_CIOCU 2 | 109 | #define GCMP_CCB_CFG_IOCUTYPE_CIOCU 2 |
110 | #define GCMP_CCB_CFG_NUMVPE_SHF 0 | 110 | #define GCMP_CCB_CFG_NUMVPE_SHF 0 |
111 | #define GCMP_CCB_CFG_NUMVPE_MSK GCMPCCBMSK(CFG_NUMVPE, 10) | 111 | #define GCMP_CCB_CFG_NUMVPE_MSK GCMPCCBMSK(CFG_NUMVPE, 10) |
112 | #define GCMP_CCB_OTHER_OFS 0x0018 /* Other Address */ | 112 | #define GCMP_CCB_OTHER_OFS 0x0018 /* Other Address */ |
113 | #define GCMP_CCB_OTHER_CORENUM_SHF 16 | 113 | #define GCMP_CCB_OTHER_CORENUM_SHF 16 |
114 | #define GCMP_CCB_OTHER_CORENUM_MSK GCMPCCBMSK(OTHER_CORENUM, 16) | 114 | #define GCMP_CCB_OTHER_CORENUM_MSK GCMPCCBMSK(OTHER_CORENUM, 16) |
115 | #define GCMP_CCB_RESETBASE_OFS 0x0020 /* Reset Exception Base */ | 115 | #define GCMP_CCB_RESETBASE_OFS 0x0020 /* Reset Exception Base */ |
116 | #define GCMP_CCB_RESETBASE_BEV_SHF 12 | 116 | #define GCMP_CCB_RESETBASE_BEV_SHF 12 |
117 | #define GCMP_CCB_RESETBASE_BEV_MSK GCMPCCBMSK(RESETBASE_BEV, 20) | 117 | #define GCMP_CCB_RESETBASE_BEV_MSK GCMPCCBMSK(RESETBASE_BEV, 20) |
118 | #define GCMP_CCB_ID_OFS 0x0028 /* Identification */ | 118 | #define GCMP_CCB_ID_OFS 0x0028 /* Identification */ |
119 | #define GCMP_CCB_DINTGROUP_OFS 0x0030 /* DINT Group Participate */ | 119 | #define GCMP_CCB_DINTGROUP_OFS 0x0030 /* DINT Group Participate */ |
120 | #define GCMP_CCB_DBGGROUP_OFS 0x0100 /* DebugBreak Group */ | 120 | #define GCMP_CCB_DBGGROUP_OFS 0x0100 /* DebugBreak Group */ |
diff --git a/arch/mips/include/asm/gic.h b/arch/mips/include/asm/gic.h index 37620db588be..61b06d7e7de1 100644 --- a/arch/mips/include/asm/gic.h +++ b/arch/mips/include/asm/gic.h | |||
@@ -66,7 +66,7 @@ | |||
66 | 66 | ||
67 | /* Register Map for Shared Section */ | 67 | /* Register Map for Shared Section */ |
68 | 68 | ||
69 | #define GIC_SH_CONFIG_OFS 0x0000 | 69 | #define GIC_SH_CONFIG_OFS 0x0000 |
70 | 70 | ||
71 | /* Shared Global Counter */ | 71 | /* Shared Global Counter */ |
72 | #define GIC_SH_COUNTER_31_00_OFS 0x0010 | 72 | #define GIC_SH_COUNTER_31_00_OFS 0x0010 |
@@ -146,13 +146,13 @@ | |||
146 | #define GIC_SH_PEND_223_192_OFS 0x0498 | 146 | #define GIC_SH_PEND_223_192_OFS 0x0498 |
147 | #define GIC_SH_PEND_255_224_OFS 0x049c | 147 | #define GIC_SH_PEND_255_224_OFS 0x049c |
148 | 148 | ||
149 | #define GIC_SH_INTR_MAP_TO_PIN_BASE_OFS 0x0500 | 149 | #define GIC_SH_INTR_MAP_TO_PIN_BASE_OFS 0x0500 |
150 | 150 | ||
151 | /* Maps Interrupt X to a Pin */ | 151 | /* Maps Interrupt X to a Pin */ |
152 | #define GIC_SH_MAP_TO_PIN(intr) \ | 152 | #define GIC_SH_MAP_TO_PIN(intr) \ |
153 | (GIC_SH_INTR_MAP_TO_PIN_BASE_OFS + (4 * intr)) | 153 | (GIC_SH_INTR_MAP_TO_PIN_BASE_OFS + (4 * intr)) |
154 | 154 | ||
155 | #define GIC_SH_INTR_MAP_TO_VPE_BASE_OFS 0x2000 | 155 | #define GIC_SH_INTR_MAP_TO_VPE_BASE_OFS 0x2000 |
156 | 156 | ||
157 | /* Maps Interrupt X to a VPE */ | 157 | /* Maps Interrupt X to a VPE */ |
158 | #define GIC_SH_MAP_TO_VPE_REG_OFF(intr, vpe) \ | 158 | #define GIC_SH_MAP_TO_VPE_REG_OFF(intr, vpe) \ |
@@ -326,7 +326,7 @@ struct gic_intr_map { | |||
326 | unsigned int polarity; /* Polarity : +/- */ | 326 | unsigned int polarity; /* Polarity : +/- */ |
327 | unsigned int trigtype; /* Trigger : Edge/Levl */ | 327 | unsigned int trigtype; /* Trigger : Edge/Levl */ |
328 | unsigned int flags; /* Misc flags */ | 328 | unsigned int flags; /* Misc flags */ |
329 | #define GIC_FLAG_IPI 0x01 | 329 | #define GIC_FLAG_IPI 0x01 |
330 | #define GIC_FLAG_TRANSPARENT 0x02 | 330 | #define GIC_FLAG_TRANSPARENT 0x02 |
331 | }; | 331 | }; |
332 | 332 | ||
@@ -343,10 +343,10 @@ struct gic_shared_intr_map { | |||
343 | 343 | ||
344 | /* GIC nomenclature for Core Interrupt Pins. */ | 344 | /* GIC nomenclature for Core Interrupt Pins. */ |
345 | #define GIC_CPU_INT0 0 /* Core Interrupt 2 */ | 345 | #define GIC_CPU_INT0 0 /* Core Interrupt 2 */ |
346 | #define GIC_CPU_INT1 1 /* . */ | 346 | #define GIC_CPU_INT1 1 /* . */ |
347 | #define GIC_CPU_INT2 2 /* . */ | 347 | #define GIC_CPU_INT2 2 /* . */ |
348 | #define GIC_CPU_INT3 3 /* . */ | 348 | #define GIC_CPU_INT3 3 /* . */ |
349 | #define GIC_CPU_INT4 4 /* . */ | 349 | #define GIC_CPU_INT4 4 /* . */ |
350 | #define GIC_CPU_INT5 5 /* Core Interrupt 5 */ | 350 | #define GIC_CPU_INT5 5 /* Core Interrupt 5 */ |
351 | 351 | ||
352 | /* Local GIC interrupts. */ | 352 | /* Local GIC interrupts. */ |
diff --git a/arch/mips/include/asm/gio_device.h b/arch/mips/include/asm/gio_device.h index 5437c84664bf..0878701712f8 100644 --- a/arch/mips/include/asm/gio_device.h +++ b/arch/mips/include/asm/gio_device.h | |||
@@ -6,15 +6,15 @@ struct gio_device_id { | |||
6 | }; | 6 | }; |
7 | 7 | ||
8 | struct gio_device { | 8 | struct gio_device { |
9 | struct device dev; | 9 | struct device dev; |
10 | struct resource resource; | 10 | struct resource resource; |
11 | unsigned int irq; | 11 | unsigned int irq; |
12 | unsigned int slotno; | 12 | unsigned int slotno; |
13 | 13 | ||
14 | const char *name; | 14 | const char *name; |
15 | struct gio_device_id id; | 15 | struct gio_device_id id; |
16 | unsigned id32:1; | 16 | unsigned id32:1; |
17 | unsigned gio64:1; | 17 | unsigned gio64:1; |
18 | }; | 18 | }; |
19 | #define to_gio_device(d) container_of(d, struct gio_device, dev) | 19 | #define to_gio_device(d) container_of(d, struct gio_device, dev) |
20 | 20 | ||
@@ -50,7 +50,7 @@ static inline void gio_device_free(struct gio_device *dev) | |||
50 | extern int gio_register_driver(struct gio_driver *); | 50 | extern int gio_register_driver(struct gio_driver *); |
51 | extern void gio_unregister_driver(struct gio_driver *); | 51 | extern void gio_unregister_driver(struct gio_driver *); |
52 | 52 | ||
53 | #define gio_get_drvdata(_dev) drv_get_drvdata(&(_dev)->dev) | 53 | #define gio_get_drvdata(_dev) drv_get_drvdata(&(_dev)->dev) |
54 | #define gio_set_drvdata(_dev, data) drv_set_drvdata(&(_dev)->dev, (data)) | 54 | #define gio_set_drvdata(_dev, data) drv_set_drvdata(&(_dev)->dev, (data)) |
55 | 55 | ||
56 | extern void gio_set_master(struct gio_device *); | 56 | extern void gio_set_master(struct gio_device *); |
diff --git a/arch/mips/include/asm/gt64120.h b/arch/mips/include/asm/gt64120.h index 0aa44abc77fe..2e72abb9440e 100644 --- a/arch/mips/include/asm/gt64120.h +++ b/arch/mips/include/asm/gt64120.h | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #define GT_MULTI_OFS 0x120 | 35 | #define GT_MULTI_OFS 0x120 |
36 | 36 | ||
37 | /* CPU Address Decode. */ | 37 | /* CPU Address Decode. */ |
38 | #define GT_SCS10LD_OFS 0x008 | 38 | #define GT_SCS10LD_OFS 0x008 |
39 | #define GT_SCS10HD_OFS 0x010 | 39 | #define GT_SCS10HD_OFS 0x010 |
40 | #define GT_SCS32LD_OFS 0x018 | 40 | #define GT_SCS32LD_OFS 0x018 |
@@ -106,12 +106,12 @@ | |||
106 | 106 | ||
107 | #define GT_ADERR_OFS 0x470 | 107 | #define GT_ADERR_OFS 0x470 |
108 | 108 | ||
109 | /* SDRAM Configuration. */ | 109 | /* SDRAM Configuration. */ |
110 | #define GT_SDRAM_CFG_OFS 0x448 | 110 | #define GT_SDRAM_CFG_OFS 0x448 |
111 | 111 | ||
112 | #define GT_SDRAM_OPMODE_OFS 0x474 | 112 | #define GT_SDRAM_OPMODE_OFS 0x474 |
113 | #define GT_SDRAM_BM_OFS 0x478 | 113 | #define GT_SDRAM_BM_OFS 0x478 |
114 | #define GT_SDRAM_ADDRDECODE_OFS 0x47c | 114 | #define GT_SDRAM_ADDRDECODE_OFS 0x47c |
115 | 115 | ||
116 | /* SDRAM Parameters. */ | 116 | /* SDRAM Parameters. */ |
117 | #define GT_SDRAM_B0_OFS 0x44c | 117 | #define GT_SDRAM_B0_OFS 0x44c |
@@ -126,14 +126,14 @@ | |||
126 | #define GT_DEV_B3_OFS 0x468 | 126 | #define GT_DEV_B3_OFS 0x468 |
127 | #define GT_DEV_BOOT_OFS 0x46c | 127 | #define GT_DEV_BOOT_OFS 0x46c |
128 | 128 | ||
129 | /* ECC. */ | 129 | /* ECC. */ |
130 | #define GT_ECC_ERRDATALO 0x480 /* GT-64120A only */ | 130 | #define GT_ECC_ERRDATALO 0x480 /* GT-64120A only */ |
131 | #define GT_ECC_ERRDATAHI 0x484 /* GT-64120A only */ | 131 | #define GT_ECC_ERRDATAHI 0x484 /* GT-64120A only */ |
132 | #define GT_ECC_MEM 0x488 /* GT-64120A only */ | 132 | #define GT_ECC_MEM 0x488 /* GT-64120A only */ |
133 | #define GT_ECC_CALC 0x48c /* GT-64120A only */ | 133 | #define GT_ECC_CALC 0x48c /* GT-64120A only */ |
134 | #define GT_ECC_ERRADDR 0x490 /* GT-64120A only */ | 134 | #define GT_ECC_ERRADDR 0x490 /* GT-64120A only */ |
135 | 135 | ||
136 | /* DMA Record. */ | 136 | /* DMA Record. */ |
137 | #define GT_DMA0_CNT_OFS 0x800 | 137 | #define GT_DMA0_CNT_OFS 0x800 |
138 | #define GT_DMA1_CNT_OFS 0x804 | 138 | #define GT_DMA1_CNT_OFS 0x804 |
139 | #define GT_DMA2_CNT_OFS 0x808 | 139 | #define GT_DMA2_CNT_OFS 0x808 |
@@ -156,13 +156,13 @@ | |||
156 | #define GT_DMA2_CUR_OFS 0x878 | 156 | #define GT_DMA2_CUR_OFS 0x878 |
157 | #define GT_DMA3_CUR_OFS 0x87c | 157 | #define GT_DMA3_CUR_OFS 0x87c |
158 | 158 | ||
159 | /* DMA Channel Control. */ | 159 | /* DMA Channel Control. */ |
160 | #define GT_DMA0_CTRL_OFS 0x840 | 160 | #define GT_DMA0_CTRL_OFS 0x840 |
161 | #define GT_DMA1_CTRL_OFS 0x844 | 161 | #define GT_DMA1_CTRL_OFS 0x844 |
162 | #define GT_DMA2_CTRL_OFS 0x848 | 162 | #define GT_DMA2_CTRL_OFS 0x848 |
163 | #define GT_DMA3_CTRL_OFS 0x84c | 163 | #define GT_DMA3_CTRL_OFS 0x84c |
164 | 164 | ||
165 | /* DMA Arbiter. */ | 165 | /* DMA Arbiter. */ |
166 | #define GT_DMA_ARB_OFS 0x860 | 166 | #define GT_DMA_ARB_OFS 0x860 |
167 | 167 | ||
168 | /* Timer/Counter. */ | 168 | /* Timer/Counter. */ |
@@ -220,7 +220,7 @@ | |||
220 | #define GT_PCI0_CFGADDR_OFS 0xcf8 | 220 | #define GT_PCI0_CFGADDR_OFS 0xcf8 |
221 | #define GT_PCI0_CFGDATA_OFS 0xcfc | 221 | #define GT_PCI0_CFGDATA_OFS 0xcfc |
222 | 222 | ||
223 | /* Interrupts. */ | 223 | /* Interrupts. */ |
224 | #define GT_INTRCAUSE_OFS 0xc18 | 224 | #define GT_INTRCAUSE_OFS 0xc18 |
225 | #define GT_INTRMASK_OFS 0xc1c | 225 | #define GT_INTRMASK_OFS 0xc1c |
226 | 226 | ||
@@ -547,15 +547,15 @@ | |||
547 | #define GT_DEF_BASE 0x14000000UL | 547 | #define GT_DEF_BASE 0x14000000UL |
548 | 548 | ||
549 | #define GT_MAX_BANKSIZE (256 * 1024 * 1024) /* Max 256MB bank */ | 549 | #define GT_MAX_BANKSIZE (256 * 1024 * 1024) /* Max 256MB bank */ |
550 | #define GT_LATTIM_MIN 6 /* Minimum lat */ | 550 | #define GT_LATTIM_MIN 6 /* Minimum lat */ |
551 | 551 | ||
552 | /* | 552 | /* |
553 | * The gt64120_dep.h file must define the following macros | 553 | * The gt64120_dep.h file must define the following macros |
554 | * | 554 | * |
555 | * GT_READ(ofs, data_pointer) | 555 | * GT_READ(ofs, data_pointer) |
556 | * GT_WRITE(ofs, data) - read/write GT64120 registers in 32bit | 556 | * GT_WRITE(ofs, data) - read/write GT64120 registers in 32bit |
557 | * | 557 | * |
558 | * TIMER - gt64120 timer irq, temporary solution until | 558 | * TIMER - gt64120 timer irq, temporary solution until |
559 | * full gt64120 cascade interrupt support is in place | 559 | * full gt64120 cascade interrupt support is in place |
560 | */ | 560 | */ |
561 | 561 | ||
diff --git a/arch/mips/include/asm/hazards.h b/arch/mips/include/asm/hazards.h index f0324e92d089..568544b6e856 100644 --- a/arch/mips/include/asm/hazards.h +++ b/arch/mips/include/asm/hazards.h | |||
@@ -25,7 +25,7 @@ static inline void name(void) \ | |||
25 | } | 25 | } |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * MIPS R2 instruction hazard barrier. Needs to be called as a subroutine. | 28 | * MIPS R2 instruction hazard barrier. Needs to be called as a subroutine. |
29 | */ | 29 | */ |
30 | extern void mips_ihb(void); | 30 | extern void mips_ihb(void); |
31 | 31 | ||
@@ -68,7 +68,7 @@ ASMMACRO(back_to_back_c0_hazard, | |||
68 | ) | 68 | ) |
69 | /* | 69 | /* |
70 | * gcc has a tradition of misscompiling the previous construct using the | 70 | * gcc has a tradition of misscompiling the previous construct using the |
71 | * address of a label as argument to inline assembler. Gas otoh has the | 71 | * address of a label as argument to inline assembler. Gas otoh has the |
72 | * annoying difference between la and dla which are only usable for 32-bit | 72 | * annoying difference between la and dla which are only usable for 32-bit |
73 | * rsp. 64-bit code, so can't be used without conditional compilation. | 73 | * rsp. 64-bit code, so can't be used without conditional compilation. |
74 | * The alterantive is switching the assembler to 64-bit code which happens | 74 | * The alterantive is switching the assembler to 64-bit code which happens |
@@ -114,7 +114,7 @@ ASMMACRO(back_to_back_c0_hazard, | |||
114 | ) | 114 | ) |
115 | /* | 115 | /* |
116 | * gcc has a tradition of misscompiling the previous construct using the | 116 | * gcc has a tradition of misscompiling the previous construct using the |
117 | * address of a label as argument to inline assembler. Gas otoh has the | 117 | * address of a label as argument to inline assembler. Gas otoh has the |
118 | * annoying difference between la and dla which are only usable for 32-bit | 118 | * annoying difference between la and dla which are only usable for 32-bit |
119 | * rsp. 64-bit code, so can't be used without conditional compilation. | 119 | * rsp. 64-bit code, so can't be used without conditional compilation. |
120 | * The alterantive is switching the assembler to 64-bit code which happens | 120 | * The alterantive is switching the assembler to 64-bit code which happens |
diff --git a/arch/mips/include/asm/highmem.h b/arch/mips/include/asm/highmem.h index 2d91888c9b74..b0dd0c84df70 100644 --- a/arch/mips/include/asm/highmem.h +++ b/arch/mips/include/asm/highmem.h | |||
@@ -39,8 +39,8 @@ extern pte_t *pkmap_page_table; | |||
39 | */ | 39 | */ |
40 | #define LAST_PKMAP 1024 | 40 | #define LAST_PKMAP 1024 |
41 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) | 41 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) |
42 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) | 42 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) |
43 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) | 43 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) |
44 | 44 | ||
45 | extern void * kmap_high(struct page *page); | 45 | extern void * kmap_high(struct page *page); |
46 | extern void kunmap_high(struct page *page); | 46 | extern void kunmap_high(struct page *page); |
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index ff2e0345e013..1be13727323f 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 1994 - 2000, 06 Ralf Baechle | 7 | * Copyright (C) 1994 - 2000, 06 Ralf Baechle |
8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
9 | * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved. | 9 | * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved. |
10 | * Author: Maciej W. Rozycki <macro@mips.com> | 10 | * Author: Maciej W. Rozycki <macro@mips.com> |
11 | */ | 11 | */ |
12 | #ifndef _ASM_IO_H | 12 | #ifndef _ASM_IO_H |
13 | #define _ASM_IO_H | 13 | #define _ASM_IO_H |
@@ -253,9 +253,9 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
253 | __ioremap_mode((offset), (size), _CACHE_UNCACHED) | 253 | __ioremap_mode((offset), (size), _CACHE_UNCACHED) |
254 | 254 | ||
255 | /* | 255 | /* |
256 | * ioremap_cachable - map bus memory into CPU space | 256 | * ioremap_cachable - map bus memory into CPU space |
257 | * @offset: bus address of the memory | 257 | * @offset: bus address of the memory |
258 | * @size: size of the resource to map | 258 | * @size: size of the resource to map |
259 | * | 259 | * |
260 | * ioremap_nocache performs a platform specific sequence of operations to | 260 | * ioremap_nocache performs a platform specific sequence of operations to |
261 | * make bus memory CPU accessible via the readb/readw/readl/writeb/ | 261 | * make bus memory CPU accessible via the readb/readw/readl/writeb/ |
@@ -264,14 +264,14 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
264 | * address. | 264 | * address. |
265 | * | 265 | * |
266 | * This version of ioremap ensures that the memory is marked cachable by | 266 | * This version of ioremap ensures that the memory is marked cachable by |
267 | * the CPU. Also enables full write-combining. Useful for some | 267 | * the CPU. Also enables full write-combining. Useful for some |
268 | * memory-like regions on I/O busses. | 268 | * memory-like regions on I/O busses. |
269 | */ | 269 | */ |
270 | #define ioremap_cachable(offset, size) \ | 270 | #define ioremap_cachable(offset, size) \ |
271 | __ioremap_mode((offset), (size), _page_cachable_default) | 271 | __ioremap_mode((offset), (size), _page_cachable_default) |
272 | 272 | ||
273 | /* | 273 | /* |
274 | * These two are MIPS specific ioremap variant. ioremap_cacheable_cow | 274 | * These two are MIPS specific ioremap variant. ioremap_cacheable_cow |
275 | * requests a cachable mapping, ioremap_uncached_accelerated requests a | 275 | * requests a cachable mapping, ioremap_uncached_accelerated requests a |
276 | * mapping using the uncached accelerated mode which isn't supported on | 276 | * mapping using the uncached accelerated mode which isn't supported on |
277 | * all processors. | 277 | * all processors. |
@@ -298,7 +298,7 @@ static inline void iounmap(const volatile void __iomem *addr) | |||
298 | } | 298 | } |
299 | 299 | ||
300 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | 300 | #ifdef CONFIG_CPU_CAVIUM_OCTEON |
301 | #define war_octeon_io_reorder_wmb() wmb() | 301 | #define war_octeon_io_reorder_wmb() wmb() |
302 | #else | 302 | #else |
303 | #define war_octeon_io_reorder_wmb() do { } while (0) | 303 | #define war_octeon_io_reorder_wmb() do { } while (0) |
304 | #endif | 304 | #endif |
@@ -317,7 +317,7 @@ static inline void pfx##write##bwlq(type val, \ | |||
317 | \ | 317 | \ |
318 | __val = pfx##ioswab##bwlq(__mem, val); \ | 318 | __val = pfx##ioswab##bwlq(__mem, val); \ |
319 | \ | 319 | \ |
320 | if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ | 320 | if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ |
321 | *__mem = __val; \ | 321 | *__mem = __val; \ |
322 | else if (cpu_has_64bits) { \ | 322 | else if (cpu_has_64bits) { \ |
323 | unsigned long __flags; \ | 323 | unsigned long __flags; \ |
@@ -327,9 +327,9 @@ static inline void pfx##write##bwlq(type val, \ | |||
327 | local_irq_save(__flags); \ | 327 | local_irq_save(__flags); \ |
328 | __asm__ __volatile__( \ | 328 | __asm__ __volatile__( \ |
329 | ".set mips3" "\t\t# __writeq""\n\t" \ | 329 | ".set mips3" "\t\t# __writeq""\n\t" \ |
330 | "dsll32 %L0, %L0, 0" "\n\t" \ | 330 | "dsll32 %L0, %L0, 0" "\n\t" \ |
331 | "dsrl32 %L0, %L0, 0" "\n\t" \ | 331 | "dsrl32 %L0, %L0, 0" "\n\t" \ |
332 | "dsll32 %M0, %M0, 0" "\n\t" \ | 332 | "dsll32 %M0, %M0, 0" "\n\t" \ |
333 | "or %L0, %L0, %M0" "\n\t" \ | 333 | "or %L0, %L0, %M0" "\n\t" \ |
334 | "sd %L0, %2" "\n\t" \ | 334 | "sd %L0, %2" "\n\t" \ |
335 | ".set mips0" "\n" \ | 335 | ".set mips0" "\n" \ |
@@ -348,7 +348,7 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ | |||
348 | \ | 348 | \ |
349 | __mem = (void *)__swizzle_addr_##bwlq((unsigned long)(mem)); \ | 349 | __mem = (void *)__swizzle_addr_##bwlq((unsigned long)(mem)); \ |
350 | \ | 350 | \ |
351 | if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ | 351 | if (sizeof(type) != sizeof(u64) || sizeof(u64) == sizeof(long)) \ |
352 | __val = *__mem; \ | 352 | __val = *__mem; \ |
353 | else if (cpu_has_64bits) { \ | 353 | else if (cpu_has_64bits) { \ |
354 | unsigned long __flags; \ | 354 | unsigned long __flags; \ |
@@ -356,9 +356,9 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ | |||
356 | if (irq) \ | 356 | if (irq) \ |
357 | local_irq_save(__flags); \ | 357 | local_irq_save(__flags); \ |
358 | __asm__ __volatile__( \ | 358 | __asm__ __volatile__( \ |
359 | ".set mips3" "\t\t# __readq" "\n\t" \ | 359 | ".set mips3" "\t\t# __readq" "\n\t" \ |
360 | "ld %L0, %1" "\n\t" \ | 360 | "ld %L0, %1" "\n\t" \ |
361 | "dsra32 %M0, %L0, 0" "\n\t" \ | 361 | "dsra32 %M0, %L0, 0" "\n\t" \ |
362 | "sll %L0, %L0, 0" "\n\t" \ | 362 | "sll %L0, %L0, 0" "\n\t" \ |
363 | ".set mips0" "\n" \ | 363 | ".set mips0" "\n" \ |
364 | : "=r" (__val) \ | 364 | : "=r" (__val) \ |
@@ -586,7 +586,7 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size); | |||
586 | 586 | ||
587 | #else /* Sane hardware */ | 587 | #else /* Sane hardware */ |
588 | 588 | ||
589 | #define dma_cache_wback_inv(start,size) \ | 589 | #define dma_cache_wback_inv(start,size) \ |
590 | do { (void) (start); (void) (size); } while (0) | 590 | do { (void) (start); (void) (size); } while (0) |
591 | #define dma_cache_wback(start,size) \ | 591 | #define dma_cache_wback(start,size) \ |
592 | do { (void) (start); (void) (size); } while (0) | 592 | do { (void) (start); (void) (size); } while (0) |
diff --git a/arch/mips/include/asm/ip32/crime.h b/arch/mips/include/asm/ip32/crime.h index 7c36b0e5b1c6..16c94a27beba 100644 --- a/arch/mips/include/asm/ip32/crime.h +++ b/arch/mips/include/asm/ip32/crime.h | |||
@@ -74,7 +74,7 @@ struct sgi_crime { | |||
74 | #define CRIME_RE_IDLE_E_INT BIT(24) | 74 | #define CRIME_RE_IDLE_E_INT BIT(24) |
75 | #define CRIME_RE_EMPTY_L_INT BIT(25) | 75 | #define CRIME_RE_EMPTY_L_INT BIT(25) |
76 | #define CRIME_RE_FULL_L_INT BIT(26) | 76 | #define CRIME_RE_FULL_L_INT BIT(26) |
77 | #define CRIME_RE_IDLE_L_INT BIT(27) | 77 | #define CRIME_RE_IDLE_L_INT BIT(27) |
78 | #define CRIME_SOFT0_INT BIT(28) | 78 | #define CRIME_SOFT0_INT BIT(28) |
79 | #define CRIME_SOFT1_INT BIT(29) | 79 | #define CRIME_SOFT1_INT BIT(29) |
80 | #define CRIME_SOFT2_INT BIT(30) | 80 | #define CRIME_SOFT2_INT BIT(30) |
@@ -118,7 +118,7 @@ struct sgi_crime { | |||
118 | #define CRIME_MEM_REF_COUNTER_MASK 0x3ff /* 10bit */ | 118 | #define CRIME_MEM_REF_COUNTER_MASK 0x3ff /* 10bit */ |
119 | 119 | ||
120 | volatile unsigned long mem_error_stat; | 120 | volatile unsigned long mem_error_stat; |
121 | #define CRIME_MEM_ERROR_STAT_MASK 0x0ff7ffff /* 28-bit register */ | 121 | #define CRIME_MEM_ERROR_STAT_MASK 0x0ff7ffff /* 28-bit register */ |
122 | #define CRIME_MEM_ERROR_MACE_ID 0x0000007f | 122 | #define CRIME_MEM_ERROR_MACE_ID 0x0000007f |
123 | #define CRIME_MEM_ERROR_MACE_ACCESS 0x00000080 | 123 | #define CRIME_MEM_ERROR_MACE_ACCESS 0x00000080 |
124 | #define CRIME_MEM_ERROR_RE_ID 0x00007f00 | 124 | #define CRIME_MEM_ERROR_RE_ID 0x00007f00 |
@@ -134,8 +134,8 @@ struct sgi_crime { | |||
134 | #define CRIME_MEM_ERROR_MEM_ECC_RD 0x00800000 | 134 | #define CRIME_MEM_ERROR_MEM_ECC_RD 0x00800000 |
135 | #define CRIME_MEM_ERROR_MEM_ECC_RMW 0x01000000 | 135 | #define CRIME_MEM_ERROR_MEM_ECC_RMW 0x01000000 |
136 | #define CRIME_MEM_ERROR_INV 0x0e000000 | 136 | #define CRIME_MEM_ERROR_INV 0x0e000000 |
137 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_RD 0x02000000 | 137 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_RD 0x02000000 |
138 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_WR 0x04000000 | 138 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_WR 0x04000000 |
139 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_RMW 0x08000000 | 139 | #define CRIME_MEM_ERROR_INV_MEM_ADDR_RMW 0x08000000 |
140 | 140 | ||
141 | volatile unsigned long mem_error_addr; | 141 | volatile unsigned long mem_error_addr; |
diff --git a/arch/mips/include/asm/ip32/ip32_ints.h b/arch/mips/include/asm/ip32/ip32_ints.h index 85bc5302bce0..72e3368de111 100644 --- a/arch/mips/include/asm/ip32/ip32_ints.h +++ b/arch/mips/include/asm/ip32/ip32_ints.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | /* | 14 | /* |
15 | * This list reflects the assignment of interrupt numbers to | 15 | * This list reflects the assignment of interrupt numbers to |
16 | * interrupting events. Order is fairly irrelevant to handling | 16 | * interrupting events. Order is fairly irrelevant to handling |
17 | * priority. This differs from irix. | 17 | * priority. This differs from irix. |
18 | */ | 18 | */ |
19 | 19 | ||
diff --git a/arch/mips/include/asm/ip32/mace.h b/arch/mips/include/asm/ip32/mace.h index c523123df380..253ed7ea80be 100644 --- a/arch/mips/include/asm/ip32/mace.h +++ b/arch/mips/include/asm/ip32/mace.h | |||
@@ -250,12 +250,12 @@ struct mace_ps2 { | |||
250 | * -> drivers/i2c/algos/i2c-algo-sgi.c */ | 250 | * -> drivers/i2c/algos/i2c-algo-sgi.c */ |
251 | struct mace_i2c { | 251 | struct mace_i2c { |
252 | volatile unsigned long config; | 252 | volatile unsigned long config; |
253 | #define MACEI2C_RESET BIT(0) | 253 | #define MACEI2C_RESET BIT(0) |
254 | #define MACEI2C_FAST BIT(1) | 254 | #define MACEI2C_FAST BIT(1) |
255 | #define MACEI2C_DATA_OVERRIDE BIT(2) | 255 | #define MACEI2C_DATA_OVERRIDE BIT(2) |
256 | #define MACEI2C_CLOCK_OVERRIDE BIT(3) | 256 | #define MACEI2C_CLOCK_OVERRIDE BIT(3) |
257 | #define MACEI2C_DATA_STATUS BIT(4) | 257 | #define MACEI2C_DATA_STATUS BIT(4) |
258 | #define MACEI2C_CLOCK_STATUS BIT(5) | 258 | #define MACEI2C_CLOCK_STATUS BIT(5) |
259 | volatile unsigned long control; | 259 | volatile unsigned long control; |
260 | volatile unsigned long data; | 260 | volatile unsigned long data; |
261 | }; | 261 | }; |
diff --git a/arch/mips/include/asm/irq.h b/arch/mips/include/asm/irq.h index 78dbb8a86da2..7bc2cdb35057 100644 --- a/arch/mips/include/asm/irq.h +++ b/arch/mips/include/asm/irq.h | |||
@@ -32,7 +32,7 @@ struct irqaction; | |||
32 | 32 | ||
33 | extern unsigned long irq_hwmask[]; | 33 | extern unsigned long irq_hwmask[]; |
34 | extern int setup_irq_smtc(unsigned int irq, struct irqaction * new, | 34 | extern int setup_irq_smtc(unsigned int irq, struct irqaction * new, |
35 | unsigned long hwmask); | 35 | unsigned long hwmask); |
36 | 36 | ||
37 | static inline void smtc_im_ack_irq(unsigned int irq) | 37 | static inline void smtc_im_ack_irq(unsigned int irq) |
38 | { | 38 | { |
@@ -60,7 +60,7 @@ extern void smtc_forward_irq(struct irq_data *d); | |||
60 | * if option is enabled. | 60 | * if option is enabled. |
61 | * | 61 | * |
62 | * Up through Linux 2.6.22 (at least) cpumask operations are very | 62 | * Up through Linux 2.6.22 (at least) cpumask operations are very |
63 | * inefficient on MIPS. Initial prototypes of SMTC IRQ affinity | 63 | * inefficient on MIPS. Initial prototypes of SMTC IRQ affinity |
64 | * used a "fast path" per-IRQ-descriptor cache of affinity information | 64 | * used a "fast path" per-IRQ-descriptor cache of affinity information |
65 | * to reduce latency. As there is a project afoot to optimize the | 65 | * to reduce latency. As there is a project afoot to optimize the |
66 | * cpumask implementations, this version is optimistically assuming | 66 | * cpumask implementations, this version is optimistically assuming |
@@ -133,7 +133,7 @@ extern void free_irqno(unsigned int irq); | |||
133 | 133 | ||
134 | /* | 134 | /* |
135 | * Before R2 the timer and performance counter interrupts were both fixed to | 135 | * Before R2 the timer and performance counter interrupts were both fixed to |
136 | * IE7. Since R2 their number has to be read from the c0_intctl register. | 136 | * IE7. Since R2 their number has to be read from the c0_intctl register. |
137 | */ | 137 | */ |
138 | #define CP0_LEGACY_COMPARE_IRQ 7 | 138 | #define CP0_LEGACY_COMPARE_IRQ 7 |
139 | #define CP0_LEGACY_PERFCNT_IRQ 7 | 139 | #define CP0_LEGACY_PERFCNT_IRQ 7 |
diff --git a/arch/mips/include/asm/isadep.h b/arch/mips/include/asm/isadep.h index 24c6cda79377..b4af6eb24ab9 100644 --- a/arch/mips/include/asm/isadep.h +++ b/arch/mips/include/asm/isadep.h | |||
@@ -18,7 +18,7 @@ | |||
18 | * kernel or user mode? (CP0_STATUS) | 18 | * kernel or user mode? (CP0_STATUS) |
19 | */ | 19 | */ |
20 | #define KU_MASK 0x08 | 20 | #define KU_MASK 0x08 |
21 | #define KU_USER 0x08 | 21 | #define KU_USER 0x08 |
22 | #define KU_KERN 0x00 | 22 | #define KU_KERN 0x00 |
23 | 23 | ||
24 | #else | 24 | #else |
@@ -26,7 +26,7 @@ | |||
26 | * kernel or user mode? | 26 | * kernel or user mode? |
27 | */ | 27 | */ |
28 | #define KU_MASK 0x18 | 28 | #define KU_MASK 0x18 |
29 | #define KU_USER 0x10 | 29 | #define KU_USER 0x10 |
30 | #define KU_KERN 0x00 | 30 | #define KU_KERN 0x00 |
31 | 31 | ||
32 | #endif | 32 | #endif |
diff --git a/arch/mips/include/asm/jazz.h b/arch/mips/include/asm/jazz.h index 83f449dec95e..a61970d01a81 100644 --- a/arch/mips/include/asm/jazz.h +++ b/arch/mips/include/asm/jazz.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * instead of 0xe0000000. | 16 | * instead of 0xe0000000. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #define JAZZ_LOCAL_IO_SPACE 0xe0000000 | 19 | #define JAZZ_LOCAL_IO_SPACE 0xe0000000 |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Revision numbers in PICA_ASIC_REVISION | 22 | * Revision numbers in PICA_ASIC_REVISION |
@@ -25,24 +25,24 @@ | |||
25 | * 0xf0000001 - Rev2 | 25 | * 0xf0000001 - Rev2 |
26 | * 0xf0000002 - Rev3 | 26 | * 0xf0000002 - Rev3 |
27 | */ | 27 | */ |
28 | #define PICA_ASIC_REVISION 0xe0000008 | 28 | #define PICA_ASIC_REVISION 0xe0000008 |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * The segments of the seven segment LED are mapped | 31 | * The segments of the seven segment LED are mapped |
32 | * to the control bits as follows: | 32 | * to the control bits as follows: |
33 | * | 33 | * |
34 | * (7) | 34 | * (7) |
35 | * --------- | 35 | * --------- |
36 | * | | | 36 | * | | |
37 | * (2) | | (6) | 37 | * (2) | | (6) |
38 | * | (1) | | 38 | * | (1) | |
39 | * --------- | 39 | * --------- |
40 | * | | | 40 | * | | |
41 | * (3) | | (5) | 41 | * (3) | | (5) |
42 | * | (4) | | 42 | * | (4) | |
43 | * --------- . (0) | 43 | * --------- . (0) |
44 | */ | 44 | */ |
45 | #define PICA_LED 0xe000f000 | 45 | #define PICA_LED 0xe000f000 |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Some characters for the LED control registers | 48 | * Some characters for the LED control registers |
@@ -51,24 +51,24 @@ | |||
51 | * control each of the seven segments and the dot independently. | 51 | * control each of the seven segments and the dot independently. |
52 | * It's only a toy, anyway... | 52 | * It's only a toy, anyway... |
53 | */ | 53 | */ |
54 | #define LED_DOT 0x01 | 54 | #define LED_DOT 0x01 |
55 | #define LED_SPACE 0x00 | 55 | #define LED_SPACE 0x00 |
56 | #define LED_0 0xfc | 56 | #define LED_0 0xfc |
57 | #define LED_1 0x60 | 57 | #define LED_1 0x60 |
58 | #define LED_2 0xda | 58 | #define LED_2 0xda |
59 | #define LED_3 0xf2 | 59 | #define LED_3 0xf2 |
60 | #define LED_4 0x66 | 60 | #define LED_4 0x66 |
61 | #define LED_5 0xb6 | 61 | #define LED_5 0xb6 |
62 | #define LED_6 0xbe | 62 | #define LED_6 0xbe |
63 | #define LED_7 0xe0 | 63 | #define LED_7 0xe0 |
64 | #define LED_8 0xfe | 64 | #define LED_8 0xfe |
65 | #define LED_9 0xf6 | 65 | #define LED_9 0xf6 |
66 | #define LED_A 0xee | 66 | #define LED_A 0xee |
67 | #define LED_b 0x3e | 67 | #define LED_b 0x3e |
68 | #define LED_C 0x9c | 68 | #define LED_C 0x9c |
69 | #define LED_d 0x7a | 69 | #define LED_d 0x7a |
70 | #define LED_E 0x9e | 70 | #define LED_E 0x9e |
71 | #define LED_F 0x8e | 71 | #define LED_F 0x8e |
72 | 72 | ||
73 | #ifndef __ASSEMBLY__ | 73 | #ifndef __ASSEMBLY__ |
74 | 74 | ||
@@ -96,9 +96,9 @@ static __inline__ void pica_set_led(unsigned int bits) | |||
96 | * This address is just a guess and seems to differ from | 96 | * This address is just a guess and seems to differ from |
97 | * other mips machines such as RC3xxx... | 97 | * other mips machines such as RC3xxx... |
98 | */ | 98 | */ |
99 | #define JAZZ_KEYBOARD_ADDRESS 0xe0005000 | 99 | #define JAZZ_KEYBOARD_ADDRESS 0xe0005000 |
100 | #define JAZZ_KEYBOARD_DATA 0xe0005000 | 100 | #define JAZZ_KEYBOARD_DATA 0xe0005000 |
101 | #define JAZZ_KEYBOARD_COMMAND 0xe0005001 | 101 | #define JAZZ_KEYBOARD_COMMAND 0xe0005001 |
102 | 102 | ||
103 | #ifndef __ASSEMBLY__ | 103 | #ifndef __ASSEMBLY__ |
104 | 104 | ||
@@ -119,28 +119,28 @@ typedef struct { | |||
119 | /* | 119 | /* |
120 | * For now. Needs to be changed for RC3xxx support. See below. | 120 | * For now. Needs to be changed for RC3xxx support. See below. |
121 | */ | 121 | */ |
122 | #define keyboard_hardware jazz_keyboard_hardware | 122 | #define keyboard_hardware jazz_keyboard_hardware |
123 | 123 | ||
124 | #endif /* !__ASSEMBLY__ */ | 124 | #endif /* !__ASSEMBLY__ */ |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * i8042 keyboard controller for most other Mips machines. | 127 | * i8042 keyboard controller for most other Mips machines. |
128 | */ | 128 | */ |
129 | #define MIPS_KEYBOARD_ADDRESS 0xb9005000 | 129 | #define MIPS_KEYBOARD_ADDRESS 0xb9005000 |
130 | #define MIPS_KEYBOARD_DATA 0xb9005003 | 130 | #define MIPS_KEYBOARD_DATA 0xb9005003 |
131 | #define MIPS_KEYBOARD_COMMAND 0xb9005007 | 131 | #define MIPS_KEYBOARD_COMMAND 0xb9005007 |
132 | 132 | ||
133 | /* | 133 | /* |
134 | * Serial and parallel ports (WD 16C552) on the Mips JAZZ | 134 | * Serial and parallel ports (WD 16C552) on the Mips JAZZ |
135 | */ | 135 | */ |
136 | #define JAZZ_SERIAL1_BASE (unsigned int)0xe0006000 | 136 | #define JAZZ_SERIAL1_BASE (unsigned int)0xe0006000 |
137 | #define JAZZ_SERIAL2_BASE (unsigned int)0xe0007000 | 137 | #define JAZZ_SERIAL2_BASE (unsigned int)0xe0007000 |
138 | #define JAZZ_PARALLEL_BASE (unsigned int)0xe0008000 | 138 | #define JAZZ_PARALLEL_BASE (unsigned int)0xe0008000 |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * Dummy Device Address. Used in jazzdma.c | 141 | * Dummy Device Address. Used in jazzdma.c |
142 | */ | 142 | */ |
143 | #define JAZZ_DUMMY_DEVICE 0xe000d000 | 143 | #define JAZZ_DUMMY_DEVICE 0xe000d000 |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * JAZZ timer registers and interrupt no. | 146 | * JAZZ timer registers and interrupt no. |
@@ -148,8 +148,8 @@ typedef struct { | |||
148 | * cpu level 6, but to keep compatibility with PC stuff | 148 | * cpu level 6, but to keep compatibility with PC stuff |
149 | * it is remapped to vector 0. See arch/mips/kernel/entry.S. | 149 | * it is remapped to vector 0. See arch/mips/kernel/entry.S. |
150 | */ | 150 | */ |
151 | #define JAZZ_TIMER_INTERVAL 0xe0000228 | 151 | #define JAZZ_TIMER_INTERVAL 0xe0000228 |
152 | #define JAZZ_TIMER_REGISTER 0xe0000230 | 152 | #define JAZZ_TIMER_REGISTER 0xe0000230 |
153 | 153 | ||
154 | /* | 154 | /* |
155 | * DRAM configuration register | 155 | * DRAM configuration register |
@@ -176,13 +176,13 @@ typedef struct { | |||
176 | #endif | 176 | #endif |
177 | #endif /* !__ASSEMBLY__ */ | 177 | #endif /* !__ASSEMBLY__ */ |
178 | 178 | ||
179 | #define PICA_DRAM_CONFIG 0xe00fffe0 | 179 | #define PICA_DRAM_CONFIG 0xe00fffe0 |
180 | 180 | ||
181 | /* | 181 | /* |
182 | * JAZZ interrupt control registers | 182 | * JAZZ interrupt control registers |
183 | */ | 183 | */ |
184 | #define JAZZ_IO_IRQ_SOURCE 0xe0010000 | 184 | #define JAZZ_IO_IRQ_SOURCE 0xe0010000 |
185 | #define JAZZ_IO_IRQ_ENABLE 0xe0010002 | 185 | #define JAZZ_IO_IRQ_ENABLE 0xe0010002 |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * JAZZ Interrupt Level definitions | 188 | * JAZZ Interrupt Level definitions |
@@ -190,20 +190,20 @@ typedef struct { | |||
190 | * This is somewhat broken. For reasons which nobody can remember anymore | 190 | * This is somewhat broken. For reasons which nobody can remember anymore |
191 | * we remap the Jazz interrupts to the usual ISA style interrupt numbers. | 191 | * we remap the Jazz interrupts to the usual ISA style interrupt numbers. |
192 | */ | 192 | */ |
193 | #define JAZZ_IRQ_START 24 | 193 | #define JAZZ_IRQ_START 24 |
194 | #define JAZZ_IRQ_END (24 + 9) | 194 | #define JAZZ_IRQ_END (24 + 9) |
195 | #define JAZZ_PARALLEL_IRQ (JAZZ_IRQ_START + 0) | 195 | #define JAZZ_PARALLEL_IRQ (JAZZ_IRQ_START + 0) |
196 | #define JAZZ_FLOPPY_IRQ (JAZZ_IRQ_START + 1) | 196 | #define JAZZ_FLOPPY_IRQ (JAZZ_IRQ_START + 1) |
197 | #define JAZZ_SOUND_IRQ (JAZZ_IRQ_START + 2) | 197 | #define JAZZ_SOUND_IRQ (JAZZ_IRQ_START + 2) |
198 | #define JAZZ_VIDEO_IRQ (JAZZ_IRQ_START + 3) | 198 | #define JAZZ_VIDEO_IRQ (JAZZ_IRQ_START + 3) |
199 | #define JAZZ_ETHERNET_IRQ (JAZZ_IRQ_START + 4) | 199 | #define JAZZ_ETHERNET_IRQ (JAZZ_IRQ_START + 4) |
200 | #define JAZZ_SCSI_IRQ (JAZZ_IRQ_START + 5) | 200 | #define JAZZ_SCSI_IRQ (JAZZ_IRQ_START + 5) |
201 | #define JAZZ_KEYBOARD_IRQ (JAZZ_IRQ_START + 6) | 201 | #define JAZZ_KEYBOARD_IRQ (JAZZ_IRQ_START + 6) |
202 | #define JAZZ_MOUSE_IRQ (JAZZ_IRQ_START + 7) | 202 | #define JAZZ_MOUSE_IRQ (JAZZ_IRQ_START + 7) |
203 | #define JAZZ_SERIAL1_IRQ (JAZZ_IRQ_START + 8) | 203 | #define JAZZ_SERIAL1_IRQ (JAZZ_IRQ_START + 8) |
204 | #define JAZZ_SERIAL2_IRQ (JAZZ_IRQ_START + 9) | 204 | #define JAZZ_SERIAL2_IRQ (JAZZ_IRQ_START + 9) |
205 | 205 | ||
206 | #define JAZZ_TIMER_IRQ (MIPS_CPU_IRQ_BASE+6) | 206 | #define JAZZ_TIMER_IRQ (MIPS_CPU_IRQ_BASE+6) |
207 | 207 | ||
208 | 208 | ||
209 | /* | 209 | /* |
@@ -211,46 +211,46 @@ typedef struct { | |||
211 | * Note: Channels 4...7 are not used with respect to the Acer PICA-61 | 211 | * Note: Channels 4...7 are not used with respect to the Acer PICA-61 |
212 | * chipset which does not provide these DMA channels. | 212 | * chipset which does not provide these DMA channels. |
213 | */ | 213 | */ |
214 | #define JAZZ_SCSI_DMA 0 /* SCSI */ | 214 | #define JAZZ_SCSI_DMA 0 /* SCSI */ |
215 | #define JAZZ_FLOPPY_DMA 1 /* FLOPPY */ | 215 | #define JAZZ_FLOPPY_DMA 1 /* FLOPPY */ |
216 | #define JAZZ_AUDIOL_DMA 2 /* AUDIO L */ | 216 | #define JAZZ_AUDIOL_DMA 2 /* AUDIO L */ |
217 | #define JAZZ_AUDIOR_DMA 3 /* AUDIO R */ | 217 | #define JAZZ_AUDIOR_DMA 3 /* AUDIO R */ |
218 | 218 | ||
219 | /* | 219 | /* |
220 | * JAZZ R4030 MCT_ADR chip (DMA controller) | 220 | * JAZZ R4030 MCT_ADR chip (DMA controller) |
221 | * Note: Virtual Addresses ! | 221 | * Note: Virtual Addresses ! |
222 | */ | 222 | */ |
223 | #define JAZZ_R4030_CONFIG 0xE0000000 /* R4030 config register */ | 223 | #define JAZZ_R4030_CONFIG 0xE0000000 /* R4030 config register */ |
224 | #define JAZZ_R4030_REVISION 0xE0000008 /* same as PICA_ASIC_REVISION */ | 224 | #define JAZZ_R4030_REVISION 0xE0000008 /* same as PICA_ASIC_REVISION */ |
225 | #define JAZZ_R4030_INV_ADDR 0xE0000010 /* Invalid Address register */ | 225 | #define JAZZ_R4030_INV_ADDR 0xE0000010 /* Invalid Address register */ |
226 | 226 | ||
227 | #define JAZZ_R4030_TRSTBL_BASE 0xE0000018 /* Translation Table Base */ | 227 | #define JAZZ_R4030_TRSTBL_BASE 0xE0000018 /* Translation Table Base */ |
228 | #define JAZZ_R4030_TRSTBL_LIM 0xE0000020 /* Translation Table Limit */ | 228 | #define JAZZ_R4030_TRSTBL_LIM 0xE0000020 /* Translation Table Limit */ |
229 | #define JAZZ_R4030_TRSTBL_INV 0xE0000028 /* Translation Table Invalidate */ | 229 | #define JAZZ_R4030_TRSTBL_INV 0xE0000028 /* Translation Table Invalidate */ |
230 | 230 | ||
231 | #define JAZZ_R4030_CACHE_MTNC 0xE0000030 /* Cache Maintenance */ | 231 | #define JAZZ_R4030_CACHE_MTNC 0xE0000030 /* Cache Maintenance */ |
232 | #define JAZZ_R4030_R_FAIL_ADDR 0xE0000038 /* Remote Failed Address */ | 232 | #define JAZZ_R4030_R_FAIL_ADDR 0xE0000038 /* Remote Failed Address */ |
233 | #define JAZZ_R4030_M_FAIL_ADDR 0xE0000040 /* Memory Failed Address */ | 233 | #define JAZZ_R4030_M_FAIL_ADDR 0xE0000040 /* Memory Failed Address */ |
234 | 234 | ||
235 | #define JAZZ_R4030_CACHE_PTAG 0xE0000048 /* I/O Cache Physical Tag */ | 235 | #define JAZZ_R4030_CACHE_PTAG 0xE0000048 /* I/O Cache Physical Tag */ |
236 | #define JAZZ_R4030_CACHE_LTAG 0xE0000050 /* I/O Cache Logical Tag */ | 236 | #define JAZZ_R4030_CACHE_LTAG 0xE0000050 /* I/O Cache Logical Tag */ |
237 | #define JAZZ_R4030_CACHE_BMASK 0xE0000058 /* I/O Cache Byte Mask */ | 237 | #define JAZZ_R4030_CACHE_BMASK 0xE0000058 /* I/O Cache Byte Mask */ |
238 | #define JAZZ_R4030_CACHE_BWIN 0xE0000060 /* I/O Cache Buffer Window */ | 238 | #define JAZZ_R4030_CACHE_BWIN 0xE0000060 /* I/O Cache Buffer Window */ |
239 | 239 | ||
240 | /* | 240 | /* |
241 | * Remote Speed Registers. | 241 | * Remote Speed Registers. |
242 | * | 242 | * |
243 | * 0: free, 1: Ethernet, 2: SCSI, 3: Floppy, | 243 | * 0: free, 1: Ethernet, 2: SCSI, 3: Floppy, |
244 | * 4: RTC, 5: Kb./Mouse 6: serial 1, 7: serial 2, | 244 | * 4: RTC, 5: Kb./Mouse 6: serial 1, 7: serial 2, |
245 | * 8: parallel, 9: NVRAM, 10: CPU, 11: PROM, | 245 | * 8: parallel, 9: NVRAM, 10: CPU, 11: PROM, |
246 | * 12: reserved, 13: free, 14: 7seg LED, 15: ??? | 246 | * 12: reserved, 13: free, 14: 7seg LED, 15: ??? |
247 | */ | 247 | */ |
248 | #define JAZZ_R4030_REM_SPEED 0xE0000070 /* 16 Remote Speed Registers */ | 248 | #define JAZZ_R4030_REM_SPEED 0xE0000070 /* 16 Remote Speed Registers */ |
249 | /* 0xE0000070,78,80... 0xE00000E8 */ | 249 | /* 0xE0000070,78,80... 0xE00000E8 */ |
250 | #define JAZZ_R4030_IRQ_ENABLE 0xE00000E8 /* Internal Interrupt Enable */ | 250 | #define JAZZ_R4030_IRQ_ENABLE 0xE00000E8 /* Internal Interrupt Enable */ |
251 | #define JAZZ_R4030_INVAL_ADDR 0xE0000010 /* Invalid address Register */ | 251 | #define JAZZ_R4030_INVAL_ADDR 0xE0000010 /* Invalid address Register */ |
252 | #define JAZZ_R4030_IRQ_SOURCE 0xE0000200 /* Interrupt Source Register */ | 252 | #define JAZZ_R4030_IRQ_SOURCE 0xE0000200 /* Interrupt Source Register */ |
253 | #define JAZZ_R4030_I386_ERROR 0xE0000208 /* i386/EISA Bus Error */ | 253 | #define JAZZ_R4030_I386_ERROR 0xE0000208 /* i386/EISA Bus Error */ |
254 | 254 | ||
255 | /* | 255 | /* |
256 | * Virtual (E)ISA controller address | 256 | * Virtual (E)ISA controller address |
diff --git a/arch/mips/include/asm/jazzdma.h b/arch/mips/include/asm/jazzdma.h index 8bb37bba68f0..2cefc3c47241 100644 --- a/arch/mips/include/asm/jazzdma.h +++ b/arch/mips/include/asm/jazzdma.h | |||
@@ -10,7 +10,7 @@ | |||
10 | extern unsigned long vdma_alloc(unsigned long paddr, unsigned long size); | 10 | extern unsigned long vdma_alloc(unsigned long paddr, unsigned long size); |
11 | extern int vdma_free(unsigned long laddr); | 11 | extern int vdma_free(unsigned long laddr); |
12 | extern int vdma_remap(unsigned long laddr, unsigned long paddr, | 12 | extern int vdma_remap(unsigned long laddr, unsigned long paddr, |
13 | unsigned long size); | 13 | unsigned long size); |
14 | extern unsigned long vdma_phys2log(unsigned long paddr); | 14 | extern unsigned long vdma_phys2log(unsigned long paddr); |
15 | extern unsigned long vdma_log2phys(unsigned long laddr); | 15 | extern unsigned long vdma_log2phys(unsigned long laddr); |
16 | extern void vdma_stats(void); /* for debugging only */ | 16 | extern void vdma_stats(void); /* for debugging only */ |
@@ -35,14 +35,14 @@ extern int vdma_get_enable(int channel); | |||
35 | * Macros to get page no. and offset of a given address | 35 | * Macros to get page no. and offset of a given address |
36 | * Note that VDMA_PAGE() works for physical addresses only | 36 | * Note that VDMA_PAGE() works for physical addresses only |
37 | */ | 37 | */ |
38 | #define VDMA_PAGE(a) ((unsigned int)(a) >> 12) | 38 | #define VDMA_PAGE(a) ((unsigned int)(a) >> 12) |
39 | #define VDMA_OFFSET(a) ((unsigned int)(a) & (VDMA_PAGESIZE-1)) | 39 | #define VDMA_OFFSET(a) ((unsigned int)(a) & (VDMA_PAGESIZE-1)) |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * error code returned by vdma_alloc() | 42 | * error code returned by vdma_alloc() |
43 | * (See also arch/mips/kernel/jazzdma.c) | 43 | * (See also arch/mips/kernel/jazzdma.c) |
44 | */ | 44 | */ |
45 | #define VDMA_ERROR 0xffffffff | 45 | #define VDMA_ERROR 0xffffffff |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * VDMA pagetable entry description | 48 | * VDMA pagetable entry description |
@@ -59,37 +59,37 @@ typedef volatile struct VDMA_PGTBL_ENTRY { | |||
59 | */ | 59 | */ |
60 | #define JAZZ_R4030_CHNL_MODE 0xE0000100 /* 8 DMA Channel Mode Registers, */ | 60 | #define JAZZ_R4030_CHNL_MODE 0xE0000100 /* 8 DMA Channel Mode Registers, */ |
61 | /* 0xE0000100,120,140... */ | 61 | /* 0xE0000100,120,140... */ |
62 | #define JAZZ_R4030_CHNL_ENABLE 0xE0000108 /* 8 DMA Channel Enable Regs, */ | 62 | #define JAZZ_R4030_CHNL_ENABLE 0xE0000108 /* 8 DMA Channel Enable Regs, */ |
63 | /* 0xE0000108,128,148... */ | 63 | /* 0xE0000108,128,148... */ |
64 | #define JAZZ_R4030_CHNL_COUNT 0xE0000110 /* 8 DMA Channel Byte Cnt Regs, */ | 64 | #define JAZZ_R4030_CHNL_COUNT 0xE0000110 /* 8 DMA Channel Byte Cnt Regs, */ |
65 | /* 0xE0000110,130,150... */ | 65 | /* 0xE0000110,130,150... */ |
66 | #define JAZZ_R4030_CHNL_ADDR 0xE0000118 /* 8 DMA Channel Address Regs, */ | 66 | #define JAZZ_R4030_CHNL_ADDR 0xE0000118 /* 8 DMA Channel Address Regs, */ |
67 | /* 0xE0000118,138,158... */ | 67 | /* 0xE0000118,138,158... */ |
68 | 68 | ||
69 | /* channel enable register bits */ | 69 | /* channel enable register bits */ |
70 | 70 | ||
71 | #define R4030_CHNL_ENABLE (1<<0) | 71 | #define R4030_CHNL_ENABLE (1<<0) |
72 | #define R4030_CHNL_WRITE (1<<1) | 72 | #define R4030_CHNL_WRITE (1<<1) |
73 | #define R4030_TC_INTR (1<<8) | 73 | #define R4030_TC_INTR (1<<8) |
74 | #define R4030_MEM_INTR (1<<9) | 74 | #define R4030_MEM_INTR (1<<9) |
75 | #define R4030_ADDR_INTR (1<<10) | 75 | #define R4030_ADDR_INTR (1<<10) |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * Channel mode register bits | 78 | * Channel mode register bits |
79 | */ | 79 | */ |
80 | #define R4030_MODE_ATIME_40 (0) /* device access time on remote bus */ | 80 | #define R4030_MODE_ATIME_40 (0) /* device access time on remote bus */ |
81 | #define R4030_MODE_ATIME_80 (1) | 81 | #define R4030_MODE_ATIME_80 (1) |
82 | #define R4030_MODE_ATIME_120 (2) | 82 | #define R4030_MODE_ATIME_120 (2) |
83 | #define R4030_MODE_ATIME_160 (3) | 83 | #define R4030_MODE_ATIME_160 (3) |
84 | #define R4030_MODE_ATIME_200 (4) | 84 | #define R4030_MODE_ATIME_200 (4) |
85 | #define R4030_MODE_ATIME_240 (5) | 85 | #define R4030_MODE_ATIME_240 (5) |
86 | #define R4030_MODE_ATIME_280 (6) | 86 | #define R4030_MODE_ATIME_280 (6) |
87 | #define R4030_MODE_ATIME_320 (7) | 87 | #define R4030_MODE_ATIME_320 (7) |
88 | #define R4030_MODE_WIDTH_8 (1<<3) /* device data bus width */ | 88 | #define R4030_MODE_WIDTH_8 (1<<3) /* device data bus width */ |
89 | #define R4030_MODE_WIDTH_16 (2<<3) | 89 | #define R4030_MODE_WIDTH_16 (2<<3) |
90 | #define R4030_MODE_WIDTH_32 (3<<3) | 90 | #define R4030_MODE_WIDTH_32 (3<<3) |
91 | #define R4030_MODE_INTR_EN (1<<5) | 91 | #define R4030_MODE_INTR_EN (1<<5) |
92 | #define R4030_MODE_BURST (1<<6) /* Rev. 2 only */ | 92 | #define R4030_MODE_BURST (1<<6) /* Rev. 2 only */ |
93 | #define R4030_MODE_FAST_ACK (1<<7) /* Rev. 2 only */ | 93 | #define R4030_MODE_FAST_ACK (1<<7) /* Rev. 2 only */ |
94 | 94 | ||
95 | #endif /* _ASM_JAZZDMA_H */ | 95 | #endif /* _ASM_JAZZDMA_H */ |
diff --git a/arch/mips/include/asm/kmap_types.h b/arch/mips/include/asm/kmap_types.h index 58e91ed0388f..c1909dcada39 100644 --- a/arch/mips/include/asm/kmap_types.h +++ b/arch/mips/include/asm/kmap_types.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_KMAP_TYPES_H | 2 | #define _ASM_KMAP_TYPES_H |
3 | 3 | ||
4 | #ifdef CONFIG_DEBUG_HIGHMEM | 4 | #ifdef CONFIG_DEBUG_HIGHMEM |
5 | #define __WITH_KM_FENCE | 5 | #define __WITH_KM_FENCE |
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | #include <asm-generic/kmap_types.h> | 8 | #include <asm-generic/kmap_types.h> |
diff --git a/arch/mips/include/asm/kprobes.h b/arch/mips/include/asm/kprobes.h index 1fbbca01e681..daba1f9a4f79 100644 --- a/arch/mips/include/asm/kprobes.h +++ b/arch/mips/include/asm/kprobes.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <asm/kdebug.h> | 29 | #include <asm/kdebug.h> |
30 | #include <asm/inst.h> | 30 | #include <asm/inst.h> |
31 | 31 | ||
32 | #define __ARCH_WANT_KPROBES_INSN_SLOT | 32 | #define __ARCH_WANT_KPROBES_INSN_SLOT |
33 | 33 | ||
34 | struct kprobe; | 34 | struct kprobe; |
35 | struct pt_regs; | 35 | struct pt_regs; |
diff --git a/arch/mips/include/asm/lasat/eeprom.h b/arch/mips/include/asm/lasat/eeprom.h index 3dac203697fa..d918b822e376 100644 --- a/arch/mips/include/asm/lasat/eeprom.h +++ b/arch/mips/include/asm/lasat/eeprom.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #include <asm/addrspace.h> | 1 | #include <asm/addrspace.h> |
2 | 2 | ||
3 | /* lasat 100 */ | 3 | /* lasat 100 */ |
4 | #define AT93C_REG_100 KSEG1ADDR(0x1c810000) | 4 | #define AT93C_REG_100 KSEG1ADDR(0x1c810000) |
5 | #define AT93C_RDATA_REG_100 AT93C_REG_100 | 5 | #define AT93C_RDATA_REG_100 AT93C_REG_100 |
6 | #define AT93C_RDATA_SHIFT_100 4 | 6 | #define AT93C_RDATA_SHIFT_100 4 |
7 | #define AT93C_WDATA_SHIFT_100 4 | 7 | #define AT93C_WDATA_SHIFT_100 4 |
8 | #define AT93C_CS_M_100 (1 << 5) | 8 | #define AT93C_CS_M_100 (1 << 5) |
9 | #define AT93C_CLK_M_100 (1 << 3) | 9 | #define AT93C_CLK_M_100 (1 << 3) |
10 | 10 | ||
11 | /* lasat 200 */ | 11 | /* lasat 200 */ |
12 | #define AT93C_REG_200 KSEG1ADDR(0x11000000) | 12 | #define AT93C_REG_200 KSEG1ADDR(0x11000000) |
diff --git a/arch/mips/include/asm/lasat/lasat.h b/arch/mips/include/asm/lasat/lasat.h index e8ff70f80e13..9e32b4da99e2 100644 --- a/arch/mips/include/asm/lasat/lasat.h +++ b/arch/mips/include/asm/lasat/lasat.h | |||
@@ -100,7 +100,7 @@ struct lasat_eeprom_struct_pre7 { | |||
100 | 100 | ||
101 | /* Configuration descriptor encoding - see the doc for details */ | 101 | /* Configuration descriptor encoding - see the doc for details */ |
102 | 102 | ||
103 | #define LASAT_W0_DSCTYPE(v) (((v)) & 0xf) | 103 | #define LASAT_W0_DSCTYPE(v) (((v)) & 0xf) |
104 | #define LASAT_W0_BMID(v) (((v) >> 0x04) & 0xf) | 104 | #define LASAT_W0_BMID(v) (((v) >> 0x04) & 0xf) |
105 | #define LASAT_W0_CPUTYPE(v) (((v) >> 0x08) & 0xf) | 105 | #define LASAT_W0_CPUTYPE(v) (((v) >> 0x08) & 0xf) |
106 | #define LASAT_W0_BUSSPEED(v) (((v) >> 0x0c) & 0xf) | 106 | #define LASAT_W0_BUSSPEED(v) (((v) >> 0x0c) & 0xf) |
@@ -109,7 +109,7 @@ struct lasat_eeprom_struct_pre7 { | |||
109 | #define LASAT_W0_SDRAMBANKS(v) (((v) >> 0x18) & 0xf) | 109 | #define LASAT_W0_SDRAMBANKS(v) (((v) >> 0x18) & 0xf) |
110 | #define LASAT_W0_L2CACHE(v) (((v) >> 0x1c) & 0xf) | 110 | #define LASAT_W0_L2CACHE(v) (((v) >> 0x1c) & 0xf) |
111 | 111 | ||
112 | #define LASAT_W1_EDHAC(v) (((v)) & 0xf) | 112 | #define LASAT_W1_EDHAC(v) (((v)) & 0xf) |
113 | #define LASAT_W1_HIFN(v) (((v) >> 0x04) & 0x1) | 113 | #define LASAT_W1_HIFN(v) (((v) >> 0x04) & 0x1) |
114 | #define LASAT_W1_ISDN(v) (((v) >> 0x05) & 0x1) | 114 | #define LASAT_W1_ISDN(v) (((v) >> 0x05) & 0x1) |
115 | #define LASAT_W1_IDE(v) (((v) >> 0x06) & 0x1) | 115 | #define LASAT_W1_IDE(v) (((v) >> 0x06) & 0x1) |
@@ -239,7 +239,7 @@ static inline void lasat_ndelay(unsigned int ns) | |||
239 | __delay(ns / lasat_ndelay_divider); | 239 | __delay(ns / lasat_ndelay_divider); |
240 | } | 240 | } |
241 | 241 | ||
242 | #define IS_LASAT_200() (current_cpu_data.cputype == CPU_R5000) | 242 | #define IS_LASAT_200() (current_cpu_data.cputype == CPU_R5000) |
243 | 243 | ||
244 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ | 244 | #endif /* !defined (_LANGUAGE_ASSEMBLY) */ |
245 | 245 | ||
@@ -247,11 +247,11 @@ static inline void lasat_ndelay(unsigned int ns) | |||
247 | #define LASAT_SERVICEMODE_MAGIC_2 0xfedeabba | 247 | #define LASAT_SERVICEMODE_MAGIC_2 0xfedeabba |
248 | 248 | ||
249 | /* Lasat 100 boards */ | 249 | /* Lasat 100 boards */ |
250 | #define LASAT_GT_BASE (KSEG1ADDR(0x14000000)) | 250 | #define LASAT_GT_BASE (KSEG1ADDR(0x14000000)) |
251 | 251 | ||
252 | /* Lasat 200 boards */ | 252 | /* Lasat 200 boards */ |
253 | #define Vrc5074_PHYS_BASE 0x1fa00000 | 253 | #define Vrc5074_PHYS_BASE 0x1fa00000 |
254 | #define Vrc5074_BASE (KSEG1ADDR(Vrc5074_PHYS_BASE)) | 254 | #define Vrc5074_BASE (KSEG1ADDR(Vrc5074_PHYS_BASE)) |
255 | #define PCI_WINDOW1 0x1a000000 | 255 | #define PCI_WINDOW1 0x1a000000 |
256 | 256 | ||
257 | #endif /* _LASAT_H */ | 257 | #endif /* _LASAT_H */ |
diff --git a/arch/mips/include/asm/lasat/serial.h b/arch/mips/include/asm/lasat/serial.h index 1c37d70579b8..a2f6c7a9cfe8 100644 --- a/arch/mips/include/asm/lasat/serial.h +++ b/arch/mips/include/asm/lasat/serial.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #include <asm/lasat/lasat.h> | 1 | #include <asm/lasat/lasat.h> |
2 | 2 | ||
3 | /* Lasat 100 boards serial configuration */ | 3 | /* Lasat 100 boards serial configuration */ |
4 | #define LASAT_BASE_BAUD_100 (7372800 / 16) | 4 | #define LASAT_BASE_BAUD_100 (7372800 / 16) |
5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 | 5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 |
6 | #define LASAT_UART_REGS_SHIFT_100 2 | 6 | #define LASAT_UART_REGS_SHIFT_100 2 |
7 | #define LASATINT_UART_100 16 | 7 | #define LASATINT_UART_100 16 |
diff --git a/arch/mips/include/asm/local.h b/arch/mips/include/asm/local.h index 94fde8d0fac1..d44622cd74be 100644 --- a/arch/mips/include/asm/local.h +++ b/arch/mips/include/asm/local.h | |||
@@ -15,10 +15,10 @@ typedef struct | |||
15 | #define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) } | 15 | #define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) } |
16 | 16 | ||
17 | #define local_read(l) atomic_long_read(&(l)->a) | 17 | #define local_read(l) atomic_long_read(&(l)->a) |
18 | #define local_set(l, i) atomic_long_set(&(l)->a, (i)) | 18 | #define local_set(l, i) atomic_long_set(&(l)->a, (i)) |
19 | 19 | ||
20 | #define local_add(i, l) atomic_long_add((i), (&(l)->a)) | 20 | #define local_add(i, l) atomic_long_add((i), (&(l)->a)) |
21 | #define local_sub(i, l) atomic_long_sub((i), (&(l)->a)) | 21 | #define local_sub(i, l) atomic_long_sub((i), (&(l)->a)) |
22 | #define local_inc(l) atomic_long_inc(&(l)->a) | 22 | #define local_inc(l) atomic_long_inc(&(l)->a) |
23 | #define local_dec(l) atomic_long_dec(&(l)->a) | 23 | #define local_dec(l) atomic_long_dec(&(l)->a) |
24 | 24 | ||
diff --git a/arch/mips/include/asm/m48t37.h b/arch/mips/include/asm/m48t37.h index cabf86264f36..e6eaf5339e4e 100644 --- a/arch/mips/include/asm/m48t37.h +++ b/arch/mips/include/asm/m48t37.h | |||
@@ -9,7 +9,7 @@ | |||
9 | extern spinlock_t rtc_lock; | 9 | extern spinlock_t rtc_lock; |
10 | 10 | ||
11 | struct m48t37_rtc { | 11 | struct m48t37_rtc { |
12 | volatile u8 pad[0x7ff0]; /* NVRAM */ | 12 | volatile u8 pad[0x7ff0]; /* NVRAM */ |
13 | volatile u8 flags; | 13 | volatile u8 flags; |
14 | volatile u8 century; | 14 | volatile u8 century; |
15 | volatile u8 alarm_sec; | 15 | volatile u8 alarm_sec; |
diff --git a/arch/mips/include/asm/mach-ar7/ar7.h b/arch/mips/include/asm/mach-ar7/ar7.h index 07d3fadb2443..a47ea0c85248 100644 --- a/arch/mips/include/asm/mach-ar7/ar7.h +++ b/arch/mips/include/asm/mach-ar7/ar7.h | |||
@@ -40,9 +40,9 @@ | |||
40 | #define AR7_REGS_USB (AR7_REGS_BASE + 0x1200) | 40 | #define AR7_REGS_USB (AR7_REGS_BASE + 0x1200) |
41 | #define AR7_REGS_RESET (AR7_REGS_BASE + 0x1600) | 41 | #define AR7_REGS_RESET (AR7_REGS_BASE + 0x1600) |
42 | #define AR7_REGS_PINSEL (AR7_REGS_BASE + 0x160C) | 42 | #define AR7_REGS_PINSEL (AR7_REGS_BASE + 0x160C) |
43 | #define AR7_REGS_VLYNQ0 (AR7_REGS_BASE + 0x1800) | 43 | #define AR7_REGS_VLYNQ0 (AR7_REGS_BASE + 0x1800) |
44 | #define AR7_REGS_DCL (AR7_REGS_BASE + 0x1a00) | 44 | #define AR7_REGS_DCL (AR7_REGS_BASE + 0x1a00) |
45 | #define AR7_REGS_VLYNQ1 (AR7_REGS_BASE + 0x1c00) | 45 | #define AR7_REGS_VLYNQ1 (AR7_REGS_BASE + 0x1c00) |
46 | #define AR7_REGS_MDIO (AR7_REGS_BASE + 0x1e00) | 46 | #define AR7_REGS_MDIO (AR7_REGS_BASE + 0x1e00) |
47 | #define AR7_REGS_IRQ (AR7_REGS_BASE + 0x2400) | 47 | #define AR7_REGS_IRQ (AR7_REGS_BASE + 0x2400) |
48 | #define AR7_REGS_MAC1 (AR7_REGS_BASE + 0x2800) | 48 | #define AR7_REGS_MAC1 (AR7_REGS_BASE + 0x2800) |
@@ -52,7 +52,7 @@ | |||
52 | #define UR8_REGS_UART1 (AR7_REGS_BASE + 0x0f00) | 52 | #define UR8_REGS_UART1 (AR7_REGS_BASE + 0x0f00) |
53 | 53 | ||
54 | /* Titan registers */ | 54 | /* Titan registers */ |
55 | #define TITAN_REGS_ESWITCH_BASE (0x08640000) | 55 | #define TITAN_REGS_ESWITCH_BASE (0x08640000) |
56 | #define TITAN_REGS_MAC0 (TITAN_REGS_ESWITCH_BASE) | 56 | #define TITAN_REGS_MAC0 (TITAN_REGS_ESWITCH_BASE) |
57 | #define TITAN_REGS_MAC1 (TITAN_REGS_ESWITCH_BASE + 0x0800) | 57 | #define TITAN_REGS_MAC1 (TITAN_REGS_ESWITCH_BASE + 0x0800) |
58 | #define TITAN_REGS_MDIO (TITAN_REGS_ESWITCH_BASE + 0x02000) | 58 | #define TITAN_REGS_MDIO (TITAN_REGS_ESWITCH_BASE + 0x02000) |
@@ -72,9 +72,9 @@ | |||
72 | 72 | ||
73 | /* GPIO control registers */ | 73 | /* GPIO control registers */ |
74 | #define AR7_GPIO_INPUT 0x0 | 74 | #define AR7_GPIO_INPUT 0x0 |
75 | #define AR7_GPIO_OUTPUT 0x4 | 75 | #define AR7_GPIO_OUTPUT 0x4 |
76 | #define AR7_GPIO_DIR 0x8 | 76 | #define AR7_GPIO_DIR 0x8 |
77 | #define AR7_GPIO_ENABLE 0xc | 77 | #define AR7_GPIO_ENABLE 0xc |
78 | #define TITAN_GPIO_INPUT_0 0x0 | 78 | #define TITAN_GPIO_INPUT_0 0x0 |
79 | #define TITAN_GPIO_INPUT_1 0x4 | 79 | #define TITAN_GPIO_INPUT_1 0x4 |
80 | #define TITAN_GPIO_OUTPUT_0 0x8 | 80 | #define TITAN_GPIO_OUTPUT_0 0x8 |
@@ -88,10 +88,10 @@ | |||
88 | #define AR7_CHIP_7200 0x2b | 88 | #define AR7_CHIP_7200 0x2b |
89 | #define AR7_CHIP_7300 0x05 | 89 | #define AR7_CHIP_7300 0x05 |
90 | #define AR7_CHIP_TITAN 0x07 | 90 | #define AR7_CHIP_TITAN 0x07 |
91 | #define TITAN_CHIP_1050 0x0f | 91 | #define TITAN_CHIP_1050 0x0f |
92 | #define TITAN_CHIP_1055 0x0e | 92 | #define TITAN_CHIP_1055 0x0e |
93 | #define TITAN_CHIP_1056 0x0d | 93 | #define TITAN_CHIP_1056 0x0d |
94 | #define TITAN_CHIP_1060 0x07 | 94 | #define TITAN_CHIP_1060 0x07 |
95 | 95 | ||
96 | /* Interrupts */ | 96 | /* Interrupts */ |
97 | #define AR7_IRQ_UART0 15 | 97 | #define AR7_IRQ_UART0 15 |
diff --git a/arch/mips/include/asm/mach-ar7/irq.h b/arch/mips/include/asm/mach-ar7/irq.h index 39e9757e3d93..7ad10e379e2b 100644 --- a/arch/mips/include/asm/mach-ar7/irq.h +++ b/arch/mips/include/asm/mach-ar7/irq.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #ifndef __ASM_AR7_IRQ_H | 9 | #ifndef __ASM_AR7_IRQ_H |
10 | #define __ASM_AR7_IRQ_H | 10 | #define __ASM_AR7_IRQ_H |
11 | 11 | ||
12 | #define NR_IRQS 256 | 12 | #define NR_IRQS 256 |
13 | 13 | ||
14 | #include_next <irq.h> | 14 | #include_next <irq.h> |
15 | 15 | ||
diff --git a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h index a5e0f17ea77c..8dec938af115 100644 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h | |||
@@ -34,8 +34,8 @@ | |||
34 | #define AR71XX_UART_SIZE 0x100 | 34 | #define AR71XX_UART_SIZE 0x100 |
35 | #define AR71XX_USB_CTRL_BASE (AR71XX_APB_BASE + 0x00030000) | 35 | #define AR71XX_USB_CTRL_BASE (AR71XX_APB_BASE + 0x00030000) |
36 | #define AR71XX_USB_CTRL_SIZE 0x100 | 36 | #define AR71XX_USB_CTRL_SIZE 0x100 |
37 | #define AR71XX_GPIO_BASE (AR71XX_APB_BASE + 0x00040000) | 37 | #define AR71XX_GPIO_BASE (AR71XX_APB_BASE + 0x00040000) |
38 | #define AR71XX_GPIO_SIZE 0x100 | 38 | #define AR71XX_GPIO_SIZE 0x100 |
39 | #define AR71XX_PLL_BASE (AR71XX_APB_BASE + 0x00050000) | 39 | #define AR71XX_PLL_BASE (AR71XX_APB_BASE + 0x00050000) |
40 | #define AR71XX_PLL_SIZE 0x100 | 40 | #define AR71XX_PLL_SIZE 0x100 |
41 | #define AR71XX_RESET_BASE (AR71XX_APB_BASE + 0x00060000) | 41 | #define AR71XX_RESET_BASE (AR71XX_APB_BASE + 0x00060000) |
@@ -312,7 +312,7 @@ | |||
312 | #define AR934X_BOOTSTRAP_EJTAG_MODE BIT(5) | 312 | #define AR934X_BOOTSTRAP_EJTAG_MODE BIT(5) |
313 | #define AR934X_BOOTSTRAP_REF_CLK_40 BIT(4) | 313 | #define AR934X_BOOTSTRAP_REF_CLK_40 BIT(4) |
314 | #define AR934X_BOOTSTRAP_BOOT_FROM_SPI BIT(2) | 314 | #define AR934X_BOOTSTRAP_BOOT_FROM_SPI BIT(2) |
315 | #define AR934X_BOOTSTRAP_SDRAM_DISABLED BIT(1) | 315 | #define AR934X_BOOTSTRAP_SDRAM_DISABLED BIT(1) |
316 | #define AR934X_BOOTSTRAP_DDR1 BIT(0) | 316 | #define AR934X_BOOTSTRAP_DDR1 BIT(0) |
317 | 317 | ||
318 | #define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0) | 318 | #define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0) |
@@ -362,7 +362,7 @@ | |||
362 | 362 | ||
363 | #define AR724X_REV_ID_REVISION_MASK 0x3 | 363 | #define AR724X_REV_ID_REVISION_MASK 0x3 |
364 | 364 | ||
365 | #define AR934X_REV_ID_REVISION_MASK 0xf | 365 | #define AR934X_REV_ID_REVISION_MASK 0xf |
366 | 366 | ||
367 | /* | 367 | /* |
368 | * SPI block | 368 | * SPI block |
diff --git a/arch/mips/include/asm/mach-ath79/ar933x_uart.h b/arch/mips/include/asm/mach-ath79/ar933x_uart.h index 52730555937f..c2917b39966b 100644 --- a/arch/mips/include/asm/mach-ath79/ar933x_uart.h +++ b/arch/mips/include/asm/mach-ath79/ar933x_uart.h | |||
@@ -26,14 +26,14 @@ | |||
26 | 26 | ||
27 | #define AR933X_UART_CS_PARITY_S 0 | 27 | #define AR933X_UART_CS_PARITY_S 0 |
28 | #define AR933X_UART_CS_PARITY_M 0x3 | 28 | #define AR933X_UART_CS_PARITY_M 0x3 |
29 | #define AR933X_UART_CS_PARITY_NONE 0 | 29 | #define AR933X_UART_CS_PARITY_NONE 0 |
30 | #define AR933X_UART_CS_PARITY_ODD 1 | 30 | #define AR933X_UART_CS_PARITY_ODD 1 |
31 | #define AR933X_UART_CS_PARITY_EVEN 2 | 31 | #define AR933X_UART_CS_PARITY_EVEN 2 |
32 | #define AR933X_UART_CS_IF_MODE_S 2 | 32 | #define AR933X_UART_CS_IF_MODE_S 2 |
33 | #define AR933X_UART_CS_IF_MODE_M 0x3 | 33 | #define AR933X_UART_CS_IF_MODE_M 0x3 |
34 | #define AR933X_UART_CS_IF_MODE_NONE 0 | 34 | #define AR933X_UART_CS_IF_MODE_NONE 0 |
35 | #define AR933X_UART_CS_IF_MODE_DTE 1 | 35 | #define AR933X_UART_CS_IF_MODE_DTE 1 |
36 | #define AR933X_UART_CS_IF_MODE_DCE 2 | 36 | #define AR933X_UART_CS_IF_MODE_DCE 2 |
37 | #define AR933X_UART_CS_FLOW_CTRL_S 4 | 37 | #define AR933X_UART_CS_FLOW_CTRL_S 4 |
38 | #define AR933X_UART_CS_FLOW_CTRL_M 0x3 | 38 | #define AR933X_UART_CS_FLOW_CTRL_M 0x3 |
39 | #define AR933X_UART_CS_DMA_EN BIT(6) | 39 | #define AR933X_UART_CS_DMA_EN BIT(6) |
diff --git a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h index ea4b66dccf6e..ddb947e9221f 100644 --- a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h | |||
@@ -49,7 +49,7 @@ | |||
49 | #define cpu_has_64bits 0 | 49 | #define cpu_has_64bits 0 |
50 | #define cpu_has_64bit_zero_reg 0 | 50 | #define cpu_has_64bit_zero_reg 0 |
51 | #define cpu_has_64bit_gp_regs 0 | 51 | #define cpu_has_64bit_gp_regs 0 |
52 | #define cpu_has_64bit_addresses 0 | 52 | #define cpu_has_64bit_addresses 0 |
53 | 53 | ||
54 | #define cpu_dcache_line_size() 32 | 54 | #define cpu_dcache_line_size() 32 |
55 | #define cpu_icache_line_size() 32 | 55 | #define cpu_icache_line_size() 32 |
diff --git a/arch/mips/include/asm/mach-au1x00/au1000.h b/arch/mips/include/asm/mach-au1x00/au1000.h index 569828d3ccab..3e11a468cdf8 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000.h +++ b/arch/mips/include/asm/mach-au1x00/au1000.h | |||
@@ -349,7 +349,7 @@ extern void au1300_vss_block_control(int block, int enable); | |||
349 | #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31) | 349 | #define AU1000_INTC0_INT_LAST (AU1000_INTC0_INT_BASE + 31) |
350 | #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_LAST + 1) | 350 | #define AU1000_INTC1_INT_BASE (AU1000_INTC0_INT_LAST + 1) |
351 | #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31) | 351 | #define AU1000_INTC1_INT_LAST (AU1000_INTC1_INT_BASE + 31) |
352 | #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST | 352 | #define AU1000_MAX_INTR AU1000_INTC1_INT_LAST |
353 | 353 | ||
354 | /* Au1300-style (GPIC): 1 controller with up to 128 sources */ | 354 | /* Au1300-style (GPIC): 1 controller with up to 128 sources */ |
355 | #define ALCHEMY_GPIC_INT_BASE (MIPS_CPU_IRQ_BASE + 8) | 355 | #define ALCHEMY_GPIC_INT_BASE (MIPS_CPU_IRQ_BASE + 8) |
@@ -589,7 +589,7 @@ enum soc_au1550_ints { | |||
589 | AU1550_GPIO14_INT, | 589 | AU1550_GPIO14_INT, |
590 | AU1550_GPIO15_INT, | 590 | AU1550_GPIO15_INT, |
591 | AU1550_GPIO200_INT, | 591 | AU1550_GPIO200_INT, |
592 | AU1550_GPIO201_205_INT, /* Logical or of GPIO201:205 */ | 592 | AU1550_GPIO201_205_INT, /* Logical or of GPIO201:205 */ |
593 | AU1550_GPIO16_INT, | 593 | AU1550_GPIO16_INT, |
594 | AU1550_GPIO17_INT, | 594 | AU1550_GPIO17_INT, |
595 | AU1550_GPIO20_INT, | 595 | AU1550_GPIO20_INT, |
@@ -603,7 +603,7 @@ enum soc_au1550_ints { | |||
603 | AU1550_GPIO28_INT, | 603 | AU1550_GPIO28_INT, |
604 | AU1550_GPIO206_INT, | 604 | AU1550_GPIO206_INT, |
605 | AU1550_GPIO207_INT, | 605 | AU1550_GPIO207_INT, |
606 | AU1550_GPIO208_215_INT, /* Logical or of GPIO208:215 */ | 606 | AU1550_GPIO208_215_INT, /* Logical or of GPIO208:215 */ |
607 | }; | 607 | }; |
608 | 608 | ||
609 | enum soc_au1200_ints { | 609 | enum soc_au1200_ints { |
@@ -636,7 +636,7 @@ enum soc_au1200_ints { | |||
636 | AU1200_GPIO205_INT, | 636 | AU1200_GPIO205_INT, |
637 | AU1200_GPIO206_INT, | 637 | AU1200_GPIO206_INT, |
638 | AU1200_GPIO207_INT, | 638 | AU1200_GPIO207_INT, |
639 | AU1200_GPIO208_215_INT, /* Logical OR of 208:215 */ | 639 | AU1200_GPIO208_215_INT, /* Logical OR of 208:215 */ |
640 | AU1200_USB_INT, | 640 | AU1200_USB_INT, |
641 | AU1200_LCD_INT, | 641 | AU1200_LCD_INT, |
642 | AU1200_MAE_BOTH_INT, | 642 | AU1200_MAE_BOTH_INT, |
@@ -823,7 +823,7 @@ enum soc_au1200_ints { | |||
823 | #define GPIC_GPIO_TO_BIT(gpio) \ | 823 | #define GPIC_GPIO_TO_BIT(gpio) \ |
824 | (1 << ((gpio) & 0x1f)) | 824 | (1 << ((gpio) & 0x1f)) |
825 | 825 | ||
826 | #define GPIC_GPIO_BANKOFF(gpio) \ | 826 | #define GPIC_GPIO_BANKOFF(gpio) \ |
827 | (((gpio) >> 5) * 4) | 827 | (((gpio) >> 5) * 4) |
828 | 828 | ||
829 | /* Pin Control bits: who owns the pin, what does it do */ | 829 | /* Pin Control bits: who owns the pin, what does it do */ |
@@ -958,32 +958,32 @@ enum soc_au1200_ints { | |||
958 | #define MEM_STSTAT 0xB4001104 | 958 | #define MEM_STSTAT 0xB4001104 |
959 | 959 | ||
960 | #define MEM_STNAND_CMD 0x0 | 960 | #define MEM_STNAND_CMD 0x0 |
961 | #define MEM_STNAND_ADDR 0x4 | 961 | #define MEM_STNAND_ADDR 0x4 |
962 | #define MEM_STNAND_DATA 0x20 | 962 | #define MEM_STNAND_DATA 0x20 |
963 | 963 | ||
964 | 964 | ||
965 | /* Programmable Counters 0 and 1 */ | 965 | /* Programmable Counters 0 and 1 */ |
966 | #define SYS_BASE 0xB1900000 | 966 | #define SYS_BASE 0xB1900000 |
967 | #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14) | 967 | #define SYS_COUNTER_CNTRL (SYS_BASE + 0x14) |
968 | # define SYS_CNTRL_E1S (1 << 23) | 968 | # define SYS_CNTRL_E1S (1 << 23) |
969 | # define SYS_CNTRL_T1S (1 << 20) | 969 | # define SYS_CNTRL_T1S (1 << 20) |
970 | # define SYS_CNTRL_M21 (1 << 19) | 970 | # define SYS_CNTRL_M21 (1 << 19) |
971 | # define SYS_CNTRL_M11 (1 << 18) | 971 | # define SYS_CNTRL_M11 (1 << 18) |
972 | # define SYS_CNTRL_M01 (1 << 17) | 972 | # define SYS_CNTRL_M01 (1 << 17) |
973 | # define SYS_CNTRL_C1S (1 << 16) | 973 | # define SYS_CNTRL_C1S (1 << 16) |
974 | # define SYS_CNTRL_BP (1 << 14) | 974 | # define SYS_CNTRL_BP (1 << 14) |
975 | # define SYS_CNTRL_EN1 (1 << 13) | 975 | # define SYS_CNTRL_EN1 (1 << 13) |
976 | # define SYS_CNTRL_BT1 (1 << 12) | 976 | # define SYS_CNTRL_BT1 (1 << 12) |
977 | # define SYS_CNTRL_EN0 (1 << 11) | 977 | # define SYS_CNTRL_EN0 (1 << 11) |
978 | # define SYS_CNTRL_BT0 (1 << 10) | 978 | # define SYS_CNTRL_BT0 (1 << 10) |
979 | # define SYS_CNTRL_E0 (1 << 8) | 979 | # define SYS_CNTRL_E0 (1 << 8) |
980 | # define SYS_CNTRL_E0S (1 << 7) | 980 | # define SYS_CNTRL_E0S (1 << 7) |
981 | # define SYS_CNTRL_32S (1 << 5) | 981 | # define SYS_CNTRL_32S (1 << 5) |
982 | # define SYS_CNTRL_T0S (1 << 4) | 982 | # define SYS_CNTRL_T0S (1 << 4) |
983 | # define SYS_CNTRL_M20 (1 << 3) | 983 | # define SYS_CNTRL_M20 (1 << 3) |
984 | # define SYS_CNTRL_M10 (1 << 2) | 984 | # define SYS_CNTRL_M10 (1 << 2) |
985 | # define SYS_CNTRL_M00 (1 << 1) | 985 | # define SYS_CNTRL_M00 (1 << 1) |
986 | # define SYS_CNTRL_C0S (1 << 0) | 986 | # define SYS_CNTRL_C0S (1 << 0) |
987 | 987 | ||
988 | /* Programmable Counter 0 Registers */ | 988 | /* Programmable Counter 0 Registers */ |
989 | #define SYS_TOYTRIM (SYS_BASE + 0) | 989 | #define SYS_TOYTRIM (SYS_BASE + 0) |
@@ -1003,33 +1003,33 @@ enum soc_au1200_ints { | |||
1003 | 1003 | ||
1004 | /* I2S Controller */ | 1004 | /* I2S Controller */ |
1005 | #define I2S_DATA 0xB1000000 | 1005 | #define I2S_DATA 0xB1000000 |
1006 | # define I2S_DATA_MASK 0xffffff | 1006 | # define I2S_DATA_MASK 0xffffff |
1007 | #define I2S_CONFIG 0xB1000004 | 1007 | #define I2S_CONFIG 0xB1000004 |
1008 | # define I2S_CONFIG_XU (1 << 25) | 1008 | # define I2S_CONFIG_XU (1 << 25) |
1009 | # define I2S_CONFIG_XO (1 << 24) | 1009 | # define I2S_CONFIG_XO (1 << 24) |
1010 | # define I2S_CONFIG_RU (1 << 23) | 1010 | # define I2S_CONFIG_RU (1 << 23) |
1011 | # define I2S_CONFIG_RO (1 << 22) | 1011 | # define I2S_CONFIG_RO (1 << 22) |
1012 | # define I2S_CONFIG_TR (1 << 21) | 1012 | # define I2S_CONFIG_TR (1 << 21) |
1013 | # define I2S_CONFIG_TE (1 << 20) | 1013 | # define I2S_CONFIG_TE (1 << 20) |
1014 | # define I2S_CONFIG_TF (1 << 19) | 1014 | # define I2S_CONFIG_TF (1 << 19) |
1015 | # define I2S_CONFIG_RR (1 << 18) | 1015 | # define I2S_CONFIG_RR (1 << 18) |
1016 | # define I2S_CONFIG_RE (1 << 17) | 1016 | # define I2S_CONFIG_RE (1 << 17) |
1017 | # define I2S_CONFIG_RF (1 << 16) | 1017 | # define I2S_CONFIG_RF (1 << 16) |
1018 | # define I2S_CONFIG_PD (1 << 11) | 1018 | # define I2S_CONFIG_PD (1 << 11) |
1019 | # define I2S_CONFIG_LB (1 << 10) | 1019 | # define I2S_CONFIG_LB (1 << 10) |
1020 | # define I2S_CONFIG_IC (1 << 9) | 1020 | # define I2S_CONFIG_IC (1 << 9) |
1021 | # define I2S_CONFIG_FM_BIT 7 | 1021 | # define I2S_CONFIG_FM_BIT 7 |
1022 | # define I2S_CONFIG_FM_MASK (0x3 << I2S_CONFIG_FM_BIT) | 1022 | # define I2S_CONFIG_FM_MASK (0x3 << I2S_CONFIG_FM_BIT) |
1023 | # define I2S_CONFIG_FM_I2S (0x0 << I2S_CONFIG_FM_BIT) | 1023 | # define I2S_CONFIG_FM_I2S (0x0 << I2S_CONFIG_FM_BIT) |
1024 | # define I2S_CONFIG_FM_LJ (0x1 << I2S_CONFIG_FM_BIT) | 1024 | # define I2S_CONFIG_FM_LJ (0x1 << I2S_CONFIG_FM_BIT) |
1025 | # define I2S_CONFIG_FM_RJ (0x2 << I2S_CONFIG_FM_BIT) | 1025 | # define I2S_CONFIG_FM_RJ (0x2 << I2S_CONFIG_FM_BIT) |
1026 | # define I2S_CONFIG_TN (1 << 6) | 1026 | # define I2S_CONFIG_TN (1 << 6) |
1027 | # define I2S_CONFIG_RN (1 << 5) | 1027 | # define I2S_CONFIG_RN (1 << 5) |
1028 | # define I2S_CONFIG_SZ_BIT 0 | 1028 | # define I2S_CONFIG_SZ_BIT 0 |
1029 | # define I2S_CONFIG_SZ_MASK (0x1F << I2S_CONFIG_SZ_BIT) | 1029 | # define I2S_CONFIG_SZ_MASK (0x1F << I2S_CONFIG_SZ_BIT) |
1030 | 1030 | ||
1031 | #define I2S_CONTROL 0xB1000008 | 1031 | #define I2S_CONTROL 0xB1000008 |
1032 | # define I2S_CONTROL_D (1 << 1) | 1032 | # define I2S_CONTROL_D (1 << 1) |
1033 | # define I2S_CONTROL_CE (1 << 0) | 1033 | # define I2S_CONTROL_CE (1 << 0) |
1034 | 1034 | ||
1035 | 1035 | ||
@@ -1037,16 +1037,16 @@ enum soc_au1200_ints { | |||
1037 | 1037 | ||
1038 | /* 4 byte offsets from AU1000_ETH_BASE */ | 1038 | /* 4 byte offsets from AU1000_ETH_BASE */ |
1039 | #define MAC_CONTROL 0x0 | 1039 | #define MAC_CONTROL 0x0 |
1040 | # define MAC_RX_ENABLE (1 << 2) | 1040 | # define MAC_RX_ENABLE (1 << 2) |
1041 | # define MAC_TX_ENABLE (1 << 3) | 1041 | # define MAC_TX_ENABLE (1 << 3) |
1042 | # define MAC_DEF_CHECK (1 << 5) | 1042 | # define MAC_DEF_CHECK (1 << 5) |
1043 | # define MAC_SET_BL(X) (((X) & 0x3) << 6) | 1043 | # define MAC_SET_BL(X) (((X) & 0x3) << 6) |
1044 | # define MAC_AUTO_PAD (1 << 8) | 1044 | # define MAC_AUTO_PAD (1 << 8) |
1045 | # define MAC_DISABLE_RETRY (1 << 10) | 1045 | # define MAC_DISABLE_RETRY (1 << 10) |
1046 | # define MAC_DISABLE_BCAST (1 << 11) | 1046 | # define MAC_DISABLE_BCAST (1 << 11) |
1047 | # define MAC_LATE_COL (1 << 12) | 1047 | # define MAC_LATE_COL (1 << 12) |
1048 | # define MAC_HASH_MODE (1 << 13) | 1048 | # define MAC_HASH_MODE (1 << 13) |
1049 | # define MAC_HASH_ONLY (1 << 15) | 1049 | # define MAC_HASH_ONLY (1 << 15) |
1050 | # define MAC_PASS_ALL (1 << 16) | 1050 | # define MAC_PASS_ALL (1 << 16) |
1051 | # define MAC_INVERSE_FILTER (1 << 17) | 1051 | # define MAC_INVERSE_FILTER (1 << 17) |
1052 | # define MAC_PROMISCUOUS (1 << 18) | 1052 | # define MAC_PROMISCUOUS (1 << 18) |
@@ -1083,9 +1083,9 @@ enum soc_au1200_ints { | |||
1083 | # define MAC_EN_RESET0 (1 << 1) | 1083 | # define MAC_EN_RESET0 (1 << 1) |
1084 | # define MAC_EN_TOSS (0 << 2) | 1084 | # define MAC_EN_TOSS (0 << 2) |
1085 | # define MAC_EN_CACHEABLE (1 << 3) | 1085 | # define MAC_EN_CACHEABLE (1 << 3) |
1086 | # define MAC_EN_RESET1 (1 << 4) | 1086 | # define MAC_EN_RESET1 (1 << 4) |
1087 | # define MAC_EN_RESET2 (1 << 5) | 1087 | # define MAC_EN_RESET2 (1 << 5) |
1088 | # define MAC_DMA_RESET (1 << 6) | 1088 | # define MAC_DMA_RESET (1 << 6) |
1089 | 1089 | ||
1090 | /* Ethernet Controller DMA Channels */ | 1090 | /* Ethernet Controller DMA Channels */ |
1091 | 1091 | ||
@@ -1095,7 +1095,7 @@ enum soc_au1200_ints { | |||
1095 | #define MAC_TX_BUFF0_STATUS 0x0 | 1095 | #define MAC_TX_BUFF0_STATUS 0x0 |
1096 | # define TX_FRAME_ABORTED (1 << 0) | 1096 | # define TX_FRAME_ABORTED (1 << 0) |
1097 | # define TX_JAB_TIMEOUT (1 << 1) | 1097 | # define TX_JAB_TIMEOUT (1 << 1) |
1098 | # define TX_NO_CARRIER (1 << 2) | 1098 | # define TX_NO_CARRIER (1 << 2) |
1099 | # define TX_LOSS_CARRIER (1 << 3) | 1099 | # define TX_LOSS_CARRIER (1 << 3) |
1100 | # define TX_EXC_DEF (1 << 4) | 1100 | # define TX_EXC_DEF (1 << 4) |
1101 | # define TX_LATE_COLL_ABORT (1 << 5) | 1101 | # define TX_LATE_COLL_ABORT (1 << 5) |
@@ -1106,7 +1106,7 @@ enum soc_au1200_ints { | |||
1106 | # define TX_COLL_CNT_MASK (0xF << 10) | 1106 | # define TX_COLL_CNT_MASK (0xF << 10) |
1107 | # define TX_PKT_RETRY (1 << 31) | 1107 | # define TX_PKT_RETRY (1 << 31) |
1108 | #define MAC_TX_BUFF0_ADDR 0x4 | 1108 | #define MAC_TX_BUFF0_ADDR 0x4 |
1109 | # define TX_DMA_ENABLE (1 << 0) | 1109 | # define TX_DMA_ENABLE (1 << 0) |
1110 | # define TX_T_DONE (1 << 1) | 1110 | # define TX_T_DONE (1 << 1) |
1111 | # define TX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) | 1111 | # define TX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) |
1112 | #define MAC_TX_BUFF0_LEN 0x8 | 1112 | #define MAC_TX_BUFF0_LEN 0x8 |
@@ -1125,7 +1125,7 @@ enum soc_au1200_ints { | |||
1125 | /* offsets from MAC_RX_RING_ADDR */ | 1125 | /* offsets from MAC_RX_RING_ADDR */ |
1126 | #define MAC_RX_BUFF0_STATUS 0x0 | 1126 | #define MAC_RX_BUFF0_STATUS 0x0 |
1127 | # define RX_FRAME_LEN_MASK 0x3fff | 1127 | # define RX_FRAME_LEN_MASK 0x3fff |
1128 | # define RX_WDOG_TIMER (1 << 14) | 1128 | # define RX_WDOG_TIMER (1 << 14) |
1129 | # define RX_RUNT (1 << 15) | 1129 | # define RX_RUNT (1 << 15) |
1130 | # define RX_OVERLEN (1 << 16) | 1130 | # define RX_OVERLEN (1 << 16) |
1131 | # define RX_COLL (1 << 17) | 1131 | # define RX_COLL (1 << 17) |
@@ -1148,7 +1148,7 @@ enum soc_au1200_ints { | |||
1148 | RX_COLL | RX_MII_ERROR | RX_CRC_ERROR | \ | 1148 | RX_COLL | RX_MII_ERROR | RX_CRC_ERROR | \ |
1149 | RX_LEN_ERROR | RX_U_CNTRL_FRAME | RX_MISSED_FRAME) | 1149 | RX_LEN_ERROR | RX_U_CNTRL_FRAME | RX_MISSED_FRAME) |
1150 | #define MAC_RX_BUFF0_ADDR 0x4 | 1150 | #define MAC_RX_BUFF0_ADDR 0x4 |
1151 | # define RX_DMA_ENABLE (1 << 0) | 1151 | # define RX_DMA_ENABLE (1 << 0) |
1152 | # define RX_T_DONE (1 << 1) | 1152 | # define RX_T_DONE (1 << 1) |
1153 | # define RX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) | 1153 | # define RX_GET_DMA_BUFFER(X) (((X) >> 2) & 0x3) |
1154 | # define RX_SET_BUFF_ADDR(X) ((X) & 0xffffffc0) | 1154 | # define RX_SET_BUFF_ADDR(X) ((X) & 0xffffffc0) |
@@ -1173,34 +1173,34 @@ enum soc_au1200_ints { | |||
1173 | 1173 | ||
1174 | /* SSIO */ | 1174 | /* SSIO */ |
1175 | #define SSI0_STATUS 0xB1600000 | 1175 | #define SSI0_STATUS 0xB1600000 |
1176 | # define SSI_STATUS_BF (1 << 4) | 1176 | # define SSI_STATUS_BF (1 << 4) |
1177 | # define SSI_STATUS_OF (1 << 3) | 1177 | # define SSI_STATUS_OF (1 << 3) |
1178 | # define SSI_STATUS_UF (1 << 2) | 1178 | # define SSI_STATUS_UF (1 << 2) |
1179 | # define SSI_STATUS_D (1 << 1) | 1179 | # define SSI_STATUS_D (1 << 1) |
1180 | # define SSI_STATUS_B (1 << 0) | 1180 | # define SSI_STATUS_B (1 << 0) |
1181 | #define SSI0_INT 0xB1600004 | 1181 | #define SSI0_INT 0xB1600004 |
1182 | # define SSI_INT_OI (1 << 3) | 1182 | # define SSI_INT_OI (1 << 3) |
1183 | # define SSI_INT_UI (1 << 2) | 1183 | # define SSI_INT_UI (1 << 2) |
1184 | # define SSI_INT_DI (1 << 1) | 1184 | # define SSI_INT_DI (1 << 1) |
1185 | #define SSI0_INT_ENABLE 0xB1600008 | 1185 | #define SSI0_INT_ENABLE 0xB1600008 |
1186 | # define SSI_INTE_OIE (1 << 3) | 1186 | # define SSI_INTE_OIE (1 << 3) |
1187 | # define SSI_INTE_UIE (1 << 2) | 1187 | # define SSI_INTE_UIE (1 << 2) |
1188 | # define SSI_INTE_DIE (1 << 1) | 1188 | # define SSI_INTE_DIE (1 << 1) |
1189 | #define SSI0_CONFIG 0xB1600020 | 1189 | #define SSI0_CONFIG 0xB1600020 |
1190 | # define SSI_CONFIG_AO (1 << 24) | 1190 | # define SSI_CONFIG_AO (1 << 24) |
1191 | # define SSI_CONFIG_DO (1 << 23) | 1191 | # define SSI_CONFIG_DO (1 << 23) |
1192 | # define SSI_CONFIG_ALEN_BIT 20 | 1192 | # define SSI_CONFIG_ALEN_BIT 20 |
1193 | # define SSI_CONFIG_ALEN_MASK (0x7 << 20) | 1193 | # define SSI_CONFIG_ALEN_MASK (0x7 << 20) |
1194 | # define SSI_CONFIG_DLEN_BIT 16 | 1194 | # define SSI_CONFIG_DLEN_BIT 16 |
1195 | # define SSI_CONFIG_DLEN_MASK (0x7 << 16) | 1195 | # define SSI_CONFIG_DLEN_MASK (0x7 << 16) |
1196 | # define SSI_CONFIG_DD (1 << 11) | 1196 | # define SSI_CONFIG_DD (1 << 11) |
1197 | # define SSI_CONFIG_AD (1 << 10) | 1197 | # define SSI_CONFIG_AD (1 << 10) |
1198 | # define SSI_CONFIG_BM_BIT 8 | 1198 | # define SSI_CONFIG_BM_BIT 8 |
1199 | # define SSI_CONFIG_BM_MASK (0x3 << 8) | 1199 | # define SSI_CONFIG_BM_MASK (0x3 << 8) |
1200 | # define SSI_CONFIG_CE (1 << 7) | 1200 | # define SSI_CONFIG_CE (1 << 7) |
1201 | # define SSI_CONFIG_DP (1 << 6) | 1201 | # define SSI_CONFIG_DP (1 << 6) |
1202 | # define SSI_CONFIG_DL (1 << 5) | 1202 | # define SSI_CONFIG_DL (1 << 5) |
1203 | # define SSI_CONFIG_EP (1 << 4) | 1203 | # define SSI_CONFIG_EP (1 << 4) |
1204 | #define SSI0_ADATA 0xB1600024 | 1204 | #define SSI0_ADATA 0xB1600024 |
1205 | # define SSI_AD_D (1 << 24) | 1205 | # define SSI_AD_D (1 << 24) |
1206 | # define SSI_AD_ADDR_BIT 16 | 1206 | # define SSI_AD_ADDR_BIT 16 |
@@ -1210,12 +1210,12 @@ enum soc_au1200_ints { | |||
1210 | #define SSI0_CLKDIV 0xB1600028 | 1210 | #define SSI0_CLKDIV 0xB1600028 |
1211 | #define SSI0_CONTROL 0xB1600100 | 1211 | #define SSI0_CONTROL 0xB1600100 |
1212 | # define SSI_CONTROL_CD (1 << 1) | 1212 | # define SSI_CONTROL_CD (1 << 1) |
1213 | # define SSI_CONTROL_E (1 << 0) | 1213 | # define SSI_CONTROL_E (1 << 0) |
1214 | 1214 | ||
1215 | /* SSI1 */ | 1215 | /* SSI1 */ |
1216 | #define SSI1_STATUS 0xB1680000 | 1216 | #define SSI1_STATUS 0xB1680000 |
1217 | #define SSI1_INT 0xB1680004 | 1217 | #define SSI1_INT 0xB1680004 |
1218 | #define SSI1_INT_ENABLE 0xB1680008 | 1218 | #define SSI1_INT_ENABLE 0xB1680008 |
1219 | #define SSI1_CONFIG 0xB1680020 | 1219 | #define SSI1_CONFIG 0xB1680020 |
1220 | #define SSI1_ADATA 0xB1680024 | 1220 | #define SSI1_ADATA 0xB1680024 |
1221 | #define SSI1_CLKDIV 0xB1680028 | 1221 | #define SSI1_CLKDIV 0xB1680028 |
@@ -1242,8 +1242,8 @@ enum soc_au1200_ints { | |||
1242 | 1242 | ||
1243 | #define SSI_CONFIG_AO (1 << 24) | 1243 | #define SSI_CONFIG_AO (1 << 24) |
1244 | #define SSI_CONFIG_DO (1 << 23) | 1244 | #define SSI_CONFIG_DO (1 << 23) |
1245 | #define SSI_CONFIG_ALEN (7 << 20) | 1245 | #define SSI_CONFIG_ALEN (7 << 20) |
1246 | #define SSI_CONFIG_DLEN (15 << 16) | 1246 | #define SSI_CONFIG_DLEN (15 << 16) |
1247 | #define SSI_CONFIG_DD (1 << 11) | 1247 | #define SSI_CONFIG_DD (1 << 11) |
1248 | #define SSI_CONFIG_AD (1 << 10) | 1248 | #define SSI_CONFIG_AD (1 << 10) |
1249 | #define SSI_CONFIG_BM (3 << 8) | 1249 | #define SSI_CONFIG_BM (3 << 8) |
@@ -1305,7 +1305,7 @@ struct au1k_irda_platform_data { | |||
1305 | # define SYS_PF_CS (1 << 16) /* EXTCLK0/32KHz to gpio2 */ | 1305 | # define SYS_PF_CS (1 << 16) /* EXTCLK0/32KHz to gpio2 */ |
1306 | # define SYS_PF_EX0 (1 << 9) /* GPIO2/clock */ | 1306 | # define SYS_PF_EX0 (1 << 9) /* GPIO2/clock */ |
1307 | 1307 | ||
1308 | /* Au1550 only. Redefines lots of pins */ | 1308 | /* Au1550 only. Redefines lots of pins */ |
1309 | # define SYS_PF_PSC2_MASK (7 << 17) | 1309 | # define SYS_PF_PSC2_MASK (7 << 17) |
1310 | # define SYS_PF_PSC2_AC97 0 | 1310 | # define SYS_PF_PSC2_AC97 0 |
1311 | # define SYS_PF_PSC2_SPI 0 | 1311 | # define SYS_PF_PSC2_SPI 0 |
@@ -1322,33 +1322,33 @@ struct au1k_irda_platform_data { | |||
1322 | # define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2)) | 1322 | # define SYS_PF_MUST_BE_SET ((1 << 5) | (1 << 2)) |
1323 | 1323 | ||
1324 | /* Au1200 only */ | 1324 | /* Au1200 only */ |
1325 | #define SYS_PINFUNC_DMA (1 << 31) | 1325 | #define SYS_PINFUNC_DMA (1 << 31) |
1326 | #define SYS_PINFUNC_S0A (1 << 30) | 1326 | #define SYS_PINFUNC_S0A (1 << 30) |
1327 | #define SYS_PINFUNC_S1A (1 << 29) | 1327 | #define SYS_PINFUNC_S1A (1 << 29) |
1328 | #define SYS_PINFUNC_LP0 (1 << 28) | 1328 | #define SYS_PINFUNC_LP0 (1 << 28) |
1329 | #define SYS_PINFUNC_LP1 (1 << 27) | 1329 | #define SYS_PINFUNC_LP1 (1 << 27) |
1330 | #define SYS_PINFUNC_LD16 (1 << 26) | 1330 | #define SYS_PINFUNC_LD16 (1 << 26) |
1331 | #define SYS_PINFUNC_LD8 (1 << 25) | 1331 | #define SYS_PINFUNC_LD8 (1 << 25) |
1332 | #define SYS_PINFUNC_LD1 (1 << 24) | 1332 | #define SYS_PINFUNC_LD1 (1 << 24) |
1333 | #define SYS_PINFUNC_LD0 (1 << 23) | 1333 | #define SYS_PINFUNC_LD0 (1 << 23) |
1334 | #define SYS_PINFUNC_P1A (3 << 21) | 1334 | #define SYS_PINFUNC_P1A (3 << 21) |
1335 | #define SYS_PINFUNC_P1B (1 << 20) | 1335 | #define SYS_PINFUNC_P1B (1 << 20) |
1336 | #define SYS_PINFUNC_FS3 (1 << 19) | 1336 | #define SYS_PINFUNC_FS3 (1 << 19) |
1337 | #define SYS_PINFUNC_P0A (3 << 17) | 1337 | #define SYS_PINFUNC_P0A (3 << 17) |
1338 | #define SYS_PINFUNC_CS (1 << 16) | 1338 | #define SYS_PINFUNC_CS (1 << 16) |
1339 | #define SYS_PINFUNC_CIM (1 << 15) | 1339 | #define SYS_PINFUNC_CIM (1 << 15) |
1340 | #define SYS_PINFUNC_P1C (1 << 14) | 1340 | #define SYS_PINFUNC_P1C (1 << 14) |
1341 | #define SYS_PINFUNC_U1T (1 << 12) | 1341 | #define SYS_PINFUNC_U1T (1 << 12) |
1342 | #define SYS_PINFUNC_U1R (1 << 11) | 1342 | #define SYS_PINFUNC_U1R (1 << 11) |
1343 | #define SYS_PINFUNC_EX1 (1 << 10) | 1343 | #define SYS_PINFUNC_EX1 (1 << 10) |
1344 | #define SYS_PINFUNC_EX0 (1 << 9) | 1344 | #define SYS_PINFUNC_EX0 (1 << 9) |
1345 | #define SYS_PINFUNC_U0R (1 << 8) | 1345 | #define SYS_PINFUNC_U0R (1 << 8) |
1346 | #define SYS_PINFUNC_MC (1 << 7) | 1346 | #define SYS_PINFUNC_MC (1 << 7) |
1347 | #define SYS_PINFUNC_S0B (1 << 6) | 1347 | #define SYS_PINFUNC_S0B (1 << 6) |
1348 | #define SYS_PINFUNC_S0C (1 << 5) | 1348 | #define SYS_PINFUNC_S0C (1 << 5) |
1349 | #define SYS_PINFUNC_P0B (1 << 4) | 1349 | #define SYS_PINFUNC_P0B (1 << 4) |
1350 | #define SYS_PINFUNC_U0T (1 << 3) | 1350 | #define SYS_PINFUNC_U0T (1 << 3) |
1351 | #define SYS_PINFUNC_S1B (1 << 2) | 1351 | #define SYS_PINFUNC_S1B (1 << 2) |
1352 | 1352 | ||
1353 | /* Power Management */ | 1353 | /* Power Management */ |
1354 | #define SYS_SCRATCH0 0xB1900018 | 1354 | #define SYS_SCRATCH0 0xB1900018 |
@@ -1405,7 +1405,7 @@ struct au1k_irda_platform_data { | |||
1405 | # define SYS_CS_DI2 (1 << 16) | 1405 | # define SYS_CS_DI2 (1 << 16) |
1406 | # define SYS_CS_CI2 (1 << 15) | 1406 | # define SYS_CS_CI2 (1 << 15) |
1407 | 1407 | ||
1408 | # define SYS_CS_ML_BIT 7 | 1408 | # define SYS_CS_ML_BIT 7 |
1409 | # define SYS_CS_ML_MASK (0x7 << SYS_CS_ML_BIT) | 1409 | # define SYS_CS_ML_MASK (0x7 << SYS_CS_ML_BIT) |
1410 | # define SYS_CS_DL (1 << 6) | 1410 | # define SYS_CS_DL (1 << 6) |
1411 | # define SYS_CS_CL (1 << 5) | 1411 | # define SYS_CS_CL (1 << 5) |
@@ -1554,8 +1554,8 @@ struct au1k_irda_platform_data { | |||
1554 | #define PCI_MWMASKDEV_MWMASK(x) (((x) & 0xffff) << 16) | 1554 | #define PCI_MWMASKDEV_MWMASK(x) (((x) & 0xffff) << 16) |
1555 | #define PCI_MWMASKDEV_DEVID(x) ((x) & 0xffff) | 1555 | #define PCI_MWMASKDEV_DEVID(x) ((x) & 0xffff) |
1556 | #define PCI_MWBASEREVCCL_BASE(x) (((x) & 0xffff) << 16) | 1556 | #define PCI_MWBASEREVCCL_BASE(x) (((x) & 0xffff) << 16) |
1557 | #define PCI_MWBASEREVCCL_REV(x) (((x) & 0xff) << 8) | 1557 | #define PCI_MWBASEREVCCL_REV(x) (((x) & 0xff) << 8) |
1558 | #define PCI_MWBASEREVCCL_CCL(x) ((x) & 0xff) | 1558 | #define PCI_MWBASEREVCCL_CCL(x) ((x) & 0xff) |
1559 | #define PCI_ID_DID(x) (((x) & 0xffff) << 16) | 1559 | #define PCI_ID_DID(x) (((x) & 0xffff) << 16) |
1560 | #define PCI_ID_VID(x) ((x) & 0xffff) | 1560 | #define PCI_ID_VID(x) ((x) & 0xffff) |
1561 | #define PCI_STATCMD_STATUS(x) (((x) & 0xffff) << 16) | 1561 | #define PCI_STATCMD_STATUS(x) (((x) & 0xffff) << 16) |
diff --git a/arch/mips/include/asm/mach-au1x00/au1000_dma.h b/arch/mips/include/asm/mach-au1x00/au1000_dma.h index ba4cf0e91c8b..7cedca5a305c 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000_dma.h +++ b/arch/mips/include/asm/mach-au1x00/au1000_dma.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/spinlock.h> /* And spinlocks */ | 34 | #include <linux/spinlock.h> /* And spinlocks */ |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | 36 | ||
37 | #define NUM_AU1000_DMA_CHANNELS 8 | 37 | #define NUM_AU1000_DMA_CHANNELS 8 |
38 | 38 | ||
39 | /* DMA Channel Register Offsets */ | 39 | /* DMA Channel Register Offsets */ |
40 | #define DMA_MODE_SET 0x00000000 | 40 | #define DMA_MODE_SET 0x00000000 |
@@ -47,7 +47,7 @@ | |||
47 | #define DMA_DS (1 << 15) | 47 | #define DMA_DS (1 << 15) |
48 | #define DMA_BE (1 << 13) | 48 | #define DMA_BE (1 << 13) |
49 | #define DMA_DR (1 << 12) | 49 | #define DMA_DR (1 << 12) |
50 | #define DMA_TS8 (1 << 11) | 50 | #define DMA_TS8 (1 << 11) |
51 | #define DMA_DW_BIT 9 | 51 | #define DMA_DW_BIT 9 |
52 | #define DMA_DW_MASK (0x03 << DMA_DW_BIT) | 52 | #define DMA_DW_MASK (0x03 << DMA_DW_BIT) |
53 | #define DMA_DW8 (0 << DMA_DW_BIT) | 53 | #define DMA_DW8 (0 << DMA_DW_BIT) |
@@ -59,9 +59,9 @@ | |||
59 | #define DMA_GO (1 << 5) | 59 | #define DMA_GO (1 << 5) |
60 | #define DMA_AB (1 << 4) | 60 | #define DMA_AB (1 << 4) |
61 | #define DMA_D1 (1 << 3) | 61 | #define DMA_D1 (1 << 3) |
62 | #define DMA_BE1 (1 << 2) | 62 | #define DMA_BE1 (1 << 2) |
63 | #define DMA_D0 (1 << 1) | 63 | #define DMA_D0 (1 << 1) |
64 | #define DMA_BE0 (1 << 0) | 64 | #define DMA_BE0 (1 << 0) |
65 | 65 | ||
66 | #define DMA_PERIPHERAL_ADDR 0x00000008 | 66 | #define DMA_PERIPHERAL_ADDR 0x00000008 |
67 | #define DMA_BUFFER0_START 0x0000000C | 67 | #define DMA_BUFFER0_START 0x0000000C |
@@ -246,7 +246,7 @@ static inline void init_dma(unsigned int dmanr) | |||
246 | mode |= DMA_IE; | 246 | mode |= DMA_IE; |
247 | 247 | ||
248 | au_writel(~mode, chan->io + DMA_MODE_CLEAR); | 248 | au_writel(~mode, chan->io + DMA_MODE_CLEAR); |
249 | au_writel(mode, chan->io + DMA_MODE_SET); | 249 | au_writel(mode, chan->io + DMA_MODE_SET); |
250 | } | 250 | } |
251 | 251 | ||
252 | /* | 252 | /* |
diff --git a/arch/mips/include/asm/mach-au1x00/au1100_mmc.h b/arch/mips/include/asm/mach-au1x00/au1100_mmc.h index e221659f1bca..cadab91cee26 100644 --- a/arch/mips/include/asm/mach-au1x00/au1100_mmc.h +++ b/arch/mips/include/asm/mach-au1x00/au1100_mmc.h | |||
@@ -148,7 +148,7 @@ struct au1xmmc_platform_data { | |||
148 | /* | 148 | /* |
149 | * SD_STATUS bit definitions. | 149 | * SD_STATUS bit definitions. |
150 | */ | 150 | */ |
151 | #define SD_STATUS_DCRCW (0x00000007) | 151 | #define SD_STATUS_DCRCW (0x00000007) |
152 | #define SD_STATUS_xx1 (0x00000008) | 152 | #define SD_STATUS_xx1 (0x00000008) |
153 | #define SD_STATUS_CB (0x00000010) | 153 | #define SD_STATUS_CB (0x00000010) |
154 | #define SD_STATUS_DB (0x00000020) | 154 | #define SD_STATUS_DB (0x00000020) |
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h b/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h index 217810e18361..ca8077afac4a 100644 --- a/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h | |||
@@ -103,7 +103,7 @@ typedef volatile struct au1xxx_ddma_desc { | |||
103 | * Lets have some SW data following -- make sure it's 32 bytes. | 103 | * Lets have some SW data following -- make sure it's 32 bytes. |
104 | */ | 104 | */ |
105 | u32 sw_status; | 105 | u32 sw_status; |
106 | u32 sw_context; | 106 | u32 sw_context; |
107 | u32 sw_reserved[6]; | 107 | u32 sw_reserved[6]; |
108 | } au1x_ddma_desc_t; | 108 | } au1x_ddma_desc_t; |
109 | 109 | ||
@@ -123,7 +123,7 @@ typedef volatile struct au1xxx_ddma_desc { | |||
123 | #define DSCR_CMD0_CV (0x1 << 2) /* Clear Valid when done */ | 123 | #define DSCR_CMD0_CV (0x1 << 2) /* Clear Valid when done */ |
124 | #define DSCR_CMD0_ST_MASK (0x3 << 0) /* Status instruction */ | 124 | #define DSCR_CMD0_ST_MASK (0x3 << 0) /* Status instruction */ |
125 | 125 | ||
126 | #define SW_STATUS_INUSE (1 << 0) | 126 | #define SW_STATUS_INUSE (1 << 0) |
127 | 127 | ||
128 | /* Command 0 device IDs. */ | 128 | /* Command 0 device IDs. */ |
129 | #define AU1550_DSCR_CMD0_UART0_TX 0 | 129 | #define AU1550_DSCR_CMD0_UART0_TX 0 |
@@ -195,8 +195,8 @@ typedef volatile struct au1xxx_ddma_desc { | |||
195 | #define AU1300_DSCR_CMD0_SDMS_RX0 9 | 195 | #define AU1300_DSCR_CMD0_SDMS_RX0 9 |
196 | #define AU1300_DSCR_CMD0_SDMS_TX1 10 | 196 | #define AU1300_DSCR_CMD0_SDMS_TX1 10 |
197 | #define AU1300_DSCR_CMD0_SDMS_RX1 11 | 197 | #define AU1300_DSCR_CMD0_SDMS_RX1 11 |
198 | #define AU1300_DSCR_CMD0_AES_TX 12 | 198 | #define AU1300_DSCR_CMD0_AES_TX 12 |
199 | #define AU1300_DSCR_CMD0_AES_RX 13 | 199 | #define AU1300_DSCR_CMD0_AES_RX 13 |
200 | #define AU1300_DSCR_CMD0_PSC0_TX 14 | 200 | #define AU1300_DSCR_CMD0_PSC0_TX 14 |
201 | #define AU1300_DSCR_CMD0_PSC0_RX 15 | 201 | #define AU1300_DSCR_CMD0_PSC0_RX 15 |
202 | #define AU1300_DSCR_CMD0_PSC1_TX 16 | 202 | #define AU1300_DSCR_CMD0_PSC1_TX 16 |
@@ -205,12 +205,12 @@ typedef volatile struct au1xxx_ddma_desc { | |||
205 | #define AU1300_DSCR_CMD0_PSC2_RX 19 | 205 | #define AU1300_DSCR_CMD0_PSC2_RX 19 |
206 | #define AU1300_DSCR_CMD0_PSC3_TX 20 | 206 | #define AU1300_DSCR_CMD0_PSC3_TX 20 |
207 | #define AU1300_DSCR_CMD0_PSC3_RX 21 | 207 | #define AU1300_DSCR_CMD0_PSC3_RX 21 |
208 | #define AU1300_DSCR_CMD0_LCD 22 | 208 | #define AU1300_DSCR_CMD0_LCD 22 |
209 | #define AU1300_DSCR_CMD0_NAND_FLASH 23 | 209 | #define AU1300_DSCR_CMD0_NAND_FLASH 23 |
210 | #define AU1300_DSCR_CMD0_SDMS_TX2 24 | 210 | #define AU1300_DSCR_CMD0_SDMS_TX2 24 |
211 | #define AU1300_DSCR_CMD0_SDMS_RX2 25 | 211 | #define AU1300_DSCR_CMD0_SDMS_RX2 25 |
212 | #define AU1300_DSCR_CMD0_CIM_SYNC 26 | 212 | #define AU1300_DSCR_CMD0_CIM_SYNC 26 |
213 | #define AU1300_DSCR_CMD0_UDMA 27 | 213 | #define AU1300_DSCR_CMD0_UDMA 27 |
214 | #define AU1300_DSCR_CMD0_DMA_REQ0 28 | 214 | #define AU1300_DSCR_CMD0_DMA_REQ0 28 |
215 | #define AU1300_DSCR_CMD0_DMA_REQ1 29 | 215 | #define AU1300_DSCR_CMD0_DMA_REQ1 29 |
216 | 216 | ||
@@ -298,7 +298,7 @@ typedef volatile struct au1xxx_ddma_desc { | |||
298 | #define DSCR_NXTPTR_MS (1 << 27) | 298 | #define DSCR_NXTPTR_MS (1 << 27) |
299 | 299 | ||
300 | /* The number of DBDMA channels. */ | 300 | /* The number of DBDMA channels. */ |
301 | #define NUM_DBDMA_CHANS 16 | 301 | #define NUM_DBDMA_CHANS 16 |
302 | 302 | ||
303 | /* | 303 | /* |
304 | * DDMA API definitions | 304 | * DDMA API definitions |
@@ -316,7 +316,7 @@ typedef struct dbdma_device_table { | |||
316 | 316 | ||
317 | 317 | ||
318 | typedef struct dbdma_chan_config { | 318 | typedef struct dbdma_chan_config { |
319 | spinlock_t lock; | 319 | spinlock_t lock; |
320 | 320 | ||
321 | u32 chan_flags; | 321 | u32 chan_flags; |
322 | u32 chan_index; | 322 | u32 chan_index; |
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_ide.h b/arch/mips/include/asm/mach-au1x00/au1xxx_ide.h index e306384b1414..bb91b8923a49 100644 --- a/arch/mips/include/asm/mach-au1x00/au1xxx_ide.h +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_ide.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-mips/mach-au1x00/au1xxx_ide.h version 01.30.00 Aug. 02 2005 | 2 | * include/asm-mips/mach-au1x00/au1xxx_ide.h version 01.30.00 Aug. 02 2005 |
3 | * | 3 | * |
4 | * BRIEF MODULE DESCRIPTION | 4 | * BRIEF MODULE DESCRIPTION |
5 | * AMD Alchemy Au1xxx IDE interface routines over the Static Bus | 5 | * AMD Alchemy Au1xxx IDE interface routines over the Static Bus |
@@ -27,14 +27,14 @@ | |||
27 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 27 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
28 | * | 28 | * |
29 | * Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE | 29 | * Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE |
30 | * Interface and Linux Device Driver" Application Note. | 30 | * Interface and Linux Device Driver" Application Note. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 33 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
34 | #define DMA_WAIT_TIMEOUT 100 | 34 | #define DMA_WAIT_TIMEOUT 100 |
35 | #define NUM_DESCRIPTORS PRD_ENTRIES | 35 | #define NUM_DESCRIPTORS PRD_ENTRIES |
36 | #else /* CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA */ | 36 | #else /* CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA */ |
37 | #define NUM_DESCRIPTORS 2 | 37 | #define NUM_DESCRIPTORS 2 |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifndef AU1XXX_ATA_RQSIZE | 40 | #ifndef AU1XXX_ATA_RQSIZE |
@@ -84,8 +84,8 @@ typedef struct { | |||
84 | #define TWP_MASK (0x3F << 14) | 84 | #define TWP_MASK (0x3F << 14) |
85 | #define TCSW_MASK (0x0F << 10) | 85 | #define TCSW_MASK (0x0F << 10) |
86 | #define TPM_MASK (0x0F << 6) | 86 | #define TPM_MASK (0x0F << 6) |
87 | #define TA_MASK (0x3F << 0) | 87 | #define TA_MASK (0x3F << 0) |
88 | #define TS_MASK (1 << 8) | 88 | #define TS_MASK (1 << 8) |
89 | 89 | ||
90 | /* Timing parameters PIO mode 0 */ | 90 | /* Timing parameters PIO mode 0 */ |
91 | #define SBC_IDE_PIO0_TCSOE (0x04 << 29) | 91 | #define SBC_IDE_PIO0_TCSOE (0x04 << 29) |
@@ -96,7 +96,7 @@ typedef struct { | |||
96 | #define SBC_IDE_PIO0_TWP (0x10 << 14) | 96 | #define SBC_IDE_PIO0_TWP (0x10 << 14) |
97 | #define SBC_IDE_PIO0_TCSW (0x04 << 10) | 97 | #define SBC_IDE_PIO0_TCSW (0x04 << 10) |
98 | #define SBC_IDE_PIO0_TPM (0x00 << 6) | 98 | #define SBC_IDE_PIO0_TPM (0x00 << 6) |
99 | #define SBC_IDE_PIO0_TA (0x15 << 0) | 99 | #define SBC_IDE_PIO0_TA (0x15 << 0) |
100 | /* Timing parameters PIO mode 1 */ | 100 | /* Timing parameters PIO mode 1 */ |
101 | #define SBC_IDE_PIO1_TCSOE (0x03 << 29) | 101 | #define SBC_IDE_PIO1_TCSOE (0x03 << 29) |
102 | #define SBC_IDE_PIO1_TOECS (0x01 << 26) | 102 | #define SBC_IDE_PIO1_TOECS (0x01 << 26) |
@@ -106,7 +106,7 @@ typedef struct { | |||
106 | #define SBC_IDE_PIO1_TWP (0x08 << 14) | 106 | #define SBC_IDE_PIO1_TWP (0x08 << 14) |
107 | #define SBC_IDE_PIO1_TCSW (0x03 << 10) | 107 | #define SBC_IDE_PIO1_TCSW (0x03 << 10) |
108 | #define SBC_IDE_PIO1_TPM (0x00 << 6) | 108 | #define SBC_IDE_PIO1_TPM (0x00 << 6) |
109 | #define SBC_IDE_PIO1_TA (0x0B << 0) | 109 | #define SBC_IDE_PIO1_TA (0x0B << 0) |
110 | /* Timing parameters PIO mode 2 */ | 110 | /* Timing parameters PIO mode 2 */ |
111 | #define SBC_IDE_PIO2_TCSOE (0x05 << 29) | 111 | #define SBC_IDE_PIO2_TCSOE (0x05 << 29) |
112 | #define SBC_IDE_PIO2_TOECS (0x01 << 26) | 112 | #define SBC_IDE_PIO2_TOECS (0x01 << 26) |
@@ -116,7 +116,7 @@ typedef struct { | |||
116 | #define SBC_IDE_PIO2_TWP (0x1F << 14) | 116 | #define SBC_IDE_PIO2_TWP (0x1F << 14) |
117 | #define SBC_IDE_PIO2_TCSW (0x05 << 10) | 117 | #define SBC_IDE_PIO2_TCSW (0x05 << 10) |
118 | #define SBC_IDE_PIO2_TPM (0x00 << 6) | 118 | #define SBC_IDE_PIO2_TPM (0x00 << 6) |
119 | #define SBC_IDE_PIO2_TA (0x22 << 0) | 119 | #define SBC_IDE_PIO2_TA (0x22 << 0) |
120 | /* Timing parameters PIO mode 3 */ | 120 | /* Timing parameters PIO mode 3 */ |
121 | #define SBC_IDE_PIO3_TCSOE (0x05 << 29) | 121 | #define SBC_IDE_PIO3_TCSOE (0x05 << 29) |
122 | #define SBC_IDE_PIO3_TOECS (0x01 << 26) | 122 | #define SBC_IDE_PIO3_TOECS (0x01 << 26) |
@@ -126,7 +126,7 @@ typedef struct { | |||
126 | #define SBC_IDE_PIO3_TWP (0x15 << 14) | 126 | #define SBC_IDE_PIO3_TWP (0x15 << 14) |
127 | #define SBC_IDE_PIO3_TCSW (0x05 << 10) | 127 | #define SBC_IDE_PIO3_TCSW (0x05 << 10) |
128 | #define SBC_IDE_PIO3_TPM (0x00 << 6) | 128 | #define SBC_IDE_PIO3_TPM (0x00 << 6) |
129 | #define SBC_IDE_PIO3_TA (0x1A << 0) | 129 | #define SBC_IDE_PIO3_TA (0x1A << 0) |
130 | /* Timing parameters PIO mode 4 */ | 130 | /* Timing parameters PIO mode 4 */ |
131 | #define SBC_IDE_PIO4_TCSOE (0x04 << 29) | 131 | #define SBC_IDE_PIO4_TCSOE (0x04 << 29) |
132 | #define SBC_IDE_PIO4_TOECS (0x01 << 26) | 132 | #define SBC_IDE_PIO4_TOECS (0x01 << 26) |
@@ -136,7 +136,7 @@ typedef struct { | |||
136 | #define SBC_IDE_PIO4_TWP (0x0D << 14) | 136 | #define SBC_IDE_PIO4_TWP (0x0D << 14) |
137 | #define SBC_IDE_PIO4_TCSW (0x03 << 10) | 137 | #define SBC_IDE_PIO4_TCSW (0x03 << 10) |
138 | #define SBC_IDE_PIO4_TPM (0x00 << 6) | 138 | #define SBC_IDE_PIO4_TPM (0x00 << 6) |
139 | #define SBC_IDE_PIO4_TA (0x12 << 0) | 139 | #define SBC_IDE_PIO4_TA (0x12 << 0) |
140 | /* Timing parameters MDMA mode 0 */ | 140 | /* Timing parameters MDMA mode 0 */ |
141 | #define SBC_IDE_MDMA0_TCSOE (0x03 << 29) | 141 | #define SBC_IDE_MDMA0_TCSOE (0x03 << 29) |
142 | #define SBC_IDE_MDMA0_TOECS (0x01 << 26) | 142 | #define SBC_IDE_MDMA0_TOECS (0x01 << 26) |
diff --git a/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h b/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h index 4e3f3bc26c60..8a9cd754be2d 100644 --- a/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h +++ b/arch/mips/include/asm/mach-au1x00/au1xxx_psc.h | |||
@@ -53,7 +53,7 @@ | |||
53 | 53 | ||
54 | #define PSC_CTRL_DISABLE 0 | 54 | #define PSC_CTRL_DISABLE 0 |
55 | #define PSC_CTRL_SUSPEND 2 | 55 | #define PSC_CTRL_SUSPEND 2 |
56 | #define PSC_CTRL_ENABLE 3 | 56 | #define PSC_CTRL_ENABLE 3 |
57 | 57 | ||
58 | /* AC97 Registers. */ | 58 | /* AC97 Registers. */ |
59 | #define PSC_AC97CFG_OFFSET 0x00000008 | 59 | #define PSC_AC97CFG_OFFSET 0x00000008 |
@@ -85,8 +85,8 @@ | |||
85 | #define PSC_AC97CFG_SE_ENABLE (1 << 25) | 85 | #define PSC_AC97CFG_SE_ENABLE (1 << 25) |
86 | 86 | ||
87 | #define PSC_AC97CFG_LEN_MASK (0xf << 21) | 87 | #define PSC_AC97CFG_LEN_MASK (0xf << 21) |
88 | #define PSC_AC97CFG_TXSLOT_MASK (0x3ff << 11) | 88 | #define PSC_AC97CFG_TXSLOT_MASK (0x3ff << 11) |
89 | #define PSC_AC97CFG_RXSLOT_MASK (0x3ff << 1) | 89 | #define PSC_AC97CFG_RXSLOT_MASK (0x3ff << 1) |
90 | #define PSC_AC97CFG_GE_ENABLE (1) | 90 | #define PSC_AC97CFG_GE_ENABLE (1) |
91 | 91 | ||
92 | /* Enable slots 3-12. */ | 92 | /* Enable slots 3-12. */ |
@@ -95,7 +95,7 @@ | |||
95 | 95 | ||
96 | /* | 96 | /* |
97 | * The word length equation is ((x) * 2) + 2, so choose 'x' appropriately. | 97 | * The word length equation is ((x) * 2) + 2, so choose 'x' appropriately. |
98 | * The only sensible numbers are 7, 9, or possibly 11. Nah, just do the | 98 | * The only sensible numbers are 7, 9, or possibly 11. Nah, just do the |
99 | * arithmetic in the macro. | 99 | * arithmetic in the macro. |
100 | */ | 100 | */ |
101 | #define PSC_AC97CFG_SET_LEN(x) (((((x) - 2) / 2) & 0xf) << 21) | 101 | #define PSC_AC97CFG_SET_LEN(x) (((((x) - 2) / 2) & 0xf) << 21) |
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h index 73853b5a2a31..796afd051c35 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio-au1000.h +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1000.h | |||
@@ -12,14 +12,14 @@ | |||
12 | #include <asm/mach-au1x00/au1000.h> | 12 | #include <asm/mach-au1x00/au1000.h> |
13 | 13 | ||
14 | /* The default GPIO numberspace as documented in the Alchemy manuals. | 14 | /* The default GPIO numberspace as documented in the Alchemy manuals. |
15 | * GPIO0-31 from GPIO1 block, GPIO200-215 from GPIO2 block. | 15 | * GPIO0-31 from GPIO1 block, GPIO200-215 from GPIO2 block. |
16 | */ | 16 | */ |
17 | #define ALCHEMY_GPIO1_BASE 0 | 17 | #define ALCHEMY_GPIO1_BASE 0 |
18 | #define ALCHEMY_GPIO2_BASE 200 | 18 | #define ALCHEMY_GPIO2_BASE 200 |
19 | 19 | ||
20 | #define ALCHEMY_GPIO1_NUM 32 | 20 | #define ALCHEMY_GPIO1_NUM 32 |
21 | #define ALCHEMY_GPIO2_NUM 16 | 21 | #define ALCHEMY_GPIO2_NUM 16 |
22 | #define ALCHEMY_GPIO1_MAX (ALCHEMY_GPIO1_BASE + ALCHEMY_GPIO1_NUM - 1) | 22 | #define ALCHEMY_GPIO1_MAX (ALCHEMY_GPIO1_BASE + ALCHEMY_GPIO1_NUM - 1) |
23 | #define ALCHEMY_GPIO2_MAX (ALCHEMY_GPIO2_BASE + ALCHEMY_GPIO2_NUM - 1) | 23 | #define ALCHEMY_GPIO2_MAX (ALCHEMY_GPIO2_BASE + ALCHEMY_GPIO2_NUM - 1) |
24 | 24 | ||
25 | #define MAKE_IRQ(intc, off) (AU1000_INTC##intc##_INT_BASE + (off)) | 25 | #define MAKE_IRQ(intc, off) (AU1000_INTC##intc##_INT_BASE + (off)) |
@@ -67,7 +67,7 @@ static inline int au1500_gpio1_to_irq(int gpio) | |||
67 | switch (gpio) { | 67 | switch (gpio) { |
68 | case 0 ... 15: | 68 | case 0 ... 15: |
69 | case 20: | 69 | case 20: |
70 | case 23 ... 28: return MAKE_IRQ(1, gpio); | 70 | case 23 ... 28: return MAKE_IRQ(1, gpio); |
71 | } | 71 | } |
72 | 72 | ||
73 | return -ENXIO; | 73 | return -ENXIO; |
@@ -139,8 +139,8 @@ static inline int au1550_gpio1_to_irq(int gpio) | |||
139 | 139 | ||
140 | switch (gpio) { | 140 | switch (gpio) { |
141 | case 0 ... 15: | 141 | case 0 ... 15: |
142 | case 20 ... 28: return MAKE_IRQ(1, gpio); | 142 | case 20 ... 28: return MAKE_IRQ(1, gpio); |
143 | case 16 ... 17: return MAKE_IRQ(1, 18 + gpio - 16); | 143 | case 16 ... 17: return MAKE_IRQ(1, 18 + gpio - 16); |
144 | } | 144 | } |
145 | 145 | ||
146 | return -ENXIO; | 146 | return -ENXIO; |
@@ -152,9 +152,9 @@ static inline int au1550_gpio2_to_irq(int gpio) | |||
152 | 152 | ||
153 | switch (gpio) { | 153 | switch (gpio) { |
154 | case 0: return MAKE_IRQ(1, 16); | 154 | case 0: return MAKE_IRQ(1, 16); |
155 | case 1 ... 5: return MAKE_IRQ(1, 17); /* shared GPIO201_205 */ | 155 | case 1 ... 5: return MAKE_IRQ(1, 17); /* shared GPIO201_205 */ |
156 | case 6 ... 7: return MAKE_IRQ(1, 29 + gpio - 6); | 156 | case 6 ... 7: return MAKE_IRQ(1, 29 + gpio - 6); |
157 | case 8 ... 15: return MAKE_IRQ(1, 31); /* shared GPIO208_215 */ | 157 | case 8 ... 15: return MAKE_IRQ(1, 31); /* shared GPIO208_215 */ |
158 | } | 158 | } |
159 | 159 | ||
160 | return -ENXIO; | 160 | return -ENXIO; |
@@ -190,7 +190,7 @@ static inline int au1200_gpio2_to_irq(int gpio) | |||
190 | case 0 ... 2: return MAKE_IRQ(0, 5 + gpio - 0); | 190 | case 0 ... 2: return MAKE_IRQ(0, 5 + gpio - 0); |
191 | case 3: return MAKE_IRQ(0, 22); | 191 | case 3: return MAKE_IRQ(0, 22); |
192 | case 4 ... 7: return MAKE_IRQ(0, 24 + gpio - 4); | 192 | case 4 ... 7: return MAKE_IRQ(0, 24 + gpio - 4); |
193 | case 8 ... 15: return MAKE_IRQ(0, 28); /* shared GPIO208_215 */ | 193 | case 8 ... 15: return MAKE_IRQ(0, 28); /* shared GPIO208_215 */ |
194 | } | 194 | } |
195 | 195 | ||
196 | return -ENXIO; | 196 | return -ENXIO; |
@@ -428,7 +428,7 @@ static inline void alchemy_gpio2_disable_int(int gpio2) | |||
428 | /** | 428 | /** |
429 | * alchemy_gpio2_enable - Activate GPIO2 block. | 429 | * alchemy_gpio2_enable - Activate GPIO2 block. |
430 | * | 430 | * |
431 | * The GPIO2 block must be enabled excplicitly to work. On systems | 431 | * The GPIO2 block must be enabled excplicitly to work. On systems |
432 | * where this isn't done by the bootloader, this macro can be used. | 432 | * where this isn't done by the bootloader, this macro can be used. |
433 | */ | 433 | */ |
434 | static inline void alchemy_gpio2_enable(void) | 434 | static inline void alchemy_gpio2_enable(void) |
@@ -533,7 +533,7 @@ static inline int alchemy_irq_to_gpio(int irq) | |||
533 | * 2 (1 for Au1000) gpio_chips are registered. | 533 | * 2 (1 for Au1000) gpio_chips are registered. |
534 | * | 534 | * |
535 | *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: | 535 | *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: |
536 | * the boards' gpio.h must provide the linux gpio wrapper functions, | 536 | * the boards' gpio.h must provide the linux gpio wrapper functions, |
537 | * | 537 | * |
538 | *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: | 538 | *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: |
539 | * inlinable gpio functions are provided which enable access to the | 539 | * inlinable gpio functions are provided which enable access to the |
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h index fb9975c74c57..ce02894271c6 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h | |||
@@ -130,7 +130,7 @@ static inline int au1300_gpio_getinitlvl(unsigned int gpio) | |||
130 | * A gpiochip for the 75 GPIOs is registered. | 130 | * A gpiochip for the 75 GPIOs is registered. |
131 | * | 131 | * |
132 | *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: | 132 | *(3) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=y: |
133 | * the boards' gpio.h must provide the linux gpio wrapper functions, | 133 | * the boards' gpio.h must provide the linux gpio wrapper functions, |
134 | * | 134 | * |
135 | *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: | 135 | *(4) GPIOLIB=n, ALCHEMY_GPIO_INDIRECT=n: |
136 | * inlinable gpio functions are provided which enable access to the | 136 | * inlinable gpio functions are provided which enable access to the |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h index dbd5b5ad07a5..cb922b9cb0e9 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | |||
@@ -182,7 +182,7 @@ enum bcm63xx_regs_set { | |||
182 | #define BCM_6328_PERF_BASE (0xb0000000) | 182 | #define BCM_6328_PERF_BASE (0xb0000000) |
183 | #define BCM_6328_TIMER_BASE (0xb0000040) | 183 | #define BCM_6328_TIMER_BASE (0xb0000040) |
184 | #define BCM_6328_WDT_BASE (0xb000005c) | 184 | #define BCM_6328_WDT_BASE (0xb000005c) |
185 | #define BCM_6328_UART0_BASE (0xb0000100) | 185 | #define BCM_6328_UART0_BASE (0xb0000100) |
186 | #define BCM_6328_UART1_BASE (0xb0000120) | 186 | #define BCM_6328_UART1_BASE (0xb0000120) |
187 | #define BCM_6328_GPIO_BASE (0xb0000080) | 187 | #define BCM_6328_GPIO_BASE (0xb0000080) |
188 | #define BCM_6328_SPI_BASE (0xdeadbeef) | 188 | #define BCM_6328_SPI_BASE (0xdeadbeef) |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h index 03a54df5fb86..7033144aab2d 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | |||
@@ -88,7 +88,7 @@ | |||
88 | #define bcm_mpi_readl(o) bcm_rset_readl(RSET_MPI, (o)) | 88 | #define bcm_mpi_readl(o) bcm_rset_readl(RSET_MPI, (o)) |
89 | #define bcm_mpi_writel(v, o) bcm_rset_writel(RSET_MPI, (v), (o)) | 89 | #define bcm_mpi_writel(v, o) bcm_rset_writel(RSET_MPI, (v), (o)) |
90 | #define bcm_pcmcia_readl(o) bcm_rset_readl(RSET_PCMCIA, (o)) | 90 | #define bcm_pcmcia_readl(o) bcm_rset_readl(RSET_PCMCIA, (o)) |
91 | #define bcm_pcmcia_writel(v, o) bcm_rset_writel(RSET_PCMCIA, (v), (o)) | 91 | #define bcm_pcmcia_writel(v, o) bcm_rset_writel(RSET_PCMCIA, (v), (o)) |
92 | #define bcm_pcie_readl(o) bcm_rset_readl(RSET_PCIE, (o)) | 92 | #define bcm_pcie_readl(o) bcm_rset_readl(RSET_PCIE, (o)) |
93 | #define bcm_pcie_writel(v, o) bcm_rset_writel(RSET_PCIE, (v), (o)) | 93 | #define bcm_pcie_writel(v, o) bcm_rset_writel(RSET_PCIE, (v), (o)) |
94 | #define bcm_sdram_readl(o) bcm_rset_readl(RSET_SDRAM, (o)) | 94 | #define bcm_sdram_readl(o) bcm_rset_readl(RSET_SDRAM, (o)) |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h index a5bbff31c898..1e89df7244bd 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_iudma.h | |||
@@ -19,7 +19,7 @@ struct bcm_enet_desc { | |||
19 | #define DMADESC_SOP_MASK (1 << 13) | 19 | #define DMADESC_SOP_MASK (1 << 13) |
20 | #define DMADESC_ESOP_MASK (DMADESC_EOP_MASK | DMADESC_SOP_MASK) | 20 | #define DMADESC_ESOP_MASK (DMADESC_EOP_MASK | DMADESC_SOP_MASK) |
21 | #define DMADESC_WRAP_MASK (1 << 12) | 21 | #define DMADESC_WRAP_MASK (1 << 12) |
22 | #define DMADESC_USB_NOZERO_MASK (1 << 1) | 22 | #define DMADESC_USB_NOZERO_MASK (1 << 1) |
23 | #define DMADESC_USB_ZERO_MASK (1 << 0) | 23 | #define DMADESC_USB_ZERO_MASK (1 << 0) |
24 | 24 | ||
25 | /* status */ | 25 | /* status */ |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h index c3eeb90b480a..81b4702f792a 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | |||
@@ -143,7 +143,7 @@ | |||
143 | CKCTL_6368_NAND_EN | \ | 143 | CKCTL_6368_NAND_EN | \ |
144 | CKCTL_6368_IPSEC_EN) | 144 | CKCTL_6368_IPSEC_EN) |
145 | 145 | ||
146 | /* System PLL Control register */ | 146 | /* System PLL Control register */ |
147 | #define PERF_SYS_PLL_CTL_REG 0x8 | 147 | #define PERF_SYS_PLL_CTL_REG 0x8 |
148 | #define SYS_PLL_SOFT_RESET 0x1 | 148 | #define SYS_PLL_SOFT_RESET 0x1 |
149 | 149 | ||
@@ -219,7 +219,7 @@ | |||
219 | #define SOFTRESET_6338_DMAMEM_MASK (1 << 6) | 219 | #define SOFTRESET_6338_DMAMEM_MASK (1 << 6) |
220 | #define SOFTRESET_6338_SAR_MASK (1 << 7) | 220 | #define SOFTRESET_6338_SAR_MASK (1 << 7) |
221 | #define SOFTRESET_6338_ACLC_MASK (1 << 8) | 221 | #define SOFTRESET_6338_ACLC_MASK (1 << 8) |
222 | #define SOFTRESET_6338_ADSLMIPSPLL_MASK (1 << 10) | 222 | #define SOFTRESET_6338_ADSLMIPSPLL_MASK (1 << 10) |
223 | #define SOFTRESET_6338_ALL (SOFTRESET_6338_SPI_MASK | \ | 223 | #define SOFTRESET_6338_ALL (SOFTRESET_6338_SPI_MASK | \ |
224 | SOFTRESET_6338_ENET_MASK | \ | 224 | SOFTRESET_6338_ENET_MASK | \ |
225 | SOFTRESET_6338_USBH_MASK | \ | 225 | SOFTRESET_6338_USBH_MASK | \ |
@@ -238,7 +238,7 @@ | |||
238 | #define SOFTRESET_6348_DMAMEM_MASK (1 << 6) | 238 | #define SOFTRESET_6348_DMAMEM_MASK (1 << 6) |
239 | #define SOFTRESET_6348_SAR_MASK (1 << 7) | 239 | #define SOFTRESET_6348_SAR_MASK (1 << 7) |
240 | #define SOFTRESET_6348_ACLC_MASK (1 << 8) | 240 | #define SOFTRESET_6348_ACLC_MASK (1 << 8) |
241 | #define SOFTRESET_6348_ADSLMIPSPLL_MASK (1 << 10) | 241 | #define SOFTRESET_6348_ADSLMIPSPLL_MASK (1 << 10) |
242 | 242 | ||
243 | #define SOFTRESET_6348_ALL (SOFTRESET_6348_SPI_MASK | \ | 243 | #define SOFTRESET_6348_ALL (SOFTRESET_6348_SPI_MASK | \ |
244 | SOFTRESET_6348_ENET_MASK | \ | 244 | SOFTRESET_6348_ENET_MASK | \ |
@@ -560,7 +560,7 @@ | |||
560 | 560 | ||
561 | 561 | ||
562 | #define GPIO_PINMUX_OTHR_REG 0x24 | 562 | #define GPIO_PINMUX_OTHR_REG 0x24 |
563 | #define GPIO_PINMUX_OTHR_6328_USB_SHIFT 12 | 563 | #define GPIO_PINMUX_OTHR_6328_USB_SHIFT 12 |
564 | #define GPIO_PINMUX_OTHR_6328_USB_MASK (3 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) | 564 | #define GPIO_PINMUX_OTHR_6328_USB_MASK (3 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) |
565 | #define GPIO_PINMUX_OTHR_6328_USB_HOST (1 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) | 565 | #define GPIO_PINMUX_OTHR_6328_USB_HOST (1 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) |
566 | #define GPIO_PINMUX_OTHR_6328_USB_DEV (2 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) | 566 | #define GPIO_PINMUX_OTHR_6328_USB_DEV (2 << GPIO_PINMUX_OTHR_6328_USB_SHIFT) |
@@ -572,12 +572,12 @@ | |||
572 | /* those bits must be kept as read in gpio basemode register*/ | 572 | /* those bits must be kept as read in gpio basemode register*/ |
573 | 573 | ||
574 | #define GPIO_STRAPBUS_REG 0x40 | 574 | #define GPIO_STRAPBUS_REG 0x40 |
575 | #define STRAPBUS_6358_BOOT_SEL_PARALLEL (1 << 1) | 575 | #define STRAPBUS_6358_BOOT_SEL_PARALLEL (1 << 1) |
576 | #define STRAPBUS_6358_BOOT_SEL_SERIAL (0 << 1) | 576 | #define STRAPBUS_6358_BOOT_SEL_SERIAL (0 << 1) |
577 | #define STRAPBUS_6368_BOOT_SEL_MASK 0x3 | 577 | #define STRAPBUS_6368_BOOT_SEL_MASK 0x3 |
578 | #define STRAPBUS_6368_BOOT_SEL_NAND 0 | 578 | #define STRAPBUS_6368_BOOT_SEL_NAND 0 |
579 | #define STRAPBUS_6368_BOOT_SEL_SERIAL 1 | 579 | #define STRAPBUS_6368_BOOT_SEL_SERIAL 1 |
580 | #define STRAPBUS_6368_BOOT_SEL_PARALLEL 3 | 580 | #define STRAPBUS_6368_BOOT_SEL_PARALLEL 3 |
581 | 581 | ||
582 | 582 | ||
583 | /************************************************************************* | 583 | /************************************************************************* |
@@ -812,7 +812,7 @@ | |||
812 | #define USBH_PRIV_SWAP_OHCI_DATA_MASK (1 << USBH_PRIV_SWAP_OHCI_DATA_SHIFT) | 812 | #define USBH_PRIV_SWAP_OHCI_DATA_MASK (1 << USBH_PRIV_SWAP_OHCI_DATA_SHIFT) |
813 | 813 | ||
814 | #define USBH_PRIV_UTMI_CTL_6368_REG 0x10 | 814 | #define USBH_PRIV_UTMI_CTL_6368_REG 0x10 |
815 | #define USBH_PRIV_UTMI_CTL_NODRIV_SHIFT 12 | 815 | #define USBH_PRIV_UTMI_CTL_NODRIV_SHIFT 12 |
816 | #define USBH_PRIV_UTMI_CTL_NODRIV_MASK (0xf << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT) | 816 | #define USBH_PRIV_UTMI_CTL_NODRIV_MASK (0xf << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT) |
817 | #define USBH_PRIV_UTMI_CTL_HOSTB_SHIFT 0 | 817 | #define USBH_PRIV_UTMI_CTL_HOSTB_SHIFT 0 |
818 | #define USBH_PRIV_UTMI_CTL_HOSTB_MASK (0xf << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT) | 818 | #define USBH_PRIV_UTMI_CTL_HOSTB_MASK (0xf << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT) |
@@ -841,7 +841,7 @@ | |||
841 | #define USBD_CONTROL_INIT_SEL_MASK (0xf << USBD_CONTROL_INIT_SEL_SHIFT) | 841 | #define USBD_CONTROL_INIT_SEL_MASK (0xf << USBD_CONTROL_INIT_SEL_SHIFT) |
842 | #define USBD_CONTROL_FIFO_RESET_SHIFT 6 | 842 | #define USBD_CONTROL_FIFO_RESET_SHIFT 6 |
843 | #define USBD_CONTROL_FIFO_RESET_MASK (3 << USBD_CONTROL_FIFO_RESET_SHIFT) | 843 | #define USBD_CONTROL_FIFO_RESET_MASK (3 << USBD_CONTROL_FIFO_RESET_SHIFT) |
844 | #define USBD_CONTROL_SETUPERRLOCK_SHIFT 5 | 844 | #define USBD_CONTROL_SETUPERRLOCK_SHIFT 5 |
845 | #define USBD_CONTROL_SETUPERRLOCK_MASK (1 << USBD_CONTROL_SETUPERRLOCK_SHIFT) | 845 | #define USBD_CONTROL_SETUPERRLOCK_MASK (1 << USBD_CONTROL_SETUPERRLOCK_SHIFT) |
846 | #define USBD_CONTROL_DONE_CSRS_SHIFT 0 | 846 | #define USBD_CONTROL_DONE_CSRS_SHIFT 0 |
847 | #define USBD_CONTROL_DONE_CSRS_MASK (1 << USBD_CONTROL_DONE_CSRS_SHIFT) | 847 | #define USBD_CONTROL_DONE_CSRS_MASK (1 << USBD_CONTROL_DONE_CSRS_SHIFT) |
@@ -852,7 +852,7 @@ | |||
852 | #define USBD_STRAPS_APP_SELF_PWR_MASK (1 << USBD_STRAPS_APP_SELF_PWR_SHIFT) | 852 | #define USBD_STRAPS_APP_SELF_PWR_MASK (1 << USBD_STRAPS_APP_SELF_PWR_SHIFT) |
853 | #define USBD_STRAPS_APP_DISCON_SHIFT 9 | 853 | #define USBD_STRAPS_APP_DISCON_SHIFT 9 |
854 | #define USBD_STRAPS_APP_DISCON_MASK (1 << USBD_STRAPS_APP_DISCON_SHIFT) | 854 | #define USBD_STRAPS_APP_DISCON_MASK (1 << USBD_STRAPS_APP_DISCON_SHIFT) |
855 | #define USBD_STRAPS_APP_CSRPRGSUP_SHIFT 8 | 855 | #define USBD_STRAPS_APP_CSRPRGSUP_SHIFT 8 |
856 | #define USBD_STRAPS_APP_CSRPRGSUP_MASK (1 << USBD_STRAPS_APP_CSRPRGSUP_SHIFT) | 856 | #define USBD_STRAPS_APP_CSRPRGSUP_MASK (1 << USBD_STRAPS_APP_CSRPRGSUP_SHIFT) |
857 | #define USBD_STRAPS_APP_RMTWKUP_SHIFT 6 | 857 | #define USBD_STRAPS_APP_RMTWKUP_SHIFT 6 |
858 | #define USBD_STRAPS_APP_RMTWKUP_MASK (1 << USBD_STRAPS_APP_RMTWKUP_SHIFT) | 858 | #define USBD_STRAPS_APP_RMTWKUP_MASK (1 << USBD_STRAPS_APP_RMTWKUP_SHIFT) |
@@ -943,7 +943,7 @@ | |||
943 | #define USBD_EPNUM_TYPEMAP_REG 0x50 | 943 | #define USBD_EPNUM_TYPEMAP_REG 0x50 |
944 | #define USBD_EPNUM_TYPEMAP_TYPE_SHIFT 8 | 944 | #define USBD_EPNUM_TYPEMAP_TYPE_SHIFT 8 |
945 | #define USBD_EPNUM_TYPEMAP_TYPE_MASK (0x3 << USBD_EPNUM_TYPEMAP_TYPE_SHIFT) | 945 | #define USBD_EPNUM_TYPEMAP_TYPE_MASK (0x3 << USBD_EPNUM_TYPEMAP_TYPE_SHIFT) |
946 | #define USBD_EPNUM_TYPEMAP_DMA_CH_SHIFT 0 | 946 | #define USBD_EPNUM_TYPEMAP_DMA_CH_SHIFT 0 |
947 | #define USBD_EPNUM_TYPEMAP_DMA_CH_MASK (0xf << USBD_EPNUM_TYPEMAP_DMACH_SHIFT) | 947 | #define USBD_EPNUM_TYPEMAP_DMA_CH_MASK (0xf << USBD_EPNUM_TYPEMAP_DMACH_SHIFT) |
948 | 948 | ||
949 | /* Misc per-endpoint settings */ | 949 | /* Misc per-endpoint settings */ |
@@ -1048,8 +1048,8 @@ | |||
1048 | #define MPI_L2PREMAP_IS_CARDBUS_MASK (1 << 2) | 1048 | #define MPI_L2PREMAP_IS_CARDBUS_MASK (1 << 2) |
1049 | 1049 | ||
1050 | #define MPI_PCIMODESEL_REG 0x144 | 1050 | #define MPI_PCIMODESEL_REG 0x144 |
1051 | #define MPI_PCIMODESEL_BAR1_NOSWAP_MASK (1 << 0) | 1051 | #define MPI_PCIMODESEL_BAR1_NOSWAP_MASK (1 << 0) |
1052 | #define MPI_PCIMODESEL_BAR2_NOSWAP_MASK (1 << 1) | 1052 | #define MPI_PCIMODESEL_BAR2_NOSWAP_MASK (1 << 1) |
1053 | #define MPI_PCIMODESEL_EXT_ARB_MASK (1 << 2) | 1053 | #define MPI_PCIMODESEL_EXT_ARB_MASK (1 << 2) |
1054 | #define MPI_PCIMODESEL_PREFETCH_SHIFT 4 | 1054 | #define MPI_PCIMODESEL_PREFETCH_SHIFT 4 |
1055 | #define MPI_PCIMODESEL_PREFETCH_MASK (0xf << MPI_PCIMODESEL_PREFETCH_SHIFT) | 1055 | #define MPI_PCIMODESEL_PREFETCH_MASK (0xf << MPI_PCIMODESEL_PREFETCH_SHIFT) |
diff --git a/arch/mips/include/asm/mach-bcm63xx/irq.h b/arch/mips/include/asm/mach-bcm63xx/irq.h index 9332e788a5c9..2bbfc8d1f307 100644 --- a/arch/mips/include/asm/mach-bcm63xx/irq.h +++ b/arch/mips/include/asm/mach-bcm63xx/irq.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_BCM63XX_IRQ_H | 1 | #ifndef __ASM_MACH_BCM63XX_IRQ_H |
2 | #define __ASM_MACH_BCM63XX_IRQ_H | 2 | #define __ASM_MACH_BCM63XX_IRQ_H |
3 | 3 | ||
4 | #define NR_IRQS 128 | 4 | #define NR_IRQS 128 |
5 | #define MIPS_CPU_IRQ_BASE 0 | 5 | #define MIPS_CPU_IRQ_BASE 0 |
6 | 6 | ||
7 | #endif | 7 | #endif |
diff --git a/arch/mips/include/asm/mach-cavium-octeon/irq.h b/arch/mips/include/asm/mach-cavium-octeon/irq.h index 502bb1815ae8..60fc4c347c44 100644 --- a/arch/mips/include/asm/mach-cavium-octeon/irq.h +++ b/arch/mips/include/asm/mach-cavium-octeon/irq.h | |||
@@ -51,8 +51,8 @@ enum octeon_irq { | |||
51 | /* 256 - 511 represent the MSI interrupts 0-255 */ | 51 | /* 256 - 511 represent the MSI interrupts 0-255 */ |
52 | #define OCTEON_IRQ_MSI_BIT0 (256) | 52 | #define OCTEON_IRQ_MSI_BIT0 (256) |
53 | 53 | ||
54 | #define OCTEON_IRQ_MSI_LAST (OCTEON_IRQ_MSI_BIT0 + 255) | 54 | #define OCTEON_IRQ_MSI_LAST (OCTEON_IRQ_MSI_BIT0 + 255) |
55 | #define OCTEON_IRQ_LAST (OCTEON_IRQ_MSI_LAST + 1) | 55 | #define OCTEON_IRQ_LAST (OCTEON_IRQ_MSI_LAST + 1) |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #endif | 58 | #endif |
diff --git a/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h b/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h index dedef7d2b01f..1e7dbb192657 100644 --- a/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h +++ b/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define CP0_PRID_OCTEON_PASS1 0x000d0000 | 16 | #define CP0_PRID_OCTEON_PASS1 0x000d0000 |
17 | #define CP0_PRID_OCTEON_CN30XX 0x000d0200 | 17 | #define CP0_PRID_OCTEON_CN30XX 0x000d0200 |
18 | 18 | ||
19 | .macro kernel_entry_setup | 19 | .macro kernel_entry_setup |
20 | # Registers set by bootloader: | 20 | # Registers set by bootloader: |
21 | # (only 32 bits set by bootloader, all addresses are physical | 21 | # (only 32 bits set by bootloader, all addresses are physical |
22 | # addresses, and need to have the appropriate memory region set | 22 | # addresses, and need to have the appropriate memory region set |
@@ -28,12 +28,12 @@ | |||
28 | .set push | 28 | .set push |
29 | .set arch=octeon | 29 | .set arch=octeon |
30 | # Read the cavium mem control register | 30 | # Read the cavium mem control register |
31 | dmfc0 v0, CP0_CVMMEMCTL_REG | 31 | dmfc0 v0, CP0_CVMMEMCTL_REG |
32 | # Clear the lower 6 bits, the CVMSEG size | 32 | # Clear the lower 6 bits, the CVMSEG size |
33 | dins v0, $0, 0, 6 | 33 | dins v0, $0, 0, 6 |
34 | ori v0, CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE | 34 | ori v0, CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE |
35 | dmtc0 v0, CP0_CVMMEMCTL_REG # Write the cavium mem control register | 35 | dmtc0 v0, CP0_CVMMEMCTL_REG # Write the cavium mem control register |
36 | dmfc0 v0, CP0_CVMCTL_REG # Read the cavium control register | 36 | dmfc0 v0, CP0_CVMCTL_REG # Read the cavium control register |
37 | #ifdef CONFIG_CAVIUM_OCTEON_HW_FIX_UNALIGNED | 37 | #ifdef CONFIG_CAVIUM_OCTEON_HW_FIX_UNALIGNED |
38 | # Disable unaligned load/store support but leave HW fixup enabled | 38 | # Disable unaligned load/store support but leave HW fixup enabled |
39 | or v0, v0, 0x5001 | 39 | or v0, v0, 0x5001 |
@@ -69,14 +69,14 @@ skip: | |||
69 | and v0, v0, v1 | 69 | and v0, v0, v1 |
70 | ori v0, v0, (6 << 7) | 70 | ori v0, v0, (6 << 7) |
71 | # Write the cavium control register | 71 | # Write the cavium control register |
72 | dmtc0 v0, CP0_CVMCTL_REG | 72 | dmtc0 v0, CP0_CVMCTL_REG |
73 | sync | 73 | sync |
74 | # Flush dcache after config change | 74 | # Flush dcache after config change |
75 | cache 9, 0($0) | 75 | cache 9, 0($0) |
76 | # Get my core id | 76 | # Get my core id |
77 | rdhwr v0, $0 | 77 | rdhwr v0, $0 |
78 | # Jump the master to kernel_entry | 78 | # Jump the master to kernel_entry |
79 | bne a2, zero, octeon_main_processor | 79 | bne a2, zero, octeon_main_processor |
80 | nop | 80 | nop |
81 | 81 | ||
82 | #ifdef CONFIG_SMP | 82 | #ifdef CONFIG_SMP |
@@ -87,21 +87,21 @@ skip: | |||
87 | # | 87 | # |
88 | 88 | ||
89 | # This is the variable where the next core to boot os stored | 89 | # This is the variable where the next core to boot os stored |
90 | PTR_LA t0, octeon_processor_boot | 90 | PTR_LA t0, octeon_processor_boot |
91 | octeon_spin_wait_boot: | 91 | octeon_spin_wait_boot: |
92 | # Get the core id of the next to be booted | 92 | # Get the core id of the next to be booted |
93 | LONG_L t1, (t0) | 93 | LONG_L t1, (t0) |
94 | # Keep looping if it isn't me | 94 | # Keep looping if it isn't me |
95 | bne t1, v0, octeon_spin_wait_boot | 95 | bne t1, v0, octeon_spin_wait_boot |
96 | nop | 96 | nop |
97 | # Get my GP from the global variable | 97 | # Get my GP from the global variable |
98 | PTR_LA t0, octeon_processor_gp | 98 | PTR_LA t0, octeon_processor_gp |
99 | LONG_L gp, (t0) | 99 | LONG_L gp, (t0) |
100 | # Get my SP from the global variable | 100 | # Get my SP from the global variable |
101 | PTR_LA t0, octeon_processor_sp | 101 | PTR_LA t0, octeon_processor_sp |
102 | LONG_L sp, (t0) | 102 | LONG_L sp, (t0) |
103 | # Set the SP global variable to zero so the master knows we've started | 103 | # Set the SP global variable to zero so the master knows we've started |
104 | LONG_S zero, (t0) | 104 | LONG_S zero, (t0) |
105 | #ifdef __OCTEON__ | 105 | #ifdef __OCTEON__ |
106 | syncw | 106 | syncw |
107 | syncw | 107 | syncw |
@@ -130,7 +130,7 @@ octeon_main_processor: | |||
130 | /* | 130 | /* |
131 | * Do SMP slave processor setup necessary before we can savely execute C code. | 131 | * Do SMP slave processor setup necessary before we can savely execute C code. |
132 | */ | 132 | */ |
133 | .macro smp_slave_setup | 133 | .macro smp_slave_setup |
134 | .endm | 134 | .endm |
135 | 135 | ||
136 | #endif /* __ASM_MACH_CAVIUM_OCTEON_KERNEL_ENTRY_H */ | 136 | #endif /* __ASM_MACH_CAVIUM_OCTEON_KERNEL_ENTRY_H */ |
diff --git a/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h b/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h index babc8374e378..71d4bface1dc 100644 --- a/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h | |||
@@ -32,9 +32,9 @@ | |||
32 | #define cpu_scache_line_size() 0 | 32 | #define cpu_scache_line_size() 0 |
33 | 33 | ||
34 | #ifdef CONFIG_64BIT | 34 | #ifdef CONFIG_64BIT |
35 | #define cpu_has_llsc 0 | 35 | #define cpu_has_llsc 0 |
36 | #else | 36 | #else |
37 | #define cpu_has_llsc 1 | 37 | #define cpu_has_llsc 1 |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #define cpu_has_mips16 0 | 40 | #define cpu_has_mips16 0 |
diff --git a/arch/mips/include/asm/mach-cobalt/mach-gt64120.h b/arch/mips/include/asm/mach-cobalt/mach-gt64120.h index f8afec3f2943..6fe475b9e965 100644 --- a/arch/mips/include/asm/mach-cobalt/mach-gt64120.h +++ b/arch/mips/include/asm/mach-cobalt/mach-gt64120.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2006 Yoichi Yuasa <yuasa@linux-mips.org> | 2 | * Copyright (C) 2006 Yoichi Yuasa <yuasa@linux-mips.org> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/include/asm/mach-db1x00/bcsr.h b/arch/mips/include/asm/mach-db1x00/bcsr.h index 16f1cf5982b9..3c3ed4ae45e2 100644 --- a/arch/mips/include/asm/mach-db1x00/bcsr.h +++ b/arch/mips/include/asm/mach-db1x00/bcsr.h | |||
@@ -110,7 +110,7 @@ enum bcsr_whoami_boards { | |||
110 | BCSR_WHOAMI_DB1300, | 110 | BCSR_WHOAMI_DB1300, |
111 | }; | 111 | }; |
112 | 112 | ||
113 | /* STATUS reg. Unless otherwise noted, they're valid on all boards. | 113 | /* STATUS reg. Unless otherwise noted, they're valid on all boards. |
114 | * PB1200 = DB1200. | 114 | * PB1200 = DB1200. |
115 | */ | 115 | */ |
116 | #define BCSR_STATUS_PC0VS 0x0003 | 116 | #define BCSR_STATUS_PC0VS 0x0003 |
@@ -190,7 +190,7 @@ enum bcsr_whoami_boards { | |||
190 | #define BCSR_RESETS_OTPWRPROT 0x1000 /* DB1300 */ | 190 | #define BCSR_RESETS_OTPWRPROT 0x1000 /* DB1300 */ |
191 | #define BCSR_RESETS_OTPCSB 0x2000 /* DB1300 */ | 191 | #define BCSR_RESETS_OTPCSB 0x2000 /* DB1300 */ |
192 | #define BCSR_RESETS_OTGPWR 0x4000 /* DB1300 */ | 192 | #define BCSR_RESETS_OTGPWR 0x4000 /* DB1300 */ |
193 | #define BCSR_RESETS_USBHPWR 0x8000 /* DB1300 */ | 193 | #define BCSR_RESETS_USBHPWR 0x8000 /* DB1300 */ |
194 | 194 | ||
195 | #define BCSR_BOARD_LCDVEE 0x0001 | 195 | #define BCSR_BOARD_LCDVEE 0x0001 |
196 | #define BCSR_BOARD_LCDVDD 0x0002 | 196 | #define BCSR_BOARD_LCDVDD 0x0002 |
diff --git a/arch/mips/include/asm/mach-db1x00/db1200.h b/arch/mips/include/asm/mach-db1x00/db1200.h index b2a8319521e5..d3cce7326dd4 100644 --- a/arch/mips/include/asm/mach-db1x00/db1200.h +++ b/arch/mips/include/asm/mach-db1x00/db1200.h | |||
@@ -63,7 +63,7 @@ | |||
63 | * the interrupt define and subtracting the DB1200_INT_BEGIN value. | 63 | * the interrupt define and subtracting the DB1200_INT_BEGIN value. |
64 | * | 64 | * |
65 | * Example: IDE bis pos is = 64 - 64 | 65 | * Example: IDE bis pos is = 64 - 64 |
66 | * ETH bit pos is = 65 - 64 | 66 | * ETH bit pos is = 65 - 64 |
67 | */ | 67 | */ |
68 | enum external_db1200_ints { | 68 | enum external_db1200_ints { |
69 | DB1200_INT_BEGIN = AU1000_MAX_INTR + 1, | 69 | DB1200_INT_BEGIN = AU1000_MAX_INTR + 1, |
diff --git a/arch/mips/include/asm/mach-db1x00/db1300.h b/arch/mips/include/asm/mach-db1x00/db1300.h index 7fe5fb3ba877..3d1ede46f059 100644 --- a/arch/mips/include/asm/mach-db1x00/db1300.h +++ b/arch/mips/include/asm/mach-db1x00/db1300.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define DB1300_SD1_INSERT_INT (DB1300_FIRST_INT + 12) | 21 | #define DB1300_SD1_INSERT_INT (DB1300_FIRST_INT + 12) |
22 | #define DB1300_SD1_EJECT_INT (DB1300_FIRST_INT + 13) | 22 | #define DB1300_SD1_EJECT_INT (DB1300_FIRST_INT + 13) |
23 | #define DB1300_OTG_VBUS_OC_INT (DB1300_FIRST_INT + 14) | 23 | #define DB1300_OTG_VBUS_OC_INT (DB1300_FIRST_INT + 14) |
24 | #define DB1300_HOST_VBUS_OC_INT (DB1300_FIRST_INT + 15) | 24 | #define DB1300_HOST_VBUS_OC_INT (DB1300_FIRST_INT + 15) |
25 | #define DB1300_LAST_INT (DB1300_FIRST_INT + 15) | 25 | #define DB1300_LAST_INT (DB1300_FIRST_INT + 15) |
26 | 26 | ||
27 | /* SMSC9210 CS */ | 27 | /* SMSC9210 CS */ |
diff --git a/arch/mips/include/asm/mach-emma2rh/irq.h b/arch/mips/include/asm/mach-emma2rh/irq.h index 5439eb856461..2f7155dade29 100644 --- a/arch/mips/include/asm/mach-emma2rh/irq.h +++ b/arch/mips/include/asm/mach-emma2rh/irq.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifndef __ASM_MACH_EMMA2RH_IRQ_H | 8 | #ifndef __ASM_MACH_EMMA2RH_IRQ_H |
9 | #define __ASM_MACH_EMMA2RH_IRQ_H | 9 | #define __ASM_MACH_EMMA2RH_IRQ_H |
10 | 10 | ||
11 | #define NR_IRQS 256 | 11 | #define NR_IRQS 256 |
12 | 12 | ||
13 | #include_next <irq.h> | 13 | #include_next <irq.h> |
14 | 14 | ||
diff --git a/arch/mips/include/asm/mach-generic/cpu-feature-overrides.h b/arch/mips/include/asm/mach-generic/cpu-feature-overrides.h index 7c185bb06f13..42be9e9ced2c 100644 --- a/arch/mips/include/asm/mach-generic/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-generic/cpu-feature-overrides.h | |||
@@ -8,6 +8,6 @@ | |||
8 | #ifndef __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H | 8 | #ifndef __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H |
9 | #define __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H | 9 | #define __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H |
10 | 10 | ||
11 | /* Intentionally empty file ... */ | 11 | /* Intentionally empty file ... */ |
12 | 12 | ||
13 | #endif /* __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H */ | 13 | #endif /* __ASM_MACH_GENERIC_CPU_FEATURE_OVERRIDES_H */ |
diff --git a/arch/mips/include/asm/mach-generic/floppy.h b/arch/mips/include/asm/mach-generic/floppy.h index a38f4d43e5e5..5b5cd689a2f7 100644 --- a/arch/mips/include/asm/mach-generic/floppy.h +++ b/arch/mips/include/asm/mach-generic/floppy.h | |||
@@ -98,7 +98,7 @@ static inline void fd_disable_irq(void) | |||
98 | static inline int fd_request_irq(void) | 98 | static inline int fd_request_irq(void) |
99 | { | 99 | { |
100 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 100 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
101 | 0, "floppy", NULL); | 101 | 0, "floppy", NULL); |
102 | } | 102 | } |
103 | 103 | ||
104 | static inline void fd_free_irq(void) | 104 | static inline void fd_free_irq(void) |
@@ -106,7 +106,7 @@ static inline void fd_free_irq(void) | |||
106 | free_irq(FLOPPY_IRQ, NULL); | 106 | free_irq(FLOPPY_IRQ, NULL); |
107 | } | 107 | } |
108 | 108 | ||
109 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); | 109 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); |
110 | 110 | ||
111 | 111 | ||
112 | static inline unsigned long fd_getfdaddr1(void) | 112 | static inline unsigned long fd_getfdaddr1(void) |
diff --git a/arch/mips/include/asm/mach-generic/ide.h b/arch/mips/include/asm/mach-generic/ide.h index 9c93a5b36f2a..affa66f5c2da 100644 --- a/arch/mips/include/asm/mach-generic/ide.h +++ b/arch/mips/include/asm/mach-generic/ide.h | |||
@@ -51,7 +51,7 @@ static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long si | |||
51 | /* | 51 | /* |
52 | * insw() and gang might be called with interrupts disabled, so we can't | 52 | * insw() and gang might be called with interrupts disabled, so we can't |
53 | * send IPIs for flushing due to the potencial of deadlocks, see the comment | 53 | * send IPIs for flushing due to the potencial of deadlocks, see the comment |
54 | * above smp_call_function() in arch/mips/kernel/smp.c. We work around the | 54 | * above smp_call_function() in arch/mips/kernel/smp.c. We work around the |
55 | * problem by disabling preemption so we know we actually perform the flush | 55 | * problem by disabling preemption so we know we actually perform the flush |
56 | * on the processor that actually has the lines to be flushed which hopefully | 56 | * on the processor that actually has the lines to be flushed which hopefully |
57 | * is even better for performance anyway. | 57 | * is even better for performance anyway. |
@@ -123,7 +123,7 @@ static inline void __ide_mm_outsl(void __iomem * port, void *addr, u32 count) | |||
123 | __ide_flush_epilogue(); | 123 | __ide_flush_epilogue(); |
124 | } | 124 | } |
125 | 125 | ||
126 | /* ide_insw calls insw, not __ide_insw. Why? */ | 126 | /* ide_insw calls insw, not __ide_insw. Why? */ |
127 | #undef insw | 127 | #undef insw |
128 | #undef insl | 128 | #undef insl |
129 | #undef outsw | 129 | #undef outsw |
diff --git a/arch/mips/include/asm/mach-generic/irq.h b/arch/mips/include/asm/mach-generic/irq.h index e014264b2be2..139cd200e79d 100644 --- a/arch/mips/include/asm/mach-generic/irq.h +++ b/arch/mips/include/asm/mach-generic/irq.h | |||
@@ -9,12 +9,12 @@ | |||
9 | #define __ASM_MACH_GENERIC_IRQ_H | 9 | #define __ASM_MACH_GENERIC_IRQ_H |
10 | 10 | ||
11 | #ifndef NR_IRQS | 11 | #ifndef NR_IRQS |
12 | #define NR_IRQS 128 | 12 | #define NR_IRQS 128 |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #ifdef CONFIG_I8259 | 15 | #ifdef CONFIG_I8259 |
16 | #ifndef I8259A_IRQ_BASE | 16 | #ifndef I8259A_IRQ_BASE |
17 | #define I8259A_IRQ_BASE 0 | 17 | #define I8259A_IRQ_BASE 0 |
18 | #endif | 18 | #endif |
19 | #endif | 19 | #endif |
20 | 20 | ||
diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h index d7a9efd3a5ce..73d717a75cb0 100644 --- a/arch/mips/include/asm/mach-generic/spaces.h +++ b/arch/mips/include/asm/mach-generic/spaces.h | |||
@@ -69,7 +69,7 @@ | |||
69 | #define HIGHMEM_START (_AC(1, UL) << _AC(59, UL)) | 69 | #define HIGHMEM_START (_AC(1, UL) << _AC(59, UL)) |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) | 72 | #define TO_PHYS(x) ( ((x) & TO_PHYS_MASK)) |
73 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | 73 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) |
74 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | 74 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) |
75 | 75 | ||
diff --git a/arch/mips/include/asm/mach-ip27/kernel-entry-init.h b/arch/mips/include/asm/mach-ip27/kernel-entry-init.h index 624d66c7f290..a323efb720dc 100644 --- a/arch/mips/include/asm/mach-ip27/kernel-entry-init.h +++ b/arch/mips/include/asm/mach-ip27/kernel-entry-init.h | |||
@@ -51,8 +51,8 @@ | |||
51 | * We might not get launched at the address the kernel is linked to, | 51 | * We might not get launched at the address the kernel is linked to, |
52 | * so we jump there. | 52 | * so we jump there. |
53 | */ | 53 | */ |
54 | PTR_LA t0, 0f | 54 | PTR_LA t0, 0f |
55 | jr t0 | 55 | jr t0 |
56 | 0: | 56 | 0: |
57 | .endm | 57 | .endm |
58 | 58 | ||
diff --git a/arch/mips/include/asm/mach-ip27/mmzone.h b/arch/mips/include/asm/mach-ip27/mmzone.h index 986a3b9b59a7..ebc9377ff876 100644 --- a/arch/mips/include/asm/mach-ip27/mmzone.h +++ b/arch/mips/include/asm/mach-ip27/mmzone.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #define pa_to_nid(addr) NASID_TO_COMPACT_NODEID(NASID_GET(addr)) | 8 | #define pa_to_nid(addr) NASID_TO_COMPACT_NODEID(NASID_GET(addr)) |
9 | 9 | ||
10 | #define LEVELS_PER_SLICE 128 | 10 | #define LEVELS_PER_SLICE 128 |
11 | 11 | ||
12 | struct slice_data { | 12 | struct slice_data { |
13 | unsigned long irq_enable_mask[2]; | 13 | unsigned long irq_enable_mask[2]; |
diff --git a/arch/mips/include/asm/mach-ip27/topology.h b/arch/mips/include/asm/mach-ip27/topology.h index b2cf641f206f..defd135e7ac8 100644 --- a/arch/mips/include/asm/mach-ip27/topology.h +++ b/arch/mips/include/asm/mach-ip27/topology.h | |||
@@ -34,7 +34,7 @@ extern int pcibus_to_node(struct pci_bus *); | |||
34 | 34 | ||
35 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; | 35 | extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES]; |
36 | 36 | ||
37 | #define node_distance(from, to) (__node_distances[(from)][(to)]) | 37 | #define node_distance(from, to) (__node_distances[(from)][(to)]) |
38 | 38 | ||
39 | #include <asm-generic/topology.h> | 39 | #include <asm-generic/topology.h> |
40 | 40 | ||
diff --git a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h index 50d344ca60a8..65e9c856390d 100644 --- a/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-ip28/cpu-feature-overrides.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define cpu_has_ic_fills_f_dc 0 | 28 | #define cpu_has_ic_fills_f_dc 0 |
29 | #define cpu_has_dsp 0 | 29 | #define cpu_has_dsp 0 |
30 | #define cpu_has_dsp2 0 | 30 | #define cpu_has_dsp2 0 |
31 | #define cpu_icache_snoops_remote_store 1 | 31 | #define cpu_icache_snoops_remote_store 1 |
32 | #define cpu_has_mipsmt 0 | 32 | #define cpu_has_mipsmt 0 |
33 | #define cpu_has_userlocal 0 | 33 | #define cpu_has_userlocal 0 |
34 | 34 | ||
diff --git a/arch/mips/include/asm/mach-ip28/spaces.h b/arch/mips/include/asm/mach-ip28/spaces.h index 05aabb27e5e7..5edf05d9dad8 100644 --- a/arch/mips/include/asm/mach-ip28/spaces.h +++ b/arch/mips/include/asm/mach-ip28/spaces.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle | 6 | * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle |
7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki | 7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki |
8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. |
9 | * 2004 pf | 9 | * 2004 pf |
10 | */ | 10 | */ |
11 | #ifndef _ASM_MACH_IP28_SPACES_H | 11 | #ifndef _ASM_MACH_IP28_SPACES_H |
12 | #define _ASM_MACH_IP28_SPACES_H | 12 | #define _ASM_MACH_IP28_SPACES_H |
diff --git a/arch/mips/include/asm/mach-ip32/dma-coherence.h b/arch/mips/include/asm/mach-ip32/dma-coherence.h index c8fb5aacf50a..073f0c4760ba 100644 --- a/arch/mips/include/asm/mach-ip32/dma-coherence.h +++ b/arch/mips/include/asm/mach-ip32/dma-coherence.h | |||
@@ -50,7 +50,7 @@ static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, | |||
50 | return pa; | 50 | return pa; |
51 | } | 51 | } |
52 | 52 | ||
53 | /* This is almost certainly wrong but it's what dma-ip32.c used to use */ | 53 | /* This is almost certainly wrong but it's what dma-ip32.c used to use */ |
54 | static inline unsigned long plat_dma_addr_to_phys(struct device *dev, | 54 | static inline unsigned long plat_dma_addr_to_phys(struct device *dev, |
55 | dma_addr_t dma_addr) | 55 | dma_addr_t dma_addr) |
56 | { | 56 | { |
diff --git a/arch/mips/include/asm/mach-ip32/war.h b/arch/mips/include/asm/mach-ip32/war.h index 7237a935a133..9807ecda5a88 100644 --- a/arch/mips/include/asm/mach-ip32/war.h +++ b/arch/mips/include/asm/mach-ip32/war.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #define MIPS4K_ICACHE_REFILL_WAR 0 | 17 | #define MIPS4K_ICACHE_REFILL_WAR 0 |
18 | #define MIPS_CACHE_SYNC_WAR 0 | 18 | #define MIPS_CACHE_SYNC_WAR 0 |
19 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 | 19 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 |
20 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 | 20 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 |
21 | #define R10000_LLSC_WAR 0 | 21 | #define R10000_LLSC_WAR 0 |
22 | #define MIPS34K_MISSED_ITLB_WAR 0 | 22 | #define MIPS34K_MISSED_ITLB_WAR 0 |
23 | 23 | ||
diff --git a/arch/mips/include/asm/mach-jazz/floppy.h b/arch/mips/include/asm/mach-jazz/floppy.h index 88b5acb75145..62aa1e287fba 100644 --- a/arch/mips/include/asm/mach-jazz/floppy.h +++ b/arch/mips/include/asm/mach-jazz/floppy.h | |||
@@ -90,7 +90,7 @@ static inline void fd_disable_irq(void) | |||
90 | static inline int fd_request_irq(void) | 90 | static inline int fd_request_irq(void) |
91 | { | 91 | { |
92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
93 | 0, "floppy", NULL); | 93 | 0, "floppy", NULL); |
94 | } | 94 | } |
95 | 95 | ||
96 | static inline void fd_free_irq(void) | 96 | static inline void fd_free_irq(void) |
diff --git a/arch/mips/include/asm/mach-jz4740/clock.h b/arch/mips/include/asm/mach-jz4740/clock.h index 1b7408dd0e23..16659cd76d4e 100644 --- a/arch/mips/include/asm/mach-jz4740/clock.h +++ b/arch/mips/include/asm/mach-jz4740/clock.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> | 2 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | * | 8 | * |
diff --git a/arch/mips/include/asm/mach-jz4740/dma.h b/arch/mips/include/asm/mach-jz4740/dma.h index a3be12183599..98b4e7c0dbae 100644 --- a/arch/mips/include/asm/mach-jz4740/dma.h +++ b/arch/mips/include/asm/mach-jz4740/dma.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ7420/JZ4740 DMA definitions | 3 | * JZ7420/JZ4740 DMA definitions |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
@@ -40,9 +40,9 @@ enum jz4740_dma_width { | |||
40 | }; | 40 | }; |
41 | 41 | ||
42 | enum jz4740_dma_transfer_size { | 42 | enum jz4740_dma_transfer_size { |
43 | JZ4740_DMA_TRANSFER_SIZE_4BYTE = 0, | 43 | JZ4740_DMA_TRANSFER_SIZE_4BYTE = 0, |
44 | JZ4740_DMA_TRANSFER_SIZE_1BYTE = 1, | 44 | JZ4740_DMA_TRANSFER_SIZE_1BYTE = 1, |
45 | JZ4740_DMA_TRANSFER_SIZE_2BYTE = 2, | 45 | JZ4740_DMA_TRANSFER_SIZE_2BYTE = 2, |
46 | JZ4740_DMA_TRANSFER_SIZE_16BYTE = 3, | 46 | JZ4740_DMA_TRANSFER_SIZE_16BYTE = 3, |
47 | JZ4740_DMA_TRANSFER_SIZE_32BYTE = 4, | 47 | JZ4740_DMA_TRANSFER_SIZE_32BYTE = 4, |
48 | }; | 48 | }; |
@@ -87,4 +87,4 @@ uint32_t jz4740_dma_get_residue(const struct jz4740_dma_chan *dma); | |||
87 | void jz4740_dma_set_complete_cb(struct jz4740_dma_chan *dma, | 87 | void jz4740_dma_set_complete_cb(struct jz4740_dma_chan *dma, |
88 | jz4740_dma_complete_callback_t cb); | 88 | jz4740_dma_complete_callback_t cb); |
89 | 89 | ||
90 | #endif /* __ASM_JZ4740_DMA_H__ */ | 90 | #endif /* __ASM_JZ4740_DMA_H__ */ |
diff --git a/arch/mips/include/asm/mach-jz4740/gpio.h b/arch/mips/include/asm/mach-jz4740/gpio.h index 1a6482ea0bb3..eaacba79cf18 100644 --- a/arch/mips/include/asm/mach-jz4740/gpio.h +++ b/arch/mips/include/asm/mach-jz4740/gpio.h | |||
@@ -198,7 +198,7 @@ uint32_t jz_gpio_port_get_value(int port, uint32_t mask); | |||
198 | #define JZ_GPIO_FUNC_MEM_ADDR14 JZ_GPIO_FUNC1 | 198 | #define JZ_GPIO_FUNC_MEM_ADDR14 JZ_GPIO_FUNC1 |
199 | #define JZ_GPIO_FUNC_MEM_ADDR15 JZ_GPIO_FUNC1 | 199 | #define JZ_GPIO_FUNC_MEM_ADDR15 JZ_GPIO_FUNC1 |
200 | #define JZ_GPIO_FUNC_MEM_ADDR16 JZ_GPIO_FUNC1 | 200 | #define JZ_GPIO_FUNC_MEM_ADDR16 JZ_GPIO_FUNC1 |
201 | #define JZ_GPIO_FUNC_LCD_CLS JZ_GPIO_FUNC1 | 201 | #define JZ_GPIO_FUNC_LCD_CLS JZ_GPIO_FUNC1 |
202 | #define JZ_GPIO_FUNC_LCD_SPL JZ_GPIO_FUNC1 | 202 | #define JZ_GPIO_FUNC_LCD_SPL JZ_GPIO_FUNC1 |
203 | #define JZ_GPIO_FUNC_MEM_DCS JZ_GPIO_FUNC1 | 203 | #define JZ_GPIO_FUNC_MEM_DCS JZ_GPIO_FUNC1 |
204 | #define JZ_GPIO_FUNC_MEM_RAS JZ_GPIO_FUNC1 | 204 | #define JZ_GPIO_FUNC_MEM_RAS JZ_GPIO_FUNC1 |
diff --git a/arch/mips/include/asm/mach-jz4740/irq.h b/arch/mips/include/asm/mach-jz4740/irq.h index 5ad1a9c113c6..df50736749c1 100644 --- a/arch/mips/include/asm/mach-jz4740/irq.h +++ b/arch/mips/include/asm/mach-jz4740/irq.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 IRQ definitions | 3 | * JZ4740 IRQ definitions |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/include/asm/mach-jz4740/platform.h b/arch/mips/include/asm/mach-jz4740/platform.h index 163e81db880d..72cfebdb5a47 100644 --- a/arch/mips/include/asm/mach-jz4740/platform.h +++ b/arch/mips/include/asm/mach-jz4740/platform.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 platform device definitions | 3 | * JZ4740 platform device definitions |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/include/asm/mach-jz4740/timer.h b/arch/mips/include/asm/mach-jz4740/timer.h index a7759fb1f73d..8750a1d04e22 100644 --- a/arch/mips/include/asm/mach-jz4740/timer.h +++ b/arch/mips/include/asm/mach-jz4740/timer.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 platform timer support | 3 | * JZ4740 platform timer support |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h index fccac3592651..98d6a2f14aaf 100644 --- a/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h +++ b/arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h | |||
@@ -44,7 +44,7 @@ | |||
44 | 44 | ||
45 | /* BOOT_SEL - find what boot media we have */ | 45 | /* BOOT_SEL - find what boot media we have */ |
46 | #define BS_FLASH 0x1 | 46 | #define BS_FLASH 0x1 |
47 | #define BS_SPI 0x4 | 47 | #define BS_SPI 0x4 |
48 | 48 | ||
49 | /* global register ranges */ | 49 | /* global register ranges */ |
50 | extern __iomem void *ltq_ebu_membase; | 50 | extern __iomem void *ltq_ebu_membase; |
diff --git a/arch/mips/include/asm/mach-lantiq/war.h b/arch/mips/include/asm/mach-lantiq/war.h index b6c568c280ef..358ca979c1bd 100644 --- a/arch/mips/include/asm/mach-lantiq/war.h +++ b/arch/mips/include/asm/mach-lantiq/war.h | |||
@@ -7,17 +7,17 @@ | |||
7 | #ifndef __ASM_MIPS_MACH_LANTIQ_WAR_H | 7 | #ifndef __ASM_MIPS_MACH_LANTIQ_WAR_H |
8 | #define __ASM_MIPS_MACH_LANTIQ_WAR_H | 8 | #define __ASM_MIPS_MACH_LANTIQ_WAR_H |
9 | 9 | ||
10 | #define R4600_V1_INDEX_ICACHEOP_WAR 0 | 10 | #define R4600_V1_INDEX_ICACHEOP_WAR 0 |
11 | #define R4600_V1_HIT_CACHEOP_WAR 0 | 11 | #define R4600_V1_HIT_CACHEOP_WAR 0 |
12 | #define R4600_V2_HIT_CACHEOP_WAR 0 | 12 | #define R4600_V2_HIT_CACHEOP_WAR 0 |
13 | #define R5432_CP0_INTERRUPT_WAR 0 | 13 | #define R5432_CP0_INTERRUPT_WAR 0 |
14 | #define BCM1250_M3_WAR 0 | 14 | #define BCM1250_M3_WAR 0 |
15 | #define SIBYTE_1956_WAR 0 | 15 | #define SIBYTE_1956_WAR 0 |
16 | #define MIPS4K_ICACHE_REFILL_WAR 0 | 16 | #define MIPS4K_ICACHE_REFILL_WAR 0 |
17 | #define MIPS_CACHE_SYNC_WAR 0 | 17 | #define MIPS_CACHE_SYNC_WAR 0 |
18 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 | 18 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 |
19 | #define ICACHE_REFILLS_WORKAROUND_WAR 0 | 19 | #define ICACHE_REFILLS_WORKAROUND_WAR 0 |
20 | #define R10000_LLSC_WAR 0 | 20 | #define R10000_LLSC_WAR 0 |
21 | #define MIPS34K_MISSED_ITLB_WAR 0 | 21 | #define MIPS34K_MISSED_ITLB_WAR 0 |
22 | 22 | ||
23 | #endif | 23 | #endif |
diff --git a/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h b/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h index 872943a4b90e..5f8693d5ab12 100644 --- a/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h +++ b/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define LTQ_DESC_SIZE 0x08 /* each descriptor is 64bit */ | 21 | #define LTQ_DESC_SIZE 0x08 /* each descriptor is 64bit */ |
22 | #define LTQ_DESC_NUM 0x40 /* 64 descriptors / channel */ | 22 | #define LTQ_DESC_NUM 0x40 /* 64 descriptors / channel */ |
23 | 23 | ||
24 | #define LTQ_DMA_OWN BIT(31) /* owner bit */ | 24 | #define LTQ_DMA_OWN BIT(31) /* owner bit */ |
25 | #define LTQ_DMA_C BIT(30) /* complete bit */ | 25 | #define LTQ_DMA_C BIT(30) /* complete bit */ |
26 | #define LTQ_DMA_SOP BIT(29) /* start of packet */ | 26 | #define LTQ_DMA_SOP BIT(29) /* start of packet */ |
27 | #define LTQ_DMA_EOP BIT(28) /* end of packet */ | 27 | #define LTQ_DMA_EOP BIT(28) /* end of packet */ |
@@ -38,7 +38,7 @@ struct ltq_dma_channel { | |||
38 | int nr; /* the channel number */ | 38 | int nr; /* the channel number */ |
39 | int irq; /* the mapped irq */ | 39 | int irq; /* the mapped irq */ |
40 | int desc; /* the current descriptor */ | 40 | int desc; /* the current descriptor */ |
41 | struct ltq_dma_desc *desc_base; /* the descriptor base */ | 41 | struct ltq_dma_desc *desc_base; /* the descriptor base */ |
42 | int phys; /* physical addr */ | 42 | int phys; /* physical addr */ |
43 | }; | 43 | }; |
44 | 44 | ||
diff --git a/arch/mips/include/asm/mach-lasat/mach-gt64120.h b/arch/mips/include/asm/mach-lasat/mach-gt64120.h index 1a9ad45cc135..c253d3fa5167 100644 --- a/arch/mips/include/asm/mach-lasat/mach-gt64120.h +++ b/arch/mips/include/asm/mach-lasat/mach-gt64120.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This is a direct copy of the ev96100.h file, with a global | 2 | * This is a direct copy of the ev96100.h file, with a global |
3 | * search and replace. The numbers are the same. | 3 | * search and replace. The numbers are the same. |
4 | * | 4 | * |
5 | * The reason I'm duplicating this is so that the 64120/96100 | 5 | * The reason I'm duplicating this is so that the 64120/96100 |
6 | * defines won't be confusing in the source code. | 6 | * defines won't be confusing in the source code. |
@@ -18,8 +18,8 @@ | |||
18 | * | 18 | * |
19 | * (Guessing ...) | 19 | * (Guessing ...) |
20 | */ | 20 | */ |
21 | #define GT_PCI_MEM_BASE 0x12000000UL | 21 | #define GT_PCI_MEM_BASE 0x12000000UL |
22 | #define GT_PCI_MEM_SIZE 0x02000000UL | 22 | #define GT_PCI_MEM_SIZE 0x02000000UL |
23 | #define GT_PCI_IO_BASE 0x10000000UL | 23 | #define GT_PCI_IO_BASE 0x10000000UL |
24 | #define GT_PCI_IO_SIZE 0x02000000UL | 24 | #define GT_PCI_IO_SIZE 0x02000000UL |
25 | #define GT_ISA_IO_BASE PCI_IO_BASE | 25 | #define GT_ISA_IO_BASE PCI_IO_BASE |
diff --git a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h index 1a05d854e34c..75fd8c0f986e 100644 --- a/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-loongson/cpu-feature-overrides.h | |||
@@ -8,9 +8,9 @@ | |||
8 | * Copyright (C) 2009 Zhang Le <r0bertz@gentoo.org> | 8 | * Copyright (C) 2009 Zhang Le <r0bertz@gentoo.org> |
9 | * | 9 | * |
10 | * reference: /proc/cpuinfo, | 10 | * reference: /proc/cpuinfo, |
11 | * arch/mips/kernel/cpu-probe.c(cpu_probe_legacy), | 11 | * arch/mips/kernel/cpu-probe.c(cpu_probe_legacy), |
12 | * arch/mips/kernel/proc.c(show_cpuinfo), | 12 | * arch/mips/kernel/proc.c(show_cpuinfo), |
13 | * loongson2f user manual. | 13 | * loongson2f user manual. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H | 16 | #ifndef __ASM_MACH_LOONGSON_CPU_FEATURE_OVERRIDES_H |
@@ -37,7 +37,7 @@ | |||
37 | #define cpu_has_fpu 1 | 37 | #define cpu_has_fpu 1 |
38 | #define cpu_has_ic_fills_f_dc 0 | 38 | #define cpu_has_ic_fills_f_dc 0 |
39 | #define cpu_has_inclusive_pcaches 1 | 39 | #define cpu_has_inclusive_pcaches 1 |
40 | #define cpu_has_llsc 1 | 40 | #define cpu_has_llsc 1 |
41 | #define cpu_has_mcheck 0 | 41 | #define cpu_has_mcheck 0 |
42 | #define cpu_has_mdmx 0 | 42 | #define cpu_has_mdmx 0 |
43 | #define cpu_has_mips16 0 | 43 | #define cpu_has_mips16 0 |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h index 2a8e2bb5d539..a0ee0cb775ad 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * Author : jlliu <liujl@lemote.com> | 5 | * Author : jlliu <liujl@lemote.com> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef _CS5536_H | 8 | #ifndef _CS5536_H |
9 | #define _CS5536_H | 9 | #define _CS5536_H |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | 12 | ||
@@ -16,237 +16,237 @@ extern void _wrmsr(u32 msr, u32 hi, u32 lo); | |||
16 | /* | 16 | /* |
17 | * MSR module base | 17 | * MSR module base |
18 | */ | 18 | */ |
19 | #define CS5536_SB_MSR_BASE (0x00000000) | 19 | #define CS5536_SB_MSR_BASE (0x00000000) |
20 | #define CS5536_GLIU_MSR_BASE (0x10000000) | 20 | #define CS5536_GLIU_MSR_BASE (0x10000000) |
21 | #define CS5536_ILLEGAL_MSR_BASE (0x20000000) | 21 | #define CS5536_ILLEGAL_MSR_BASE (0x20000000) |
22 | #define CS5536_USB_MSR_BASE (0x40000000) | 22 | #define CS5536_USB_MSR_BASE (0x40000000) |
23 | #define CS5536_IDE_MSR_BASE (0x60000000) | 23 | #define CS5536_IDE_MSR_BASE (0x60000000) |
24 | #define CS5536_DIVIL_MSR_BASE (0x80000000) | 24 | #define CS5536_DIVIL_MSR_BASE (0x80000000) |
25 | #define CS5536_ACC_MSR_BASE (0xa0000000) | 25 | #define CS5536_ACC_MSR_BASE (0xa0000000) |
26 | #define CS5536_UNUSED_MSR_BASE (0xc0000000) | 26 | #define CS5536_UNUSED_MSR_BASE (0xc0000000) |
27 | #define CS5536_GLCP_MSR_BASE (0xe0000000) | 27 | #define CS5536_GLCP_MSR_BASE (0xe0000000) |
28 | 28 | ||
29 | #define SB_MSR_REG(offset) (CS5536_SB_MSR_BASE | (offset)) | 29 | #define SB_MSR_REG(offset) (CS5536_SB_MSR_BASE | (offset)) |
30 | #define GLIU_MSR_REG(offset) (CS5536_GLIU_MSR_BASE | (offset)) | 30 | #define GLIU_MSR_REG(offset) (CS5536_GLIU_MSR_BASE | (offset)) |
31 | #define ILLEGAL_MSR_REG(offset) (CS5536_ILLEGAL_MSR_BASE | (offset)) | 31 | #define ILLEGAL_MSR_REG(offset) (CS5536_ILLEGAL_MSR_BASE | (offset)) |
32 | #define USB_MSR_REG(offset) (CS5536_USB_MSR_BASE | (offset)) | 32 | #define USB_MSR_REG(offset) (CS5536_USB_MSR_BASE | (offset)) |
33 | #define IDE_MSR_REG(offset) (CS5536_IDE_MSR_BASE | (offset)) | 33 | #define IDE_MSR_REG(offset) (CS5536_IDE_MSR_BASE | (offset)) |
34 | #define DIVIL_MSR_REG(offset) (CS5536_DIVIL_MSR_BASE | (offset)) | 34 | #define DIVIL_MSR_REG(offset) (CS5536_DIVIL_MSR_BASE | (offset)) |
35 | #define ACC_MSR_REG(offset) (CS5536_ACC_MSR_BASE | (offset)) | 35 | #define ACC_MSR_REG(offset) (CS5536_ACC_MSR_BASE | (offset)) |
36 | #define UNUSED_MSR_REG(offset) (CS5536_UNUSED_MSR_BASE | (offset)) | 36 | #define UNUSED_MSR_REG(offset) (CS5536_UNUSED_MSR_BASE | (offset)) |
37 | #define GLCP_MSR_REG(offset) (CS5536_GLCP_MSR_BASE | (offset)) | 37 | #define GLCP_MSR_REG(offset) (CS5536_GLCP_MSR_BASE | (offset)) |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * BAR SPACE OF VIRTUAL PCI : | 40 | * BAR SPACE OF VIRTUAL PCI : |
41 | * range for pci probe use, length is the actual size. | 41 | * range for pci probe use, length is the actual size. |
42 | */ | 42 | */ |
43 | /* IO space for all DIVIL modules */ | 43 | /* IO space for all DIVIL modules */ |
44 | #define CS5536_IRQ_RANGE 0xffffffe0 /* USERD FOR PCI PROBE */ | 44 | #define CS5536_IRQ_RANGE 0xffffffe0 /* USERD FOR PCI PROBE */ |
45 | #define CS5536_IRQ_LENGTH 0x20 /* THE REGS ACTUAL LENGTH */ | 45 | #define CS5536_IRQ_LENGTH 0x20 /* THE REGS ACTUAL LENGTH */ |
46 | #define CS5536_SMB_RANGE 0xfffffff8 | 46 | #define CS5536_SMB_RANGE 0xfffffff8 |
47 | #define CS5536_SMB_LENGTH 0x08 | 47 | #define CS5536_SMB_LENGTH 0x08 |
48 | #define CS5536_GPIO_RANGE 0xffffff00 | 48 | #define CS5536_GPIO_RANGE 0xffffff00 |
49 | #define CS5536_GPIO_LENGTH 0x100 | 49 | #define CS5536_GPIO_LENGTH 0x100 |
50 | #define CS5536_MFGPT_RANGE 0xffffffc0 | 50 | #define CS5536_MFGPT_RANGE 0xffffffc0 |
51 | #define CS5536_MFGPT_LENGTH 0x40 | 51 | #define CS5536_MFGPT_LENGTH 0x40 |
52 | #define CS5536_ACPI_RANGE 0xffffffe0 | 52 | #define CS5536_ACPI_RANGE 0xffffffe0 |
53 | #define CS5536_ACPI_LENGTH 0x20 | 53 | #define CS5536_ACPI_LENGTH 0x20 |
54 | #define CS5536_PMS_RANGE 0xffffff80 | 54 | #define CS5536_PMS_RANGE 0xffffff80 |
55 | #define CS5536_PMS_LENGTH 0x80 | 55 | #define CS5536_PMS_LENGTH 0x80 |
56 | /* IO space for IDE */ | 56 | /* IO space for IDE */ |
57 | #define CS5536_IDE_RANGE 0xfffffff0 | 57 | #define CS5536_IDE_RANGE 0xfffffff0 |
58 | #define CS5536_IDE_LENGTH 0x10 | 58 | #define CS5536_IDE_LENGTH 0x10 |
59 | /* IO space for ACC */ | 59 | /* IO space for ACC */ |
60 | #define CS5536_ACC_RANGE 0xffffff80 | 60 | #define CS5536_ACC_RANGE 0xffffff80 |
61 | #define CS5536_ACC_LENGTH 0x80 | 61 | #define CS5536_ACC_LENGTH 0x80 |
62 | /* MEM space for ALL USB modules */ | 62 | /* MEM space for ALL USB modules */ |
63 | #define CS5536_OHCI_RANGE 0xfffff000 | 63 | #define CS5536_OHCI_RANGE 0xfffff000 |
64 | #define CS5536_OHCI_LENGTH 0x1000 | 64 | #define CS5536_OHCI_LENGTH 0x1000 |
65 | #define CS5536_EHCI_RANGE 0xfffff000 | 65 | #define CS5536_EHCI_RANGE 0xfffff000 |
66 | #define CS5536_EHCI_LENGTH 0x1000 | 66 | #define CS5536_EHCI_LENGTH 0x1000 |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * PCI MSR ACCESS | 69 | * PCI MSR ACCESS |
70 | */ | 70 | */ |
71 | #define PCI_MSR_CTRL 0xF0 | 71 | #define PCI_MSR_CTRL 0xF0 |
72 | #define PCI_MSR_ADDR 0xF4 | 72 | #define PCI_MSR_ADDR 0xF4 |
73 | #define PCI_MSR_DATA_LO 0xF8 | 73 | #define PCI_MSR_DATA_LO 0xF8 |
74 | #define PCI_MSR_DATA_HI 0xFC | 74 | #define PCI_MSR_DATA_HI 0xFC |
75 | 75 | ||
76 | /**************** MSR *****************************/ | 76 | /**************** MSR *****************************/ |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * GLIU STANDARD MSR | 79 | * GLIU STANDARD MSR |
80 | */ | 80 | */ |
81 | #define GLIU_CAP 0x00 | 81 | #define GLIU_CAP 0x00 |
82 | #define GLIU_CONFIG 0x01 | 82 | #define GLIU_CONFIG 0x01 |
83 | #define GLIU_SMI 0x02 | 83 | #define GLIU_SMI 0x02 |
84 | #define GLIU_ERROR 0x03 | 84 | #define GLIU_ERROR 0x03 |
85 | #define GLIU_PM 0x04 | 85 | #define GLIU_PM 0x04 |
86 | #define GLIU_DIAG 0x05 | 86 | #define GLIU_DIAG 0x05 |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * GLIU SPEC. MSR | 89 | * GLIU SPEC. MSR |
90 | */ | 90 | */ |
91 | #define GLIU_P2D_BM0 0x20 | 91 | #define GLIU_P2D_BM0 0x20 |
92 | #define GLIU_P2D_BM1 0x21 | 92 | #define GLIU_P2D_BM1 0x21 |
93 | #define GLIU_P2D_BM2 0x22 | 93 | #define GLIU_P2D_BM2 0x22 |
94 | #define GLIU_P2D_BMK0 0x23 | 94 | #define GLIU_P2D_BMK0 0x23 |
95 | #define GLIU_P2D_BMK1 0x24 | 95 | #define GLIU_P2D_BMK1 0x24 |
96 | #define GLIU_P2D_BM3 0x25 | 96 | #define GLIU_P2D_BM3 0x25 |
97 | #define GLIU_P2D_BM4 0x26 | 97 | #define GLIU_P2D_BM4 0x26 |
98 | #define GLIU_COH 0x80 | 98 | #define GLIU_COH 0x80 |
99 | #define GLIU_PAE 0x81 | 99 | #define GLIU_PAE 0x81 |
100 | #define GLIU_ARB 0x82 | 100 | #define GLIU_ARB 0x82 |
101 | #define GLIU_ASMI 0x83 | 101 | #define GLIU_ASMI 0x83 |
102 | #define GLIU_AERR 0x84 | 102 | #define GLIU_AERR 0x84 |
103 | #define GLIU_DEBUG 0x85 | 103 | #define GLIU_DEBUG 0x85 |
104 | #define GLIU_PHY_CAP 0x86 | 104 | #define GLIU_PHY_CAP 0x86 |
105 | #define GLIU_NOUT_RESP 0x87 | 105 | #define GLIU_NOUT_RESP 0x87 |
106 | #define GLIU_NOUT_WDATA 0x88 | 106 | #define GLIU_NOUT_WDATA 0x88 |
107 | #define GLIU_WHOAMI 0x8B | 107 | #define GLIU_WHOAMI 0x8B |
108 | #define GLIU_SLV_DIS 0x8C | 108 | #define GLIU_SLV_DIS 0x8C |
109 | #define GLIU_IOD_BM0 0xE0 | 109 | #define GLIU_IOD_BM0 0xE0 |
110 | #define GLIU_IOD_BM1 0xE1 | 110 | #define GLIU_IOD_BM1 0xE1 |
111 | #define GLIU_IOD_BM2 0xE2 | 111 | #define GLIU_IOD_BM2 0xE2 |
112 | #define GLIU_IOD_BM3 0xE3 | 112 | #define GLIU_IOD_BM3 0xE3 |
113 | #define GLIU_IOD_BM4 0xE4 | 113 | #define GLIU_IOD_BM4 0xE4 |
114 | #define GLIU_IOD_BM5 0xE5 | 114 | #define GLIU_IOD_BM5 0xE5 |
115 | #define GLIU_IOD_BM6 0xE6 | 115 | #define GLIU_IOD_BM6 0xE6 |
116 | #define GLIU_IOD_BM7 0xE7 | 116 | #define GLIU_IOD_BM7 0xE7 |
117 | #define GLIU_IOD_BM8 0xE8 | 117 | #define GLIU_IOD_BM8 0xE8 |
118 | #define GLIU_IOD_BM9 0xE9 | 118 | #define GLIU_IOD_BM9 0xE9 |
119 | #define GLIU_IOD_SC0 0xEA | 119 | #define GLIU_IOD_SC0 0xEA |
120 | #define GLIU_IOD_SC1 0xEB | 120 | #define GLIU_IOD_SC1 0xEB |
121 | #define GLIU_IOD_SC2 0xEC | 121 | #define GLIU_IOD_SC2 0xEC |
122 | #define GLIU_IOD_SC3 0xED | 122 | #define GLIU_IOD_SC3 0xED |
123 | #define GLIU_IOD_SC4 0xEE | 123 | #define GLIU_IOD_SC4 0xEE |
124 | #define GLIU_IOD_SC5 0xEF | 124 | #define GLIU_IOD_SC5 0xEF |
125 | #define GLIU_IOD_SC6 0xF0 | 125 | #define GLIU_IOD_SC6 0xF0 |
126 | #define GLIU_IOD_SC7 0xF1 | 126 | #define GLIU_IOD_SC7 0xF1 |
127 | 127 | ||
128 | /* | 128 | /* |
129 | * SB STANDARD | 129 | * SB STANDARD |
130 | */ | 130 | */ |
131 | #define SB_CAP 0x00 | 131 | #define SB_CAP 0x00 |
132 | #define SB_CONFIG 0x01 | 132 | #define SB_CONFIG 0x01 |
133 | #define SB_SMI 0x02 | 133 | #define SB_SMI 0x02 |
134 | #define SB_ERROR 0x03 | 134 | #define SB_ERROR 0x03 |
135 | #define SB_MAR_ERR_EN 0x00000001 | 135 | #define SB_MAR_ERR_EN 0x00000001 |
136 | #define SB_TAR_ERR_EN 0x00000002 | 136 | #define SB_TAR_ERR_EN 0x00000002 |
137 | #define SB_RSVD_BIT1 0x00000004 | 137 | #define SB_RSVD_BIT1 0x00000004 |
138 | #define SB_EXCEP_ERR_EN 0x00000008 | 138 | #define SB_EXCEP_ERR_EN 0x00000008 |
139 | #define SB_SYSE_ERR_EN 0x00000010 | 139 | #define SB_SYSE_ERR_EN 0x00000010 |
140 | #define SB_PARE_ERR_EN 0x00000020 | 140 | #define SB_PARE_ERR_EN 0x00000020 |
141 | #define SB_TAS_ERR_EN 0x00000040 | 141 | #define SB_TAS_ERR_EN 0x00000040 |
142 | #define SB_MAR_ERR_FLAG 0x00010000 | 142 | #define SB_MAR_ERR_FLAG 0x00010000 |
143 | #define SB_TAR_ERR_FLAG 0x00020000 | 143 | #define SB_TAR_ERR_FLAG 0x00020000 |
144 | #define SB_RSVD_BIT2 0x00040000 | 144 | #define SB_RSVD_BIT2 0x00040000 |
145 | #define SB_EXCEP_ERR_FLAG 0x00080000 | 145 | #define SB_EXCEP_ERR_FLAG 0x00080000 |
146 | #define SB_SYSE_ERR_FLAG 0x00100000 | 146 | #define SB_SYSE_ERR_FLAG 0x00100000 |
147 | #define SB_PARE_ERR_FLAG 0x00200000 | 147 | #define SB_PARE_ERR_FLAG 0x00200000 |
148 | #define SB_TAS_ERR_FLAG 0x00400000 | 148 | #define SB_TAS_ERR_FLAG 0x00400000 |
149 | #define SB_PM 0x04 | 149 | #define SB_PM 0x04 |
150 | #define SB_DIAG 0x05 | 150 | #define SB_DIAG 0x05 |
151 | 151 | ||
152 | /* | 152 | /* |
153 | * SB SPEC. | 153 | * SB SPEC. |
154 | */ | 154 | */ |
155 | #define SB_CTRL 0x10 | 155 | #define SB_CTRL 0x10 |
156 | #define SB_R0 0x20 | 156 | #define SB_R0 0x20 |
157 | #define SB_R1 0x21 | 157 | #define SB_R1 0x21 |
158 | #define SB_R2 0x22 | 158 | #define SB_R2 0x22 |
159 | #define SB_R3 0x23 | 159 | #define SB_R3 0x23 |
160 | #define SB_R4 0x24 | 160 | #define SB_R4 0x24 |
161 | #define SB_R5 0x25 | 161 | #define SB_R5 0x25 |
162 | #define SB_R6 0x26 | 162 | #define SB_R6 0x26 |
163 | #define SB_R7 0x27 | 163 | #define SB_R7 0x27 |
164 | #define SB_R8 0x28 | 164 | #define SB_R8 0x28 |
165 | #define SB_R9 0x29 | 165 | #define SB_R9 0x29 |
166 | #define SB_R10 0x2A | 166 | #define SB_R10 0x2A |
167 | #define SB_R11 0x2B | 167 | #define SB_R11 0x2B |
168 | #define SB_R12 0x2C | 168 | #define SB_R12 0x2C |
169 | #define SB_R13 0x2D | 169 | #define SB_R13 0x2D |
170 | #define SB_R14 0x2E | 170 | #define SB_R14 0x2E |
171 | #define SB_R15 0x2F | 171 | #define SB_R15 0x2F |
172 | 172 | ||
173 | /* | 173 | /* |
174 | * GLCP STANDARD | 174 | * GLCP STANDARD |
175 | */ | 175 | */ |
176 | #define GLCP_CAP 0x00 | 176 | #define GLCP_CAP 0x00 |
177 | #define GLCP_CONFIG 0x01 | 177 | #define GLCP_CONFIG 0x01 |
178 | #define GLCP_SMI 0x02 | 178 | #define GLCP_SMI 0x02 |
179 | #define GLCP_ERROR 0x03 | 179 | #define GLCP_ERROR 0x03 |
180 | #define GLCP_PM 0x04 | 180 | #define GLCP_PM 0x04 |
181 | #define GLCP_DIAG 0x05 | 181 | #define GLCP_DIAG 0x05 |
182 | 182 | ||
183 | /* | 183 | /* |
184 | * GLCP SPEC. | 184 | * GLCP SPEC. |
185 | */ | 185 | */ |
186 | #define GLCP_CLK_DIS_DELAY 0x08 | 186 | #define GLCP_CLK_DIS_DELAY 0x08 |
187 | #define GLCP_PM_CLK_DISABLE 0x09 | 187 | #define GLCP_PM_CLK_DISABLE 0x09 |
188 | #define GLCP_GLB_PM 0x0B | 188 | #define GLCP_GLB_PM 0x0B |
189 | #define GLCP_DBG_OUT 0x0C | 189 | #define GLCP_DBG_OUT 0x0C |
190 | #define GLCP_RSVD1 0x0D | 190 | #define GLCP_RSVD1 0x0D |
191 | #define GLCP_SOFT_COM 0x0E | 191 | #define GLCP_SOFT_COM 0x0E |
192 | #define SOFT_BAR_SMB_FLAG 0x00000001 | 192 | #define SOFT_BAR_SMB_FLAG 0x00000001 |
193 | #define SOFT_BAR_GPIO_FLAG 0x00000002 | 193 | #define SOFT_BAR_GPIO_FLAG 0x00000002 |
194 | #define SOFT_BAR_MFGPT_FLAG 0x00000004 | 194 | #define SOFT_BAR_MFGPT_FLAG 0x00000004 |
195 | #define SOFT_BAR_IRQ_FLAG 0x00000008 | 195 | #define SOFT_BAR_IRQ_FLAG 0x00000008 |
196 | #define SOFT_BAR_PMS_FLAG 0x00000010 | 196 | #define SOFT_BAR_PMS_FLAG 0x00000010 |
197 | #define SOFT_BAR_ACPI_FLAG 0x00000020 | 197 | #define SOFT_BAR_ACPI_FLAG 0x00000020 |
198 | #define SOFT_BAR_IDE_FLAG 0x00000400 | 198 | #define SOFT_BAR_IDE_FLAG 0x00000400 |
199 | #define SOFT_BAR_ACC_FLAG 0x00000800 | 199 | #define SOFT_BAR_ACC_FLAG 0x00000800 |
200 | #define SOFT_BAR_OHCI_FLAG 0x00001000 | 200 | #define SOFT_BAR_OHCI_FLAG 0x00001000 |
201 | #define SOFT_BAR_EHCI_FLAG 0x00002000 | 201 | #define SOFT_BAR_EHCI_FLAG 0x00002000 |
202 | #define GLCP_RSVD2 0x0F | 202 | #define GLCP_RSVD2 0x0F |
203 | #define GLCP_CLK_OFF 0x10 | 203 | #define GLCP_CLK_OFF 0x10 |
204 | #define GLCP_CLK_ACTIVE 0x11 | 204 | #define GLCP_CLK_ACTIVE 0x11 |
205 | #define GLCP_CLK_DISABLE 0x12 | 205 | #define GLCP_CLK_DISABLE 0x12 |
206 | #define GLCP_CLK4ACK 0x13 | 206 | #define GLCP_CLK4ACK 0x13 |
207 | #define GLCP_SYS_RST 0x14 | 207 | #define GLCP_SYS_RST 0x14 |
208 | #define GLCP_RSVD3 0x15 | 208 | #define GLCP_RSVD3 0x15 |
209 | #define GLCP_DBG_CLK_CTRL 0x16 | 209 | #define GLCP_DBG_CLK_CTRL 0x16 |
210 | #define GLCP_CHIP_REV_ID 0x17 | 210 | #define GLCP_CHIP_REV_ID 0x17 |
211 | 211 | ||
212 | /* PIC */ | 212 | /* PIC */ |
213 | #define PIC_YSEL_LOW 0x20 | 213 | #define PIC_YSEL_LOW 0x20 |
214 | #define PIC_YSEL_LOW_USB_SHIFT 8 | 214 | #define PIC_YSEL_LOW_USB_SHIFT 8 |
215 | #define PIC_YSEL_LOW_ACC_SHIFT 16 | 215 | #define PIC_YSEL_LOW_ACC_SHIFT 16 |
216 | #define PIC_YSEL_LOW_FLASH_SHIFT 24 | 216 | #define PIC_YSEL_LOW_FLASH_SHIFT 24 |
217 | #define PIC_YSEL_HIGH 0x21 | 217 | #define PIC_YSEL_HIGH 0x21 |
218 | #define PIC_ZSEL_LOW 0x22 | 218 | #define PIC_ZSEL_LOW 0x22 |
219 | #define PIC_ZSEL_HIGH 0x23 | 219 | #define PIC_ZSEL_HIGH 0x23 |
220 | #define PIC_IRQM_PRIM 0x24 | 220 | #define PIC_IRQM_PRIM 0x24 |
221 | #define PIC_IRQM_LPC 0x25 | 221 | #define PIC_IRQM_LPC 0x25 |
222 | #define PIC_XIRR_STS_LOW 0x26 | 222 | #define PIC_XIRR_STS_LOW 0x26 |
223 | #define PIC_XIRR_STS_HIGH 0x27 | 223 | #define PIC_XIRR_STS_HIGH 0x27 |
224 | #define PCI_SHDW 0x34 | 224 | #define PCI_SHDW 0x34 |
225 | 225 | ||
226 | /* | 226 | /* |
227 | * DIVIL STANDARD | 227 | * DIVIL STANDARD |
228 | */ | 228 | */ |
229 | #define DIVIL_CAP 0x00 | 229 | #define DIVIL_CAP 0x00 |
230 | #define DIVIL_CONFIG 0x01 | 230 | #define DIVIL_CONFIG 0x01 |
231 | #define DIVIL_SMI 0x02 | 231 | #define DIVIL_SMI 0x02 |
232 | #define DIVIL_ERROR 0x03 | 232 | #define DIVIL_ERROR 0x03 |
233 | #define DIVIL_PM 0x04 | 233 | #define DIVIL_PM 0x04 |
234 | #define DIVIL_DIAG 0x05 | 234 | #define DIVIL_DIAG 0x05 |
235 | 235 | ||
236 | /* | 236 | /* |
237 | * DIVIL SPEC. | 237 | * DIVIL SPEC. |
238 | */ | 238 | */ |
239 | #define DIVIL_LBAR_IRQ 0x08 | 239 | #define DIVIL_LBAR_IRQ 0x08 |
240 | #define DIVIL_LBAR_KEL 0x09 | 240 | #define DIVIL_LBAR_KEL 0x09 |
241 | #define DIVIL_LBAR_SMB 0x0B | 241 | #define DIVIL_LBAR_SMB 0x0B |
242 | #define DIVIL_LBAR_GPIO 0x0C | 242 | #define DIVIL_LBAR_GPIO 0x0C |
243 | #define DIVIL_LBAR_MFGPT 0x0D | 243 | #define DIVIL_LBAR_MFGPT 0x0D |
244 | #define DIVIL_LBAR_ACPI 0x0E | 244 | #define DIVIL_LBAR_ACPI 0x0E |
245 | #define DIVIL_LBAR_PMS 0x0F | 245 | #define DIVIL_LBAR_PMS 0x0F |
246 | #define DIVIL_LEG_IO 0x14 | 246 | #define DIVIL_LEG_IO 0x14 |
247 | #define DIVIL_BALL_OPTS 0x15 | 247 | #define DIVIL_BALL_OPTS 0x15 |
248 | #define DIVIL_SOFT_IRQ 0x16 | 248 | #define DIVIL_SOFT_IRQ 0x16 |
249 | #define DIVIL_SOFT_RESET 0x17 | 249 | #define DIVIL_SOFT_RESET 0x17 |
250 | 250 | ||
251 | /* MFGPT */ | 251 | /* MFGPT */ |
252 | #define MFGPT_IRQ 0x28 | 252 | #define MFGPT_IRQ 0x28 |
@@ -254,52 +254,52 @@ extern void _wrmsr(u32 msr, u32 hi, u32 lo); | |||
254 | /* | 254 | /* |
255 | * IDE STANDARD | 255 | * IDE STANDARD |
256 | */ | 256 | */ |
257 | #define IDE_CAP 0x00 | 257 | #define IDE_CAP 0x00 |
258 | #define IDE_CONFIG 0x01 | 258 | #define IDE_CONFIG 0x01 |
259 | #define IDE_SMI 0x02 | 259 | #define IDE_SMI 0x02 |
260 | #define IDE_ERROR 0x03 | 260 | #define IDE_ERROR 0x03 |
261 | #define IDE_PM 0x04 | 261 | #define IDE_PM 0x04 |
262 | #define IDE_DIAG 0x05 | 262 | #define IDE_DIAG 0x05 |
263 | 263 | ||
264 | /* | 264 | /* |
265 | * IDE SPEC. | 265 | * IDE SPEC. |
266 | */ | 266 | */ |
267 | #define IDE_IO_BAR 0x08 | 267 | #define IDE_IO_BAR 0x08 |
268 | #define IDE_CFG 0x10 | 268 | #define IDE_CFG 0x10 |
269 | #define IDE_DTC 0x12 | 269 | #define IDE_DTC 0x12 |
270 | #define IDE_CAST 0x13 | 270 | #define IDE_CAST 0x13 |
271 | #define IDE_ETC 0x14 | 271 | #define IDE_ETC 0x14 |
272 | #define IDE_INTERNAL_PM 0x15 | 272 | #define IDE_INTERNAL_PM 0x15 |
273 | 273 | ||
274 | /* | 274 | /* |
275 | * ACC STANDARD | 275 | * ACC STANDARD |
276 | */ | 276 | */ |
277 | #define ACC_CAP 0x00 | 277 | #define ACC_CAP 0x00 |
278 | #define ACC_CONFIG 0x01 | 278 | #define ACC_CONFIG 0x01 |
279 | #define ACC_SMI 0x02 | 279 | #define ACC_SMI 0x02 |
280 | #define ACC_ERROR 0x03 | 280 | #define ACC_ERROR 0x03 |
281 | #define ACC_PM 0x04 | 281 | #define ACC_PM 0x04 |
282 | #define ACC_DIAG 0x05 | 282 | #define ACC_DIAG 0x05 |
283 | 283 | ||
284 | /* | 284 | /* |
285 | * USB STANDARD | 285 | * USB STANDARD |
286 | */ | 286 | */ |
287 | #define USB_CAP 0x00 | 287 | #define USB_CAP 0x00 |
288 | #define USB_CONFIG 0x01 | 288 | #define USB_CONFIG 0x01 |
289 | #define USB_SMI 0x02 | 289 | #define USB_SMI 0x02 |
290 | #define USB_ERROR 0x03 | 290 | #define USB_ERROR 0x03 |
291 | #define USB_PM 0x04 | 291 | #define USB_PM 0x04 |
292 | #define USB_DIAG 0x05 | 292 | #define USB_DIAG 0x05 |
293 | 293 | ||
294 | /* | 294 | /* |
295 | * USB SPEC. | 295 | * USB SPEC. |
296 | */ | 296 | */ |
297 | #define USB_OHCI 0x08 | 297 | #define USB_OHCI 0x08 |
298 | #define USB_EHCI 0x09 | 298 | #define USB_EHCI 0x09 |
299 | 299 | ||
300 | /****************** NATIVE ***************************/ | 300 | /****************** NATIVE ***************************/ |
301 | /* GPIO : I/O SPACE; REG : 32BITS */ | 301 | /* GPIO : I/O SPACE; REG : 32BITS */ |
302 | #define GPIOL_OUT_VAL 0x00 | 302 | #define GPIOL_OUT_VAL 0x00 |
303 | #define GPIOL_OUT_EN 0x04 | 303 | #define GPIOL_OUT_EN 0x04 |
304 | 304 | ||
305 | #endif /* _CS5536_H */ | 305 | #endif /* _CS5536_H */ |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h index 4b493d6772c2..021d0172dad6 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_mfgpt.h | |||
@@ -25,7 +25,7 @@ static inline void __maybe_unused enable_mfgpt0_counter(void) | |||
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #define MFGPT_TICK_RATE 14318000 | 27 | #define MFGPT_TICK_RATE 14318000 |
28 | #define COMPARE ((MFGPT_TICK_RATE + HZ/2) / HZ) | 28 | #define COMPARE ((MFGPT_TICK_RATE + HZ/2) / HZ) |
29 | 29 | ||
30 | #define MFGPT_BASE mfgpt_base | 30 | #define MFGPT_BASE mfgpt_base |
31 | #define MFGPT0_CMP2 (MFGPT_BASE + 2) | 31 | #define MFGPT0_CMP2 (MFGPT_BASE + 2) |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h index 0dca9c89ee7c..8a7ecb4d5c64 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_pci.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Author : jlliu, liujl@lemote.com | 8 | * Author : jlliu, liujl@lemote.com |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _CS5536_PCI_H | 11 | #ifndef _CS5536_PCI_H |
12 | #define _CS5536_PCI_H | 12 | #define _CS5536_PCI_H |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/pci_regs.h> | 15 | #include <linux/pci_regs.h> |
@@ -17,20 +17,20 @@ | |||
17 | extern void cs5536_pci_conf_write4(int function, int reg, u32 value); | 17 | extern void cs5536_pci_conf_write4(int function, int reg, u32 value); |
18 | extern u32 cs5536_pci_conf_read4(int function, int reg); | 18 | extern u32 cs5536_pci_conf_read4(int function, int reg); |
19 | 19 | ||
20 | #define CS5536_ACC_INTR 9 | 20 | #define CS5536_ACC_INTR 9 |
21 | #define CS5536_IDE_INTR 14 | 21 | #define CS5536_IDE_INTR 14 |
22 | #define CS5536_USB_INTR 11 | 22 | #define CS5536_USB_INTR 11 |
23 | #define CS5536_MFGPT_INTR 5 | 23 | #define CS5536_MFGPT_INTR 5 |
24 | #define CS5536_UART1_INTR 4 | 24 | #define CS5536_UART1_INTR 4 |
25 | #define CS5536_UART2_INTR 3 | 25 | #define CS5536_UART2_INTR 3 |
26 | 26 | ||
27 | /************** PCI BUS DEVICE FUNCTION ***************/ | 27 | /************** PCI BUS DEVICE FUNCTION ***************/ |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * PCI bus device function | 30 | * PCI bus device function |
31 | */ | 31 | */ |
32 | #define PCI_BUS_CS5536 0 | 32 | #define PCI_BUS_CS5536 0 |
33 | #define PCI_IDSEL_CS5536 14 | 33 | #define PCI_IDSEL_CS5536 14 |
34 | 34 | ||
35 | /********** STANDARD PCI-2.2 EXPANSION ****************/ | 35 | /********** STANDARD PCI-2.2 EXPANSION ****************/ |
36 | 36 | ||
@@ -45,21 +45,21 @@ extern u32 cs5536_pci_conf_read4(int function, int reg); | |||
45 | (((mod_dev_id) << 16) | (sys_vendor_id)) | 45 | (((mod_dev_id) << 16) | (sys_vendor_id)) |
46 | 46 | ||
47 | /* VENDOR ID */ | 47 | /* VENDOR ID */ |
48 | #define CS5536_VENDOR_ID 0x1022 | 48 | #define CS5536_VENDOR_ID 0x1022 |
49 | 49 | ||
50 | /* DEVICE ID */ | 50 | /* DEVICE ID */ |
51 | #define CS5536_ISA_DEVICE_ID 0x2090 | 51 | #define CS5536_ISA_DEVICE_ID 0x2090 |
52 | #define CS5536_IDE_DEVICE_ID 0x209a | 52 | #define CS5536_IDE_DEVICE_ID 0x209a |
53 | #define CS5536_ACC_DEVICE_ID 0x2093 | 53 | #define CS5536_ACC_DEVICE_ID 0x2093 |
54 | #define CS5536_OHCI_DEVICE_ID 0x2094 | 54 | #define CS5536_OHCI_DEVICE_ID 0x2094 |
55 | #define CS5536_EHCI_DEVICE_ID 0x2095 | 55 | #define CS5536_EHCI_DEVICE_ID 0x2095 |
56 | 56 | ||
57 | /* CLASS CODE : CLASS SUB-CLASS INTERFACE */ | 57 | /* CLASS CODE : CLASS SUB-CLASS INTERFACE */ |
58 | #define CS5536_ISA_CLASS_CODE 0x060100 | 58 | #define CS5536_ISA_CLASS_CODE 0x060100 |
59 | #define CS5536_IDE_CLASS_CODE 0x010180 | 59 | #define CS5536_IDE_CLASS_CODE 0x010180 |
60 | #define CS5536_ACC_CLASS_CODE 0x040100 | 60 | #define CS5536_ACC_CLASS_CODE 0x040100 |
61 | #define CS5536_OHCI_CLASS_CODE 0x0C0310 | 61 | #define CS5536_OHCI_CLASS_CODE 0x0C0310 |
62 | #define CS5536_EHCI_CLASS_CODE 0x0C0320 | 62 | #define CS5536_EHCI_CLASS_CODE 0x0C0320 |
63 | 63 | ||
64 | /* BHLC : BIST HEADER-TYPE LATENCY-TIMER CACHE-LINE-SIZE */ | 64 | /* BHLC : BIST HEADER-TYPE LATENCY-TIMER CACHE-LINE-SIZE */ |
65 | 65 | ||
@@ -67,40 +67,40 @@ extern u32 cs5536_pci_conf_read4(int function, int reg); | |||
67 | ((PCI_NONE_BIST << 24) | ((header_type) << 16) \ | 67 | ((PCI_NONE_BIST << 24) | ((header_type) << 16) \ |
68 | | ((latency_timer) << 8) | PCI_NORMAL_CACHE_LINE_SIZE); | 68 | | ((latency_timer) << 8) | PCI_NORMAL_CACHE_LINE_SIZE); |
69 | 69 | ||
70 | #define PCI_NONE_BIST 0x00 /* RO not implemented yet. */ | 70 | #define PCI_NONE_BIST 0x00 /* RO not implemented yet. */ |
71 | #define PCI_BRIDGE_HEADER_TYPE 0x80 /* RO */ | 71 | #define PCI_BRIDGE_HEADER_TYPE 0x80 /* RO */ |
72 | #define PCI_NORMAL_HEADER_TYPE 0x00 | 72 | #define PCI_NORMAL_HEADER_TYPE 0x00 |
73 | #define PCI_NORMAL_LATENCY_TIMER 0x00 | 73 | #define PCI_NORMAL_LATENCY_TIMER 0x00 |
74 | #define PCI_NORMAL_CACHE_LINE_SIZE 0x08 /* RW */ | 74 | #define PCI_NORMAL_CACHE_LINE_SIZE 0x08 /* RW */ |
75 | 75 | ||
76 | /* BAR */ | 76 | /* BAR */ |
77 | #define PCI_BAR0_REG 0x10 | 77 | #define PCI_BAR0_REG 0x10 |
78 | #define PCI_BAR1_REG 0x14 | 78 | #define PCI_BAR1_REG 0x14 |
79 | #define PCI_BAR2_REG 0x18 | 79 | #define PCI_BAR2_REG 0x18 |
80 | #define PCI_BAR3_REG 0x1c | 80 | #define PCI_BAR3_REG 0x1c |
81 | #define PCI_BAR4_REG 0x20 | 81 | #define PCI_BAR4_REG 0x20 |
82 | #define PCI_BAR5_REG 0x24 | 82 | #define PCI_BAR5_REG 0x24 |
83 | #define PCI_BAR_COUNT 6 | 83 | #define PCI_BAR_COUNT 6 |
84 | #define PCI_BAR_RANGE_MASK 0xFFFFFFFF | 84 | #define PCI_BAR_RANGE_MASK 0xFFFFFFFF |
85 | 85 | ||
86 | /* CARDBUS CIS POINTER */ | 86 | /* CARDBUS CIS POINTER */ |
87 | #define PCI_CARDBUS_CIS_POINTER 0x00000000 | 87 | #define PCI_CARDBUS_CIS_POINTER 0x00000000 |
88 | 88 | ||
89 | /* SUBSYSTEM VENDOR ID */ | 89 | /* SUBSYSTEM VENDOR ID */ |
90 | #define CS5536_SUB_VENDOR_ID CS5536_VENDOR_ID | 90 | #define CS5536_SUB_VENDOR_ID CS5536_VENDOR_ID |
91 | 91 | ||
92 | /* SUBSYSTEM ID */ | 92 | /* SUBSYSTEM ID */ |
93 | #define CS5536_ISA_SUB_ID CS5536_ISA_DEVICE_ID | 93 | #define CS5536_ISA_SUB_ID CS5536_ISA_DEVICE_ID |
94 | #define CS5536_IDE_SUB_ID CS5536_IDE_DEVICE_ID | 94 | #define CS5536_IDE_SUB_ID CS5536_IDE_DEVICE_ID |
95 | #define CS5536_ACC_SUB_ID CS5536_ACC_DEVICE_ID | 95 | #define CS5536_ACC_SUB_ID CS5536_ACC_DEVICE_ID |
96 | #define CS5536_OHCI_SUB_ID CS5536_OHCI_DEVICE_ID | 96 | #define CS5536_OHCI_SUB_ID CS5536_OHCI_DEVICE_ID |
97 | #define CS5536_EHCI_SUB_ID CS5536_EHCI_DEVICE_ID | 97 | #define CS5536_EHCI_SUB_ID CS5536_EHCI_DEVICE_ID |
98 | 98 | ||
99 | /* EXPANSION ROM BAR */ | 99 | /* EXPANSION ROM BAR */ |
100 | #define PCI_EXPANSION_ROM_BAR 0x00000000 | 100 | #define PCI_EXPANSION_ROM_BAR 0x00000000 |
101 | 101 | ||
102 | /* CAPABILITIES POINTER */ | 102 | /* CAPABILITIES POINTER */ |
103 | #define PCI_CAPLIST_POINTER 0x00000000 | 103 | #define PCI_CAPLIST_POINTER 0x00000000 |
104 | #define PCI_CAPLIST_USB_POINTER 0x40 | 104 | #define PCI_CAPLIST_USB_POINTER 0x40 |
105 | /* INTERRUPT */ | 105 | /* INTERRUPT */ |
106 | 106 | ||
@@ -108,46 +108,46 @@ extern u32 cs5536_pci_conf_read4(int function, int reg); | |||
108 | ((PCI_MAX_LATENCY << 24) | (PCI_MIN_GRANT << 16) | \ | 108 | ((PCI_MAX_LATENCY << 24) | (PCI_MIN_GRANT << 16) | \ |
109 | ((pin) << 8) | (mod_intr)) | 109 | ((pin) << 8) | (mod_intr)) |
110 | 110 | ||
111 | #define PCI_MAX_LATENCY 0x40 | 111 | #define PCI_MAX_LATENCY 0x40 |
112 | #define PCI_MIN_GRANT 0x00 | 112 | #define PCI_MIN_GRANT 0x00 |
113 | #define PCI_DEFAULT_PIN 0x01 | 113 | #define PCI_DEFAULT_PIN 0x01 |
114 | 114 | ||
115 | /*********** EXPANSION PCI REG ************************/ | 115 | /*********** EXPANSION PCI REG ************************/ |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * ISA EXPANSION | 118 | * ISA EXPANSION |
119 | */ | 119 | */ |
120 | #define PCI_UART1_INT_REG 0x50 | 120 | #define PCI_UART1_INT_REG 0x50 |
121 | #define PCI_UART2_INT_REG 0x54 | 121 | #define PCI_UART2_INT_REG 0x54 |
122 | #define PCI_ISA_FIXUP_REG 0x58 | 122 | #define PCI_ISA_FIXUP_REG 0x58 |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * IDE EXPANSION | 125 | * IDE EXPANSION |
126 | */ | 126 | */ |
127 | #define PCI_IDE_CFG_REG 0x40 | 127 | #define PCI_IDE_CFG_REG 0x40 |
128 | #define CS5536_IDE_FLASH_SIGNATURE 0xDEADBEEF | 128 | #define CS5536_IDE_FLASH_SIGNATURE 0xDEADBEEF |
129 | #define PCI_IDE_DTC_REG 0x48 | 129 | #define PCI_IDE_DTC_REG 0x48 |
130 | #define PCI_IDE_CAST_REG 0x4C | 130 | #define PCI_IDE_CAST_REG 0x4C |
131 | #define PCI_IDE_ETC_REG 0x50 | 131 | #define PCI_IDE_ETC_REG 0x50 |
132 | #define PCI_IDE_PM_REG 0x54 | 132 | #define PCI_IDE_PM_REG 0x54 |
133 | #define PCI_IDE_INT_REG 0x60 | 133 | #define PCI_IDE_INT_REG 0x60 |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * ACC EXPANSION | 136 | * ACC EXPANSION |
137 | */ | 137 | */ |
138 | #define PCI_ACC_INT_REG 0x50 | 138 | #define PCI_ACC_INT_REG 0x50 |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * OHCI EXPANSION : INTTERUPT IS IMPLEMENTED BY THE OHCI | 141 | * OHCI EXPANSION : INTTERUPT IS IMPLEMENTED BY THE OHCI |
142 | */ | 142 | */ |
143 | #define PCI_OHCI_PM_REG 0x40 | 143 | #define PCI_OHCI_PM_REG 0x40 |
144 | #define PCI_OHCI_INT_REG 0x50 | 144 | #define PCI_OHCI_INT_REG 0x50 |
145 | 145 | ||
146 | /* | 146 | /* |
147 | * EHCI EXPANSION | 147 | * EHCI EXPANSION |
148 | */ | 148 | */ |
149 | #define PCI_EHCI_LEGSMIEN_REG 0x50 | 149 | #define PCI_EHCI_LEGSMIEN_REG 0x50 |
150 | #define PCI_EHCI_LEGSMISTS_REG 0x54 | 150 | #define PCI_EHCI_LEGSMISTS_REG 0x54 |
151 | #define PCI_EHCI_FLADJ_REG 0x60 | 151 | #define PCI_EHCI_FLADJ_REG 0x60 |
152 | 152 | ||
153 | #endif /* _CS5536_PCI_H_ */ | 153 | #endif /* _CS5536_PCI_H_ */ |
diff --git a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h index 21c4ecedebe7..1f17c1815ee5 100644 --- a/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h +++ b/arch/mips/include/asm/mach-loongson/cs5536/cs5536_vsm.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | 5 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef _CS5536_VSM_H | 8 | #ifndef _CS5536_VSM_H |
9 | #define _CS5536_VSM_H | 9 | #define _CS5536_VSM_H |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | 12 | ||
diff --git a/arch/mips/include/asm/mach-loongson/gpio.h b/arch/mips/include/asm/mach-loongson/gpio.h index e30e73d443df..211a7b7138fe 100644 --- a/arch/mips/include/asm/mach-loongson/gpio.h +++ b/arch/mips/include/asm/mach-loongson/gpio.h | |||
@@ -10,8 +10,8 @@ | |||
10 | * (at your option) any later version. | 10 | * (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef __STLS2F_GPIO_H | 13 | #ifndef __STLS2F_GPIO_H |
14 | #define __STLS2F_GPIO_H | 14 | #define __STLS2F_GPIO_H |
15 | 15 | ||
16 | #include <asm-generic/gpio.h> | 16 | #include <asm-generic/gpio.h> |
17 | 17 | ||
diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h index 5222a007bc21..b286534fef08 100644 --- a/arch/mips/include/asm/mach-loongson/loongson.h +++ b/arch/mips/include/asm/mach-loongson/loongson.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote, Inc. | 2 | * Copyright (C) 2009 Lemote, Inc. |
3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | 3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
@@ -52,7 +52,7 @@ extern void mach_irq_dispatch(unsigned int pending); | |||
52 | extern int mach_i8259_irq(void); | 52 | extern int mach_i8259_irq(void); |
53 | 53 | ||
54 | /* We need this in some places... */ | 54 | /* We need this in some places... */ |
55 | #define delay() ({ \ | 55 | #define delay() ({ \ |
56 | int x; \ | 56 | int x; \ |
57 | for (x = 0; x < 100000; x++) \ | 57 | for (x = 0; x < 100000; x++) \ |
58 | __asm__ __volatile__(""); \ | 58 | __asm__ __volatile__(""); \ |
@@ -82,13 +82,13 @@ static inline void do_perfcnt_IRQ(void) | |||
82 | 82 | ||
83 | #define LOONGSON_BOOT_BASE 0x1fc00000 | 83 | #define LOONGSON_BOOT_BASE 0x1fc00000 |
84 | #define LOONGSON_BOOT_SIZE 0x00100000 /* 1M */ | 84 | #define LOONGSON_BOOT_SIZE 0x00100000 /* 1M */ |
85 | #define LOONGSON_BOOT_TOP (LOONGSON_BOOT_BASE+LOONGSON_BOOT_SIZE-1) | 85 | #define LOONGSON_BOOT_TOP (LOONGSON_BOOT_BASE+LOONGSON_BOOT_SIZE-1) |
86 | #define LOONGSON_REG_BASE 0x1fe00000 | 86 | #define LOONGSON_REG_BASE 0x1fe00000 |
87 | #define LOONGSON_REG_SIZE 0x00100000 /* 256Bytes + 256Bytes + ??? */ | 87 | #define LOONGSON_REG_SIZE 0x00100000 /* 256Bytes + 256Bytes + ??? */ |
88 | #define LOONGSON_REG_TOP (LOONGSON_REG_BASE+LOONGSON_REG_SIZE-1) | 88 | #define LOONGSON_REG_TOP (LOONGSON_REG_BASE+LOONGSON_REG_SIZE-1) |
89 | 89 | ||
90 | #define LOONGSON_LIO1_BASE 0x1ff00000 | 90 | #define LOONGSON_LIO1_BASE 0x1ff00000 |
91 | #define LOONGSON_LIO1_SIZE 0x00100000 /* 1M */ | 91 | #define LOONGSON_LIO1_SIZE 0x00100000 /* 1M */ |
92 | #define LOONGSON_LIO1_TOP (LOONGSON_LIO1_BASE+LOONGSON_LIO1_SIZE-1) | 92 | #define LOONGSON_LIO1_TOP (LOONGSON_LIO1_BASE+LOONGSON_LIO1_SIZE-1) |
93 | 93 | ||
94 | #define LOONGSON_PCILO0_BASE 0x10000000 | 94 | #define LOONGSON_PCILO0_BASE 0x10000000 |
@@ -115,13 +115,13 @@ static inline void do_perfcnt_IRQ(void) | |||
115 | #define LOONGSON_PCI_REG(x) LOONGSON_REG(LOONGSON_PCICONFIGBASE + (x)) | 115 | #define LOONGSON_PCI_REG(x) LOONGSON_REG(LOONGSON_PCICONFIGBASE + (x)) |
116 | #define LOONGSON_PCIDID LOONGSON_PCI_REG(0x00) | 116 | #define LOONGSON_PCIDID LOONGSON_PCI_REG(0x00) |
117 | #define LOONGSON_PCICMD LOONGSON_PCI_REG(0x04) | 117 | #define LOONGSON_PCICMD LOONGSON_PCI_REG(0x04) |
118 | #define LOONGSON_PCICLASS LOONGSON_PCI_REG(0x08) | 118 | #define LOONGSON_PCICLASS LOONGSON_PCI_REG(0x08) |
119 | #define LOONGSON_PCILTIMER LOONGSON_PCI_REG(0x0c) | 119 | #define LOONGSON_PCILTIMER LOONGSON_PCI_REG(0x0c) |
120 | #define LOONGSON_PCIBASE0 LOONGSON_PCI_REG(0x10) | 120 | #define LOONGSON_PCIBASE0 LOONGSON_PCI_REG(0x10) |
121 | #define LOONGSON_PCIBASE1 LOONGSON_PCI_REG(0x14) | 121 | #define LOONGSON_PCIBASE1 LOONGSON_PCI_REG(0x14) |
122 | #define LOONGSON_PCIBASE2 LOONGSON_PCI_REG(0x18) | 122 | #define LOONGSON_PCIBASE2 LOONGSON_PCI_REG(0x18) |
123 | #define LOONGSON_PCIBASE3 LOONGSON_PCI_REG(0x1c) | 123 | #define LOONGSON_PCIBASE3 LOONGSON_PCI_REG(0x1c) |
124 | #define LOONGSON_PCIBASE4 LOONGSON_PCI_REG(0x20) | 124 | #define LOONGSON_PCIBASE4 LOONGSON_PCI_REG(0x20) |
125 | #define LOONGSON_PCIEXPRBASE LOONGSON_PCI_REG(0x30) | 125 | #define LOONGSON_PCIEXPRBASE LOONGSON_PCI_REG(0x30) |
126 | #define LOONGSON_PCIINT LOONGSON_PCI_REG(0x3c) | 126 | #define LOONGSON_PCIINT LOONGSON_PCI_REG(0x3c) |
127 | 127 | ||
@@ -132,7 +132,7 @@ static inline void do_perfcnt_IRQ(void) | |||
132 | #define LOONGSON_PCICMD_MABORT_CLR 0x20000000 | 132 | #define LOONGSON_PCICMD_MABORT_CLR 0x20000000 |
133 | #define LOONGSON_PCICMD_MTABORT_CLR 0x10000000 | 133 | #define LOONGSON_PCICMD_MTABORT_CLR 0x10000000 |
134 | #define LOONGSON_PCICMD_TABORT_CLR 0x08000000 | 134 | #define LOONGSON_PCICMD_TABORT_CLR 0x08000000 |
135 | #define LOONGSON_PCICMD_MPERR_CLR 0x01000000 | 135 | #define LOONGSON_PCICMD_MPERR_CLR 0x01000000 |
136 | #define LOONGSON_PCICMD_PERRRESPEN 0x00000040 | 136 | #define LOONGSON_PCICMD_PERRRESPEN 0x00000040 |
137 | #define LOONGSON_PCICMD_ASTEPEN 0x00000080 | 137 | #define LOONGSON_PCICMD_ASTEPEN 0x00000080 |
138 | #define LOONGSON_PCICMD_SERREN 0x00000100 | 138 | #define LOONGSON_PCICMD_SERREN 0x00000100 |
@@ -142,7 +142,7 @@ static inline void do_perfcnt_IRQ(void) | |||
142 | /* Loongson h/w Configuration */ | 142 | /* Loongson h/w Configuration */ |
143 | 143 | ||
144 | #define LOONGSON_GENCFG_OFFSET 0x4 | 144 | #define LOONGSON_GENCFG_OFFSET 0x4 |
145 | #define LOONGSON_GENCFG LOONGSON_REG(LOONGSON_REGBASE + LOONGSON_GENCFG_OFFSET) | 145 | #define LOONGSON_GENCFG LOONGSON_REG(LOONGSON_REGBASE + LOONGSON_GENCFG_OFFSET) |
146 | 146 | ||
147 | #define LOONGSON_GENCFG_DEBUGMODE 0x00000001 | 147 | #define LOONGSON_GENCFG_DEBUGMODE 0x00000001 |
148 | #define LOONGSON_GENCFG_SNOOPEN 0x00000002 | 148 | #define LOONGSON_GENCFG_SNOOPEN 0x00000002 |
@@ -173,25 +173,25 @@ static inline void do_perfcnt_IRQ(void) | |||
173 | 173 | ||
174 | /* GPIO Regs - r/w */ | 174 | /* GPIO Regs - r/w */ |
175 | 175 | ||
176 | #define LOONGSON_GPIODATA LOONGSON_REG(LOONGSON_REGBASE + 0x1c) | 176 | #define LOONGSON_GPIODATA LOONGSON_REG(LOONGSON_REGBASE + 0x1c) |
177 | #define LOONGSON_GPIOIE LOONGSON_REG(LOONGSON_REGBASE + 0x20) | 177 | #define LOONGSON_GPIOIE LOONGSON_REG(LOONGSON_REGBASE + 0x20) |
178 | 178 | ||
179 | /* ICU Configuration Regs - r/w */ | 179 | /* ICU Configuration Regs - r/w */ |
180 | 180 | ||
181 | #define LOONGSON_INTEDGE LOONGSON_REG(LOONGSON_REGBASE + 0x24) | 181 | #define LOONGSON_INTEDGE LOONGSON_REG(LOONGSON_REGBASE + 0x24) |
182 | #define LOONGSON_INTSTEER LOONGSON_REG(LOONGSON_REGBASE + 0x28) | 182 | #define LOONGSON_INTSTEER LOONGSON_REG(LOONGSON_REGBASE + 0x28) |
183 | #define LOONGSON_INTPOL LOONGSON_REG(LOONGSON_REGBASE + 0x2c) | 183 | #define LOONGSON_INTPOL LOONGSON_REG(LOONGSON_REGBASE + 0x2c) |
184 | 184 | ||
185 | /* ICU Enable Regs - IntEn & IntISR are r/o. */ | 185 | /* ICU Enable Regs - IntEn & IntISR are r/o. */ |
186 | 186 | ||
187 | #define LOONGSON_INTENSET LOONGSON_REG(LOONGSON_REGBASE + 0x30) | 187 | #define LOONGSON_INTENSET LOONGSON_REG(LOONGSON_REGBASE + 0x30) |
188 | #define LOONGSON_INTENCLR LOONGSON_REG(LOONGSON_REGBASE + 0x34) | 188 | #define LOONGSON_INTENCLR LOONGSON_REG(LOONGSON_REGBASE + 0x34) |
189 | #define LOONGSON_INTEN LOONGSON_REG(LOONGSON_REGBASE + 0x38) | 189 | #define LOONGSON_INTEN LOONGSON_REG(LOONGSON_REGBASE + 0x38) |
190 | #define LOONGSON_INTISR LOONGSON_REG(LOONGSON_REGBASE + 0x3c) | 190 | #define LOONGSON_INTISR LOONGSON_REG(LOONGSON_REGBASE + 0x3c) |
191 | 191 | ||
192 | /* ICU */ | 192 | /* ICU */ |
193 | #define LOONGSON_ICU_MBOXES 0x0000000f | 193 | #define LOONGSON_ICU_MBOXES 0x0000000f |
194 | #define LOONGSON_ICU_MBOXES_SHIFT 0 | 194 | #define LOONGSON_ICU_MBOXES_SHIFT 0 |
195 | #define LOONGSON_ICU_DMARDY 0x00000010 | 195 | #define LOONGSON_ICU_DMARDY 0x00000010 |
196 | #define LOONGSON_ICU_DMAEMPTY 0x00000020 | 196 | #define LOONGSON_ICU_DMAEMPTY 0x00000020 |
197 | #define LOONGSON_ICU_COPYRDY 0x00000040 | 197 | #define LOONGSON_ICU_COPYRDY 0x00000040 |
@@ -212,10 +212,10 @@ static inline void do_perfcnt_IRQ(void) | |||
212 | 212 | ||
213 | /* PCI prefetch window base & mask */ | 213 | /* PCI prefetch window base & mask */ |
214 | 214 | ||
215 | #define LOONGSON_MEM_WIN_BASE_L LOONGSON_REG(LOONGSON_REGBASE + 0x40) | 215 | #define LOONGSON_MEM_WIN_BASE_L LOONGSON_REG(LOONGSON_REGBASE + 0x40) |
216 | #define LOONGSON_MEM_WIN_BASE_H LOONGSON_REG(LOONGSON_REGBASE + 0x44) | 216 | #define LOONGSON_MEM_WIN_BASE_H LOONGSON_REG(LOONGSON_REGBASE + 0x44) |
217 | #define LOONGSON_MEM_WIN_MASK_L LOONGSON_REG(LOONGSON_REGBASE + 0x48) | 217 | #define LOONGSON_MEM_WIN_MASK_L LOONGSON_REG(LOONGSON_REGBASE + 0x48) |
218 | #define LOONGSON_MEM_WIN_MASK_H LOONGSON_REG(LOONGSON_REGBASE + 0x4c) | 218 | #define LOONGSON_MEM_WIN_MASK_H LOONGSON_REG(LOONGSON_REGBASE + 0x4c) |
219 | 219 | ||
220 | /* PCI_Hit*_Sel_* */ | 220 | /* PCI_Hit*_Sel_* */ |
221 | 221 | ||
diff --git a/arch/mips/include/asm/mach-loongson/machine.h b/arch/mips/include/asm/mach-loongson/machine.h index 43213388c174..3810d5ca84ac 100644 --- a/arch/mips/include/asm/mach-loongson/machine.h +++ b/arch/mips/include/asm/mach-loongson/machine.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote, Inc. | 2 | * Copyright (C) 2009 Lemote, Inc. |
3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | 3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
diff --git a/arch/mips/include/asm/mach-loongson/mem.h b/arch/mips/include/asm/mach-loongson/mem.h index 3b23ee8647d6..f4a36d7dbfab 100644 --- a/arch/mips/include/asm/mach-loongson/mem.h +++ b/arch/mips/include/asm/mach-loongson/mem.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote, Inc. | 2 | * Copyright (C) 2009 Lemote, Inc. |
3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | 3 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/irq.h b/arch/mips/include/asm/mach-loongson1/irq.h index da96ed42f733..96bfb1c1c73d 100644 --- a/arch/mips/include/asm/mach-loongson1/irq.h +++ b/arch/mips/include/asm/mach-loongson1/irq.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * IRQ mappings for Loongson 1 | 4 | * IRQ mappings for Loongson 1 |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/loongson1.h b/arch/mips/include/asm/mach-loongson1/loongson1.h index 4e18e88cebbf..5c437c2ba6b3 100644 --- a/arch/mips/include/asm/mach-loongson1/loongson1.h +++ b/arch/mips/include/asm/mach-loongson1/loongson1.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Register mappings for Loongson 1 | 4 | * Register mappings for Loongson 1 |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/platform.h b/arch/mips/include/asm/mach-loongson1/platform.h index 718a1228a4f3..30c13e508fff 100644 --- a/arch/mips/include/asm/mach-loongson1/platform.h +++ b/arch/mips/include/asm/mach-loongson1/platform.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/prom.h b/arch/mips/include/asm/mach-loongson1/prom.h index b871dc41b8d9..34859a4d4ac4 100644 --- a/arch/mips/include/asm/mach-loongson1/prom.h +++ b/arch/mips/include/asm/mach-loongson1/prom.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/regs-clk.h b/arch/mips/include/asm/mach-loongson1/regs-clk.h index a81fa3d0dc91..fb6a3ff9318f 100644 --- a/arch/mips/include/asm/mach-loongson1/regs-clk.h +++ b/arch/mips/include/asm/mach-loongson1/regs-clk.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Loongson 1 Clock Register Definitions. | 4 | * Loongson 1 Clock Register Definitions. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-loongson1/regs-wdt.h b/arch/mips/include/asm/mach-loongson1/regs-wdt.h index f897de68c527..6574568c2084 100644 --- a/arch/mips/include/asm/mach-loongson1/regs-wdt.h +++ b/arch/mips/include/asm/mach-loongson1/regs-wdt.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Loongson 1 watchdog register definitions. | 4 | * Loongson 1 watchdog register definitions. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h b/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h index 37e3583a9fdd..de3b66a3723e 100644 --- a/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-malta/cpu-feature-overrides.h | |||
@@ -23,8 +23,8 @@ | |||
23 | /* #define cpu_has_watch ? */ | 23 | /* #define cpu_has_watch ? */ |
24 | #define cpu_has_divec 1 | 24 | #define cpu_has_divec 1 |
25 | #define cpu_has_vce 0 | 25 | #define cpu_has_vce 0 |
26 | /* #define cpu_has_cache_cdex_p ? */ | 26 | /* #define cpu_has_cache_cdex_p ? */ |
27 | /* #define cpu_has_cache_cdex_s ? */ | 27 | /* #define cpu_has_cache_cdex_s ? */ |
28 | /* #define cpu_has_prefetch ? */ | 28 | /* #define cpu_has_prefetch ? */ |
29 | #define cpu_has_mcheck 1 | 29 | #define cpu_has_mcheck 1 |
30 | /* #define cpu_has_ejtag ? */ | 30 | /* #define cpu_has_ejtag ? */ |
@@ -50,8 +50,8 @@ | |||
50 | /* #define cpu_has_watch ? */ | 50 | /* #define cpu_has_watch ? */ |
51 | #define cpu_has_divec 1 | 51 | #define cpu_has_divec 1 |
52 | #define cpu_has_vce 0 | 52 | #define cpu_has_vce 0 |
53 | /* #define cpu_has_cache_cdex_p ? */ | 53 | /* #define cpu_has_cache_cdex_p ? */ |
54 | /* #define cpu_has_cache_cdex_s ? */ | 54 | /* #define cpu_has_cache_cdex_s ? */ |
55 | /* #define cpu_has_prefetch ? */ | 55 | /* #define cpu_has_prefetch ? */ |
56 | #define cpu_has_mcheck 1 | 56 | #define cpu_has_mcheck 1 |
57 | /* #define cpu_has_ejtag ? */ | 57 | /* #define cpu_has_ejtag ? */ |
diff --git a/arch/mips/include/asm/mach-malta/irq.h b/arch/mips/include/asm/mach-malta/irq.h index 9b9da26683c2..47cfe64efbb0 100644 --- a/arch/mips/include/asm/mach-malta/irq.h +++ b/arch/mips/include/asm/mach-malta/irq.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __ASM_MACH_MIPS_IRQ_H | 2 | #define __ASM_MACH_MIPS_IRQ_H |
3 | 3 | ||
4 | 4 | ||
5 | #define NR_IRQS 256 | 5 | #define NR_IRQS 256 |
6 | 6 | ||
7 | #include_next <irq.h> | 7 | #include_next <irq.h> |
8 | 8 | ||
diff --git a/arch/mips/include/asm/mach-malta/mach-gt64120.h b/arch/mips/include/asm/mach-malta/mach-gt64120.h index 0f863148f3b6..62a4b2889fa7 100644 --- a/arch/mips/include/asm/mach-malta/mach-gt64120.h +++ b/arch/mips/include/asm/mach-malta/mach-gt64120.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This is a direct copy of the ev96100.h file, with a global | 2 | * This is a direct copy of the ev96100.h file, with a global |
3 | * search and replace. The numbers are the same. | 3 | * search and replace. The numbers are the same. |
4 | * | 4 | * |
5 | * The reason I'm duplicating this is so that the 64120/96100 | 5 | * The reason I'm duplicating this is so that the 64120/96100 |
6 | * defines won't be confusing in the source code. | 6 | * defines won't be confusing in the source code. |
diff --git a/arch/mips/include/asm/mach-pnx833x/irq-mapping.h b/arch/mips/include/asm/mach-pnx833x/irq-mapping.h index 6d70264557b2..daa85ce03ef6 100644 --- a/arch/mips/include/asm/mach-pnx833x/irq-mapping.h +++ b/arch/mips/include/asm/mach-pnx833x/irq-mapping.h | |||
@@ -42,15 +42,15 @@ | |||
42 | #define PNX833X_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) | 42 | #define PNX833X_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) |
43 | 43 | ||
44 | /* Interrupts supported by PIC */ | 44 | /* Interrupts supported by PIC */ |
45 | #define PNX833X_PIC_I2C0_INT (PNX833X_PIC_IRQ_BASE + 1) | 45 | #define PNX833X_PIC_I2C0_INT (PNX833X_PIC_IRQ_BASE + 1) |
46 | #define PNX833X_PIC_I2C1_INT (PNX833X_PIC_IRQ_BASE + 2) | 46 | #define PNX833X_PIC_I2C1_INT (PNX833X_PIC_IRQ_BASE + 2) |
47 | #define PNX833X_PIC_UART0_INT (PNX833X_PIC_IRQ_BASE + 3) | 47 | #define PNX833X_PIC_UART0_INT (PNX833X_PIC_IRQ_BASE + 3) |
48 | #define PNX833X_PIC_UART1_INT (PNX833X_PIC_IRQ_BASE + 4) | 48 | #define PNX833X_PIC_UART1_INT (PNX833X_PIC_IRQ_BASE + 4) |
49 | #define PNX833X_PIC_TS_IN0_DV_INT (PNX833X_PIC_IRQ_BASE + 5) | 49 | #define PNX833X_PIC_TS_IN0_DV_INT (PNX833X_PIC_IRQ_BASE + 5) |
50 | #define PNX833X_PIC_TS_IN0_DMA_INT (PNX833X_PIC_IRQ_BASE + 6) | 50 | #define PNX833X_PIC_TS_IN0_DMA_INT (PNX833X_PIC_IRQ_BASE + 6) |
51 | #define PNX833X_PIC_GPIO_INT (PNX833X_PIC_IRQ_BASE + 7) | 51 | #define PNX833X_PIC_GPIO_INT (PNX833X_PIC_IRQ_BASE + 7) |
52 | #define PNX833X_PIC_AUDIO_DEC_INT (PNX833X_PIC_IRQ_BASE + 8) | 52 | #define PNX833X_PIC_AUDIO_DEC_INT (PNX833X_PIC_IRQ_BASE + 8) |
53 | #define PNX833X_PIC_VIDEO_DEC_INT (PNX833X_PIC_IRQ_BASE + 9) | 53 | #define PNX833X_PIC_VIDEO_DEC_INT (PNX833X_PIC_IRQ_BASE + 9) |
54 | #define PNX833X_PIC_CONFIG_INT (PNX833X_PIC_IRQ_BASE + 10) | 54 | #define PNX833X_PIC_CONFIG_INT (PNX833X_PIC_IRQ_BASE + 10) |
55 | #define PNX833X_PIC_AOI_INT (PNX833X_PIC_IRQ_BASE + 11) | 55 | #define PNX833X_PIC_AOI_INT (PNX833X_PIC_IRQ_BASE + 11) |
56 | #define PNX833X_PIC_SYNC_INT (PNX833X_PIC_IRQ_BASE + 12) | 56 | #define PNX833X_PIC_SYNC_INT (PNX833X_PIC_IRQ_BASE + 12) |
diff --git a/arch/mips/include/asm/mach-pnx833x/pnx833x.h b/arch/mips/include/asm/mach-pnx833x/pnx833x.h index 100f52870e3c..e6fc3a9d594a 100644 --- a/arch/mips/include/asm/mach-pnx833x/pnx833x.h +++ b/arch/mips/include/asm/mach-pnx833x/pnx833x.h | |||
@@ -73,7 +73,7 @@ | |||
73 | 73 | ||
74 | 74 | ||
75 | #define PNX833X_RESET_CONTROL PNX833X_REG(0x8004) | 75 | #define PNX833X_RESET_CONTROL PNX833X_REG(0x8004) |
76 | #define PNX833X_RESET_CONTROL_2 PNX833X_REG(0x8014) | 76 | #define PNX833X_RESET_CONTROL_2 PNX833X_REG(0x8014) |
77 | 77 | ||
78 | #define PNX833X_PIC_REG(offs) PNX833X_REG(0x01000 + (offs)) | 78 | #define PNX833X_PIC_REG(offs) PNX833X_REG(0x01000 + (offs)) |
79 | #define PNX833X_PIC_INT_PRIORITY PNX833X_PIC_REG(0x0) | 79 | #define PNX833X_PIC_INT_PRIORITY PNX833X_PIC_REG(0x0) |
@@ -82,10 +82,10 @@ | |||
82 | #define PNX833X_PIC_INT_SRC_INT_SRC_SHIFT 3 | 82 | #define PNX833X_PIC_INT_SRC_INT_SRC_SHIFT 3 |
83 | #define PNX833X_PIC_INT_REG(irq) PNX833X_PIC_REG(0x10 + 4*(irq)) | 83 | #define PNX833X_PIC_INT_REG(irq) PNX833X_PIC_REG(0x10 + 4*(irq)) |
84 | 84 | ||
85 | #define PNX833X_CLOCK_CPUCP_CTL PNX833X_REG(0x9228) | 85 | #define PNX833X_CLOCK_CPUCP_CTL PNX833X_REG(0x9228) |
86 | #define PNX833X_CLOCK_CPUCP_CTL_EXIT_RESET 0x00000002ul /* bit 1 */ | 86 | #define PNX833X_CLOCK_CPUCP_CTL_EXIT_RESET 0x00000002ul /* bit 1 */ |
87 | #define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_MASK 0x00000018ul /* bits 4:3 */ | 87 | #define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_MASK 0x00000018ul /* bits 4:3 */ |
88 | #define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_SHIFT 3 | 88 | #define PNX833X_CLOCK_CPUCP_CTL_DIV_CLOCK_SHIFT 3 |
89 | 89 | ||
90 | #define PNX8335_CLOCK_PLL_CPU_CTL PNX833X_REG(0x9020) | 90 | #define PNX8335_CLOCK_PLL_CPU_CTL PNX833X_REG(0x9020) |
91 | #define PNX8335_CLOCK_PLL_CPU_CTL_FREQ_MASK 0x1f | 91 | #define PNX8335_CLOCK_PLL_CPU_CTL_FREQ_MASK 0x1f |
@@ -149,7 +149,7 @@ | |||
149 | #define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_MASK (1 << 14) | 149 | #define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_MASK (1 << 14) |
150 | #define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_SHIFT 14 | 150 | #define PNX833X_MIU_SEL0_SPI_MODE_ENABLE_SHIFT 14 |
151 | 151 | ||
152 | #define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_MASK (1 << 7) | 152 | #define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_MASK (1 << 7) |
153 | #define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_SHIFT 7 | 153 | #define PNX833X_MIU_SEL0_BURST_MODE_ENABLE_SHIFT 7 |
154 | 154 | ||
155 | #define PNX833X_MIU_SEL0_BURST_PAGE_LEN_MASK (0xF << 9) | 155 | #define PNX833X_MIU_SEL0_BURST_PAGE_LEN_MASK (0xF << 9) |
@@ -160,10 +160,10 @@ | |||
160 | #define PNX833X_MIU_CONFIG_SPI_OPCODE_MASK (0xFF << 3) | 160 | #define PNX833X_MIU_CONFIG_SPI_OPCODE_MASK (0xFF << 3) |
161 | #define PNX833X_MIU_CONFIG_SPI_OPCODE_SHIFT 3 | 161 | #define PNX833X_MIU_CONFIG_SPI_OPCODE_SHIFT 3 |
162 | 162 | ||
163 | #define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_MASK (1 << 2) | 163 | #define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_MASK (1 << 2) |
164 | #define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_SHIFT 2 | 164 | #define PNX833X_MIU_CONFIG_SPI_DATA_ENABLE_SHIFT 2 |
165 | 165 | ||
166 | #define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_MASK (1 << 1) | 166 | #define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_MASK (1 << 1) |
167 | #define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_SHIFT 1 | 167 | #define PNX833X_MIU_CONFIG_SPI_ADDR_ENABLE_SHIFT 1 |
168 | 168 | ||
169 | #define PNX833X_MIU_CONFIG_SPI_SYNC_MASK (1 << 0) | 169 | #define PNX833X_MIU_CONFIG_SPI_SYNC_MASK (1 << 0) |
diff --git a/arch/mips/include/asm/mach-powertv/asic.h b/arch/mips/include/asm/mach-powertv/asic.h index c7077a64b9a7..b341108d12f1 100644 --- a/arch/mips/include/asm/mach-powertv/asic.h +++ b/arch/mips/include/asm/mach-powertv/asic.h | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <asm/mach-powertv/asic_regs.h> | 24 | #include <asm/mach-powertv/asic_regs.h> |
25 | 25 | ||
26 | #define DVR_CAPABLE (1<<0) | 26 | #define DVR_CAPABLE (1<<0) |
27 | #define PCIE_CAPABLE (1<<1) | 27 | #define PCIE_CAPABLE (1<<1) |
28 | #define FFS_CAPABLE (1<<2) | 28 | #define FFS_CAPABLE (1<<2) |
29 | #define DISPLAY_CAPABLE (1<<3) | 29 | #define DISPLAY_CAPABLE (1<<3) |
30 | 30 | ||
31 | /* Platform Family types | 31 | /* Platform Family types |
@@ -111,7 +111,7 @@ enum sys_reboot_type { | |||
111 | * Older drivers may report as | 111 | * Older drivers may report as |
112 | * userReboot. */ | 112 | * userReboot. */ |
113 | sys_hardware_reset = 0x09, /* HW watchdog or front-panel | 113 | sys_hardware_reset = 0x09, /* HW watchdog or front-panel |
114 | * reset button reset. Older | 114 | * reset button reset. Older |
115 | * drivers may report as | 115 | * drivers may report as |
116 | * userReboot. */ | 116 | * userReboot. */ |
117 | sys_watchdogInterrupt = 0x0A /* Pre-watchdog interrupt */ | 117 | sys_watchdogInterrupt = 0x0A /* Pre-watchdog interrupt */ |
diff --git a/arch/mips/include/asm/mach-powertv/asic_regs.h b/arch/mips/include/asm/mach-powertv/asic_regs.h index deecb26a077e..06712abb3e55 100644 --- a/arch/mips/include/asm/mach-powertv/asic_regs.h +++ b/arch/mips/include/asm/mach-powertv/asic_regs.h | |||
@@ -49,8 +49,8 @@ enum asic_type { | |||
49 | #define UART1_INTEN uart1_inten | 49 | #define UART1_INTEN uart1_inten |
50 | #define UART1_CONFIG1 uart1_config1 | 50 | #define UART1_CONFIG1 uart1_config1 |
51 | #define UART1_CONFIG2 uart1_config2 | 51 | #define UART1_CONFIG2 uart1_config2 |
52 | #define UART1_DIVISORHI uart1_divisorhi | 52 | #define UART1_DIVISORHI uart1_divisorhi |
53 | #define UART1_DIVISORLO uart1_divisorlo | 53 | #define UART1_DIVISORLO uart1_divisorlo |
54 | #define UART1_DATA uart1_data | 54 | #define UART1_DATA uart1_data |
55 | #define UART1_STATUS uart1_status | 55 | #define UART1_STATUS uart1_status |
56 | 56 | ||
diff --git a/arch/mips/include/asm/mach-powertv/dma-coherence.h b/arch/mips/include/asm/mach-powertv/dma-coherence.h index 35371641575d..f8316720a218 100644 --- a/arch/mips/include/asm/mach-powertv/dma-coherence.h +++ b/arch/mips/include/asm/mach-powertv/dma-coherence.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Version from mach-generic modified to support PowerTV port | 6 | * Version from mach-generic modified to support PowerTV port |
7 | * Portions Copyright (C) 2009 Cisco Systems, Inc. | 7 | * Portions Copyright (C) 2009 Cisco Systems, Inc. |
8 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> | 8 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> |
9 | * | 9 | * |
10 | */ | 10 | */ |
diff --git a/arch/mips/include/asm/mach-powertv/interrupts.h b/arch/mips/include/asm/mach-powertv/interrupts.h index 4fd652ceb52a..6c463be62156 100644 --- a/arch/mips/include/asm/mach-powertv/interrupts.h +++ b/arch/mips/include/asm/mach-powertv/interrupts.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #ifndef _ASM_MACH_POWERTV_INTERRUPTS_H_ | 19 | #ifndef _ASM_MACH_POWERTV_INTERRUPTS_H_ |
20 | #define _ASM_MACH_POWERTV_INTERRUPTS_H_ | 20 | #define _ASM_MACH_POWERTV_INTERRUPTS_H_ |
21 | 21 | ||
22 | /* | 22 | /* |
@@ -49,9 +49,9 @@ | |||
49 | * glue logic inside SPARC ILC | 49 | * glue logic inside SPARC ILC |
50 | * (see INT_SBAG_STAT, below, | 50 | * (see INT_SBAG_STAT, below, |
51 | * for individual interrupts) */ | 51 | * for individual interrupts) */ |
52 | #define irq_qam_b_fec (ibase+116) /* QAM B FEC Interrupt */ | 52 | #define irq_qam_b_fec (ibase+116) /* QAM B FEC Interrupt */ |
53 | #define irq_qam_a_fec (ibase+115) /* QAM A FEC Interrupt */ | 53 | #define irq_qam_a_fec (ibase+115) /* QAM A FEC Interrupt */ |
54 | /* 114 unused (bit 18) */ | 54 | /* 114 unused (bit 18) */ |
55 | #define irq_mailbox (ibase+113) /* Mailbox Debug Interrupt -- | 55 | #define irq_mailbox (ibase+113) /* Mailbox Debug Interrupt -- |
56 | * Ored by glue logic inside | 56 | * Ored by glue logic inside |
57 | * SPARC ILC (see | 57 | * SPARC ILC (see |
@@ -99,9 +99,9 @@ | |||
99 | #define irq_sata1 (ibase+87) /* SATA 1 Interrupt */ | 99 | #define irq_sata1 (ibase+87) /* SATA 1 Interrupt */ |
100 | #define irq_dtcp (ibase+86) /* DTCP Interrupt */ | 100 | #define irq_dtcp (ibase+86) /* DTCP Interrupt */ |
101 | #define irq_pciexp1 (ibase+85) /* PCI Express 1 Interrupt */ | 101 | #define irq_pciexp1 (ibase+85) /* PCI Express 1 Interrupt */ |
102 | /* 84 unused (bit 20) */ | 102 | /* 84 unused (bit 20) */ |
103 | /* 83 unused (bit 19) */ | 103 | /* 83 unused (bit 19) */ |
104 | /* 82 unused (bit 18) */ | 104 | /* 82 unused (bit 18) */ |
105 | #define irq_sata2 (ibase+81) /* SATA2 Interrupt */ | 105 | #define irq_sata2 (ibase+81) /* SATA2 Interrupt */ |
106 | #define irq_uart2 (ibase+80) /* UART2 Interrupt */ | 106 | #define irq_uart2 (ibase+80) /* UART2 Interrupt */ |
107 | #define irq_legacy_usb (ibase+79) /* Legacy USB Host ISR (1.1 | 107 | #define irq_legacy_usb (ibase+79) /* Legacy USB Host ISR (1.1 |
@@ -117,22 +117,22 @@ | |||
117 | #define irq_mod_dma (ibase+70) /* Modulator DMA Interrupt */ | 117 | #define irq_mod_dma (ibase+70) /* Modulator DMA Interrupt */ |
118 | #define irq_byte_eng1 (ibase+69) /* Byte Engine Interrupt [1] */ | 118 | #define irq_byte_eng1 (ibase+69) /* Byte Engine Interrupt [1] */ |
119 | #define irq_byte_eng0 (ibase+68) /* Byte Engine Interrupt [0] */ | 119 | #define irq_byte_eng0 (ibase+68) /* Byte Engine Interrupt [0] */ |
120 | /* 67 unused (bit 03) */ | 120 | /* 67 unused (bit 03) */ |
121 | /* 66 unused (bit 02) */ | 121 | /* 66 unused (bit 02) */ |
122 | /* 65 unused (bit 01) */ | 122 | /* 65 unused (bit 01) */ |
123 | /* 64 unused (bit 00) */ | 123 | /* 64 unused (bit 00) */ |
124 | /*------------- Register: int_stat_1 */ | 124 | /*------------- Register: int_stat_1 */ |
125 | /* 63 unused (bit 31) */ | 125 | /* 63 unused (bit 31) */ |
126 | /* 62 unused (bit 30) */ | 126 | /* 62 unused (bit 30) */ |
127 | /* 61 unused (bit 29) */ | 127 | /* 61 unused (bit 29) */ |
128 | /* 60 unused (bit 28) */ | 128 | /* 60 unused (bit 28) */ |
129 | /* 59 unused (bit 27) */ | 129 | /* 59 unused (bit 27) */ |
130 | /* 58 unused (bit 26) */ | 130 | /* 58 unused (bit 26) */ |
131 | /* 57 unused (bit 25) */ | 131 | /* 57 unused (bit 25) */ |
132 | /* 56 unused (bit 24) */ | 132 | /* 56 unused (bit 24) */ |
133 | #define irq_buf_dma_mem2mem (ibase+55) /* BufDMA Memory to Memory | 133 | #define irq_buf_dma_mem2mem (ibase+55) /* BufDMA Memory to Memory |
134 | * Interrupt */ | 134 | * Interrupt */ |
135 | #define irq_buf_dma_usbtransmit (ibase+54) /* BufDMA USB Transmit | 135 | #define irq_buf_dma_usbtransmit (ibase+54) /* BufDMA USB Transmit |
136 | * Interrupt */ | 136 | * Interrupt */ |
137 | #define irq_buf_dma_qpskpodtransmit (ibase+53) /* BufDMA QPSK/POD Tramsit | 137 | #define irq_buf_dma_qpskpodtransmit (ibase+53) /* BufDMA QPSK/POD Tramsit |
138 | * Interrupt */ | 138 | * Interrupt */ |
@@ -140,7 +140,7 @@ | |||
140 | * Interrupt */ | 140 | * Interrupt */ |
141 | #define irq_buf_dma_usbrecv (ibase+51) /* BufDMA USB Receive | 141 | #define irq_buf_dma_usbrecv (ibase+51) /* BufDMA USB Receive |
142 | * Interrupt */ | 142 | * Interrupt */ |
143 | #define irq_buf_dma_qpskpodrecv (ibase+50) /* BufDMA QPSK/POD Receive | 143 | #define irq_buf_dma_qpskpodrecv (ibase+50) /* BufDMA QPSK/POD Receive |
144 | * Interrupt */ | 144 | * Interrupt */ |
145 | #define irq_buf_dma_recv_error (ibase+49) /* BufDMA Receive Error | 145 | #define irq_buf_dma_recv_error (ibase+49) /* BufDMA Receive Error |
146 | * Interrupt */ | 146 | * Interrupt */ |
@@ -166,7 +166,7 @@ | |||
166 | * Module */ | 166 | * Module */ |
167 | #define irq_gpio2 (ibase+37) /* GP I/O IRQ 2 - From GP I/O | 167 | #define irq_gpio2 (ibase+37) /* GP I/O IRQ 2 - From GP I/O |
168 | * Module (ABE_intN) */ | 168 | * Module (ABE_intN) */ |
169 | #define irq_pcrcmplt1 (ibase+36) /* PCR Capture Complete or | 169 | #define irq_pcrcmplt1 (ibase+36) /* PCR Capture Complete or |
170 | * Discontinuity 1 */ | 170 | * Discontinuity 1 */ |
171 | #define irq_pcrcmplt2 (ibase+35) /* PCR Capture Complete or | 171 | #define irq_pcrcmplt2 (ibase+35) /* PCR Capture Complete or |
172 | * Discontinuity 2 */ | 172 | * Discontinuity 2 */ |
@@ -217,18 +217,18 @@ | |||
217 | #define irq_qpsk_hecerr (ibase+11) /* QPSK HEC Error Interrupt */ | 217 | #define irq_qpsk_hecerr (ibase+11) /* QPSK HEC Error Interrupt */ |
218 | #define irq_qpsk_crcerr (ibase+10) /* QPSK AAL-5 CRC Error | 218 | #define irq_qpsk_crcerr (ibase+10) /* QPSK AAL-5 CRC Error |
219 | * Interrupt */ | 219 | * Interrupt */ |
220 | /* 9 unused (bit 09) */ | 220 | /* 9 unused (bit 09) */ |
221 | /* 8 unused (bit 08) */ | 221 | /* 8 unused (bit 08) */ |
222 | #define irq_psicrcerr (ibase+7) /* QAM PSI CRC Error | 222 | #define irq_psicrcerr (ibase+7) /* QAM PSI CRC Error |
223 | * Interrupt */ | 223 | * Interrupt */ |
224 | #define irq_psilength_err (ibase+6) /* QAM PSI Length Error | 224 | #define irq_psilength_err (ibase+6) /* QAM PSI Length Error |
225 | * Interrupt */ | 225 | * Interrupt */ |
226 | #define irq_esfforward (ibase+5) /* ESF Interrupt Mark From | 226 | #define irq_esfforward (ibase+5) /* ESF Interrupt Mark From |
227 | * Forward Path Reference - | 227 | * Forward Path Reference - |
228 | * every 3ms when forward Mbits | 228 | * every 3ms when forward Mbits |
229 | * and forward slot control | 229 | * and forward slot control |
230 | * bytes are updated. */ | 230 | * bytes are updated. */ |
231 | #define irq_esfreverse (ibase+4) /* ESF Interrupt Mark from | 231 | #define irq_esfreverse (ibase+4) /* ESF Interrupt Mark from |
232 | * Reverse Path Reference - | 232 | * Reverse Path Reference - |
233 | * delayed from forward mark by | 233 | * delayed from forward mark by |
234 | * the ranging delay plus a | 234 | * the ranging delay plus a |
@@ -239,15 +239,15 @@ | |||
239 | * 1.554 M upstream rates and | 239 | * 1.554 M upstream rates and |
240 | * every 6 ms for 256K upstream | 240 | * every 6 ms for 256K upstream |
241 | * rate. */ | 241 | * rate. */ |
242 | #define irq_aloha_timeout (ibase+3) /* Slotted-Aloha timeout on | 242 | #define irq_aloha_timeout (ibase+3) /* Slotted-Aloha timeout on |
243 | * Channel 1. */ | 243 | * Channel 1. */ |
244 | #define irq_reservation (ibase+2) /* Partial (or Incremental) | 244 | #define irq_reservation (ibase+2) /* Partial (or Incremental) |
245 | * Reservation Message Completed | 245 | * Reservation Message Completed |
246 | * or Slotted aloha verify for | 246 | * or Slotted aloha verify for |
247 | * channel 1. */ | 247 | * channel 1. */ |
248 | #define irq_aloha3 (ibase+1) /* Slotted-Aloha Message Verify | 248 | #define irq_aloha3 (ibase+1) /* Slotted-Aloha Message Verify |
249 | * Interrupt or Reservation | 249 | * Interrupt or Reservation |
250 | * increment completed for | 250 | * increment completed for |
251 | * channel 3. */ | 251 | * channel 3. */ |
252 | #define irq_mpeg_d (ibase+0) /* MPEG Decoder Interrupt */ | 252 | #define irq_mpeg_d (ibase+0) /* MPEG Decoder Interrupt */ |
253 | #endif /* _ASM_MACH_POWERTV_INTERRUPTS_H_ */ | 253 | #endif /* _ASM_MACH_POWERTV_INTERRUPTS_H_ */ |
diff --git a/arch/mips/include/asm/mach-rc32434/ddr.h b/arch/mips/include/asm/mach-rc32434/ddr.h index 291e2cf9dde0..e1cad0c7fd52 100644 --- a/arch/mips/include/asm/mach-rc32434/ddr.h +++ b/arch/mips/include/asm/mach-rc32434/ddr.h | |||
@@ -138,4 +138,4 @@ struct ddr_ram { | |||
138 | #define RC32434_DLLED_DBE_BIT 0 | 138 | #define RC32434_DLLED_DBE_BIT 0 |
139 | #define RC32434_DLLED_DTE_BIT 1 | 139 | #define RC32434_DLLED_DTE_BIT 1 |
140 | 140 | ||
141 | #endif /* _ASM_RC32434_DDR_H_ */ | 141 | #endif /* _ASM_RC32434_DDR_H_ */ |
diff --git a/arch/mips/include/asm/mach-rc32434/dma.h b/arch/mips/include/asm/mach-rc32434/dma.h index 5f898b5873f7..4322191e46bf 100644 --- a/arch/mips/include/asm/mach-rc32434/dma.h +++ b/arch/mips/include/asm/mach-rc32434/dma.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * DMA register definition. | 5 | * DMA register definition. |
6 | * | 6 | * |
7 | * Author : ryan.holmQVist@idt.com | 7 | * Author : ryan.holmQVist@idt.com |
8 | * Date : 20011005 | 8 | * Date : 20011005 |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_RC32434_DMA_H | 11 | #ifndef __ASM_RC32434_DMA_H |
@@ -71,10 +71,10 @@ struct dma_reg { | |||
71 | #define DMA_CHAN_DONE_BIT (1 << 1) | 71 | #define DMA_CHAN_DONE_BIT (1 << 1) |
72 | #define DMA_CHAN_MODE_BIT (1 << 2) | 72 | #define DMA_CHAN_MODE_BIT (1 << 2) |
73 | #define DMA_CHAN_MODE_MSK 0x0000000c | 73 | #define DMA_CHAN_MODE_MSK 0x0000000c |
74 | #define DMA_CHAN_MODE_AUTO 0 | 74 | #define DMA_CHAN_MODE_AUTO 0 |
75 | #define DMA_CHAN_MODE_BURST 1 | 75 | #define DMA_CHAN_MODE_BURST 1 |
76 | #define DMA_CHAN_MODE_XFRT 2 | 76 | #define DMA_CHAN_MODE_XFRT 2 |
77 | #define DMA_CHAN_MODE_RSVD 3 | 77 | #define DMA_CHAN_MODE_RSVD 3 |
78 | #define DMA_CHAN_ACT_BIT (1 << 4) | 78 | #define DMA_CHAN_ACT_BIT (1 << 4) |
79 | 79 | ||
80 | /* DMA status registers */ | 80 | /* DMA status registers */ |
@@ -100,4 +100,4 @@ struct dma_channel { | |||
100 | struct dma_reg ch[DMA_CHAN_COUNT]; | 100 | struct dma_reg ch[DMA_CHAN_COUNT]; |
101 | }; | 101 | }; |
102 | 102 | ||
103 | #endif /* __ASM_RC32434_DMA_H */ | 103 | #endif /* __ASM_RC32434_DMA_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/dma_v.h b/arch/mips/include/asm/mach-rc32434/dma_v.h index 173a9f9146cd..28c54063a345 100644 --- a/arch/mips/include/asm/mach-rc32434/dma_v.h +++ b/arch/mips/include/asm/mach-rc32434/dma_v.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * DMA register definition. | 5 | * DMA register definition. |
6 | * | 6 | * |
7 | * Author : ryan.holmQVist@idt.com | 7 | * Author : ryan.holmQVist@idt.com |
8 | * Date : 20011005 | 8 | * Date : 20011005 |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _ASM_RC32434_DMA_V_H_ | 11 | #ifndef _ASM_RC32434_DMA_V_H_ |
@@ -49,4 +49,4 @@ static inline void rc32434_chain_dma(struct dma_reg *ch, u32 dma_addr) | |||
49 | __raw_writel(dma_addr, &ch->dmandptr); | 49 | __raw_writel(dma_addr, &ch->dmandptr); |
50 | } | 50 | } |
51 | 51 | ||
52 | #endif /* _ASM_RC32434_DMA_V_H_ */ | 52 | #endif /* _ASM_RC32434_DMA_V_H_ */ |
diff --git a/arch/mips/include/asm/mach-rc32434/eth.h b/arch/mips/include/asm/mach-rc32434/eth.h index a25cbc56173d..c2645faadf57 100644 --- a/arch/mips/include/asm/mach-rc32434/eth.h +++ b/arch/mips/include/asm/mach-rc32434/eth.h | |||
@@ -26,8 +26,8 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef __ASM_RC32434_ETH_H | 29 | #ifndef __ASM_RC32434_ETH_H |
30 | #define __ASM_RC32434_ETH_H | 30 | #define __ASM_RC32434_ETH_H |
31 | 31 | ||
32 | 32 | ||
33 | #define ETH0_BASE_ADDR 0x18060000 | 33 | #define ETH0_BASE_ADDR 0x18060000 |
@@ -217,4 +217,4 @@ struct eth_regs { | |||
217 | #define ETH_TX_LE (1 << 16) | 217 | #define ETH_TX_LE (1 << 16) |
218 | #define ETH_TX_CC 0x001E0000 | 218 | #define ETH_TX_CC 0x001E0000 |
219 | 219 | ||
220 | #endif /* __ASM_RC32434_ETH_H */ | 220 | #endif /* __ASM_RC32434_ETH_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/gpio.h b/arch/mips/include/asm/mach-rc32434/gpio.h index 12ee8d510160..4dee0a34250c 100644 --- a/arch/mips/include/asm/mach-rc32434/gpio.h +++ b/arch/mips/include/asm/mach-rc32434/gpio.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * GPIO register definition. | 5 | * GPIO register definition. |
6 | * | 6 | * |
7 | * Author : ryan.holmQVist@idt.com | 7 | * Author : ryan.holmQVist@idt.com |
8 | * Date : 20011005 | 8 | * Date : 20011005 |
9 | * Copyright (C) 2001, 2002 Ryan Holm <ryan.holmQVist@idt.com> | 9 | * Copyright (C) 2001, 2002 Ryan Holm <ryan.holmQVist@idt.com> |
10 | * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org> | 10 | * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org> |
11 | */ | 11 | */ |
@@ -26,9 +26,9 @@ | |||
26 | #define irq_to_gpio(irq) (irq - (8 + 4 * 32)) | 26 | #define irq_to_gpio(irq) (irq - (8 + 4 * 32)) |
27 | 27 | ||
28 | struct rb532_gpio_reg { | 28 | struct rb532_gpio_reg { |
29 | u32 gpiofunc; /* GPIO Function Register | 29 | u32 gpiofunc; /* GPIO Function Register |
30 | * gpiofunc[x]==0 bit = gpio | 30 | * gpiofunc[x]==0 bit = gpio |
31 | * func[x]==1 bit = altfunc | 31 | * func[x]==1 bit = altfunc |
32 | */ | 32 | */ |
33 | u32 gpiocfg; /* GPIO Configuration Register | 33 | u32 gpiocfg; /* GPIO Configuration Register |
34 | * gpiocfg[x]==0 bit = input | 34 | * gpiocfg[x]==0 bit = input |
diff --git a/arch/mips/include/asm/mach-rc32434/irq.h b/arch/mips/include/asm/mach-rc32434/irq.h index 023a5b100ed0..b76dec95c04e 100644 --- a/arch/mips/include/asm/mach-rc32434/irq.h +++ b/arch/mips/include/asm/mach-rc32434/irq.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_RC32434_IRQ_H | 1 | #ifndef __ASM_RC32434_IRQ_H |
2 | #define __ASM_RC32434_IRQ_H | 2 | #define __ASM_RC32434_IRQ_H |
3 | 3 | ||
4 | #define NR_IRQS 256 | 4 | #define NR_IRQS 256 |
5 | 5 | ||
6 | #include <asm/mach-generic/irq.h> | 6 | #include <asm/mach-generic/irq.h> |
7 | #include <asm/mach-rc32434/rb.h> | 7 | #include <asm/mach-rc32434/rb.h> |
@@ -25,12 +25,12 @@ | |||
25 | 25 | ||
26 | #define UART0_IRQ (GROUP3_IRQ_BASE + 0) | 26 | #define UART0_IRQ (GROUP3_IRQ_BASE + 0) |
27 | 27 | ||
28 | #define ETH0_DMA_RX_IRQ (GROUP1_IRQ_BASE + 0) | 28 | #define ETH0_DMA_RX_IRQ (GROUP1_IRQ_BASE + 0) |
29 | #define ETH0_DMA_TX_IRQ (GROUP1_IRQ_BASE + 1) | 29 | #define ETH0_DMA_TX_IRQ (GROUP1_IRQ_BASE + 1) |
30 | #define ETH0_RX_OVR_IRQ (GROUP3_IRQ_BASE + 9) | 30 | #define ETH0_RX_OVR_IRQ (GROUP3_IRQ_BASE + 9) |
31 | #define ETH0_TX_UND_IRQ (GROUP3_IRQ_BASE + 10) | 31 | #define ETH0_TX_UND_IRQ (GROUP3_IRQ_BASE + 10) |
32 | 32 | ||
33 | #define GPIO_MAPPED_IRQ_BASE GROUP4_IRQ_BASE | 33 | #define GPIO_MAPPED_IRQ_BASE GROUP4_IRQ_BASE |
34 | #define GPIO_MAPPED_IRQ_GROUP 4 | 34 | #define GPIO_MAPPED_IRQ_GROUP 4 |
35 | 35 | ||
36 | #endif /* __ASM_RC32434_IRQ_H */ | 36 | #endif /* __ASM_RC32434_IRQ_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/pci.h b/arch/mips/include/asm/mach-rc32434/pci.h index 410638f2af74..6f40d1515580 100644 --- a/arch/mips/include/asm/mach-rc32434/pci.h +++ b/arch/mips/include/asm/mach-rc32434/pci.h | |||
@@ -151,11 +151,11 @@ struct pci_msu { | |||
151 | #define PCI_CFGA_REG_PBA2 (0x18 >> 2) /* use PCIPBA_ */ | 151 | #define PCI_CFGA_REG_PBA2 (0x18 >> 2) /* use PCIPBA_ */ |
152 | #define PCI_CFGA_REG_PBA3 (0x1c >> 2) /* use PCIPBA_ */ | 152 | #define PCI_CFGA_REG_PBA3 (0x1c >> 2) /* use PCIPBA_ */ |
153 | #define PCI_CFGA_REG_SUBSYS (0x2c >> 2) /* use PCFGSS_ */ | 153 | #define PCI_CFGA_REG_SUBSYS (0x2c >> 2) /* use PCFGSS_ */ |
154 | #define PCI_CFGA_REG_3C (0x3C >> 2) /* use PCFG3C_ */ | 154 | #define PCI_CFGA_REG_3C (0x3C >> 2) /* use PCFG3C_ */ |
155 | #define PCI_CFGA_REG_PBBA0C (0x44 >> 2) /* use PCIPBAC_ */ | 155 | #define PCI_CFGA_REG_PBBA0C (0x44 >> 2) /* use PCIPBAC_ */ |
156 | #define PCI_CFGA_REG_PBA0M (0x48 >> 2) | 156 | #define PCI_CFGA_REG_PBA0M (0x48 >> 2) |
157 | #define PCI_CFGA_REG_PBA1C (0x4c >> 2) /* use PCIPBAC_ */ | 157 | #define PCI_CFGA_REG_PBA1C (0x4c >> 2) /* use PCIPBAC_ */ |
158 | #define PCI_CFGA_REG_PBA1M (0x50 >> 2) | 158 | #define PCI_CFGA_REG_PBA1M (0x50 >> 2) |
159 | #define PCI_CFGA_REG_PBA2C (0x54 >> 2) /* use PCIPBAC_ */ | 159 | #define PCI_CFGA_REG_PBA2C (0x54 >> 2) /* use PCIPBAC_ */ |
160 | #define PCI_CFGA_REG_PBA2M (0x58 >> 2) | 160 | #define PCI_CFGA_REG_PBA2M (0x58 >> 2) |
161 | #define PCI_CFGA_REG_PBA3C (0x5c >> 2) /* use PCIPBAC_ */ | 161 | #define PCI_CFGA_REG_PBA3C (0x5c >> 2) /* use PCIPBAC_ */ |
@@ -164,9 +164,9 @@ struct pci_msu { | |||
164 | #define PCI_CFGA_FUNC_BIT 8 | 164 | #define PCI_CFGA_FUNC_BIT 8 |
165 | #define PCI_CFGA_FUNC 0x00000700 | 165 | #define PCI_CFGA_FUNC 0x00000700 |
166 | #define PCI_CFGA_DEV_BIT 11 | 166 | #define PCI_CFGA_DEV_BIT 11 |
167 | #define PCI_CFGA_DEV 0x0000f800 | 167 | #define PCI_CFGA_DEV 0x0000f800 |
168 | #define PCI_CFGA_DEV_INTERN 0 | 168 | #define PCI_CFGA_DEV_INTERN 0 |
169 | #define PCI_CFGA_BUS_BIT 16 | 169 | #define PCI_CFGA_BUS_BIT 16 |
170 | #define PCI CFGA_BUS 0x00ff0000 | 170 | #define PCI CFGA_BUS 0x00ff0000 |
171 | #define PCI_CFGA_BUS_TYPE0 0 | 171 | #define PCI_CFGA_BUS_TYPE0 0 |
172 | #define PCI_CFGA_EN (1 << 31) | 172 | #define PCI_CFGA_EN (1 << 31) |
@@ -201,13 +201,13 @@ struct pci_msu { | |||
201 | #define PCI_PBAC_P (1 << 1) | 201 | #define PCI_PBAC_P (1 << 1) |
202 | #define PCI_PBAC_SIZE_BIT 2 | 202 | #define PCI_PBAC_SIZE_BIT 2 |
203 | #define PCI_PBAC_SIZE 0x0000007c | 203 | #define PCI_PBAC_SIZE 0x0000007c |
204 | #define PCI_PBAC_SB (1 << 7) | 204 | #define PCI_PBAC_SB (1 << 7) |
205 | #define PCI_PBAC_PP (1 << 8) | 205 | #define PCI_PBAC_PP (1 << 8) |
206 | #define PCI_PBAC_MR_BIT 9 | 206 | #define PCI_PBAC_MR_BIT 9 |
207 | #define PCI_PBAC_MR 0x00000600 | 207 | #define PCI_PBAC_MR 0x00000600 |
208 | #define PCI_PBAC_MR_RD 0 | 208 | #define PCI_PBAC_MR_RD 0 |
209 | #define PCI_PBAC_MR_RD_LINE 1 | 209 | #define PCI_PBAC_MR_RD_LINE 1 |
210 | #define PCI_PBAC_MR_RD_MULT 2 | 210 | #define PCI_PBAC_MR_RD_MULT 2 |
211 | #define PCI_PBAC_MRL (1 << 11) | 211 | #define PCI_PBAC_MRL (1 << 11) |
212 | #define PCI_PBAC_MRM (1 << 12) | 212 | #define PCI_PBAC_MRM (1 << 12) |
213 | #define PCI_PBAC_TRP (1 << 13) | 213 | #define PCI_PBAC_TRP (1 << 13) |
@@ -227,14 +227,14 @@ struct pci_msu { | |||
227 | */ | 227 | */ |
228 | 228 | ||
229 | #define PCI_LBAC_MSI (1 << 0) | 229 | #define PCI_LBAC_MSI (1 << 0) |
230 | #define PCI_LBAC_MSI_MEM 0 | 230 | #define PCI_LBAC_MSI_MEM 0 |
231 | #define PCI_LBAC_MSI_IO 1 | 231 | #define PCI_LBAC_MSI_IO 1 |
232 | #define PCI_LBAC_SIZE_BIT 2 | 232 | #define PCI_LBAC_SIZE_BIT 2 |
233 | #define PCI_LBAC_SIZE 0x0000007c | 233 | #define PCI_LBAC_SIZE 0x0000007c |
234 | #define PCI_LBAC_SB (1 << 7) | 234 | #define PCI_LBAC_SB (1 << 7) |
235 | #define PCI_LBAC_RT (1 << 8) | 235 | #define PCI_LBAC_RT (1 << 8) |
236 | #define PCI_LBAC_RT_NO_PREF 0 | 236 | #define PCI_LBAC_RT_NO_PREF 0 |
237 | #define PCI_LBAC_RT_PREF 1 | 237 | #define PCI_LBAC_RT_PREF 1 |
238 | 238 | ||
239 | /* | 239 | /* |
240 | * PCI Local Base Address [0|1|2|3] Mapping Register | 240 | * PCI Local Base Address [0|1|2|3] Mapping Register |
@@ -279,16 +279,16 @@ struct pci_msu { | |||
279 | #define PCI_DMAD_PT 0x00c00000 /* preferred transaction field */ | 279 | #define PCI_DMAD_PT 0x00c00000 /* preferred transaction field */ |
280 | /* These are for reads (DMA channel 8) */ | 280 | /* These are for reads (DMA channel 8) */ |
281 | #define PCI_DMAD_DEVCMD_MR 0 /* memory read */ | 281 | #define PCI_DMAD_DEVCMD_MR 0 /* memory read */ |
282 | #define PCI_DMAD_DEVCMD_MRL 1 /* memory read line */ | 282 | #define PCI_DMAD_DEVCMD_MRL 1 /* memory read line */ |
283 | #define PCI_DMAD_DEVCMD_MRM 2 /* memory read multiple */ | 283 | #define PCI_DMAD_DEVCMD_MRM 2 /* memory read multiple */ |
284 | #define PCI_DMAD_DEVCMD_IOR 3 /* I/O read */ | 284 | #define PCI_DMAD_DEVCMD_IOR 3 /* I/O read */ |
285 | /* These are for writes (DMA channel 9) */ | 285 | /* These are for writes (DMA channel 9) */ |
286 | #define PCI_DMAD_DEVCMD_MW 0 /* memory write */ | 286 | #define PCI_DMAD_DEVCMD_MW 0 /* memory write */ |
287 | #define PCI_DMAD_DEVCMD_MWI 1 /* memory write invalidate */ | 287 | #define PCI_DMAD_DEVCMD_MWI 1 /* memory write invalidate */ |
288 | #define PCI_DMAD_DEVCMD_IOW 3 /* I/O write */ | 288 | #define PCI_DMAD_DEVCMD_IOW 3 /* I/O write */ |
289 | 289 | ||
290 | /* Swap byte field applies to both DMA channel 8 and 9 */ | 290 | /* Swap byte field applies to both DMA channel 8 and 9 */ |
291 | #define PCI_DMAD_SB (1 << 24) /* swap byte field */ | 291 | #define PCI_DMAD_SB (1 << 24) /* swap byte field */ |
292 | 292 | ||
293 | 293 | ||
294 | /* | 294 | /* |
@@ -309,7 +309,7 @@ struct pci_msu { | |||
309 | #define PCI_MSU_M1 (1 << 1) | 309 | #define PCI_MSU_M1 (1 << 1) |
310 | #define PCI_MSU_DB (1 << 2) | 310 | #define PCI_MSU_DB (1 << 2) |
311 | 311 | ||
312 | #define PCI_MSG_ADDR 0xB8088010 | 312 | #define PCI_MSG_ADDR 0xB8088010 |
313 | #define PCI0_ADDR 0xB8080000 | 313 | #define PCI0_ADDR 0xB8080000 |
314 | #define rc32434_pci ((struct pci_reg *) PCI0_ADDR) | 314 | #define rc32434_pci ((struct pci_reg *) PCI0_ADDR) |
315 | #define rc32434_pci_msg ((struct pci_msu *) PCI_MSG_ADDR) | 315 | #define rc32434_pci_msg ((struct pci_msu *) PCI_MSG_ADDR) |
@@ -331,9 +331,9 @@ struct pci_msu { | |||
331 | #define PCILBA_SIZE_MASK 0x1F | 331 | #define PCILBA_SIZE_MASK 0x1F |
332 | #define SIZE_256MB 0x1C | 332 | #define SIZE_256MB 0x1C |
333 | #define SIZE_128MB 0x1B | 333 | #define SIZE_128MB 0x1B |
334 | #define SIZE_64MB 0x1A | 334 | #define SIZE_64MB 0x1A |
335 | #define SIZE_32MB 0x19 | 335 | #define SIZE_32MB 0x19 |
336 | #define SIZE_16MB 0x18 | 336 | #define SIZE_16MB 0x18 |
337 | #define SIZE_4MB 0x16 | 337 | #define SIZE_4MB 0x16 |
338 | #define SIZE_2MB 0x15 | 338 | #define SIZE_2MB 0x15 |
339 | #define SIZE_1MB 0x14 | 339 | #define SIZE_1MB 0x14 |
@@ -363,7 +363,7 @@ struct pci_msu { | |||
363 | #define KORINA_CONFIG23_ADDR 0x8000005C | 363 | #define KORINA_CONFIG23_ADDR 0x8000005C |
364 | #define KORINA_CONFIG24_ADDR 0x80000060 | 364 | #define KORINA_CONFIG24_ADDR 0x80000060 |
365 | #define KORINA_CONFIG25_ADDR 0x80000064 | 365 | #define KORINA_CONFIG25_ADDR 0x80000064 |
366 | #define KORINA_CMD (PCI_CFG04_CMD_IO_ENA | \ | 366 | #define KORINA_CMD (PCI_CFG04_CMD_IO_ENA | \ |
367 | PCI_CFG04_CMD_MEM_ENA | \ | 367 | PCI_CFG04_CMD_MEM_ENA | \ |
368 | PCI_CFG04_CMD_BM_ENA | \ | 368 | PCI_CFG04_CMD_BM_ENA | \ |
369 | PCI_CFG04_CMD_MW_INV | \ | 369 | PCI_CFG04_CMD_MW_INV | \ |
@@ -401,8 +401,8 @@ struct pci_msu { | |||
401 | #define KORINA_BAR3 0x48000008 /* Spare 128 MB Memory */ | 401 | #define KORINA_BAR3 0x48000008 /* Spare 128 MB Memory */ |
402 | 402 | ||
403 | #define KORINA_CNFG4 KORINA_BAR0 | 403 | #define KORINA_CNFG4 KORINA_BAR0 |
404 | #define KORINA_CNFG5 KORINA_BAR1 | 404 | #define KORINA_CNFG5 KORINA_BAR1 |
405 | #define KORINA_CNFG6 KORINA_BAR2 | 405 | #define KORINA_CNFG6 KORINA_BAR2 |
406 | #define KORINA_CNFG7 KORINA_BAR3 | 406 | #define KORINA_CNFG7 KORINA_BAR3 |
407 | 407 | ||
408 | #define KORINA_SUBSYS_VENDOR_ID 0x011d | 408 | #define KORINA_SUBSYS_VENDOR_ID 0x011d |
@@ -410,20 +410,20 @@ struct pci_msu { | |||
410 | #define KORINA_CNFG8 0 | 410 | #define KORINA_CNFG8 0 |
411 | #define KORINA_CNFG9 0 | 411 | #define KORINA_CNFG9 0 |
412 | #define KORINA_CNFG10 0 | 412 | #define KORINA_CNFG10 0 |
413 | #define KORINA_CNFG11 ((KORINA_SUBSYS_VENDOR_ID<<16) | \ | 413 | #define KORINA_CNFG11 ((KORINA_SUBSYS_VENDOR_ID<<16) | \ |
414 | KORINA_SUBSYSTEM_ID) | 414 | KORINA_SUBSYSTEM_ID) |
415 | #define KORINA_INT_LINE 1 | 415 | #define KORINA_INT_LINE 1 |
416 | #define KORINA_INT_PIN 1 | 416 | #define KORINA_INT_PIN 1 |
417 | #define KORINA_MIN_GNT 8 | 417 | #define KORINA_MIN_GNT 8 |
418 | #define KORINA_MAX_LAT 0x38 | 418 | #define KORINA_MAX_LAT 0x38 |
419 | #define KORINA_CNFG12 0 | 419 | #define KORINA_CNFG12 0 |
420 | #define KORINA_CNFG13 0 | 420 | #define KORINA_CNFG13 0 |
421 | #define KORINA_CNFG14 0 | 421 | #define KORINA_CNFG14 0 |
422 | #define KORINA_CNFG15 ((KORINA_MAX_LAT<<24) | \ | 422 | #define KORINA_CNFG15 ((KORINA_MAX_LAT<<24) | \ |
423 | (KORINA_MIN_GNT<<16) | \ | 423 | (KORINA_MIN_GNT<<16) | \ |
424 | (KORINA_INT_PIN<<8) | \ | 424 | (KORINA_INT_PIN<<8) | \ |
425 | KORINA_INT_LINE) | 425 | KORINA_INT_LINE) |
426 | #define KORINA_RETRY_LIMIT 0x80 | 426 | #define KORINA_RETRY_LIMIT 0x80 |
427 | #define KORINA_TRDY_LIMIT 0x80 | 427 | #define KORINA_TRDY_LIMIT 0x80 |
428 | #define KORINA_CNFG16 ((KORINA_RETRY_LIMIT<<8) | \ | 428 | #define KORINA_CNFG16 ((KORINA_RETRY_LIMIT<<8) | \ |
429 | KORINA_TRDY_LIMIT) | 429 | KORINA_TRDY_LIMIT) |
@@ -475,7 +475,7 @@ struct pci_msu { | |||
475 | #define KORINA_PBA3M 0 | 475 | #define KORINA_PBA3M 0 |
476 | #define KORINA_CNFG24 KORINA_PBA3M | 476 | #define KORINA_CNFG24 KORINA_PBA3M |
477 | 477 | ||
478 | #define PCITC_DTIMER_VAL 8 | 478 | #define PCITC_DTIMER_VAL 8 |
479 | #define PCITC_RTIMER_VAL 0x10 | 479 | #define PCITC_RTIMER_VAL 0x10 |
480 | 480 | ||
481 | #endif /* __ASM_RC32434_PCI_H */ | 481 | #endif /* __ASM_RC32434_PCI_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/rb.h b/arch/mips/include/asm/mach-rc32434/rb.h index 6dc5f8df1f3e..aac8ce8902e7 100644 --- a/arch/mips/include/asm/mach-rc32434/rb.h +++ b/arch/mips/include/asm/mach-rc32434/rb.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/genhd.h> | 18 | #include <linux/genhd.h> |
19 | 19 | ||
20 | #define REGBASE 0x18000000 | 20 | #define REGBASE 0x18000000 |
21 | #define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(REGBASE)) | 21 | #define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(REGBASE)) |
22 | #define UART0BASE 0x58000 | 22 | #define UART0BASE 0x58000 |
23 | #define RST (1 << 15) | 23 | #define RST (1 << 15) |
24 | #define DEV0BASE 0x010000 | 24 | #define DEV0BASE 0x010000 |
@@ -80,10 +80,10 @@ struct cf_device { | |||
80 | struct mpmc_device { | 80 | struct mpmc_device { |
81 | unsigned char state; | 81 | unsigned char state; |
82 | spinlock_t lock; | 82 | spinlock_t lock; |
83 | void __iomem *base; | 83 | void __iomem *base; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask); | 86 | extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask); |
87 | extern unsigned char get_latch_u5(void); | 87 | extern unsigned char get_latch_u5(void); |
88 | 88 | ||
89 | #endif /* __ASM_RC32434_RB_H */ | 89 | #endif /* __ASM_RC32434_RB_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/rc32434.h b/arch/mips/include/asm/mach-rc32434/rc32434.h index fce25d4231fc..02fd32b4be16 100644 --- a/arch/mips/include/asm/mach-rc32434/rc32434.h +++ b/arch/mips/include/asm/mach-rc32434/rc32434.h | |||
@@ -16,4 +16,4 @@ static inline void rc32434_sync(void) | |||
16 | __asm__ volatile ("sync"); | 16 | __asm__ volatile ("sync"); |
17 | } | 17 | } |
18 | 18 | ||
19 | #endif /* _ASM_RC32434_RC32434_H_ */ | 19 | #endif /* _ASM_RC32434_RC32434_H_ */ |
diff --git a/arch/mips/include/asm/mach-rc32434/timer.h b/arch/mips/include/asm/mach-rc32434/timer.h index e49b1d57a017..cda26bb9eead 100644 --- a/arch/mips/include/asm/mach-rc32434/timer.h +++ b/arch/mips/include/asm/mach-rc32434/timer.h | |||
@@ -51,15 +51,15 @@ struct timer { | |||
51 | #define RC32434_CTC_TO_BIT 1 | 51 | #define RC32434_CTC_TO_BIT 1 |
52 | 52 | ||
53 | /* Real time clock registers */ | 53 | /* Real time clock registers */ |
54 | #define RC32434_RTC_MSK(x) BIT_TO_MASK(x) | 54 | #define RC32434_RTC_MSK(x) BIT_TO_MASK(x) |
55 | #define RC32434_RTC_CE_BIT 0 | 55 | #define RC32434_RTC_CE_BIT 0 |
56 | #define RC32434_RTC_TO_BIT 1 | 56 | #define RC32434_RTC_TO_BIT 1 |
57 | #define RC32434_RTC_RQE_BIT 2 | 57 | #define RC32434_RTC_RQE_BIT 2 |
58 | 58 | ||
59 | /* Counter registers */ | 59 | /* Counter registers */ |
60 | #define RC32434_RCOUNT_BIT 0 | 60 | #define RC32434_RCOUNT_BIT 0 |
61 | #define RC32434_RCOUNT_MSK 0x0000ffff | 61 | #define RC32434_RCOUNT_MSK 0x0000ffff |
62 | #define RC32434_RCOMP_BIT 0 | 62 | #define RC32434_RCOMP_BIT 0 |
63 | #define RC32434_RCOMP_MSK 0x0000ffff | 63 | #define RC32434_RCOMP_MSK 0x0000ffff |
64 | 64 | ||
65 | #endif /* __ASM_RC32434_TIMER_H */ | 65 | #endif /* __ASM_RC32434_TIMER_H */ |
diff --git a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h index 7f3e3f9bd23a..d9c828419037 100644 --- a/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h +++ b/arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h | |||
@@ -23,8 +23,8 @@ | |||
23 | /* #define cpu_has_watch ? */ | 23 | /* #define cpu_has_watch ? */ |
24 | #define cpu_has_divec 1 | 24 | #define cpu_has_divec 1 |
25 | #define cpu_has_vce 0 | 25 | #define cpu_has_vce 0 |
26 | /* #define cpu_has_cache_cdex_p ? */ | 26 | /* #define cpu_has_cache_cdex_p ? */ |
27 | /* #define cpu_has_cache_cdex_s ? */ | 27 | /* #define cpu_has_cache_cdex_s ? */ |
28 | /* #define cpu_has_prefetch ? */ | 28 | /* #define cpu_has_prefetch ? */ |
29 | #define cpu_has_mcheck 1 | 29 | #define cpu_has_mcheck 1 |
30 | /* #define cpu_has_ejtag ? */ | 30 | /* #define cpu_has_ejtag ? */ |
@@ -53,8 +53,8 @@ | |||
53 | /* #define cpu_has_watch ? */ | 53 | /* #define cpu_has_watch ? */ |
54 | #define cpu_has_divec 1 | 54 | #define cpu_has_divec 1 |
55 | #define cpu_has_vce 0 | 55 | #define cpu_has_vce 0 |
56 | /* #define cpu_has_cache_cdex_p ? */ | 56 | /* #define cpu_has_cache_cdex_p ? */ |
57 | /* #define cpu_has_cache_cdex_s ? */ | 57 | /* #define cpu_has_cache_cdex_s ? */ |
58 | /* #define cpu_has_prefetch ? */ | 58 | /* #define cpu_has_prefetch ? */ |
59 | #define cpu_has_mcheck 1 | 59 | #define cpu_has_mcheck 1 |
60 | /* #define cpu_has_ejtag ? */ | 60 | /* #define cpu_has_ejtag ? */ |
diff --git a/arch/mips/include/asm/mach-sead3/irq.h b/arch/mips/include/asm/mach-sead3/irq.h index 652ea4c38cda..5d154cfbcf4c 100644 --- a/arch/mips/include/asm/mach-sead3/irq.h +++ b/arch/mips/include/asm/mach-sead3/irq.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_MIPS_IRQ_H | 1 | #ifndef __ASM_MACH_MIPS_IRQ_H |
2 | #define __ASM_MACH_MIPS_IRQ_H | 2 | #define __ASM_MACH_MIPS_IRQ_H |
3 | 3 | ||
4 | #define NR_IRQS 256 | 4 | #define NR_IRQS 256 |
5 | 5 | ||
6 | 6 | ||
7 | #include_next <irq.h> | 7 | #include_next <irq.h> |
diff --git a/arch/mips/include/asm/mach-sibyte/war.h b/arch/mips/include/asm/mach-sibyte/war.h index 176f5b32dc69..0a227d426b9c 100644 --- a/arch/mips/include/asm/mach-sibyte/war.h +++ b/arch/mips/include/asm/mach-sibyte/war.h | |||
@@ -21,12 +21,12 @@ extern int sb1250_m3_workaround_needed(void); | |||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #define BCM1250_M3_WAR sb1250_m3_workaround_needed() | 23 | #define BCM1250_M3_WAR sb1250_m3_workaround_needed() |
24 | #define SIBYTE_1956_WAR 1 | 24 | #define SIBYTE_1956_WAR 1 |
25 | 25 | ||
26 | #else | 26 | #else |
27 | 27 | ||
28 | #define BCM1250_M3_WAR 0 | 28 | #define BCM1250_M3_WAR 0 |
29 | #define SIBYTE_1956_WAR 0 | 29 | #define SIBYTE_1956_WAR 0 |
30 | 30 | ||
31 | #endif | 31 | #endif |
32 | 32 | ||
diff --git a/arch/mips/include/asm/mach-wrppmc/mach-gt64120.h b/arch/mips/include/asm/mach-wrppmc/mach-gt64120.h index 83746b84a5ec..00fa3684ac98 100644 --- a/arch/mips/include/asm/mach-wrppmc/mach-gt64120.h +++ b/arch/mips/include/asm/mach-wrppmc/mach-gt64120.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This is a direct copy of the ev96100.h file, with a global | 2 | * This is a direct copy of the ev96100.h file, with a global |
3 | * search and replace. The numbers are the same. | 3 | * search and replace. The numbers are the same. |
4 | * | 4 | * |
5 | * The reason I'm duplicating this is so that the 64120/96100 | 5 | * The reason I'm duplicating this is so that the 64120/96100 |
6 | * defines won't be confusing in the source code. | 6 | * defines won't be confusing in the source code. |
@@ -11,11 +11,11 @@ | |||
11 | /* | 11 | /* |
12 | * This is the CPU physical memory map of PPMC Board: | 12 | * This is the CPU physical memory map of PPMC Board: |
13 | * | 13 | * |
14 | * 0x00000000-0x03FFFFFF - 64MB SDRAM (SCS[0]#) | 14 | * 0x00000000-0x03FFFFFF - 64MB SDRAM (SCS[0]#) |
15 | * 0x1C000000-0x1C000000 - LED (CS0) | 15 | * 0x1C000000-0x1C000000 - LED (CS0) |
16 | * 0x1C800000-0x1C800007 - UART 16550 port (CS1) | 16 | * 0x1C800000-0x1C800007 - UART 16550 port (CS1) |
17 | * 0x1F000000-0x1F000000 - MailBox (CS3) | 17 | * 0x1F000000-0x1F000000 - MailBox (CS3) |
18 | * 0x1FC00000-0x20000000 - 4MB Flash (BOOT CS) | 18 | * 0x1FC00000-0x20000000 - 4MB Flash (BOOT CS) |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define WRPPMC_SDRAM_SCS0_BASE 0x00000000 | 21 | #define WRPPMC_SDRAM_SCS0_BASE 0x00000000 |
@@ -39,8 +39,8 @@ | |||
39 | * | 39 | * |
40 | * NOTE: We only have PCI_0 hose interface | 40 | * NOTE: We only have PCI_0 hose interface |
41 | */ | 41 | */ |
42 | #define GT_PCI_MEM_BASE 0x13000000UL | 42 | #define GT_PCI_MEM_BASE 0x13000000UL |
43 | #define GT_PCI_MEM_SIZE 0x02000000UL | 43 | #define GT_PCI_MEM_SIZE 0x02000000UL |
44 | #define GT_PCI_IO_BASE 0x11000000UL | 44 | #define GT_PCI_IO_BASE 0x11000000UL |
45 | #define GT_PCI_IO_SIZE 0x02000000UL | 45 | #define GT_PCI_IO_SIZE 0x02000000UL |
46 | 46 | ||
diff --git a/arch/mips/include/asm/mc146818-time.h b/arch/mips/include/asm/mc146818-time.h index 4a08dbe37db8..9e1ad26abdc0 100644 --- a/arch/mips/include/asm/mc146818-time.h +++ b/arch/mips/include/asm/mc146818-time.h | |||
@@ -26,7 +26,7 @@ | |||
26 | * MC146818A or Dallas DS12887 data sheet for details. | 26 | * MC146818A or Dallas DS12887 data sheet for details. |
27 | * | 27 | * |
28 | * BUG: This routine does not handle hour overflow properly; it just | 28 | * BUG: This routine does not handle hour overflow properly; it just |
29 | * sets the minutes. Usually you'll only notice that after reboot! | 29 | * sets the minutes. Usually you'll only notice that after reboot! |
30 | */ | 30 | */ |
31 | static inline int mc146818_set_rtc_mmss(unsigned long nowtime) | 31 | static inline int mc146818_set_rtc_mmss(unsigned long nowtime) |
32 | { | 32 | { |
@@ -77,7 +77,7 @@ static inline int mc146818_set_rtc_mmss(unsigned long nowtime) | |||
77 | * battery and quartz) will not reset the oscillator and will not | 77 | * battery and quartz) will not reset the oscillator and will not |
78 | * update precisely 500 ms later. You won't find this mentioned in | 78 | * update precisely 500 ms later. You won't find this mentioned in |
79 | * the Dallas Semiconductor data sheets, but who believes data | 79 | * the Dallas Semiconductor data sheets, but who believes data |
80 | * sheets anyway ... -- Markus Kuhn | 80 | * sheets anyway ... -- Markus Kuhn |
81 | */ | 81 | */ |
82 | CMOS_WRITE(save_control, RTC_CONTROL); | 82 | CMOS_WRITE(save_control, RTC_CONTROL); |
83 | CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); | 83 | CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); |
diff --git a/arch/mips/include/asm/mips-boards/bonito64.h b/arch/mips/include/asm/mips-boards/bonito64.h index d14e2adc4be5..b2048d1bcc1c 100644 --- a/arch/mips/include/asm/mips-boards/bonito64.h +++ b/arch/mips/include/asm/mips-boards/bonito64.h | |||
@@ -41,18 +41,18 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
41 | 41 | ||
42 | #define BONITO_BOOT_BASE 0x1fc00000 | 42 | #define BONITO_BOOT_BASE 0x1fc00000 |
43 | #define BONITO_BOOT_SIZE 0x00100000 | 43 | #define BONITO_BOOT_SIZE 0x00100000 |
44 | #define BONITO_BOOT_TOP (BONITO_BOOT_BASE+BONITO_BOOT_SIZE-1) | 44 | #define BONITO_BOOT_TOP (BONITO_BOOT_BASE+BONITO_BOOT_SIZE-1) |
45 | #define BONITO_FLASH_BASE 0x1c000000 | 45 | #define BONITO_FLASH_BASE 0x1c000000 |
46 | #define BONITO_FLASH_SIZE 0x03000000 | 46 | #define BONITO_FLASH_SIZE 0x03000000 |
47 | #define BONITO_FLASH_TOP (BONITO_FLASH_BASE+BONITO_FLASH_SIZE-1) | 47 | #define BONITO_FLASH_TOP (BONITO_FLASH_BASE+BONITO_FLASH_SIZE-1) |
48 | #define BONITO_SOCKET_BASE 0x1f800000 | 48 | #define BONITO_SOCKET_BASE 0x1f800000 |
49 | #define BONITO_SOCKET_SIZE 0x00400000 | 49 | #define BONITO_SOCKET_SIZE 0x00400000 |
50 | #define BONITO_SOCKET_TOP (BONITO_SOCKET_BASE+BONITO_SOCKET_SIZE-1) | 50 | #define BONITO_SOCKET_TOP (BONITO_SOCKET_BASE+BONITO_SOCKET_SIZE-1) |
51 | #define BONITO_REG_BASE 0x1fe00000 | 51 | #define BONITO_REG_BASE 0x1fe00000 |
52 | #define BONITO_REG_SIZE 0x00040000 | 52 | #define BONITO_REG_SIZE 0x00040000 |
53 | #define BONITO_REG_TOP (BONITO_REG_BASE+BONITO_REG_SIZE-1) | 53 | #define BONITO_REG_TOP (BONITO_REG_BASE+BONITO_REG_SIZE-1) |
54 | #define BONITO_DEV_BASE 0x1ff00000 | 54 | #define BONITO_DEV_BASE 0x1ff00000 |
55 | #define BONITO_DEV_SIZE 0x00100000 | 55 | #define BONITO_DEV_SIZE 0x00100000 |
56 | #define BONITO_DEV_TOP (BONITO_DEV_BASE+BONITO_DEV_SIZE-1) | 56 | #define BONITO_DEV_TOP (BONITO_DEV_BASE+BONITO_DEV_SIZE-1) |
57 | #define BONITO_PCILO_BASE 0x10000000 | 57 | #define BONITO_PCILO_BASE 0x10000000 |
58 | #define BONITO_PCILO_SIZE 0x0c000000 | 58 | #define BONITO_PCILO_SIZE 0x0c000000 |
@@ -79,14 +79,14 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
79 | 79 | ||
80 | /* PCI Configuration Registers */ | 80 | /* PCI Configuration Registers */ |
81 | 81 | ||
82 | #define BONITO_PCI_REG(x) BONITO(BONITO_PCICONFIGBASE + (x)) | 82 | #define BONITO_PCI_REG(x) BONITO(BONITO_PCICONFIGBASE + (x)) |
83 | #define BONITO_PCIDID BONITO_PCI_REG(0x00) | 83 | #define BONITO_PCIDID BONITO_PCI_REG(0x00) |
84 | #define BONITO_PCICMD BONITO_PCI_REG(0x04) | 84 | #define BONITO_PCICMD BONITO_PCI_REG(0x04) |
85 | #define BONITO_PCICLASS BONITO_PCI_REG(0x08) | 85 | #define BONITO_PCICLASS BONITO_PCI_REG(0x08) |
86 | #define BONITO_PCILTIMER BONITO_PCI_REG(0x0c) | 86 | #define BONITO_PCILTIMER BONITO_PCI_REG(0x0c) |
87 | #define BONITO_PCIBASE0 BONITO_PCI_REG(0x10) | 87 | #define BONITO_PCIBASE0 BONITO_PCI_REG(0x10) |
88 | #define BONITO_PCIBASE1 BONITO_PCI_REG(0x14) | 88 | #define BONITO_PCIBASE1 BONITO_PCI_REG(0x14) |
89 | #define BONITO_PCIBASE2 BONITO_PCI_REG(0x18) | 89 | #define BONITO_PCIBASE2 BONITO_PCI_REG(0x18) |
90 | #define BONITO_PCIEXPRBASE BONITO_PCI_REG(0x30) | 90 | #define BONITO_PCIEXPRBASE BONITO_PCI_REG(0x30) |
91 | #define BONITO_PCIINT BONITO_PCI_REG(0x3c) | 91 | #define BONITO_PCIINT BONITO_PCI_REG(0x3c) |
92 | 92 | ||
@@ -95,7 +95,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
95 | #define BONITO_PCICMD_MABORT_CLR 0x20000000 | 95 | #define BONITO_PCICMD_MABORT_CLR 0x20000000 |
96 | #define BONITO_PCICMD_MTABORT_CLR 0x10000000 | 96 | #define BONITO_PCICMD_MTABORT_CLR 0x10000000 |
97 | #define BONITO_PCICMD_TABORT_CLR 0x08000000 | 97 | #define BONITO_PCICMD_TABORT_CLR 0x08000000 |
98 | #define BONITO_PCICMD_MPERR_CLR 0x01000000 | 98 | #define BONITO_PCICMD_MPERR_CLR 0x01000000 |
99 | #define BONITO_PCICMD_PERRRESPEN 0x00000040 | 99 | #define BONITO_PCICMD_PERRRESPEN 0x00000040 |
100 | #define BONITO_PCICMD_ASTEPEN 0x00000080 | 100 | #define BONITO_PCICMD_ASTEPEN 0x00000080 |
101 | #define BONITO_PCICMD_SERREN 0x00000100 | 101 | #define BONITO_PCICMD_SERREN 0x00000100 |
@@ -139,7 +139,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
139 | 139 | ||
140 | /* Other Bonito configuration */ | 140 | /* Other Bonito configuration */ |
141 | 141 | ||
142 | #define BONITO_BONGENCFG_OFFSET 0x4 | 142 | #define BONITO_BONGENCFG_OFFSET 0x4 |
143 | #define BONITO_BONGENCFG BONITO(BONITO_REGBASE + BONITO_BONGENCFG_OFFSET) | 143 | #define BONITO_BONGENCFG BONITO(BONITO_REGBASE + BONITO_BONGENCFG_OFFSET) |
144 | 144 | ||
145 | #define BONITO_BONGENCFG_DEBUGMODE 0x00000001 | 145 | #define BONITO_BONGENCFG_DEBUGMODE 0x00000001 |
@@ -165,7 +165,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
165 | 165 | ||
166 | /* 2. IO & IDE configuration */ | 166 | /* 2. IO & IDE configuration */ |
167 | 167 | ||
168 | #define BONITO_IODEVCFG BONITO(BONITO_REGBASE + 0x08) | 168 | #define BONITO_IODEVCFG BONITO(BONITO_REGBASE + 0x08) |
169 | 169 | ||
170 | /* 3. IO & IDE configuration */ | 170 | /* 3. IO & IDE configuration */ |
171 | 171 | ||
@@ -181,33 +181,33 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
181 | 181 | ||
182 | /* GPIO Regs - r/w */ | 182 | /* GPIO Regs - r/w */ |
183 | 183 | ||
184 | #define BONITO_GPIODATA_OFFSET 0x1c | 184 | #define BONITO_GPIODATA_OFFSET 0x1c |
185 | #define BONITO_GPIODATA BONITO(BONITO_REGBASE + BONITO_GPIODATA_OFFSET) | 185 | #define BONITO_GPIODATA BONITO(BONITO_REGBASE + BONITO_GPIODATA_OFFSET) |
186 | #define BONITO_GPIOIE BONITO(BONITO_REGBASE + 0x20) | 186 | #define BONITO_GPIOIE BONITO(BONITO_REGBASE + 0x20) |
187 | 187 | ||
188 | /* ICU Configuration Regs - r/w */ | 188 | /* ICU Configuration Regs - r/w */ |
189 | 189 | ||
190 | #define BONITO_INTEDGE BONITO(BONITO_REGBASE + 0x24) | 190 | #define BONITO_INTEDGE BONITO(BONITO_REGBASE + 0x24) |
191 | #define BONITO_INTSTEER BONITO(BONITO_REGBASE + 0x28) | 191 | #define BONITO_INTSTEER BONITO(BONITO_REGBASE + 0x28) |
192 | #define BONITO_INTPOL BONITO(BONITO_REGBASE + 0x2c) | 192 | #define BONITO_INTPOL BONITO(BONITO_REGBASE + 0x2c) |
193 | 193 | ||
194 | /* ICU Enable Regs - IntEn & IntISR are r/o. */ | 194 | /* ICU Enable Regs - IntEn & IntISR are r/o. */ |
195 | 195 | ||
196 | #define BONITO_INTENSET BONITO(BONITO_REGBASE + 0x30) | 196 | #define BONITO_INTENSET BONITO(BONITO_REGBASE + 0x30) |
197 | #define BONITO_INTENCLR BONITO(BONITO_REGBASE + 0x34) | 197 | #define BONITO_INTENCLR BONITO(BONITO_REGBASE + 0x34) |
198 | #define BONITO_INTEN BONITO(BONITO_REGBASE + 0x38) | 198 | #define BONITO_INTEN BONITO(BONITO_REGBASE + 0x38) |
199 | #define BONITO_INTISR BONITO(BONITO_REGBASE + 0x3c) | 199 | #define BONITO_INTISR BONITO(BONITO_REGBASE + 0x3c) |
200 | 200 | ||
201 | /* PCI mail boxes */ | 201 | /* PCI mail boxes */ |
202 | 202 | ||
203 | #define BONITO_PCIMAIL0_OFFSET 0x40 | 203 | #define BONITO_PCIMAIL0_OFFSET 0x40 |
204 | #define BONITO_PCIMAIL1_OFFSET 0x44 | 204 | #define BONITO_PCIMAIL1_OFFSET 0x44 |
205 | #define BONITO_PCIMAIL2_OFFSET 0x48 | 205 | #define BONITO_PCIMAIL2_OFFSET 0x48 |
206 | #define BONITO_PCIMAIL3_OFFSET 0x4c | 206 | #define BONITO_PCIMAIL3_OFFSET 0x4c |
207 | #define BONITO_PCIMAIL0 BONITO(BONITO_REGBASE + 0x40) | 207 | #define BONITO_PCIMAIL0 BONITO(BONITO_REGBASE + 0x40) |
208 | #define BONITO_PCIMAIL1 BONITO(BONITO_REGBASE + 0x44) | 208 | #define BONITO_PCIMAIL1 BONITO(BONITO_REGBASE + 0x44) |
209 | #define BONITO_PCIMAIL2 BONITO(BONITO_REGBASE + 0x48) | 209 | #define BONITO_PCIMAIL2 BONITO(BONITO_REGBASE + 0x48) |
210 | #define BONITO_PCIMAIL3 BONITO(BONITO_REGBASE + 0x4c) | 210 | #define BONITO_PCIMAIL3 BONITO(BONITO_REGBASE + 0x4c) |
211 | 211 | ||
212 | 212 | ||
213 | /* 6. PCI cache */ | 213 | /* 6. PCI cache */ |
@@ -216,7 +216,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
216 | #define BONITO_PCICACHETAG BONITO(BONITO_REGBASE + 0x54) | 216 | #define BONITO_PCICACHETAG BONITO(BONITO_REGBASE + 0x54) |
217 | 217 | ||
218 | #define BONITO_PCIBADADDR BONITO(BONITO_REGBASE + 0x58) | 218 | #define BONITO_PCIBADADDR BONITO(BONITO_REGBASE + 0x58) |
219 | #define BONITO_PCIMSTAT BONITO(BONITO_REGBASE + 0x5c) | 219 | #define BONITO_PCIMSTAT BONITO(BONITO_REGBASE + 0x5c) |
220 | 220 | ||
221 | 221 | ||
222 | /* | 222 | /* |
@@ -228,20 +228,20 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
228 | 228 | ||
229 | #define BONITO_CONFIGBASE 0x000 | 229 | #define BONITO_CONFIGBASE 0x000 |
230 | #define BONITO_BONITOBASE 0x100 | 230 | #define BONITO_BONITOBASE 0x100 |
231 | #define BONITO_LDMABASE 0x200 | 231 | #define BONITO_LDMABASE 0x200 |
232 | #define BONITO_COPBASE 0x300 | 232 | #define BONITO_COPBASE 0x300 |
233 | #define BONITO_REG_BLOCKMASK 0x300 | 233 | #define BONITO_REG_BLOCKMASK 0x300 |
234 | 234 | ||
235 | #define BONITO_LDMACTRL BONITO(BONITO_LDMABASE + 0x0) | 235 | #define BONITO_LDMACTRL BONITO(BONITO_LDMABASE + 0x0) |
236 | #define BONITO_LDMASTAT BONITO(BONITO_LDMABASE + 0x0) | 236 | #define BONITO_LDMASTAT BONITO(BONITO_LDMABASE + 0x0) |
237 | #define BONITO_LDMAADDR BONITO(BONITO_LDMABASE + 0x4) | 237 | #define BONITO_LDMAADDR BONITO(BONITO_LDMABASE + 0x4) |
238 | #define BONITO_LDMAGO BONITO(BONITO_LDMABASE + 0x8) | 238 | #define BONITO_LDMAGO BONITO(BONITO_LDMABASE + 0x8) |
239 | #define BONITO_LDMADATA BONITO(BONITO_LDMABASE + 0xc) | 239 | #define BONITO_LDMADATA BONITO(BONITO_LDMABASE + 0xc) |
240 | 240 | ||
241 | #define BONITO_COPCTRL BONITO(BONITO_COPBASE + 0x0) | 241 | #define BONITO_COPCTRL BONITO(BONITO_COPBASE + 0x0) |
242 | #define BONITO_COPSTAT BONITO(BONITO_COPBASE + 0x0) | 242 | #define BONITO_COPSTAT BONITO(BONITO_COPBASE + 0x0) |
243 | #define BONITO_COPPADDR BONITO(BONITO_COPBASE + 0x4) | 243 | #define BONITO_COPPADDR BONITO(BONITO_COPBASE + 0x4) |
244 | #define BONITO_COPDADDR BONITO(BONITO_COPBASE + 0x8) | 244 | #define BONITO_COPDADDR BONITO(BONITO_COPBASE + 0x8) |
245 | #define BONITO_COPGO BONITO(BONITO_COPBASE + 0xc) | 245 | #define BONITO_COPGO BONITO(BONITO_COPBASE + 0xc) |
246 | 246 | ||
247 | 247 | ||
@@ -257,7 +257,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
257 | #define BONITO_IDECOPGO_DMA_SIZE_SHIFT 0 | 257 | #define BONITO_IDECOPGO_DMA_SIZE_SHIFT 0 |
258 | #define BONITO_IDECOPGO_DMA_WRITE 0x00010000 | 258 | #define BONITO_IDECOPGO_DMA_WRITE 0x00010000 |
259 | #define BONITO_IDECOPGO_DMAWCOUNT 0x000f0000 | 259 | #define BONITO_IDECOPGO_DMAWCOUNT 0x000f0000 |
260 | #define BONITO_IDECOPGO_DMAWCOUNT_SHIFT 16 | 260 | #define BONITO_IDECOPGO_DMAWCOUNT_SHIFT 16 |
261 | 261 | ||
262 | #define BONITO_IDECOPCTRL_DMA_STARTBIT 0x80000000 | 262 | #define BONITO_IDECOPCTRL_DMA_STARTBIT 0x80000000 |
263 | #define BONITO_IDECOPCTRL_DMA_RSTBIT 0x40000000 | 263 | #define BONITO_IDECOPCTRL_DMA_RSTBIT 0x40000000 |
@@ -291,11 +291,11 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
291 | #define BONITO_SDCFG_DRAMMODESET 0x00200000 | 291 | #define BONITO_SDCFG_DRAMMODESET 0x00200000 |
292 | /* --- */ | 292 | /* --- */ |
293 | #define BONITO_SDCFG_DRAMEXTREGS 0x00400000 | 293 | #define BONITO_SDCFG_DRAMEXTREGS 0x00400000 |
294 | #define BONITO_SDCFG_DRAMPARITY 0x00800000 | 294 | #define BONITO_SDCFG_DRAMPARITY 0x00800000 |
295 | /* Added by RPF 11-9-00 */ | 295 | /* Added by RPF 11-9-00 */ |
296 | #define BONITO_SDCFG_DRAMBURSTLEN 0x03000000 | 296 | #define BONITO_SDCFG_DRAMBURSTLEN 0x03000000 |
297 | #define BONITO_SDCFG_DRAMBURSTLEN_SHIFT 24 | 297 | #define BONITO_SDCFG_DRAMBURSTLEN_SHIFT 24 |
298 | #define BONITO_SDCFG_DRAMMODESET_DONE 0x80000000 | 298 | #define BONITO_SDCFG_DRAMMODESET_DONE 0x80000000 |
299 | /* --- */ | 299 | /* --- */ |
300 | 300 | ||
301 | /* PCI Cache - pciCacheCtrl */ | 301 | /* PCI Cache - pciCacheCtrl */ |
@@ -308,7 +308,7 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
308 | 308 | ||
309 | #define BONITO_PCICACHECTRL_IOBCCOH_PRES 0x00000100 | 309 | #define BONITO_PCICACHECTRL_IOBCCOH_PRES 0x00000100 |
310 | #define BONITO_PCICACHECTRL_IOBCCOH_EN 0x00000200 | 310 | #define BONITO_PCICACHECTRL_IOBCCOH_EN 0x00000200 |
311 | #define BONITO_PCICACHECTRL_CPUCOH_PRES 0x00000400 | 311 | #define BONITO_PCICACHECTRL_CPUCOH_PRES 0x00000400 |
312 | #define BONITO_PCICACHECTRL_CPUCOH_EN 0x00000800 | 312 | #define BONITO_PCICACHECTRL_CPUCOH_EN 0x00000800 |
313 | 313 | ||
314 | #define BONITO_IODEVCFG_BUFFBIT_CS0 0x00000001 | 314 | #define BONITO_IODEVCFG_BUFFBIT_CS0 0x00000001 |
@@ -343,18 +343,18 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
343 | 343 | ||
344 | /* gpio */ | 344 | /* gpio */ |
345 | #define BONITO_GPIO_GPIOW 0x000003ff | 345 | #define BONITO_GPIO_GPIOW 0x000003ff |
346 | #define BONITO_GPIO_GPIOW_SHIFT 0 | 346 | #define BONITO_GPIO_GPIOW_SHIFT 0 |
347 | #define BONITO_GPIO_GPIOR 0x01ff0000 | 347 | #define BONITO_GPIO_GPIOR 0x01ff0000 |
348 | #define BONITO_GPIO_GPIOR_SHIFT 16 | 348 | #define BONITO_GPIO_GPIOR_SHIFT 16 |
349 | #define BONITO_GPIO_GPINR 0xfe000000 | 349 | #define BONITO_GPIO_GPINR 0xfe000000 |
350 | #define BONITO_GPIO_GPINR_SHIFT 25 | 350 | #define BONITO_GPIO_GPINR_SHIFT 25 |
351 | #define BONITO_GPIO_IOW(N) (1<<(BONITO_GPIO_GPIOW_SHIFT+(N))) | 351 | #define BONITO_GPIO_IOW(N) (1<<(BONITO_GPIO_GPIOW_SHIFT+(N))) |
352 | #define BONITO_GPIO_IOR(N) (1<<(BONITO_GPIO_GPIOR_SHIFT+(N))) | 352 | #define BONITO_GPIO_IOR(N) (1<<(BONITO_GPIO_GPIOR_SHIFT+(N))) |
353 | #define BONITO_GPIO_INR(N) (1<<(BONITO_GPIO_GPINR_SHIFT+(N))) | 353 | #define BONITO_GPIO_INR(N) (1<<(BONITO_GPIO_GPINR_SHIFT+(N))) |
354 | 354 | ||
355 | /* ICU */ | 355 | /* ICU */ |
356 | #define BONITO_ICU_MBOXES 0x0000000f | 356 | #define BONITO_ICU_MBOXES 0x0000000f |
357 | #define BONITO_ICU_MBOXES_SHIFT 0 | 357 | #define BONITO_ICU_MBOXES_SHIFT 0 |
358 | #define BONITO_ICU_DMARDY 0x00000010 | 358 | #define BONITO_ICU_DMARDY 0x00000010 |
359 | #define BONITO_ICU_DMAEMPTY 0x00000020 | 359 | #define BONITO_ICU_DMAEMPTY 0x00000020 |
360 | #define BONITO_ICU_COPYRDY 0x00000040 | 360 | #define BONITO_ICU_COPYRDY 0x00000040 |
@@ -384,13 +384,13 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
384 | #define BONITO_PCIMAP_PCIMAP_2 0x00040000 | 384 | #define BONITO_PCIMAP_PCIMAP_2 0x00040000 |
385 | #define BONITO_PCIMAP_WIN(WIN, ADDR) ((((ADDR)>>26) & BONITO_PCIMAP_PCIMAP_LO0) << ((WIN)*6)) | 385 | #define BONITO_PCIMAP_WIN(WIN, ADDR) ((((ADDR)>>26) & BONITO_PCIMAP_PCIMAP_LO0) << ((WIN)*6)) |
386 | 386 | ||
387 | #define BONITO_PCIMAP_WINSIZE (1<<26) | 387 | #define BONITO_PCIMAP_WINSIZE (1<<26) |
388 | #define BONITO_PCIMAP_WINOFFSET(ADDR) ((ADDR) & (BONITO_PCIMAP_WINSIZE - 1)) | 388 | #define BONITO_PCIMAP_WINOFFSET(ADDR) ((ADDR) & (BONITO_PCIMAP_WINSIZE - 1)) |
389 | #define BONITO_PCIMAP_WINBASE(ADDR) ((ADDR) << 26) | 389 | #define BONITO_PCIMAP_WINBASE(ADDR) ((ADDR) << 26) |
390 | 390 | ||
391 | /* pcimembaseCfg */ | 391 | /* pcimembaseCfg */ |
392 | 392 | ||
393 | #define BONITO_PCIMEMBASECFG_MASK 0xf0000000 | 393 | #define BONITO_PCIMEMBASECFG_MASK 0xf0000000 |
394 | #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK 0x0000001f | 394 | #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK 0x0000001f |
395 | #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK_SHIFT 0 | 395 | #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK_SHIFT 0 |
396 | #define BONITO_PCIMEMBASECFG_MEMBASE0_TRANS 0x000003e0 | 396 | #define BONITO_PCIMEMBASECFG_MEMBASE0_TRANS 0x000003e0 |
@@ -406,21 +406,21 @@ extern unsigned long _pcictrl_bonito_pcicfg; | |||
406 | #define BONITO_PCIMEMBASECFG_MEMBASE1_IO 0x00800000 | 406 | #define BONITO_PCIMEMBASECFG_MEMBASE1_IO 0x00800000 |
407 | 407 | ||
408 | #define BONITO_PCIMEMBASECFG_ASHIFT 23 | 408 | #define BONITO_PCIMEMBASECFG_ASHIFT 23 |
409 | #define BONITO_PCIMEMBASECFG_AMASK 0x007fffff | 409 | #define BONITO_PCIMEMBASECFG_AMASK 0x007fffff |
410 | #define BONITO_PCIMEMBASECFGSIZE(WIN, SIZE) (((~((SIZE)-1))>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) | 410 | #define BONITO_PCIMEMBASECFGSIZE(WIN, SIZE) (((~((SIZE)-1))>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) |
411 | #define BONITO_PCIMEMBASECFGBASE(WIN, BASE) (((BASE)>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) | 411 | #define BONITO_PCIMEMBASECFGBASE(WIN, BASE) (((BASE)>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) |
412 | 412 | ||
413 | #define BONITO_PCIMEMBASECFG_SIZE(WIN, CFG) (((((~(CFG)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK)) << (BONITO_PCIMEMBASECFG_ASHIFT - BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) | BONITO_PCIMEMBASECFG_AMASK) | 413 | #define BONITO_PCIMEMBASECFG_SIZE(WIN, CFG) (((((~(CFG)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK)) << (BONITO_PCIMEMBASECFG_ASHIFT - BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) | BONITO_PCIMEMBASECFG_AMASK) |
414 | 414 | ||
415 | 415 | ||
416 | #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) | 416 | #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) |
417 | #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) | 417 | #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) |
418 | #define BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) | 418 | #define BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT) |
419 | 419 | ||
420 | #define BONITO_PCITOPHYS(WIN, ADDR, CFG) ( \ | 420 | #define BONITO_PCITOPHYS(WIN, ADDR, CFG) ( \ |
421 | (((ADDR) & (~(BONITO_PCIMEMBASECFG_MASK))) & (~(BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG)))) | \ | 421 | (((ADDR) & (~(BONITO_PCIMEMBASECFG_MASK))) & (~(BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG)))) | \ |
422 | (BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG)) \ | 422 | (BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG)) \ |
423 | ) | 423 | ) |
424 | 424 | ||
425 | /* PCICmd */ | 425 | /* PCICmd */ |
426 | 426 | ||
diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h index c01e286394da..1465b1193b12 100644 --- a/arch/mips/include/asm/mips-boards/generic.h +++ b/arch/mips/include/asm/mips-boards/generic.h | |||
@@ -27,39 +27,39 @@ | |||
27 | /* | 27 | /* |
28 | * Display register base. | 28 | * Display register base. |
29 | */ | 29 | */ |
30 | #define ASCII_DISPLAY_WORD_BASE 0x1f000410 | 30 | #define ASCII_DISPLAY_WORD_BASE 0x1f000410 |
31 | #define ASCII_DISPLAY_POS_BASE 0x1f000418 | 31 | #define ASCII_DISPLAY_POS_BASE 0x1f000418 |
32 | 32 | ||
33 | 33 | ||
34 | /* | 34 | /* |
35 | * Yamon Prom print address. | 35 | * Yamon Prom print address. |
36 | */ | 36 | */ |
37 | #define YAMON_PROM_PRINT_ADDR 0x1fc00504 | 37 | #define YAMON_PROM_PRINT_ADDR 0x1fc00504 |
38 | 38 | ||
39 | 39 | ||
40 | /* | 40 | /* |
41 | * Reset register. | 41 | * Reset register. |
42 | */ | 42 | */ |
43 | #define SOFTRES_REG 0x1f000500 | 43 | #define SOFTRES_REG 0x1f000500 |
44 | #define GORESET 0x42 | 44 | #define GORESET 0x42 |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Revision register. | 47 | * Revision register. |
48 | */ | 48 | */ |
49 | #define MIPS_REVISION_REG 0x1fc00010 | 49 | #define MIPS_REVISION_REG 0x1fc00010 |
50 | #define MIPS_REVISION_CORID_QED_RM5261 0 | 50 | #define MIPS_REVISION_CORID_QED_RM5261 0 |
51 | #define MIPS_REVISION_CORID_CORE_LV 1 | 51 | #define MIPS_REVISION_CORID_CORE_LV 1 |
52 | #define MIPS_REVISION_CORID_BONITO64 2 | 52 | #define MIPS_REVISION_CORID_BONITO64 2 |
53 | #define MIPS_REVISION_CORID_CORE_20K 3 | 53 | #define MIPS_REVISION_CORID_CORE_20K 3 |
54 | #define MIPS_REVISION_CORID_CORE_FPGA 4 | 54 | #define MIPS_REVISION_CORID_CORE_FPGA 4 |
55 | #define MIPS_REVISION_CORID_CORE_MSC 5 | 55 | #define MIPS_REVISION_CORID_CORE_MSC 5 |
56 | #define MIPS_REVISION_CORID_CORE_EMUL 6 | 56 | #define MIPS_REVISION_CORID_CORE_EMUL 6 |
57 | #define MIPS_REVISION_CORID_CORE_FPGA2 7 | 57 | #define MIPS_REVISION_CORID_CORE_FPGA2 7 |
58 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 | 58 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 |
59 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 | 59 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 |
60 | #define MIPS_REVISION_CORID_CORE_24K 10 | 60 | #define MIPS_REVISION_CORID_CORE_24K 10 |
61 | #define MIPS_REVISION_CORID_CORE_FPGA4 11 | 61 | #define MIPS_REVISION_CORID_CORE_FPGA4 11 |
62 | #define MIPS_REVISION_CORID_CORE_FPGA5 12 | 62 | #define MIPS_REVISION_CORID_CORE_FPGA5 12 |
63 | 63 | ||
64 | /**** Artificial corid defines ****/ | 64 | /**** Artificial corid defines ****/ |
65 | /* | 65 | /* |
@@ -97,4 +97,4 @@ extern void mips_pcibios_init(void); | |||
97 | #define mips_pcibios_init() do { } while (0) | 97 | #define mips_pcibios_init() do { } while (0) |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #endif /* __ASM_MIPS_BOARDS_GENERIC_H */ | 100 | #endif /* __ASM_MIPS_BOARDS_GENERIC_H */ |
diff --git a/arch/mips/include/asm/mips-boards/launch.h b/arch/mips/include/asm/mips-boards/launch.h index d8ae7f95a522..653477e4074d 100644 --- a/arch/mips/include/asm/mips-boards/launch.h +++ b/arch/mips/include/asm/mips-boards/launch.h | |||
@@ -16,11 +16,11 @@ struct cpulaunch { | |||
16 | #else | 16 | #else |
17 | 17 | ||
18 | #define LOG2CPULAUNCH 5 | 18 | #define LOG2CPULAUNCH 5 |
19 | #define LAUNCH_PC 0 | 19 | #define LAUNCH_PC 0 |
20 | #define LAUNCH_GP 4 | 20 | #define LAUNCH_GP 4 |
21 | #define LAUNCH_SP 8 | 21 | #define LAUNCH_SP 8 |
22 | #define LAUNCH_A0 12 | 22 | #define LAUNCH_A0 12 |
23 | #define LAUNCH_FLAGS 28 | 23 | #define LAUNCH_FLAGS 28 |
24 | 24 | ||
25 | #endif | 25 | #endif |
26 | 26 | ||
diff --git a/arch/mips/include/asm/mips-boards/malta.h b/arch/mips/include/asm/mips-boards/malta.h index c1891578fa65..722bc889eab5 100644 --- a/arch/mips/include/asm/mips-boards/malta.h +++ b/arch/mips/include/asm/mips-boards/malta.h | |||
@@ -33,9 +33,9 @@ | |||
33 | * Malta I/O ports base address for the Galileo GT64120 and Algorithmics | 33 | * Malta I/O ports base address for the Galileo GT64120 and Algorithmics |
34 | * Bonito system controllers. | 34 | * Bonito system controllers. |
35 | */ | 35 | */ |
36 | #define MALTA_GT_PORT_BASE get_gt_port_base(GT_PCI0IOLD_OFS) | 36 | #define MALTA_GT_PORT_BASE get_gt_port_base(GT_PCI0IOLD_OFS) |
37 | #define MALTA_BONITO_PORT_BASE ((unsigned long)ioremap (0x1fd00000, 0x10000)) | 37 | #define MALTA_BONITO_PORT_BASE ((unsigned long)ioremap (0x1fd00000, 0x10000)) |
38 | #define MALTA_MSC_PORT_BASE get_msc_port_base(MSC01_PCI_SC2PIOBASL) | 38 | #define MALTA_MSC_PORT_BASE get_msc_port_base(MSC01_PCI_SC2PIOBASL) |
39 | 39 | ||
40 | static inline unsigned long get_gt_port_base(unsigned long reg) | 40 | static inline unsigned long get_gt_port_base(unsigned long reg) |
41 | { | 41 | { |
@@ -77,8 +77,8 @@ static inline unsigned long get_msc_port_base(unsigned long reg) | |||
77 | /* | 77 | /* |
78 | * Malta RTC-device indirect register access. | 78 | * Malta RTC-device indirect register access. |
79 | */ | 79 | */ |
80 | #define MALTA_RTC_ADR_REG 0x70 | 80 | #define MALTA_RTC_ADR_REG 0x70 |
81 | #define MALTA_RTC_DAT_REG 0x71 | 81 | #define MALTA_RTC_DAT_REG 0x71 |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Malta SMSC FDC37M817 Super I/O Controller register. | 84 | * Malta SMSC FDC37M817 Super I/O Controller register. |
diff --git a/arch/mips/include/asm/mips-boards/maltaint.h b/arch/mips/include/asm/mips-boards/maltaint.h index 669244815753..e330732ddf98 100644 --- a/arch/mips/include/asm/mips-boards/maltaint.h +++ b/arch/mips/include/asm/mips-boards/maltaint.h | |||
@@ -4,8 +4,8 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2000,2012 MIPS Technologies, Inc. All rights reserved. | 6 | * Copyright (C) 2000,2012 MIPS Technologies, Inc. All rights reserved. |
7 | * Carsten Langgaard <carstenl@mips.com> | 7 | * Carsten Langgaard <carstenl@mips.com> |
8 | * Steven J. Hill <sjhill@mips.com> | 8 | * Steven J. Hill <sjhill@mips.com> |
9 | */ | 9 | */ |
10 | #ifndef _MIPS_MALTAINT_H | 10 | #ifndef _MIPS_MALTAINT_H |
11 | #define _MIPS_MALTAINT_H | 11 | #define _MIPS_MALTAINT_H |
@@ -24,9 +24,9 @@ | |||
24 | #define MIPSCPU_INT_I8259A MIPSCPU_INT_MB0 | 24 | #define MIPSCPU_INT_I8259A MIPSCPU_INT_MB0 |
25 | #define MIPSCPU_INT_MB1 3 | 25 | #define MIPSCPU_INT_MB1 3 |
26 | #define MIPSCPU_INT_SMI MIPSCPU_INT_MB1 | 26 | #define MIPSCPU_INT_SMI MIPSCPU_INT_MB1 |
27 | #define MIPSCPU_INT_IPI0 MIPSCPU_INT_MB1 /* GIC IPI */ | 27 | #define MIPSCPU_INT_IPI0 MIPSCPU_INT_MB1 /* GIC IPI */ |
28 | #define MIPSCPU_INT_MB2 4 | 28 | #define MIPSCPU_INT_MB2 4 |
29 | #define MIPSCPU_INT_IPI1 MIPSCPU_INT_MB2 /* GIC IPI */ | 29 | #define MIPSCPU_INT_IPI1 MIPSCPU_INT_MB2 /* GIC IPI */ |
30 | #define MIPSCPU_INT_MB3 5 | 30 | #define MIPSCPU_INT_MB3 5 |
31 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 | 31 | #define MIPSCPU_INT_COREHI MIPSCPU_INT_MB3 |
32 | #define MIPSCPU_INT_MB4 6 | 32 | #define MIPSCPU_INT_MB4 6 |
diff --git a/arch/mips/include/asm/mips-boards/piix4.h b/arch/mips/include/asm/mips-boards/piix4.h index 2971d60f2e95..a02596cf1abd 100644 --- a/arch/mips/include/asm/mips-boards/piix4.h +++ b/arch/mips/include/asm/mips-boards/piix4.h | |||
@@ -53,7 +53,7 @@ | |||
53 | #define PIIX4_OCW2_SP (0x6 << 5) | 53 | #define PIIX4_OCW2_SP (0x6 << 5) |
54 | #define PIIX4_OCW2_NOP (0x2 << 5) | 54 | #define PIIX4_OCW2_NOP (0x2 << 5) |
55 | 55 | ||
56 | #define PIIX4_OCW2_SEL (0x0 << 3) | 56 | #define PIIX4_OCW2_SEL (0x0 << 3) |
57 | 57 | ||
58 | #define PIIX4_OCW2_ILS_0 0 | 58 | #define PIIX4_OCW2_ILS_0 0 |
59 | #define PIIX4_OCW2_ILS_1 1 | 59 | #define PIIX4_OCW2_ILS_1 1 |
@@ -72,9 +72,9 @@ | |||
72 | #define PIIX4_OCW2_ILS_14 6 | 72 | #define PIIX4_OCW2_ILS_14 6 |
73 | #define PIIX4_OCW2_ILS_15 7 | 73 | #define PIIX4_OCW2_ILS_15 7 |
74 | 74 | ||
75 | #define PIIX4_OCW3_SEL (0x1 << 3) | 75 | #define PIIX4_OCW3_SEL (0x1 << 3) |
76 | 76 | ||
77 | #define PIIX4_OCW3_IRR 0x2 | 77 | #define PIIX4_OCW3_IRR 0x2 |
78 | #define PIIX4_OCW3_ISR 0x3 | 78 | #define PIIX4_OCW3_ISR 0x3 |
79 | 79 | ||
80 | #endif /* __ASM_MIPS_BOARDS_PIIX4_H */ | 80 | #endif /* __ASM_MIPS_BOARDS_PIIX4_H */ |
diff --git a/arch/mips/include/asm/mips-boards/prom.h b/arch/mips/include/asm/mips-boards/prom.h index a9db576a9768..e7aed3e4ff58 100644 --- a/arch/mips/include/asm/mips-boards/prom.h +++ b/arch/mips/include/asm/mips-boards/prom.h | |||
@@ -39,9 +39,9 @@ extern int get_ethernet_addr(char *ethernet_addr); | |||
39 | /* Memory descriptor management. */ | 39 | /* Memory descriptor management. */ |
40 | #define PROM_MAX_PMEMBLOCKS 32 | 40 | #define PROM_MAX_PMEMBLOCKS 32 |
41 | struct prom_pmemblock { | 41 | struct prom_pmemblock { |
42 | unsigned long base; /* Within KSEG0. */ | 42 | unsigned long base; /* Within KSEG0. */ |
43 | unsigned int size; /* In bytes. */ | 43 | unsigned int size; /* In bytes. */ |
44 | unsigned int type; /* free or prom memory */ | 44 | unsigned int type; /* free or prom memory */ |
45 | }; | 45 | }; |
46 | 46 | ||
47 | #endif /* !(_MIPS_PROM_H) */ | 47 | #endif /* !(_MIPS_PROM_H) */ |
diff --git a/arch/mips/include/asm/mips-boards/sead3int.h b/arch/mips/include/asm/mips-boards/sead3int.h index d634d9a807f6..6b17aaf7d901 100644 --- a/arch/mips/include/asm/mips-boards/sead3int.h +++ b/arch/mips/include/asm/mips-boards/sead3int.h | |||
@@ -4,8 +4,8 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2000,2012 MIPS Technologies, Inc. All rights reserved. | 6 | * Copyright (C) 2000,2012 MIPS Technologies, Inc. All rights reserved. |
7 | * Douglas Leung <douglas@mips.com> | 7 | * Douglas Leung <douglas@mips.com> |
8 | * Steven J. Hill <sjhill@mips.com> | 8 | * Steven J. Hill <sjhill@mips.com> |
9 | */ | 9 | */ |
10 | #ifndef _MIPS_SEAD3INT_H | 10 | #ifndef _MIPS_SEAD3INT_H |
11 | #define _MIPS_SEAD3INT_H | 11 | #define _MIPS_SEAD3INT_H |
diff --git a/arch/mips/include/asm/mips-boards/sim.h b/arch/mips/include/asm/mips-boards/sim.h index acb7c2331d98..b112fdc9f77d 100644 --- a/arch/mips/include/asm/mips-boards/sim.h +++ b/arch/mips/include/asm/mips-boards/sim.h | |||
@@ -19,18 +19,18 @@ | |||
19 | #ifndef _ASM_MIPS_BOARDS_SIM_H | 19 | #ifndef _ASM_MIPS_BOARDS_SIM_H |
20 | #define _ASM_MIPS_BOARDS_SIM_H | 20 | #define _ASM_MIPS_BOARDS_SIM_H |
21 | 21 | ||
22 | #define STATS_ON 1 | 22 | #define STATS_ON 1 |
23 | #define STATS_OFF 2 | 23 | #define STATS_OFF 2 |
24 | #define STATS_CLEAR 3 | 24 | #define STATS_CLEAR 3 |
25 | #define STATS_DUMP 4 | 25 | #define STATS_DUMP 4 |
26 | #define TRACE_ON 5 | 26 | #define TRACE_ON 5 |
27 | #define TRACE_OFF 6 | 27 | #define TRACE_OFF 6 |
28 | 28 | ||
29 | 29 | ||
30 | #define simcfg(code) \ | 30 | #define simcfg(code) \ |
31 | ({ \ | 31 | ({ \ |
32 | __asm__ __volatile__( \ | 32 | __asm__ __volatile__( \ |
33 | "sltiu $0,$0, %0" \ | 33 | "sltiu $0,$0, %0" \ |
34 | ::"i"(code) \ | 34 | ::"i"(code) \ |
35 | ); \ | 35 | ); \ |
36 | }) | 36 | }) |
diff --git a/arch/mips/include/asm/mipsmtregs.h b/arch/mips/include/asm/mipsmtregs.h index 5b3cb8553e9a..38b7704ee376 100644 --- a/arch/mips/include/asm/mipsmtregs.h +++ b/arch/mips/include/asm/mipsmtregs.h | |||
@@ -270,14 +270,14 @@ static inline void ehb(void) | |||
270 | 270 | ||
271 | #define mftc0(rt,sel) \ | 271 | #define mftc0(rt,sel) \ |
272 | ({ \ | 272 | ({ \ |
273 | unsigned long __res; \ | 273 | unsigned long __res; \ |
274 | \ | 274 | \ |
275 | __asm__ __volatile__( \ | 275 | __asm__ __volatile__( \ |
276 | " .set push \n" \ | 276 | " .set push \n" \ |
277 | " .set mips32r2 \n" \ | 277 | " .set mips32r2 \n" \ |
278 | " .set noat \n" \ | 278 | " .set noat \n" \ |
279 | " # mftc0 $1, $" #rt ", " #sel " \n" \ | 279 | " # mftc0 $1, $" #rt ", " #sel " \n" \ |
280 | " .word 0x41000800 | (" #rt " << 16) | " #sel " \n" \ | 280 | " .word 0x41000800 | (" #rt " << 16) | " #sel " \n" \ |
281 | " move %0, $1 \n" \ | 281 | " move %0, $1 \n" \ |
282 | " .set pop \n" \ | 282 | " .set pop \n" \ |
283 | : "=r" (__res)); \ | 283 | : "=r" (__res)); \ |
@@ -334,7 +334,7 @@ do { \ | |||
334 | " .set noat \n" \ | 334 | " .set noat \n" \ |
335 | " move $1, %0 \n" \ | 335 | " move $1, %0 \n" \ |
336 | " # mttc0 %0," #rd ", " #sel " \n" \ | 336 | " # mttc0 %0," #rd ", " #sel " \n" \ |
337 | " .word 0x41810000 | (" #rd " << 11) | " #sel " \n" \ | 337 | " .word 0x41810000 | (" #rd " << 11) | " #sel " \n" \ |
338 | " .set pop \n" \ | 338 | " .set pop \n" \ |
339 | : \ | 339 | : \ |
340 | : "r" (v)); \ | 340 | : "r" (v)); \ |
diff --git a/arch/mips/include/asm/mipsregs.h b/arch/mips/include/asm/mipsregs.h index 1ad3e34e18e6..2145162674b9 100644 --- a/arch/mips/include/asm/mipsregs.h +++ b/arch/mips/include/asm/mipsregs.h | |||
@@ -123,16 +123,16 @@ | |||
123 | * Status Register Values | 123 | * Status Register Values |
124 | */ | 124 | */ |
125 | 125 | ||
126 | #define FPU_CSR_FLUSH 0x01000000 /* flush denormalised results to 0 */ | 126 | #define FPU_CSR_FLUSH 0x01000000 /* flush denormalised results to 0 */ |
127 | #define FPU_CSR_COND 0x00800000 /* $fcc0 */ | 127 | #define FPU_CSR_COND 0x00800000 /* $fcc0 */ |
128 | #define FPU_CSR_COND0 0x00800000 /* $fcc0 */ | 128 | #define FPU_CSR_COND0 0x00800000 /* $fcc0 */ |
129 | #define FPU_CSR_COND1 0x02000000 /* $fcc1 */ | 129 | #define FPU_CSR_COND1 0x02000000 /* $fcc1 */ |
130 | #define FPU_CSR_COND2 0x04000000 /* $fcc2 */ | 130 | #define FPU_CSR_COND2 0x04000000 /* $fcc2 */ |
131 | #define FPU_CSR_COND3 0x08000000 /* $fcc3 */ | 131 | #define FPU_CSR_COND3 0x08000000 /* $fcc3 */ |
132 | #define FPU_CSR_COND4 0x10000000 /* $fcc4 */ | 132 | #define FPU_CSR_COND4 0x10000000 /* $fcc4 */ |
133 | #define FPU_CSR_COND5 0x20000000 /* $fcc5 */ | 133 | #define FPU_CSR_COND5 0x20000000 /* $fcc5 */ |
134 | #define FPU_CSR_COND6 0x40000000 /* $fcc6 */ | 134 | #define FPU_CSR_COND6 0x40000000 /* $fcc6 */ |
135 | #define FPU_CSR_COND7 0x80000000 /* $fcc7 */ | 135 | #define FPU_CSR_COND7 0x80000000 /* $fcc7 */ |
136 | 136 | ||
137 | /* | 137 | /* |
138 | * Bits 18 - 20 of the FPU Status Register will be read as 0, | 138 | * Bits 18 - 20 of the FPU Status Register will be read as 0, |
@@ -145,34 +145,34 @@ | |||
145 | * E the exception enable | 145 | * E the exception enable |
146 | * S the sticky/flag bit | 146 | * S the sticky/flag bit |
147 | */ | 147 | */ |
148 | #define FPU_CSR_ALL_X 0x0003f000 | 148 | #define FPU_CSR_ALL_X 0x0003f000 |
149 | #define FPU_CSR_UNI_X 0x00020000 | 149 | #define FPU_CSR_UNI_X 0x00020000 |
150 | #define FPU_CSR_INV_X 0x00010000 | 150 | #define FPU_CSR_INV_X 0x00010000 |
151 | #define FPU_CSR_DIV_X 0x00008000 | 151 | #define FPU_CSR_DIV_X 0x00008000 |
152 | #define FPU_CSR_OVF_X 0x00004000 | 152 | #define FPU_CSR_OVF_X 0x00004000 |
153 | #define FPU_CSR_UDF_X 0x00002000 | 153 | #define FPU_CSR_UDF_X 0x00002000 |
154 | #define FPU_CSR_INE_X 0x00001000 | 154 | #define FPU_CSR_INE_X 0x00001000 |
155 | 155 | ||
156 | #define FPU_CSR_ALL_E 0x00000f80 | 156 | #define FPU_CSR_ALL_E 0x00000f80 |
157 | #define FPU_CSR_INV_E 0x00000800 | 157 | #define FPU_CSR_INV_E 0x00000800 |
158 | #define FPU_CSR_DIV_E 0x00000400 | 158 | #define FPU_CSR_DIV_E 0x00000400 |
159 | #define FPU_CSR_OVF_E 0x00000200 | 159 | #define FPU_CSR_OVF_E 0x00000200 |
160 | #define FPU_CSR_UDF_E 0x00000100 | 160 | #define FPU_CSR_UDF_E 0x00000100 |
161 | #define FPU_CSR_INE_E 0x00000080 | 161 | #define FPU_CSR_INE_E 0x00000080 |
162 | 162 | ||
163 | #define FPU_CSR_ALL_S 0x0000007c | 163 | #define FPU_CSR_ALL_S 0x0000007c |
164 | #define FPU_CSR_INV_S 0x00000040 | 164 | #define FPU_CSR_INV_S 0x00000040 |
165 | #define FPU_CSR_DIV_S 0x00000020 | 165 | #define FPU_CSR_DIV_S 0x00000020 |
166 | #define FPU_CSR_OVF_S 0x00000010 | 166 | #define FPU_CSR_OVF_S 0x00000010 |
167 | #define FPU_CSR_UDF_S 0x00000008 | 167 | #define FPU_CSR_UDF_S 0x00000008 |
168 | #define FPU_CSR_INE_S 0x00000004 | 168 | #define FPU_CSR_INE_S 0x00000004 |
169 | 169 | ||
170 | /* Bits 0 and 1 of FPU Status Register specify the rounding mode */ | 170 | /* Bits 0 and 1 of FPU Status Register specify the rounding mode */ |
171 | #define FPU_CSR_RM 0x00000003 | 171 | #define FPU_CSR_RM 0x00000003 |
172 | #define FPU_CSR_RN 0x0 /* nearest */ | 172 | #define FPU_CSR_RN 0x0 /* nearest */ |
173 | #define FPU_CSR_RZ 0x1 /* towards zero */ | 173 | #define FPU_CSR_RZ 0x1 /* towards zero */ |
174 | #define FPU_CSR_RU 0x2 /* towards +Infinity */ | 174 | #define FPU_CSR_RU 0x2 /* towards +Infinity */ |
175 | #define FPU_CSR_RD 0x3 /* towards -Infinity */ | 175 | #define FPU_CSR_RD 0x3 /* towards -Infinity */ |
176 | 176 | ||
177 | 177 | ||
178 | /* | 178 | /* |
@@ -214,15 +214,15 @@ | |||
214 | * Default page size for a given kernel configuration | 214 | * Default page size for a given kernel configuration |
215 | */ | 215 | */ |
216 | #ifdef CONFIG_PAGE_SIZE_4KB | 216 | #ifdef CONFIG_PAGE_SIZE_4KB |
217 | #define PM_DEFAULT_MASK PM_4K | 217 | #define PM_DEFAULT_MASK PM_4K |
218 | #elif defined(CONFIG_PAGE_SIZE_8KB) | 218 | #elif defined(CONFIG_PAGE_SIZE_8KB) |
219 | #define PM_DEFAULT_MASK PM_8K | 219 | #define PM_DEFAULT_MASK PM_8K |
220 | #elif defined(CONFIG_PAGE_SIZE_16KB) | 220 | #elif defined(CONFIG_PAGE_SIZE_16KB) |
221 | #define PM_DEFAULT_MASK PM_16K | 221 | #define PM_DEFAULT_MASK PM_16K |
222 | #elif defined(CONFIG_PAGE_SIZE_32KB) | 222 | #elif defined(CONFIG_PAGE_SIZE_32KB) |
223 | #define PM_DEFAULT_MASK PM_32K | 223 | #define PM_DEFAULT_MASK PM_32K |
224 | #elif defined(CONFIG_PAGE_SIZE_64KB) | 224 | #elif defined(CONFIG_PAGE_SIZE_64KB) |
225 | #define PM_DEFAULT_MASK PM_64K | 225 | #define PM_DEFAULT_MASK PM_64K |
226 | #else | 226 | #else |
227 | #error Bad page size configuration! | 227 | #error Bad page size configuration! |
228 | #endif | 228 | #endif |
@@ -260,34 +260,34 @@ | |||
260 | /* | 260 | /* |
261 | * PageGrain bits | 261 | * PageGrain bits |
262 | */ | 262 | */ |
263 | #define PG_RIE (_ULCAST_(1) << 31) | 263 | #define PG_RIE (_ULCAST_(1) << 31) |
264 | #define PG_XIE (_ULCAST_(1) << 30) | 264 | #define PG_XIE (_ULCAST_(1) << 30) |
265 | #define PG_ELPA (_ULCAST_(1) << 29) | 265 | #define PG_ELPA (_ULCAST_(1) << 29) |
266 | #define PG_ESP (_ULCAST_(1) << 28) | 266 | #define PG_ESP (_ULCAST_(1) << 28) |
267 | 267 | ||
268 | /* | 268 | /* |
269 | * R4x00 interrupt enable / cause bits | 269 | * R4x00 interrupt enable / cause bits |
270 | */ | 270 | */ |
271 | #define IE_SW0 (_ULCAST_(1) << 8) | 271 | #define IE_SW0 (_ULCAST_(1) << 8) |
272 | #define IE_SW1 (_ULCAST_(1) << 9) | 272 | #define IE_SW1 (_ULCAST_(1) << 9) |
273 | #define IE_IRQ0 (_ULCAST_(1) << 10) | 273 | #define IE_IRQ0 (_ULCAST_(1) << 10) |
274 | #define IE_IRQ1 (_ULCAST_(1) << 11) | 274 | #define IE_IRQ1 (_ULCAST_(1) << 11) |
275 | #define IE_IRQ2 (_ULCAST_(1) << 12) | 275 | #define IE_IRQ2 (_ULCAST_(1) << 12) |
276 | #define IE_IRQ3 (_ULCAST_(1) << 13) | 276 | #define IE_IRQ3 (_ULCAST_(1) << 13) |
277 | #define IE_IRQ4 (_ULCAST_(1) << 14) | 277 | #define IE_IRQ4 (_ULCAST_(1) << 14) |
278 | #define IE_IRQ5 (_ULCAST_(1) << 15) | 278 | #define IE_IRQ5 (_ULCAST_(1) << 15) |
279 | 279 | ||
280 | /* | 280 | /* |
281 | * R4x00 interrupt cause bits | 281 | * R4x00 interrupt cause bits |
282 | */ | 282 | */ |
283 | #define C_SW0 (_ULCAST_(1) << 8) | 283 | #define C_SW0 (_ULCAST_(1) << 8) |
284 | #define C_SW1 (_ULCAST_(1) << 9) | 284 | #define C_SW1 (_ULCAST_(1) << 9) |
285 | #define C_IRQ0 (_ULCAST_(1) << 10) | 285 | #define C_IRQ0 (_ULCAST_(1) << 10) |
286 | #define C_IRQ1 (_ULCAST_(1) << 11) | 286 | #define C_IRQ1 (_ULCAST_(1) << 11) |
287 | #define C_IRQ2 (_ULCAST_(1) << 12) | 287 | #define C_IRQ2 (_ULCAST_(1) << 12) |
288 | #define C_IRQ3 (_ULCAST_(1) << 13) | 288 | #define C_IRQ3 (_ULCAST_(1) << 13) |
289 | #define C_IRQ4 (_ULCAST_(1) << 14) | 289 | #define C_IRQ4 (_ULCAST_(1) << 14) |
290 | #define C_IRQ5 (_ULCAST_(1) << 15) | 290 | #define C_IRQ5 (_ULCAST_(1) << 15) |
291 | 291 | ||
292 | /* | 292 | /* |
293 | * Bitfields in the R4xx0 cp0 status register | 293 | * Bitfields in the R4xx0 cp0 status register |
@@ -301,7 +301,7 @@ | |||
301 | # define KSU_KERNEL 0x00000000 | 301 | # define KSU_KERNEL 0x00000000 |
302 | #define ST0_UX 0x00000020 | 302 | #define ST0_UX 0x00000020 |
303 | #define ST0_SX 0x00000040 | 303 | #define ST0_SX 0x00000040 |
304 | #define ST0_KX 0x00000080 | 304 | #define ST0_KX 0x00000080 |
305 | #define ST0_DE 0x00010000 | 305 | #define ST0_DE 0x00010000 |
306 | #define ST0_CE 0x00020000 | 306 | #define ST0_CE 0x00020000 |
307 | 307 | ||
@@ -315,7 +315,7 @@ | |||
315 | /* | 315 | /* |
316 | * Bitfields in the R[23]000 cp0 status register. | 316 | * Bitfields in the R[23]000 cp0 status register. |
317 | */ | 317 | */ |
318 | #define ST0_IEC 0x00000001 | 318 | #define ST0_IEC 0x00000001 |
319 | #define ST0_KUC 0x00000002 | 319 | #define ST0_KUC 0x00000002 |
320 | #define ST0_IEP 0x00000004 | 320 | #define ST0_IEP 0x00000004 |
321 | #define ST0_KUP 0x00000008 | 321 | #define ST0_KUP 0x00000008 |
@@ -329,7 +329,7 @@ | |||
329 | /* | 329 | /* |
330 | * Bits specific to the R4640/R4650 | 330 | * Bits specific to the R4640/R4650 |
331 | */ | 331 | */ |
332 | #define ST0_UM (_ULCAST_(1) << 4) | 332 | #define ST0_UM (_ULCAST_(1) << 4) |
333 | #define ST0_IL (_ULCAST_(1) << 23) | 333 | #define ST0_IL (_ULCAST_(1) << 23) |
334 | #define ST0_DL (_ULCAST_(1) << 24) | 334 | #define ST0_DL (_ULCAST_(1) << 24) |
335 | 335 | ||
@@ -343,22 +343,22 @@ | |||
343 | */ | 343 | */ |
344 | #define TX39_CONF_ICS_SHIFT 19 | 344 | #define TX39_CONF_ICS_SHIFT 19 |
345 | #define TX39_CONF_ICS_MASK 0x00380000 | 345 | #define TX39_CONF_ICS_MASK 0x00380000 |
346 | #define TX39_CONF_ICS_1KB 0x00000000 | 346 | #define TX39_CONF_ICS_1KB 0x00000000 |
347 | #define TX39_CONF_ICS_2KB 0x00080000 | 347 | #define TX39_CONF_ICS_2KB 0x00080000 |
348 | #define TX39_CONF_ICS_4KB 0x00100000 | 348 | #define TX39_CONF_ICS_4KB 0x00100000 |
349 | #define TX39_CONF_ICS_8KB 0x00180000 | 349 | #define TX39_CONF_ICS_8KB 0x00180000 |
350 | #define TX39_CONF_ICS_16KB 0x00200000 | 350 | #define TX39_CONF_ICS_16KB 0x00200000 |
351 | 351 | ||
352 | #define TX39_CONF_DCS_SHIFT 16 | 352 | #define TX39_CONF_DCS_SHIFT 16 |
353 | #define TX39_CONF_DCS_MASK 0x00070000 | 353 | #define TX39_CONF_DCS_MASK 0x00070000 |
354 | #define TX39_CONF_DCS_1KB 0x00000000 | 354 | #define TX39_CONF_DCS_1KB 0x00000000 |
355 | #define TX39_CONF_DCS_2KB 0x00010000 | 355 | #define TX39_CONF_DCS_2KB 0x00010000 |
356 | #define TX39_CONF_DCS_4KB 0x00020000 | 356 | #define TX39_CONF_DCS_4KB 0x00020000 |
357 | #define TX39_CONF_DCS_8KB 0x00030000 | 357 | #define TX39_CONF_DCS_8KB 0x00030000 |
358 | #define TX39_CONF_DCS_16KB 0x00040000 | 358 | #define TX39_CONF_DCS_16KB 0x00040000 |
359 | 359 | ||
360 | #define TX39_CONF_CWFON 0x00004000 | 360 | #define TX39_CONF_CWFON 0x00004000 |
361 | #define TX39_CONF_WBON 0x00002000 | 361 | #define TX39_CONF_WBON 0x00002000 |
362 | #define TX39_CONF_RF_SHIFT 10 | 362 | #define TX39_CONF_RF_SHIFT 10 |
363 | #define TX39_CONF_RF_MASK 0x00000c00 | 363 | #define TX39_CONF_RF_MASK 0x00000c00 |
364 | #define TX39_CONF_DOZE 0x00000200 | 364 | #define TX39_CONF_DOZE 0x00000200 |
@@ -375,38 +375,38 @@ | |||
375 | * Status register bits available in all MIPS CPUs. | 375 | * Status register bits available in all MIPS CPUs. |
376 | */ | 376 | */ |
377 | #define ST0_IM 0x0000ff00 | 377 | #define ST0_IM 0x0000ff00 |
378 | #define STATUSB_IP0 8 | 378 | #define STATUSB_IP0 8 |
379 | #define STATUSF_IP0 (_ULCAST_(1) << 8) | 379 | #define STATUSF_IP0 (_ULCAST_(1) << 8) |
380 | #define STATUSB_IP1 9 | 380 | #define STATUSB_IP1 9 |
381 | #define STATUSF_IP1 (_ULCAST_(1) << 9) | 381 | #define STATUSF_IP1 (_ULCAST_(1) << 9) |
382 | #define STATUSB_IP2 10 | 382 | #define STATUSB_IP2 10 |
383 | #define STATUSF_IP2 (_ULCAST_(1) << 10) | 383 | #define STATUSF_IP2 (_ULCAST_(1) << 10) |
384 | #define STATUSB_IP3 11 | 384 | #define STATUSB_IP3 11 |
385 | #define STATUSF_IP3 (_ULCAST_(1) << 11) | 385 | #define STATUSF_IP3 (_ULCAST_(1) << 11) |
386 | #define STATUSB_IP4 12 | 386 | #define STATUSB_IP4 12 |
387 | #define STATUSF_IP4 (_ULCAST_(1) << 12) | 387 | #define STATUSF_IP4 (_ULCAST_(1) << 12) |
388 | #define STATUSB_IP5 13 | 388 | #define STATUSB_IP5 13 |
389 | #define STATUSF_IP5 (_ULCAST_(1) << 13) | 389 | #define STATUSF_IP5 (_ULCAST_(1) << 13) |
390 | #define STATUSB_IP6 14 | 390 | #define STATUSB_IP6 14 |
391 | #define STATUSF_IP6 (_ULCAST_(1) << 14) | 391 | #define STATUSF_IP6 (_ULCAST_(1) << 14) |
392 | #define STATUSB_IP7 15 | 392 | #define STATUSB_IP7 15 |
393 | #define STATUSF_IP7 (_ULCAST_(1) << 15) | 393 | #define STATUSF_IP7 (_ULCAST_(1) << 15) |
394 | #define STATUSB_IP8 0 | 394 | #define STATUSB_IP8 0 |
395 | #define STATUSF_IP8 (_ULCAST_(1) << 0) | 395 | #define STATUSF_IP8 (_ULCAST_(1) << 0) |
396 | #define STATUSB_IP9 1 | 396 | #define STATUSB_IP9 1 |
397 | #define STATUSF_IP9 (_ULCAST_(1) << 1) | 397 | #define STATUSF_IP9 (_ULCAST_(1) << 1) |
398 | #define STATUSB_IP10 2 | 398 | #define STATUSB_IP10 2 |
399 | #define STATUSF_IP10 (_ULCAST_(1) << 2) | 399 | #define STATUSF_IP10 (_ULCAST_(1) << 2) |
400 | #define STATUSB_IP11 3 | 400 | #define STATUSB_IP11 3 |
401 | #define STATUSF_IP11 (_ULCAST_(1) << 3) | 401 | #define STATUSF_IP11 (_ULCAST_(1) << 3) |
402 | #define STATUSB_IP12 4 | 402 | #define STATUSB_IP12 4 |
403 | #define STATUSF_IP12 (_ULCAST_(1) << 4) | 403 | #define STATUSF_IP12 (_ULCAST_(1) << 4) |
404 | #define STATUSB_IP13 5 | 404 | #define STATUSB_IP13 5 |
405 | #define STATUSF_IP13 (_ULCAST_(1) << 5) | 405 | #define STATUSF_IP13 (_ULCAST_(1) << 5) |
406 | #define STATUSB_IP14 6 | 406 | #define STATUSB_IP14 6 |
407 | #define STATUSF_IP14 (_ULCAST_(1) << 6) | 407 | #define STATUSF_IP14 (_ULCAST_(1) << 6) |
408 | #define STATUSB_IP15 7 | 408 | #define STATUSB_IP15 7 |
409 | #define STATUSF_IP15 (_ULCAST_(1) << 7) | 409 | #define STATUSF_IP15 (_ULCAST_(1) << 7) |
410 | #define ST0_CH 0x00040000 | 410 | #define ST0_CH 0x00040000 |
411 | #define ST0_NMI 0x00080000 | 411 | #define ST0_NMI 0x00080000 |
412 | #define ST0_SR 0x00100000 | 412 | #define ST0_SR 0x00100000 |
@@ -436,36 +436,36 @@ | |||
436 | * | 436 | * |
437 | * Refer to your MIPS R4xx0 manual, chapter 5 for explanation. | 437 | * Refer to your MIPS R4xx0 manual, chapter 5 for explanation. |
438 | */ | 438 | */ |
439 | #define CAUSEB_EXCCODE 2 | 439 | #define CAUSEB_EXCCODE 2 |
440 | #define CAUSEF_EXCCODE (_ULCAST_(31) << 2) | 440 | #define CAUSEF_EXCCODE (_ULCAST_(31) << 2) |
441 | #define CAUSEB_IP 8 | 441 | #define CAUSEB_IP 8 |
442 | #define CAUSEF_IP (_ULCAST_(255) << 8) | 442 | #define CAUSEF_IP (_ULCAST_(255) << 8) |
443 | #define CAUSEB_IP0 8 | 443 | #define CAUSEB_IP0 8 |
444 | #define CAUSEF_IP0 (_ULCAST_(1) << 8) | 444 | #define CAUSEF_IP0 (_ULCAST_(1) << 8) |
445 | #define CAUSEB_IP1 9 | 445 | #define CAUSEB_IP1 9 |
446 | #define CAUSEF_IP1 (_ULCAST_(1) << 9) | 446 | #define CAUSEF_IP1 (_ULCAST_(1) << 9) |
447 | #define CAUSEB_IP2 10 | 447 | #define CAUSEB_IP2 10 |
448 | #define CAUSEF_IP2 (_ULCAST_(1) << 10) | 448 | #define CAUSEF_IP2 (_ULCAST_(1) << 10) |
449 | #define CAUSEB_IP3 11 | 449 | #define CAUSEB_IP3 11 |
450 | #define CAUSEF_IP3 (_ULCAST_(1) << 11) | 450 | #define CAUSEF_IP3 (_ULCAST_(1) << 11) |
451 | #define CAUSEB_IP4 12 | 451 | #define CAUSEB_IP4 12 |
452 | #define CAUSEF_IP4 (_ULCAST_(1) << 12) | 452 | #define CAUSEF_IP4 (_ULCAST_(1) << 12) |
453 | #define CAUSEB_IP5 13 | 453 | #define CAUSEB_IP5 13 |
454 | #define CAUSEF_IP5 (_ULCAST_(1) << 13) | 454 | #define CAUSEF_IP5 (_ULCAST_(1) << 13) |
455 | #define CAUSEB_IP6 14 | 455 | #define CAUSEB_IP6 14 |
456 | #define CAUSEF_IP6 (_ULCAST_(1) << 14) | 456 | #define CAUSEF_IP6 (_ULCAST_(1) << 14) |
457 | #define CAUSEB_IP7 15 | 457 | #define CAUSEB_IP7 15 |
458 | #define CAUSEF_IP7 (_ULCAST_(1) << 15) | 458 | #define CAUSEF_IP7 (_ULCAST_(1) << 15) |
459 | #define CAUSEB_IV 23 | 459 | #define CAUSEB_IV 23 |
460 | #define CAUSEF_IV (_ULCAST_(1) << 23) | 460 | #define CAUSEF_IV (_ULCAST_(1) << 23) |
461 | #define CAUSEB_PCI 26 | 461 | #define CAUSEB_PCI 26 |
462 | #define CAUSEF_PCI (_ULCAST_(1) << 26) | 462 | #define CAUSEF_PCI (_ULCAST_(1) << 26) |
463 | #define CAUSEB_CE 28 | 463 | #define CAUSEB_CE 28 |
464 | #define CAUSEF_CE (_ULCAST_(3) << 28) | 464 | #define CAUSEF_CE (_ULCAST_(3) << 28) |
465 | #define CAUSEB_TI 30 | 465 | #define CAUSEB_TI 30 |
466 | #define CAUSEF_TI (_ULCAST_(1) << 30) | 466 | #define CAUSEF_TI (_ULCAST_(1) << 30) |
467 | #define CAUSEB_BD 31 | 467 | #define CAUSEB_BD 31 |
468 | #define CAUSEF_BD (_ULCAST_(1) << 31) | 468 | #define CAUSEF_BD (_ULCAST_(1) << 31) |
469 | 469 | ||
470 | /* | 470 | /* |
471 | * Bits in the coprocessor 0 config register. | 471 | * Bits in the coprocessor 0 config register. |
@@ -483,11 +483,11 @@ | |||
483 | #define CONF_BE (_ULCAST_(1) << 15) | 483 | #define CONF_BE (_ULCAST_(1) << 15) |
484 | 484 | ||
485 | /* Bits common to various processors. */ | 485 | /* Bits common to various processors. */ |
486 | #define CONF_CU (_ULCAST_(1) << 3) | 486 | #define CONF_CU (_ULCAST_(1) << 3) |
487 | #define CONF_DB (_ULCAST_(1) << 4) | 487 | #define CONF_DB (_ULCAST_(1) << 4) |
488 | #define CONF_IB (_ULCAST_(1) << 5) | 488 | #define CONF_IB (_ULCAST_(1) << 5) |
489 | #define CONF_DC (_ULCAST_(7) << 6) | 489 | #define CONF_DC (_ULCAST_(7) << 6) |
490 | #define CONF_IC (_ULCAST_(7) << 9) | 490 | #define CONF_IC (_ULCAST_(7) << 9) |
491 | #define CONF_EB (_ULCAST_(1) << 13) | 491 | #define CONF_EB (_ULCAST_(1) << 13) |
492 | #define CONF_EM (_ULCAST_(1) << 14) | 492 | #define CONF_EM (_ULCAST_(1) << 14) |
493 | #define CONF_SM (_ULCAST_(1) << 16) | 493 | #define CONF_SM (_ULCAST_(1) << 16) |
@@ -497,29 +497,29 @@ | |||
497 | #define CONF_EC (_ULCAST_(7) << 28) | 497 | #define CONF_EC (_ULCAST_(7) << 28) |
498 | #define CONF_CM (_ULCAST_(1) << 31) | 498 | #define CONF_CM (_ULCAST_(1) << 31) |
499 | 499 | ||
500 | /* Bits specific to the R4xx0. */ | 500 | /* Bits specific to the R4xx0. */ |
501 | #define R4K_CONF_SW (_ULCAST_(1) << 20) | 501 | #define R4K_CONF_SW (_ULCAST_(1) << 20) |
502 | #define R4K_CONF_SS (_ULCAST_(1) << 21) | 502 | #define R4K_CONF_SS (_ULCAST_(1) << 21) |
503 | #define R4K_CONF_SB (_ULCAST_(3) << 22) | 503 | #define R4K_CONF_SB (_ULCAST_(3) << 22) |
504 | 504 | ||
505 | /* Bits specific to the R5000. */ | 505 | /* Bits specific to the R5000. */ |
506 | #define R5K_CONF_SE (_ULCAST_(1) << 12) | 506 | #define R5K_CONF_SE (_ULCAST_(1) << 12) |
507 | #define R5K_CONF_SS (_ULCAST_(3) << 20) | 507 | #define R5K_CONF_SS (_ULCAST_(3) << 20) |
508 | 508 | ||
509 | /* Bits specific to the RM7000. */ | 509 | /* Bits specific to the RM7000. */ |
510 | #define RM7K_CONF_SE (_ULCAST_(1) << 3) | 510 | #define RM7K_CONF_SE (_ULCAST_(1) << 3) |
511 | #define RM7K_CONF_TE (_ULCAST_(1) << 12) | 511 | #define RM7K_CONF_TE (_ULCAST_(1) << 12) |
512 | #define RM7K_CONF_CLK (_ULCAST_(1) << 16) | 512 | #define RM7K_CONF_CLK (_ULCAST_(1) << 16) |
513 | #define RM7K_CONF_TC (_ULCAST_(1) << 17) | 513 | #define RM7K_CONF_TC (_ULCAST_(1) << 17) |
514 | #define RM7K_CONF_SI (_ULCAST_(3) << 20) | 514 | #define RM7K_CONF_SI (_ULCAST_(3) << 20) |
515 | #define RM7K_CONF_SC (_ULCAST_(1) << 31) | 515 | #define RM7K_CONF_SC (_ULCAST_(1) << 31) |
516 | 516 | ||
517 | /* Bits specific to the R10000. */ | 517 | /* Bits specific to the R10000. */ |
518 | #define R10K_CONF_DN (_ULCAST_(3) << 3) | 518 | #define R10K_CONF_DN (_ULCAST_(3) << 3) |
519 | #define R10K_CONF_CT (_ULCAST_(1) << 5) | 519 | #define R10K_CONF_CT (_ULCAST_(1) << 5) |
520 | #define R10K_CONF_PE (_ULCAST_(1) << 6) | 520 | #define R10K_CONF_PE (_ULCAST_(1) << 6) |
521 | #define R10K_CONF_PM (_ULCAST_(3) << 7) | 521 | #define R10K_CONF_PM (_ULCAST_(3) << 7) |
522 | #define R10K_CONF_EC (_ULCAST_(15)<< 9) | 522 | #define R10K_CONF_EC (_ULCAST_(15)<< 9) |
523 | #define R10K_CONF_SB (_ULCAST_(1) << 13) | 523 | #define R10K_CONF_SB (_ULCAST_(1) << 13) |
524 | #define R10K_CONF_SK (_ULCAST_(1) << 14) | 524 | #define R10K_CONF_SK (_ULCAST_(1) << 14) |
525 | #define R10K_CONF_SS (_ULCAST_(7) << 16) | 525 | #define R10K_CONF_SS (_ULCAST_(7) << 16) |
@@ -527,14 +527,14 @@ | |||
527 | #define R10K_CONF_DC (_ULCAST_(7) << 26) | 527 | #define R10K_CONF_DC (_ULCAST_(7) << 26) |
528 | #define R10K_CONF_IC (_ULCAST_(7) << 29) | 528 | #define R10K_CONF_IC (_ULCAST_(7) << 29) |
529 | 529 | ||
530 | /* Bits specific to the VR41xx. */ | 530 | /* Bits specific to the VR41xx. */ |
531 | #define VR41_CONF_CS (_ULCAST_(1) << 12) | 531 | #define VR41_CONF_CS (_ULCAST_(1) << 12) |
532 | #define VR41_CONF_P4K (_ULCAST_(1) << 13) | 532 | #define VR41_CONF_P4K (_ULCAST_(1) << 13) |
533 | #define VR41_CONF_BP (_ULCAST_(1) << 16) | 533 | #define VR41_CONF_BP (_ULCAST_(1) << 16) |
534 | #define VR41_CONF_M16 (_ULCAST_(1) << 20) | 534 | #define VR41_CONF_M16 (_ULCAST_(1) << 20) |
535 | #define VR41_CONF_AD (_ULCAST_(1) << 23) | 535 | #define VR41_CONF_AD (_ULCAST_(1) << 23) |
536 | 536 | ||
537 | /* Bits specific to the R30xx. */ | 537 | /* Bits specific to the R30xx. */ |
538 | #define R30XX_CONF_FDM (_ULCAST_(1) << 19) | 538 | #define R30XX_CONF_FDM (_ULCAST_(1) << 19) |
539 | #define R30XX_CONF_REV (_ULCAST_(1) << 22) | 539 | #define R30XX_CONF_REV (_ULCAST_(1) << 22) |
540 | #define R30XX_CONF_AC (_ULCAST_(1) << 23) | 540 | #define R30XX_CONF_AC (_ULCAST_(1) << 23) |
@@ -551,8 +551,8 @@ | |||
551 | #define TX49_CONF_HALT (_ULCAST_(1) << 18) | 551 | #define TX49_CONF_HALT (_ULCAST_(1) << 18) |
552 | #define TX49_CONF_CWFON (_ULCAST_(1) << 27) | 552 | #define TX49_CONF_CWFON (_ULCAST_(1) << 27) |
553 | 553 | ||
554 | /* Bits specific to the MIPS32/64 PRA. */ | 554 | /* Bits specific to the MIPS32/64 PRA. */ |
555 | #define MIPS_CONF_MT (_ULCAST_(7) << 7) | 555 | #define MIPS_CONF_MT (_ULCAST_(7) << 7) |
556 | #define MIPS_CONF_AR (_ULCAST_(7) << 10) | 556 | #define MIPS_CONF_AR (_ULCAST_(7) << 10) |
557 | #define MIPS_CONF_AT (_ULCAST_(3) << 13) | 557 | #define MIPS_CONF_AT (_ULCAST_(3) << 13) |
558 | #define MIPS_CONF_M (_ULCAST_(1) << 31) | 558 | #define MIPS_CONF_M (_ULCAST_(1) << 31) |
@@ -560,14 +560,14 @@ | |||
560 | /* | 560 | /* |
561 | * Bits in the MIPS32/64 PRA coprocessor 0 config registers 1 and above. | 561 | * Bits in the MIPS32/64 PRA coprocessor 0 config registers 1 and above. |
562 | */ | 562 | */ |
563 | #define MIPS_CONF1_FP (_ULCAST_(1) << 0) | 563 | #define MIPS_CONF1_FP (_ULCAST_(1) << 0) |
564 | #define MIPS_CONF1_EP (_ULCAST_(1) << 1) | 564 | #define MIPS_CONF1_EP (_ULCAST_(1) << 1) |
565 | #define MIPS_CONF1_CA (_ULCAST_(1) << 2) | 565 | #define MIPS_CONF1_CA (_ULCAST_(1) << 2) |
566 | #define MIPS_CONF1_WR (_ULCAST_(1) << 3) | 566 | #define MIPS_CONF1_WR (_ULCAST_(1) << 3) |
567 | #define MIPS_CONF1_PC (_ULCAST_(1) << 4) | 567 | #define MIPS_CONF1_PC (_ULCAST_(1) << 4) |
568 | #define MIPS_CONF1_MD (_ULCAST_(1) << 5) | 568 | #define MIPS_CONF1_MD (_ULCAST_(1) << 5) |
569 | #define MIPS_CONF1_C2 (_ULCAST_(1) << 6) | 569 | #define MIPS_CONF1_C2 (_ULCAST_(1) << 6) |
570 | #define MIPS_CONF1_DA (_ULCAST_(7) << 7) | 570 | #define MIPS_CONF1_DA (_ULCAST_(7) << 7) |
571 | #define MIPS_CONF1_DL (_ULCAST_(7) << 10) | 571 | #define MIPS_CONF1_DL (_ULCAST_(7) << 10) |
572 | #define MIPS_CONF1_DS (_ULCAST_(7) << 13) | 572 | #define MIPS_CONF1_DS (_ULCAST_(7) << 13) |
573 | #define MIPS_CONF1_IA (_ULCAST_(7) << 16) | 573 | #define MIPS_CONF1_IA (_ULCAST_(7) << 16) |
@@ -575,22 +575,22 @@ | |||
575 | #define MIPS_CONF1_IS (_ULCAST_(7) << 22) | 575 | #define MIPS_CONF1_IS (_ULCAST_(7) << 22) |
576 | #define MIPS_CONF1_TLBS (_ULCAST_(63)<< 25) | 576 | #define MIPS_CONF1_TLBS (_ULCAST_(63)<< 25) |
577 | 577 | ||
578 | #define MIPS_CONF2_SA (_ULCAST_(15)<< 0) | 578 | #define MIPS_CONF2_SA (_ULCAST_(15)<< 0) |
579 | #define MIPS_CONF2_SL (_ULCAST_(15)<< 4) | 579 | #define MIPS_CONF2_SL (_ULCAST_(15)<< 4) |
580 | #define MIPS_CONF2_SS (_ULCAST_(15)<< 8) | 580 | #define MIPS_CONF2_SS (_ULCAST_(15)<< 8) |
581 | #define MIPS_CONF2_SU (_ULCAST_(15)<< 12) | 581 | #define MIPS_CONF2_SU (_ULCAST_(15)<< 12) |
582 | #define MIPS_CONF2_TA (_ULCAST_(15)<< 16) | 582 | #define MIPS_CONF2_TA (_ULCAST_(15)<< 16) |
583 | #define MIPS_CONF2_TL (_ULCAST_(15)<< 20) | 583 | #define MIPS_CONF2_TL (_ULCAST_(15)<< 20) |
584 | #define MIPS_CONF2_TS (_ULCAST_(15)<< 24) | 584 | #define MIPS_CONF2_TS (_ULCAST_(15)<< 24) |
585 | #define MIPS_CONF2_TU (_ULCAST_(7) << 28) | 585 | #define MIPS_CONF2_TU (_ULCAST_(7) << 28) |
586 | 586 | ||
587 | #define MIPS_CONF3_TL (_ULCAST_(1) << 0) | 587 | #define MIPS_CONF3_TL (_ULCAST_(1) << 0) |
588 | #define MIPS_CONF3_SM (_ULCAST_(1) << 1) | 588 | #define MIPS_CONF3_SM (_ULCAST_(1) << 1) |
589 | #define MIPS_CONF3_MT (_ULCAST_(1) << 2) | 589 | #define MIPS_CONF3_MT (_ULCAST_(1) << 2) |
590 | #define MIPS_CONF3_SP (_ULCAST_(1) << 4) | 590 | #define MIPS_CONF3_SP (_ULCAST_(1) << 4) |
591 | #define MIPS_CONF3_VINT (_ULCAST_(1) << 5) | 591 | #define MIPS_CONF3_VINT (_ULCAST_(1) << 5) |
592 | #define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) | 592 | #define MIPS_CONF3_VEIC (_ULCAST_(1) << 6) |
593 | #define MIPS_CONF3_LPA (_ULCAST_(1) << 7) | 593 | #define MIPS_CONF3_LPA (_ULCAST_(1) << 7) |
594 | #define MIPS_CONF3_DSP (_ULCAST_(1) << 10) | 594 | #define MIPS_CONF3_DSP (_ULCAST_(1) << 10) |
595 | #define MIPS_CONF3_DSP2P (_ULCAST_(1) << 11) | 595 | #define MIPS_CONF3_DSP2P (_ULCAST_(1) << 11) |
596 | #define MIPS_CONF3_RXI (_ULCAST_(1) << 12) | 596 | #define MIPS_CONF3_RXI (_ULCAST_(1) << 12) |
@@ -621,7 +621,7 @@ | |||
621 | #ifndef __ASSEMBLY__ | 621 | #ifndef __ASSEMBLY__ |
622 | 622 | ||
623 | /* | 623 | /* |
624 | * Functions to access the R10000 performance counters. These are basically | 624 | * Functions to access the R10000 performance counters. These are basically |
625 | * mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit | 625 | * mfc0 and mtc0 instructions from and to coprocessor register with a 5-bit |
626 | * performance counter number encoded into bits 1 ... 5 of the instruction. | 626 | * performance counter number encoded into bits 1 ... 5 of the instruction. |
627 | * Only performance counters 0 to 1 actually exist, so for a non-R10000 aware | 627 | * Only performance counters 0 to 1 actually exist, so for a non-R10000 aware |
@@ -632,13 +632,13 @@ | |||
632 | unsigned int __res; \ | 632 | unsigned int __res; \ |
633 | __asm__ __volatile__( \ | 633 | __asm__ __volatile__( \ |
634 | "mfpc\t%0, %1" \ | 634 | "mfpc\t%0, %1" \ |
635 | : "=r" (__res) \ | 635 | : "=r" (__res) \ |
636 | : "i" (counter)); \ | 636 | : "i" (counter)); \ |
637 | \ | 637 | \ |
638 | __res; \ | 638 | __res; \ |
639 | }) | 639 | }) |
640 | 640 | ||
641 | #define write_r10k_perf_cntr(counter,val) \ | 641 | #define write_r10k_perf_cntr(counter,val) \ |
642 | do { \ | 642 | do { \ |
643 | __asm__ __volatile__( \ | 643 | __asm__ __volatile__( \ |
644 | "mtpc\t%0, %1" \ | 644 | "mtpc\t%0, %1" \ |
@@ -651,13 +651,13 @@ do { \ | |||
651 | unsigned int __res; \ | 651 | unsigned int __res; \ |
652 | __asm__ __volatile__( \ | 652 | __asm__ __volatile__( \ |
653 | "mfps\t%0, %1" \ | 653 | "mfps\t%0, %1" \ |
654 | : "=r" (__res) \ | 654 | : "=r" (__res) \ |
655 | : "i" (counter)); \ | 655 | : "i" (counter)); \ |
656 | \ | 656 | \ |
657 | __res; \ | 657 | __res; \ |
658 | }) | 658 | }) |
659 | 659 | ||
660 | #define write_r10k_perf_cntl(counter,val) \ | 660 | #define write_r10k_perf_cntl(counter,val) \ |
661 | do { \ | 661 | do { \ |
662 | __asm__ __volatile__( \ | 662 | __asm__ __volatile__( \ |
663 | "mtps\t%0, %1" \ | 663 | "mtps\t%0, %1" \ |
@@ -847,20 +847,20 @@ do { \ | |||
847 | #define write_c0_context(val) __write_ulong_c0_register($4, 0, val) | 847 | #define write_c0_context(val) __write_ulong_c0_register($4, 0, val) |
848 | 848 | ||
849 | #define read_c0_userlocal() __read_ulong_c0_register($4, 2) | 849 | #define read_c0_userlocal() __read_ulong_c0_register($4, 2) |
850 | #define write_c0_userlocal(val) __write_ulong_c0_register($4, 2, val) | 850 | #define write_c0_userlocal(val) __write_ulong_c0_register($4, 2, val) |
851 | 851 | ||
852 | #define read_c0_pagemask() __read_32bit_c0_register($5, 0) | 852 | #define read_c0_pagemask() __read_32bit_c0_register($5, 0) |
853 | #define write_c0_pagemask(val) __write_32bit_c0_register($5, 0, val) | 853 | #define write_c0_pagemask(val) __write_32bit_c0_register($5, 0, val) |
854 | 854 | ||
855 | #define read_c0_pagegrain() __read_32bit_c0_register($5, 1) | 855 | #define read_c0_pagegrain() __read_32bit_c0_register($5, 1) |
856 | #define write_c0_pagegrain(val) __write_32bit_c0_register($5, 1, val) | 856 | #define write_c0_pagegrain(val) __write_32bit_c0_register($5, 1, val) |
857 | 857 | ||
858 | #define read_c0_wired() __read_32bit_c0_register($6, 0) | 858 | #define read_c0_wired() __read_32bit_c0_register($6, 0) |
859 | #define write_c0_wired(val) __write_32bit_c0_register($6, 0, val) | 859 | #define write_c0_wired(val) __write_32bit_c0_register($6, 0, val) |
860 | 860 | ||
861 | #define read_c0_info() __read_32bit_c0_register($7, 0) | 861 | #define read_c0_info() __read_32bit_c0_register($7, 0) |
862 | 862 | ||
863 | #define read_c0_cache() __read_32bit_c0_register($7, 0) /* TX39xx */ | 863 | #define read_c0_cache() __read_32bit_c0_register($7, 0) /* TX39xx */ |
864 | #define write_c0_cache(val) __write_32bit_c0_register($7, 0, val) | 864 | #define write_c0_cache(val) __write_32bit_c0_register($7, 0, val) |
865 | 865 | ||
866 | #define read_c0_badvaddr() __read_ulong_c0_register($8, 0) | 866 | #define read_c0_badvaddr() __read_ulong_c0_register($8, 0) |
@@ -975,7 +975,7 @@ do { \ | |||
975 | #define write_c0_intcontrol(val) __write_32bit_c0_ctrl_register($20, val) | 975 | #define write_c0_intcontrol(val) __write_32bit_c0_ctrl_register($20, val) |
976 | 976 | ||
977 | #define read_c0_framemask() __read_32bit_c0_register($21, 0) | 977 | #define read_c0_framemask() __read_32bit_c0_register($21, 0) |
978 | #define write_c0_framemask(val) __write_32bit_c0_register($21, 0, val) | 978 | #define write_c0_framemask(val) __write_32bit_c0_register($21, 0, val) |
979 | 979 | ||
980 | #define read_c0_diag() __read_32bit_c0_register($22, 0) | 980 | #define read_c0_diag() __read_32bit_c0_register($22, 0) |
981 | #define write_c0_diag(val) __write_32bit_c0_register($22, 0, val) | 981 | #define write_c0_diag(val) __write_32bit_c0_register($22, 0, val) |
@@ -1005,27 +1005,27 @@ do { \ | |||
1005 | * MIPS32 / MIPS64 performance counters | 1005 | * MIPS32 / MIPS64 performance counters |
1006 | */ | 1006 | */ |
1007 | #define read_c0_perfctrl0() __read_32bit_c0_register($25, 0) | 1007 | #define read_c0_perfctrl0() __read_32bit_c0_register($25, 0) |
1008 | #define write_c0_perfctrl0(val) __write_32bit_c0_register($25, 0, val) | 1008 | #define write_c0_perfctrl0(val) __write_32bit_c0_register($25, 0, val) |
1009 | #define read_c0_perfcntr0() __read_32bit_c0_register($25, 1) | 1009 | #define read_c0_perfcntr0() __read_32bit_c0_register($25, 1) |
1010 | #define write_c0_perfcntr0(val) __write_32bit_c0_register($25, 1, val) | 1010 | #define write_c0_perfcntr0(val) __write_32bit_c0_register($25, 1, val) |
1011 | #define read_c0_perfcntr0_64() __read_64bit_c0_register($25, 1) | 1011 | #define read_c0_perfcntr0_64() __read_64bit_c0_register($25, 1) |
1012 | #define write_c0_perfcntr0_64(val) __write_64bit_c0_register($25, 1, val) | 1012 | #define write_c0_perfcntr0_64(val) __write_64bit_c0_register($25, 1, val) |
1013 | #define read_c0_perfctrl1() __read_32bit_c0_register($25, 2) | 1013 | #define read_c0_perfctrl1() __read_32bit_c0_register($25, 2) |
1014 | #define write_c0_perfctrl1(val) __write_32bit_c0_register($25, 2, val) | 1014 | #define write_c0_perfctrl1(val) __write_32bit_c0_register($25, 2, val) |
1015 | #define read_c0_perfcntr1() __read_32bit_c0_register($25, 3) | 1015 | #define read_c0_perfcntr1() __read_32bit_c0_register($25, 3) |
1016 | #define write_c0_perfcntr1(val) __write_32bit_c0_register($25, 3, val) | 1016 | #define write_c0_perfcntr1(val) __write_32bit_c0_register($25, 3, val) |
1017 | #define read_c0_perfcntr1_64() __read_64bit_c0_register($25, 3) | 1017 | #define read_c0_perfcntr1_64() __read_64bit_c0_register($25, 3) |
1018 | #define write_c0_perfcntr1_64(val) __write_64bit_c0_register($25, 3, val) | 1018 | #define write_c0_perfcntr1_64(val) __write_64bit_c0_register($25, 3, val) |
1019 | #define read_c0_perfctrl2() __read_32bit_c0_register($25, 4) | 1019 | #define read_c0_perfctrl2() __read_32bit_c0_register($25, 4) |
1020 | #define write_c0_perfctrl2(val) __write_32bit_c0_register($25, 4, val) | 1020 | #define write_c0_perfctrl2(val) __write_32bit_c0_register($25, 4, val) |
1021 | #define read_c0_perfcntr2() __read_32bit_c0_register($25, 5) | 1021 | #define read_c0_perfcntr2() __read_32bit_c0_register($25, 5) |
1022 | #define write_c0_perfcntr2(val) __write_32bit_c0_register($25, 5, val) | 1022 | #define write_c0_perfcntr2(val) __write_32bit_c0_register($25, 5, val) |
1023 | #define read_c0_perfcntr2_64() __read_64bit_c0_register($25, 5) | 1023 | #define read_c0_perfcntr2_64() __read_64bit_c0_register($25, 5) |
1024 | #define write_c0_perfcntr2_64(val) __write_64bit_c0_register($25, 5, val) | 1024 | #define write_c0_perfcntr2_64(val) __write_64bit_c0_register($25, 5, val) |
1025 | #define read_c0_perfctrl3() __read_32bit_c0_register($25, 6) | 1025 | #define read_c0_perfctrl3() __read_32bit_c0_register($25, 6) |
1026 | #define write_c0_perfctrl3(val) __write_32bit_c0_register($25, 6, val) | 1026 | #define write_c0_perfctrl3(val) __write_32bit_c0_register($25, 6, val) |
1027 | #define read_c0_perfcntr3() __read_32bit_c0_register($25, 7) | 1027 | #define read_c0_perfcntr3() __read_32bit_c0_register($25, 7) |
1028 | #define write_c0_perfcntr3(val) __write_32bit_c0_register($25, 7, val) | 1028 | #define write_c0_perfcntr3(val) __write_32bit_c0_register($25, 7, val) |
1029 | #define read_c0_perfcntr3_64() __read_64bit_c0_register($25, 7) | 1029 | #define read_c0_perfcntr3_64() __read_64bit_c0_register($25, 7) |
1030 | #define write_c0_perfcntr3_64(val) __write_64bit_c0_register($25, 7, val) | 1030 | #define write_c0_perfcntr3_64(val) __write_64bit_c0_register($25, 7, val) |
1031 | 1031 | ||
@@ -1033,12 +1033,12 @@ do { \ | |||
1033 | #define write_c0_ecc(val) __write_32bit_c0_register($26, 0, val) | 1033 | #define write_c0_ecc(val) __write_32bit_c0_register($26, 0, val) |
1034 | 1034 | ||
1035 | #define read_c0_derraddr0() __read_ulong_c0_register($26, 1) | 1035 | #define read_c0_derraddr0() __read_ulong_c0_register($26, 1) |
1036 | #define write_c0_derraddr0(val) __write_ulong_c0_register($26, 1, val) | 1036 | #define write_c0_derraddr0(val) __write_ulong_c0_register($26, 1, val) |
1037 | 1037 | ||
1038 | #define read_c0_cacheerr() __read_32bit_c0_register($27, 0) | 1038 | #define read_c0_cacheerr() __read_32bit_c0_register($27, 0) |
1039 | 1039 | ||
1040 | #define read_c0_derraddr1() __read_ulong_c0_register($27, 1) | 1040 | #define read_c0_derraddr1() __read_ulong_c0_register($27, 1) |
1041 | #define write_c0_derraddr1(val) __write_ulong_c0_register($27, 1, val) | 1041 | #define write_c0_derraddr1(val) __write_ulong_c0_register($27, 1, val) |
1042 | 1042 | ||
1043 | #define read_c0_taglo() __read_32bit_c0_register($28, 0) | 1043 | #define read_c0_taglo() __read_32bit_c0_register($28, 0) |
1044 | #define write_c0_taglo(val) __write_32bit_c0_register($28, 0, val) | 1044 | #define write_c0_taglo(val) __write_32bit_c0_register($28, 0, val) |
@@ -1083,9 +1083,9 @@ do { \ | |||
1083 | #define write_c0_cvmctl(val) __write_64bit_c0_register($9, 7, val) | 1083 | #define write_c0_cvmctl(val) __write_64bit_c0_register($9, 7, val) |
1084 | 1084 | ||
1085 | #define read_c0_cvmmemctl() __read_64bit_c0_register($11, 7) | 1085 | #define read_c0_cvmmemctl() __read_64bit_c0_register($11, 7) |
1086 | #define write_c0_cvmmemctl(val) __write_64bit_c0_register($11, 7, val) | 1086 | #define write_c0_cvmmemctl(val) __write_64bit_c0_register($11, 7, val) |
1087 | /* | 1087 | /* |
1088 | * The cacheerr registers are not standardized. On OCTEON, they are | 1088 | * The cacheerr registers are not standardized. On OCTEON, they are |
1089 | * 64 bits wide. | 1089 | * 64 bits wide. |
1090 | */ | 1090 | */ |
1091 | #define read_octeon_c0_icacheerr() __read_64bit_c0_register($27, 0) | 1091 | #define read_octeon_c0_icacheerr() __read_64bit_c0_register($27, 0) |
@@ -1183,7 +1183,7 @@ do { \ | |||
1183 | " # wrdsp $1, %x1 \n" \ | 1183 | " # wrdsp $1, %x1 \n" \ |
1184 | " .word 0x7c2004f8 | (%x1 << 11) \n" \ | 1184 | " .word 0x7c2004f8 | (%x1 << 11) \n" \ |
1185 | " .set pop \n" \ | 1185 | " .set pop \n" \ |
1186 | : \ | 1186 | : \ |
1187 | : "r" (val), "i" (mask)); \ | 1187 | : "r" (val), "i" (mask)); \ |
1188 | } while (0) | 1188 | } while (0) |
1189 | 1189 | ||
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index 45cfa1ad86a6..e81d719efcd1 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h | |||
@@ -77,7 +77,7 @@ extern unsigned long pgd_current[]; | |||
77 | #define ASID_INC 0x1 | 77 | #define ASID_INC 0x1 |
78 | extern unsigned long smtc_asid_mask; | 78 | extern unsigned long smtc_asid_mask; |
79 | #define ASID_MASK (smtc_asid_mask) | 79 | #define ASID_MASK (smtc_asid_mask) |
80 | #define HW_ASID_MASK 0xff | 80 | #define HW_ASID_MASK 0xff |
81 | /* End SMTC/34K debug hack */ | 81 | /* End SMTC/34K debug hack */ |
82 | #else /* FIXME: not correct for R6000 */ | 82 | #else /* FIXME: not correct for R6000 */ |
83 | 83 | ||
@@ -140,7 +140,7 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 142 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
143 | struct task_struct *tsk) | 143 | struct task_struct *tsk) |
144 | { | 144 | { |
145 | unsigned int cpu = smp_processor_id(); | 145 | unsigned int cpu = smp_processor_id(); |
146 | unsigned long flags; | 146 | unsigned long flags; |
@@ -238,7 +238,7 @@ activate_mm(struct mm_struct *prev, struct mm_struct *next) | |||
238 | } | 238 | } |
239 | /* See comments for similar code above */ | 239 | /* See comments for similar code above */ |
240 | write_c0_entryhi((read_c0_entryhi() & ~HW_ASID_MASK) | | 240 | write_c0_entryhi((read_c0_entryhi() & ~HW_ASID_MASK) | |
241 | cpu_asid(cpu, next)); | 241 | cpu_asid(cpu, next)); |
242 | ehb(); /* Make sure it propagates to TCStatus */ | 242 | ehb(); /* Make sure it propagates to TCStatus */ |
243 | evpe(mtflags); | 243 | evpe(mtflags); |
244 | #else | 244 | #else |
diff --git a/arch/mips/include/asm/msc01_ic.h b/arch/mips/include/asm/msc01_ic.h index d92406ae2841..ff7f074d073c 100644 --- a/arch/mips/include/asm/msc01_ic.h +++ b/arch/mips/include/asm/msc01_ic.h | |||
@@ -15,45 +15,45 @@ | |||
15 | * Register offset addresses | 15 | * Register offset addresses |
16 | *****************************************************************************/ | 16 | *****************************************************************************/ |
17 | 17 | ||
18 | #define MSC01_IC_RST_OFS 0x00008 /* Software reset */ | 18 | #define MSC01_IC_RST_OFS 0x00008 /* Software reset */ |
19 | #define MSC01_IC_ENAL_OFS 0x00100 /* Int_in enable mask 31:0 */ | 19 | #define MSC01_IC_ENAL_OFS 0x00100 /* Int_in enable mask 31:0 */ |
20 | #define MSC01_IC_ENAH_OFS 0x00108 /* Int_in enable mask 63:32 */ | 20 | #define MSC01_IC_ENAH_OFS 0x00108 /* Int_in enable mask 63:32 */ |
21 | #define MSC01_IC_DISL_OFS 0x00120 /* Int_in disable mask 31:0 */ | 21 | #define MSC01_IC_DISL_OFS 0x00120 /* Int_in disable mask 31:0 */ |
22 | #define MSC01_IC_DISH_OFS 0x00128 /* Int_in disable mask 63:32 */ | 22 | #define MSC01_IC_DISH_OFS 0x00128 /* Int_in disable mask 63:32 */ |
23 | #define MSC01_IC_ISBL_OFS 0x00140 /* Raw int_in 31:0 */ | 23 | #define MSC01_IC_ISBL_OFS 0x00140 /* Raw int_in 31:0 */ |
24 | #define MSC01_IC_ISBH_OFS 0x00148 /* Raw int_in 63:32 */ | 24 | #define MSC01_IC_ISBH_OFS 0x00148 /* Raw int_in 63:32 */ |
25 | #define MSC01_IC_ISAL_OFS 0x00160 /* Masked int_in 31:0 */ | 25 | #define MSC01_IC_ISAL_OFS 0x00160 /* Masked int_in 31:0 */ |
26 | #define MSC01_IC_ISAH_OFS 0x00168 /* Masked int_in 63:32 */ | 26 | #define MSC01_IC_ISAH_OFS 0x00168 /* Masked int_in 63:32 */ |
27 | #define MSC01_IC_LVL_OFS 0x00180 /* Disable priority int_out */ | 27 | #define MSC01_IC_LVL_OFS 0x00180 /* Disable priority int_out */ |
28 | #define MSC01_IC_RAMW_OFS 0x00180 /* Shadow set RAM (EI) */ | 28 | #define MSC01_IC_RAMW_OFS 0x00180 /* Shadow set RAM (EI) */ |
29 | #define MSC01_IC_OSB_OFS 0x00188 /* Raw int_out */ | 29 | #define MSC01_IC_OSB_OFS 0x00188 /* Raw int_out */ |
30 | #define MSC01_IC_OSA_OFS 0x00190 /* Masked int_out */ | 30 | #define MSC01_IC_OSA_OFS 0x00190 /* Masked int_out */ |
31 | #define MSC01_IC_GENA_OFS 0x00198 /* Global HW int enable */ | 31 | #define MSC01_IC_GENA_OFS 0x00198 /* Global HW int enable */ |
32 | #define MSC01_IC_BASE_OFS 0x001a0 /* Base address of IC_VEC */ | 32 | #define MSC01_IC_BASE_OFS 0x001a0 /* Base address of IC_VEC */ |
33 | #define MSC01_IC_VEC_OFS 0x001b0 /* Active int's vector address */ | 33 | #define MSC01_IC_VEC_OFS 0x001b0 /* Active int's vector address */ |
34 | #define MSC01_IC_EOI_OFS 0x001c0 /* Enable lower level ints */ | 34 | #define MSC01_IC_EOI_OFS 0x001c0 /* Enable lower level ints */ |
35 | #define MSC01_IC_CFG_OFS 0x001c8 /* Configuration register */ | 35 | #define MSC01_IC_CFG_OFS 0x001c8 /* Configuration register */ |
36 | #define MSC01_IC_TRLD_OFS 0x001d0 /* Interval timer reload val */ | 36 | #define MSC01_IC_TRLD_OFS 0x001d0 /* Interval timer reload val */ |
37 | #define MSC01_IC_TVAL_OFS 0x001e0 /* Interval timer current val */ | 37 | #define MSC01_IC_TVAL_OFS 0x001e0 /* Interval timer current val */ |
38 | #define MSC01_IC_TCFG_OFS 0x001f0 /* Interval timer config */ | 38 | #define MSC01_IC_TCFG_OFS 0x001f0 /* Interval timer config */ |
39 | #define MSC01_IC_SUP_OFS 0x00200 /* Set up int_in line 0 */ | 39 | #define MSC01_IC_SUP_OFS 0x00200 /* Set up int_in line 0 */ |
40 | #define MSC01_IC_ENA_OFS 0x00800 /* Int_in enable mask 63:0 */ | 40 | #define MSC01_IC_ENA_OFS 0x00800 /* Int_in enable mask 63:0 */ |
41 | #define MSC01_IC_DIS_OFS 0x00820 /* Int_in disable mask 63:0 */ | 41 | #define MSC01_IC_DIS_OFS 0x00820 /* Int_in disable mask 63:0 */ |
42 | #define MSC01_IC_ISB_OFS 0x00840 /* Raw int_in 63:0 */ | 42 | #define MSC01_IC_ISB_OFS 0x00840 /* Raw int_in 63:0 */ |
43 | #define MSC01_IC_ISA_OFS 0x00860 /* Masked int_in 63:0 */ | 43 | #define MSC01_IC_ISA_OFS 0x00860 /* Masked int_in 63:0 */ |
44 | 44 | ||
45 | /***************************************************************************** | 45 | /***************************************************************************** |
46 | * Register field encodings | 46 | * Register field encodings |
47 | *****************************************************************************/ | 47 | *****************************************************************************/ |
48 | 48 | ||
49 | #define MSC01_IC_RST_RST_SHF 0 | 49 | #define MSC01_IC_RST_RST_SHF 0 |
50 | #define MSC01_IC_RST_RST_MSK 0x00000001 | 50 | #define MSC01_IC_RST_RST_MSK 0x00000001 |
51 | #define MSC01_IC_RST_RST_BIT MSC01_IC_RST_RST_MSK | 51 | #define MSC01_IC_RST_RST_BIT MSC01_IC_RST_RST_MSK |
52 | #define MSC01_IC_LVL_LVL_SHF 0 | 52 | #define MSC01_IC_LVL_LVL_SHF 0 |
53 | #define MSC01_IC_LVL_LVL_MSK 0x000000ff | 53 | #define MSC01_IC_LVL_LVL_MSK 0x000000ff |
54 | #define MSC01_IC_LVL_SPUR_SHF 16 | 54 | #define MSC01_IC_LVL_SPUR_SHF 16 |
55 | #define MSC01_IC_LVL_SPUR_MSK 0x00010000 | 55 | #define MSC01_IC_LVL_SPUR_MSK 0x00010000 |
56 | #define MSC01_IC_LVL_SPUR_BIT MSC01_IC_LVL_SPUR_MSK | 56 | #define MSC01_IC_LVL_SPUR_BIT MSC01_IC_LVL_SPUR_MSK |
57 | #define MSC01_IC_RAMW_RIPL_SHF 0 | 57 | #define MSC01_IC_RAMW_RIPL_SHF 0 |
58 | #define MSC01_IC_RAMW_RIPL_MSK 0x0000003f | 58 | #define MSC01_IC_RAMW_RIPL_MSK 0x0000003f |
59 | #define MSC01_IC_RAMW_DATA_SHF 6 | 59 | #define MSC01_IC_RAMW_DATA_SHF 6 |
@@ -63,33 +63,33 @@ | |||
63 | #define MSC01_IC_RAMW_READ_SHF 31 | 63 | #define MSC01_IC_RAMW_READ_SHF 31 |
64 | #define MSC01_IC_RAMW_READ_MSK 0x80000000 | 64 | #define MSC01_IC_RAMW_READ_MSK 0x80000000 |
65 | #define MSC01_IC_RAMW_READ_BIT MSC01_IC_RAMW_READ_MSK | 65 | #define MSC01_IC_RAMW_READ_BIT MSC01_IC_RAMW_READ_MSK |
66 | #define MSC01_IC_OSB_OSB_SHF 0 | 66 | #define MSC01_IC_OSB_OSB_SHF 0 |
67 | #define MSC01_IC_OSB_OSB_MSK 0x000000ff | 67 | #define MSC01_IC_OSB_OSB_MSK 0x000000ff |
68 | #define MSC01_IC_OSA_OSA_SHF 0 | 68 | #define MSC01_IC_OSA_OSA_SHF 0 |
69 | #define MSC01_IC_OSA_OSA_MSK 0x000000ff | 69 | #define MSC01_IC_OSA_OSA_MSK 0x000000ff |
70 | #define MSC01_IC_GENA_GENA_SHF 0 | 70 | #define MSC01_IC_GENA_GENA_SHF 0 |
71 | #define MSC01_IC_GENA_GENA_MSK 0x00000001 | 71 | #define MSC01_IC_GENA_GENA_MSK 0x00000001 |
72 | #define MSC01_IC_GENA_GENA_BIT MSC01_IC_GENA_GENA_MSK | 72 | #define MSC01_IC_GENA_GENA_BIT MSC01_IC_GENA_GENA_MSK |
73 | #define MSC01_IC_CFG_DIS_SHF 0 | 73 | #define MSC01_IC_CFG_DIS_SHF 0 |
74 | #define MSC01_IC_CFG_DIS_MSK 0x00000001 | 74 | #define MSC01_IC_CFG_DIS_MSK 0x00000001 |
75 | #define MSC01_IC_CFG_DIS_BIT MSC01_IC_CFG_DIS_MSK | 75 | #define MSC01_IC_CFG_DIS_BIT MSC01_IC_CFG_DIS_MSK |
76 | #define MSC01_IC_CFG_SHFT_SHF 8 | 76 | #define MSC01_IC_CFG_SHFT_SHF 8 |
77 | #define MSC01_IC_CFG_SHFT_MSK 0x00000f00 | 77 | #define MSC01_IC_CFG_SHFT_MSK 0x00000f00 |
78 | #define MSC01_IC_TCFG_ENA_SHF 0 | 78 | #define MSC01_IC_TCFG_ENA_SHF 0 |
79 | #define MSC01_IC_TCFG_ENA_MSK 0x00000001 | 79 | #define MSC01_IC_TCFG_ENA_MSK 0x00000001 |
80 | #define MSC01_IC_TCFG_ENA_BIT MSC01_IC_TCFG_ENA_MSK | 80 | #define MSC01_IC_TCFG_ENA_BIT MSC01_IC_TCFG_ENA_MSK |
81 | #define MSC01_IC_TCFG_INT_SHF 8 | 81 | #define MSC01_IC_TCFG_INT_SHF 8 |
82 | #define MSC01_IC_TCFG_INT_MSK 0x00000100 | 82 | #define MSC01_IC_TCFG_INT_MSK 0x00000100 |
83 | #define MSC01_IC_TCFG_INT_BIT MSC01_IC_TCFG_INT_MSK | 83 | #define MSC01_IC_TCFG_INT_BIT MSC01_IC_TCFG_INT_MSK |
84 | #define MSC01_IC_TCFG_EDGE_SHF 16 | 84 | #define MSC01_IC_TCFG_EDGE_SHF 16 |
85 | #define MSC01_IC_TCFG_EDGE_MSK 0x00010000 | 85 | #define MSC01_IC_TCFG_EDGE_MSK 0x00010000 |
86 | #define MSC01_IC_TCFG_EDGE_BIT MSC01_IC_TCFG_EDGE_MSK | 86 | #define MSC01_IC_TCFG_EDGE_BIT MSC01_IC_TCFG_EDGE_MSK |
87 | #define MSC01_IC_SUP_PRI_SHF 0 | 87 | #define MSC01_IC_SUP_PRI_SHF 0 |
88 | #define MSC01_IC_SUP_PRI_MSK 0x00000007 | 88 | #define MSC01_IC_SUP_PRI_MSK 0x00000007 |
89 | #define MSC01_IC_SUP_EDGE_SHF 8 | 89 | #define MSC01_IC_SUP_EDGE_SHF 8 |
90 | #define MSC01_IC_SUP_EDGE_MSK 0x00000100 | 90 | #define MSC01_IC_SUP_EDGE_MSK 0x00000100 |
91 | #define MSC01_IC_SUP_EDGE_BIT MSC01_IC_SUP_EDGE_MSK | 91 | #define MSC01_IC_SUP_EDGE_BIT MSC01_IC_SUP_EDGE_MSK |
92 | #define MSC01_IC_SUP_STEP 8 | 92 | #define MSC01_IC_SUP_STEP 8 |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * MIPS System controller interrupt register base. | 95 | * MIPS System controller interrupt register base. |
@@ -100,32 +100,32 @@ | |||
100 | * Absolute register addresses | 100 | * Absolute register addresses |
101 | *****************************************************************************/ | 101 | *****************************************************************************/ |
102 | 102 | ||
103 | #define MSC01_IC_RST (MSC01_IC_REG_BASE + MSC01_IC_RST_OFS) | 103 | #define MSC01_IC_RST (MSC01_IC_REG_BASE + MSC01_IC_RST_OFS) |
104 | #define MSC01_IC_ENAL (MSC01_IC_REG_BASE + MSC01_IC_ENAL_OFS) | 104 | #define MSC01_IC_ENAL (MSC01_IC_REG_BASE + MSC01_IC_ENAL_OFS) |
105 | #define MSC01_IC_ENAH (MSC01_IC_REG_BASE + MSC01_IC_ENAH_OFS) | 105 | #define MSC01_IC_ENAH (MSC01_IC_REG_BASE + MSC01_IC_ENAH_OFS) |
106 | #define MSC01_IC_DISL (MSC01_IC_REG_BASE + MSC01_IC_DISL_OFS) | 106 | #define MSC01_IC_DISL (MSC01_IC_REG_BASE + MSC01_IC_DISL_OFS) |
107 | #define MSC01_IC_DISH (MSC01_IC_REG_BASE + MSC01_IC_DISH_OFS) | 107 | #define MSC01_IC_DISH (MSC01_IC_REG_BASE + MSC01_IC_DISH_OFS) |
108 | #define MSC01_IC_ISBL (MSC01_IC_REG_BASE + MSC01_IC_ISBL_OFS) | 108 | #define MSC01_IC_ISBL (MSC01_IC_REG_BASE + MSC01_IC_ISBL_OFS) |
109 | #define MSC01_IC_ISBH (MSC01_IC_REG_BASE + MSC01_IC_ISBH_OFS) | 109 | #define MSC01_IC_ISBH (MSC01_IC_REG_BASE + MSC01_IC_ISBH_OFS) |
110 | #define MSC01_IC_ISAL (MSC01_IC_REG_BASE + MSC01_IC_ISAL_OFS) | 110 | #define MSC01_IC_ISAL (MSC01_IC_REG_BASE + MSC01_IC_ISAL_OFS) |
111 | #define MSC01_IC_ISAH (MSC01_IC_REG_BASE + MSC01_IC_ISAH_OFS) | 111 | #define MSC01_IC_ISAH (MSC01_IC_REG_BASE + MSC01_IC_ISAH_OFS) |
112 | #define MSC01_IC_LVL (MSC01_IC_REG_BASE + MSC01_IC_LVL_OFS) | 112 | #define MSC01_IC_LVL (MSC01_IC_REG_BASE + MSC01_IC_LVL_OFS) |
113 | #define MSC01_IC_RAMW (MSC01_IC_REG_BASE + MSC01_IC_RAMW_OFS) | 113 | #define MSC01_IC_RAMW (MSC01_IC_REG_BASE + MSC01_IC_RAMW_OFS) |
114 | #define MSC01_IC_OSB (MSC01_IC_REG_BASE + MSC01_IC_OSB_OFS) | 114 | #define MSC01_IC_OSB (MSC01_IC_REG_BASE + MSC01_IC_OSB_OFS) |
115 | #define MSC01_IC_OSA (MSC01_IC_REG_BASE + MSC01_IC_OSA_OFS) | 115 | #define MSC01_IC_OSA (MSC01_IC_REG_BASE + MSC01_IC_OSA_OFS) |
116 | #define MSC01_IC_GENA (MSC01_IC_REG_BASE + MSC01_IC_GENA_OFS) | 116 | #define MSC01_IC_GENA (MSC01_IC_REG_BASE + MSC01_IC_GENA_OFS) |
117 | #define MSC01_IC_BASE (MSC01_IC_REG_BASE + MSC01_IC_BASE_OFS) | 117 | #define MSC01_IC_BASE (MSC01_IC_REG_BASE + MSC01_IC_BASE_OFS) |
118 | #define MSC01_IC_VEC (MSC01_IC_REG_BASE + MSC01_IC_VEC_OFS) | 118 | #define MSC01_IC_VEC (MSC01_IC_REG_BASE + MSC01_IC_VEC_OFS) |
119 | #define MSC01_IC_EOI (MSC01_IC_REG_BASE + MSC01_IC_EOI_OFS) | 119 | #define MSC01_IC_EOI (MSC01_IC_REG_BASE + MSC01_IC_EOI_OFS) |
120 | #define MSC01_IC_CFG (MSC01_IC_REG_BASE + MSC01_IC_CFG_OFS) | 120 | #define MSC01_IC_CFG (MSC01_IC_REG_BASE + MSC01_IC_CFG_OFS) |
121 | #define MSC01_IC_TRLD (MSC01_IC_REG_BASE + MSC01_IC_TRLD_OFS) | 121 | #define MSC01_IC_TRLD (MSC01_IC_REG_BASE + MSC01_IC_TRLD_OFS) |
122 | #define MSC01_IC_TVAL (MSC01_IC_REG_BASE + MSC01_IC_TVAL_OFS) | 122 | #define MSC01_IC_TVAL (MSC01_IC_REG_BASE + MSC01_IC_TVAL_OFS) |
123 | #define MSC01_IC_TCFG (MSC01_IC_REG_BASE + MSC01_IC_TCFG_OFS) | 123 | #define MSC01_IC_TCFG (MSC01_IC_REG_BASE + MSC01_IC_TCFG_OFS) |
124 | #define MSC01_IC_SUP (MSC01_IC_REG_BASE + MSC01_IC_SUP_OFS) | 124 | #define MSC01_IC_SUP (MSC01_IC_REG_BASE + MSC01_IC_SUP_OFS) |
125 | #define MSC01_IC_ENA (MSC01_IC_REG_BASE + MSC01_IC_ENA_OFS) | 125 | #define MSC01_IC_ENA (MSC01_IC_REG_BASE + MSC01_IC_ENA_OFS) |
126 | #define MSC01_IC_DIS (MSC01_IC_REG_BASE + MSC01_IC_DIS_OFS) | 126 | #define MSC01_IC_DIS (MSC01_IC_REG_BASE + MSC01_IC_DIS_OFS) |
127 | #define MSC01_IC_ISB (MSC01_IC_REG_BASE + MSC01_IC_ISB_OFS) | 127 | #define MSC01_IC_ISB (MSC01_IC_REG_BASE + MSC01_IC_ISB_OFS) |
128 | #define MSC01_IC_ISA (MSC01_IC_REG_BASE + MSC01_IC_ISA_OFS) | 128 | #define MSC01_IC_ISA (MSC01_IC_REG_BASE + MSC01_IC_ISA_OFS) |
129 | 129 | ||
130 | /* | 130 | /* |
131 | * Soc-it interrupts are configurable. | 131 | * Soc-it interrupts are configurable. |
diff --git a/arch/mips/include/asm/netlogic/common.h b/arch/mips/include/asm/netlogic/common.h index 42bfd5f1eeec..aef560a51a7e 100644 --- a/arch/mips/include/asm/netlogic/common.h +++ b/arch/mips/include/asm/netlogic/common.h | |||
@@ -38,11 +38,11 @@ | |||
38 | /* | 38 | /* |
39 | * Common SMP definitions | 39 | * Common SMP definitions |
40 | */ | 40 | */ |
41 | #define RESET_VEC_PHYS 0x1fc00000 | 41 | #define RESET_VEC_PHYS 0x1fc00000 |
42 | #define RESET_DATA_PHYS (RESET_VEC_PHYS + (1<<10)) | 42 | #define RESET_DATA_PHYS (RESET_VEC_PHYS + (1<<10)) |
43 | #define BOOT_THREAD_MODE 0 | 43 | #define BOOT_THREAD_MODE 0 |
44 | #define BOOT_NMI_LOCK 4 | 44 | #define BOOT_NMI_LOCK 4 |
45 | #define BOOT_NMI_HANDLER 8 | 45 | #define BOOT_NMI_HANDLER 8 |
46 | 46 | ||
47 | #ifndef __ASSEMBLY__ | 47 | #ifndef __ASSEMBLY__ |
48 | #include <linux/cpumask.h> | 48 | #include <linux/cpumask.h> |
@@ -80,7 +80,7 @@ extern unsigned int nlm_threads_per_core; | |||
80 | extern cpumask_t nlm_cpumask; | 80 | extern cpumask_t nlm_cpumask; |
81 | 81 | ||
82 | struct nlm_soc_info { | 82 | struct nlm_soc_info { |
83 | unsigned long coremask; /* cores enabled on the soc */ | 83 | unsigned long coremask; /* cores enabled on the soc */ |
84 | unsigned long ebase; | 84 | unsigned long ebase; |
85 | uint64_t irqmask; | 85 | uint64_t irqmask; |
86 | uint64_t sysbase; /* only for XLP */ | 86 | uint64_t sysbase; /* only for XLP */ |
@@ -88,9 +88,9 @@ struct nlm_soc_info { | |||
88 | spinlock_t piclock; | 88 | spinlock_t piclock; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | #define nlm_get_node(i) (&nlm_nodes[i]) | 91 | #define nlm_get_node(i) (&nlm_nodes[i]) |
92 | #ifdef CONFIG_CPU_XLR | 92 | #ifdef CONFIG_CPU_XLR |
93 | #define nlm_current_node() (&nlm_nodes[0]) | 93 | #define nlm_current_node() (&nlm_nodes[0]) |
94 | #else | 94 | #else |
95 | #define nlm_current_node() (&nlm_nodes[nlm_nodeid()]) | 95 | #define nlm_current_node() (&nlm_nodes[nlm_nodeid()]) |
96 | #endif | 96 | #endif |
diff --git a/arch/mips/include/asm/netlogic/haldefs.h b/arch/mips/include/asm/netlogic/haldefs.h index 72a0c788b472..419d8aef8569 100644 --- a/arch/mips/include/asm/netlogic/haldefs.h +++ b/arch/mips/include/asm/netlogic/haldefs.h | |||
@@ -48,7 +48,7 @@ | |||
48 | * access 64 bit addresses or data. | 48 | * access 64 bit addresses or data. |
49 | * | 49 | * |
50 | * We need to disable interrupts because we save just the lower 32 bits of | 50 | * We need to disable interrupts because we save just the lower 32 bits of |
51 | * registers in interrupt handling. So if we get hit by an interrupt while | 51 | * registers in interrupt handling. So if we get hit by an interrupt while |
52 | * using the upper 32 bits of a register, we lose. | 52 | * using the upper 32 bits of a register, we lose. |
53 | */ | 53 | */ |
54 | static inline uint32_t nlm_save_flags_kx(void) | 54 | static inline uint32_t nlm_save_flags_kx(void) |
diff --git a/arch/mips/include/asm/netlogic/mips-extns.h b/arch/mips/include/asm/netlogic/mips-extns.h index 32ba6d95d47c..8ffae43107e6 100644 --- a/arch/mips/include/asm/netlogic/mips-extns.h +++ b/arch/mips/include/asm/netlogic/mips-extns.h | |||
@@ -49,7 +49,7 @@ | |||
49 | */ | 49 | */ |
50 | #define write_c0_eimr(val) \ | 50 | #define write_c0_eimr(val) \ |
51 | do { \ | 51 | do { \ |
52 | if (sizeof(unsigned long) == 4) { \ | 52 | if (sizeof(unsigned long) == 4) { \ |
53 | unsigned long __flags; \ | 53 | unsigned long __flags; \ |
54 | \ | 54 | \ |
55 | local_irq_save(__flags); \ | 55 | local_irq_save(__flags); \ |
@@ -208,7 +208,7 @@ do { \ | |||
208 | ".set\tmips0\n\t" \ | 208 | ".set\tmips0\n\t" \ |
209 | : : "Jr" (value)); \ | 209 | : : "Jr" (value)); \ |
210 | else \ | 210 | else \ |
211 | __asm__ __volatile__( \ | 211 | __asm__ __volatile__( \ |
212 | ".set\tmips32\n\t" \ | 212 | ".set\tmips32\n\t" \ |
213 | "mtc2\t%z0, " #reg ", " #sel "\n\t" \ | 213 | "mtc2\t%z0, " #reg ", " #sel "\n\t" \ |
214 | ".set\tmips0\n\t" \ | 214 | ".set\tmips0\n\t" \ |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/bridge.h b/arch/mips/include/asm/netlogic/xlp-hal/bridge.h index ca95133f1ad1..790f0f1e55c6 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/bridge.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/bridge.h | |||
@@ -178,9 +178,9 @@ | |||
178 | 178 | ||
179 | #define nlm_read_bridge_reg(b, r) nlm_read_reg(b, r) | 179 | #define nlm_read_bridge_reg(b, r) nlm_read_reg(b, r) |
180 | #define nlm_write_bridge_reg(b, r, v) nlm_write_reg(b, r, v) | 180 | #define nlm_write_bridge_reg(b, r, v) nlm_write_reg(b, r, v) |
181 | #define nlm_get_bridge_pcibase(node) \ | 181 | #define nlm_get_bridge_pcibase(node) \ |
182 | nlm_pcicfg_base(XLP_IO_BRIDGE_OFFSET(node)) | 182 | nlm_pcicfg_base(XLP_IO_BRIDGE_OFFSET(node)) |
183 | #define nlm_get_bridge_regbase(node) \ | 183 | #define nlm_get_bridge_regbase(node) \ |
184 | (nlm_get_bridge_pcibase(node) + XLP_IO_PCI_HDRSZ) | 184 | (nlm_get_bridge_pcibase(node) + XLP_IO_PCI_HDRSZ) |
185 | 185 | ||
186 | #endif /* __ASSEMBLY__ */ | 186 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/iomap.h b/arch/mips/include/asm/netlogic/xlp-hal/iomap.h index 2c63f9754640..9fac46fb7913 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/iomap.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/iomap.h | |||
@@ -35,12 +35,12 @@ | |||
35 | #ifndef __NLM_HAL_IOMAP_H__ | 35 | #ifndef __NLM_HAL_IOMAP_H__ |
36 | #define __NLM_HAL_IOMAP_H__ | 36 | #define __NLM_HAL_IOMAP_H__ |
37 | 37 | ||
38 | #define XLP_DEFAULT_IO_BASE 0x18000000 | 38 | #define XLP_DEFAULT_IO_BASE 0x18000000 |
39 | #define XLP_DEFAULT_PCI_ECFG_BASE XLP_DEFAULT_IO_BASE | 39 | #define XLP_DEFAULT_PCI_ECFG_BASE XLP_DEFAULT_IO_BASE |
40 | #define XLP_DEFAULT_PCI_CFG_BASE 0x1c000000 | 40 | #define XLP_DEFAULT_PCI_CFG_BASE 0x1c000000 |
41 | 41 | ||
42 | #define NMI_BASE 0xbfc00000 | 42 | #define NMI_BASE 0xbfc00000 |
43 | #define XLP_IO_CLK 133333333 | 43 | #define XLP_IO_CLK 133333333 |
44 | 44 | ||
45 | #define XLP_PCIE_CFG_SIZE 0x1000 /* 4K */ | 45 | #define XLP_PCIE_CFG_SIZE 0x1000 /* 4K */ |
46 | #define XLP_PCIE_DEV_BLK_SIZE (8 * XLP_PCIE_CFG_SIZE) | 46 | #define XLP_PCIE_DEV_BLK_SIZE (8 * XLP_PCIE_CFG_SIZE) |
@@ -96,8 +96,8 @@ | |||
96 | #define XLP_IO_NAND_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 1) | 96 | #define XLP_IO_NAND_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 1) |
97 | #define XLP_IO_SPI_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 2) | 97 | #define XLP_IO_SPI_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 2) |
98 | /* SD flash */ | 98 | /* SD flash */ |
99 | #define XLP_IO_SD_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 3) | 99 | #define XLP_IO_SD_OFFSET(node) XLP_HDR_OFFSET(node, 0, 7, 3) |
100 | #define XLP_IO_MMC_OFFSET(node, slot) \ | 100 | #define XLP_IO_MMC_OFFSET(node, slot) \ |
101 | ((XLP_IO_SD_OFFSET(node))+(slot*0x100)+XLP_IO_PCI_HDRSZ) | 101 | ((XLP_IO_SD_OFFSET(node))+(slot*0x100)+XLP_IO_PCI_HDRSZ) |
102 | 102 | ||
103 | /* PCI config header register id's */ | 103 | /* PCI config header register id's */ |
@@ -125,26 +125,26 @@ | |||
125 | #define XLP_PCI_SBB_WT_REG 0x3f | 125 | #define XLP_PCI_SBB_WT_REG 0x3f |
126 | 126 | ||
127 | /* PCI IDs for SoC device */ | 127 | /* PCI IDs for SoC device */ |
128 | #define PCI_VENDOR_NETLOGIC 0x184e | 128 | #define PCI_VENDOR_NETLOGIC 0x184e |
129 | 129 | ||
130 | #define PCI_DEVICE_ID_NLM_ROOT 0x1001 | 130 | #define PCI_DEVICE_ID_NLM_ROOT 0x1001 |
131 | #define PCI_DEVICE_ID_NLM_ICI 0x1002 | 131 | #define PCI_DEVICE_ID_NLM_ICI 0x1002 |
132 | #define PCI_DEVICE_ID_NLM_PIC 0x1003 | 132 | #define PCI_DEVICE_ID_NLM_PIC 0x1003 |
133 | #define PCI_DEVICE_ID_NLM_PCIE 0x1004 | 133 | #define PCI_DEVICE_ID_NLM_PCIE 0x1004 |
134 | #define PCI_DEVICE_ID_NLM_EHCI 0x1007 | 134 | #define PCI_DEVICE_ID_NLM_EHCI 0x1007 |
135 | #define PCI_DEVICE_ID_NLM_OHCI 0x1008 | 135 | #define PCI_DEVICE_ID_NLM_OHCI 0x1008 |
136 | #define PCI_DEVICE_ID_NLM_NAE 0x1009 | 136 | #define PCI_DEVICE_ID_NLM_NAE 0x1009 |
137 | #define PCI_DEVICE_ID_NLM_POE 0x100A | 137 | #define PCI_DEVICE_ID_NLM_POE 0x100A |
138 | #define PCI_DEVICE_ID_NLM_FMN 0x100B | 138 | #define PCI_DEVICE_ID_NLM_FMN 0x100B |
139 | #define PCI_DEVICE_ID_NLM_RAID 0x100D | 139 | #define PCI_DEVICE_ID_NLM_RAID 0x100D |
140 | #define PCI_DEVICE_ID_NLM_SAE 0x100D | 140 | #define PCI_DEVICE_ID_NLM_SAE 0x100D |
141 | #define PCI_DEVICE_ID_NLM_RSA 0x100E | 141 | #define PCI_DEVICE_ID_NLM_RSA 0x100E |
142 | #define PCI_DEVICE_ID_NLM_CMP 0x100F | 142 | #define PCI_DEVICE_ID_NLM_CMP 0x100F |
143 | #define PCI_DEVICE_ID_NLM_UART 0x1010 | 143 | #define PCI_DEVICE_ID_NLM_UART 0x1010 |
144 | #define PCI_DEVICE_ID_NLM_I2C 0x1011 | 144 | #define PCI_DEVICE_ID_NLM_I2C 0x1011 |
145 | #define PCI_DEVICE_ID_NLM_NOR 0x1015 | 145 | #define PCI_DEVICE_ID_NLM_NOR 0x1015 |
146 | #define PCI_DEVICE_ID_NLM_NAND 0x1016 | 146 | #define PCI_DEVICE_ID_NLM_NAND 0x1016 |
147 | #define PCI_DEVICE_ID_NLM_MMC 0x1018 | 147 | #define PCI_DEVICE_ID_NLM_MMC 0x1018 |
148 | 148 | ||
149 | #ifndef __ASSEMBLY__ | 149 | #ifndef __ASSEMBLY__ |
150 | 150 | ||
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h b/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h index 66c323d1bd7d..b559cb9f56ea 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/pcibus.h | |||
@@ -33,42 +33,42 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #ifndef __NLM_HAL_PCIBUS_H__ | 35 | #ifndef __NLM_HAL_PCIBUS_H__ |
36 | #define __NLM_HAL_PCIBUS_H__ | 36 | #define __NLM_HAL_PCIBUS_H__ |
37 | 37 | ||
38 | /* PCIE Memory and IO regions */ | 38 | /* PCIE Memory and IO regions */ |
39 | #define PCIE_MEM_BASE 0xd0000000ULL | 39 | #define PCIE_MEM_BASE 0xd0000000ULL |
40 | #define PCIE_MEM_LIMIT 0xdfffffffULL | 40 | #define PCIE_MEM_LIMIT 0xdfffffffULL |
41 | #define PCIE_IO_BASE 0x14000000ULL | 41 | #define PCIE_IO_BASE 0x14000000ULL |
42 | #define PCIE_IO_LIMIT 0x15ffffffULL | 42 | #define PCIE_IO_LIMIT 0x15ffffffULL |
43 | 43 | ||
44 | #define PCIE_BRIDGE_CMD 0x1 | 44 | #define PCIE_BRIDGE_CMD 0x1 |
45 | #define PCIE_BRIDGE_MSI_CAP 0x14 | 45 | #define PCIE_BRIDGE_MSI_CAP 0x14 |
46 | #define PCIE_BRIDGE_MSI_ADDRL 0x15 | 46 | #define PCIE_BRIDGE_MSI_ADDRL 0x15 |
47 | #define PCIE_BRIDGE_MSI_ADDRH 0x16 | 47 | #define PCIE_BRIDGE_MSI_ADDRH 0x16 |
48 | #define PCIE_BRIDGE_MSI_DATA 0x17 | 48 | #define PCIE_BRIDGE_MSI_DATA 0x17 |
49 | 49 | ||
50 | /* XLP Global PCIE configuration space registers */ | 50 | /* XLP Global PCIE configuration space registers */ |
51 | #define PCIE_BYTE_SWAP_MEM_BASE 0x247 | 51 | #define PCIE_BYTE_SWAP_MEM_BASE 0x247 |
52 | #define PCIE_BYTE_SWAP_MEM_LIM 0x248 | 52 | #define PCIE_BYTE_SWAP_MEM_LIM 0x248 |
53 | #define PCIE_BYTE_SWAP_IO_BASE 0x249 | 53 | #define PCIE_BYTE_SWAP_IO_BASE 0x249 |
54 | #define PCIE_BYTE_SWAP_IO_LIM 0x24A | 54 | #define PCIE_BYTE_SWAP_IO_LIM 0x24A |
55 | #define PCIE_MSI_STATUS 0x25A | 55 | #define PCIE_MSI_STATUS 0x25A |
56 | #define PCIE_MSI_EN 0x25B | 56 | #define PCIE_MSI_EN 0x25B |
57 | #define PCIE_INT_EN0 0x261 | 57 | #define PCIE_INT_EN0 0x261 |
58 | 58 | ||
59 | /* PCIE_MSI_EN */ | 59 | /* PCIE_MSI_EN */ |
60 | #define PCIE_MSI_VECTOR_INT_EN 0xFFFFFFFF | 60 | #define PCIE_MSI_VECTOR_INT_EN 0xFFFFFFFF |
61 | 61 | ||
62 | /* PCIE_INT_EN0 */ | 62 | /* PCIE_INT_EN0 */ |
63 | #define PCIE_MSI_INT_EN (1 << 9) | 63 | #define PCIE_MSI_INT_EN (1 << 9) |
64 | 64 | ||
65 | #ifndef __ASSEMBLY__ | 65 | #ifndef __ASSEMBLY__ |
66 | 66 | ||
67 | #define nlm_read_pcie_reg(b, r) nlm_read_reg(b, r) | 67 | #define nlm_read_pcie_reg(b, r) nlm_read_reg(b, r) |
68 | #define nlm_write_pcie_reg(b, r, v) nlm_write_reg(b, r, v) | 68 | #define nlm_write_pcie_reg(b, r, v) nlm_write_reg(b, r, v) |
69 | #define nlm_get_pcie_base(node, inst) \ | 69 | #define nlm_get_pcie_base(node, inst) \ |
70 | nlm_pcicfg_base(XLP_IO_PCIE_OFFSET(node, inst)) | 70 | nlm_pcicfg_base(XLP_IO_PCIE_OFFSET(node, inst)) |
71 | #define nlm_get_pcie_regbase(node, inst) \ | 71 | #define nlm_get_pcie_regbase(node, inst) \ |
72 | (nlm_get_pcie_base(node, inst) + XLP_IO_PCI_HDRSZ) | 72 | (nlm_get_pcie_base(node, inst) + XLP_IO_PCI_HDRSZ) |
73 | 73 | ||
74 | int xlp_pcie_link_irt(int link); | 74 | int xlp_pcie_link_irt(int link); |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/pic.h b/arch/mips/include/asm/netlogic/xlp-hal/pic.h index b2e53a5383ab..46ace0ca26d8 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/pic.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/pic.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define _NLM_HAL_PIC_H | 36 | #define _NLM_HAL_PIC_H |
37 | 37 | ||
38 | /* PIC Specific registers */ | 38 | /* PIC Specific registers */ |
39 | #define PIC_CTRL 0x00 | 39 | #define PIC_CTRL 0x00 |
40 | 40 | ||
41 | /* PIC control register defines */ | 41 | /* PIC control register defines */ |
42 | #define PIC_CTRL_ITV 32 /* interrupt timeout value */ | 42 | #define PIC_CTRL_ITV 32 /* interrupt timeout value */ |
@@ -71,41 +71,41 @@ | |||
71 | #define PIC_IRT_DB 16 /* Destination base */ | 71 | #define PIC_IRT_DB 16 /* Destination base */ |
72 | #define PIC_IRT_DTE 0 /* Destination thread enables */ | 72 | #define PIC_IRT_DTE 0 /* Destination thread enables */ |
73 | 73 | ||
74 | #define PIC_BYTESWAP 0x02 | 74 | #define PIC_BYTESWAP 0x02 |
75 | #define PIC_STATUS 0x04 | 75 | #define PIC_STATUS 0x04 |
76 | #define PIC_INTR_TIMEOUT 0x06 | 76 | #define PIC_INTR_TIMEOUT 0x06 |
77 | #define PIC_ICI0_INTR_TIMEOUT 0x08 | 77 | #define PIC_ICI0_INTR_TIMEOUT 0x08 |
78 | #define PIC_ICI1_INTR_TIMEOUT 0x0a | 78 | #define PIC_ICI1_INTR_TIMEOUT 0x0a |
79 | #define PIC_ICI2_INTR_TIMEOUT 0x0c | 79 | #define PIC_ICI2_INTR_TIMEOUT 0x0c |
80 | #define PIC_IPI_CTL 0x0e | 80 | #define PIC_IPI_CTL 0x0e |
81 | #define PIC_INT_ACK 0x10 | 81 | #define PIC_INT_ACK 0x10 |
82 | #define PIC_INT_PENDING0 0x12 | 82 | #define PIC_INT_PENDING0 0x12 |
83 | #define PIC_INT_PENDING1 0x14 | 83 | #define PIC_INT_PENDING1 0x14 |
84 | #define PIC_INT_PENDING2 0x16 | 84 | #define PIC_INT_PENDING2 0x16 |
85 | 85 | ||
86 | #define PIC_WDOG0_MAXVAL 0x18 | 86 | #define PIC_WDOG0_MAXVAL 0x18 |
87 | #define PIC_WDOG0_COUNT 0x1a | 87 | #define PIC_WDOG0_COUNT 0x1a |
88 | #define PIC_WDOG0_ENABLE0 0x1c | 88 | #define PIC_WDOG0_ENABLE0 0x1c |
89 | #define PIC_WDOG0_ENABLE1 0x1e | 89 | #define PIC_WDOG0_ENABLE1 0x1e |
90 | #define PIC_WDOG0_BEATCMD 0x20 | 90 | #define PIC_WDOG0_BEATCMD 0x20 |
91 | #define PIC_WDOG0_BEAT0 0x22 | 91 | #define PIC_WDOG0_BEAT0 0x22 |
92 | #define PIC_WDOG0_BEAT1 0x24 | 92 | #define PIC_WDOG0_BEAT1 0x24 |
93 | 93 | ||
94 | #define PIC_WDOG1_MAXVAL 0x26 | 94 | #define PIC_WDOG1_MAXVAL 0x26 |
95 | #define PIC_WDOG1_COUNT 0x28 | 95 | #define PIC_WDOG1_COUNT 0x28 |
96 | #define PIC_WDOG1_ENABLE0 0x2a | 96 | #define PIC_WDOG1_ENABLE0 0x2a |
97 | #define PIC_WDOG1_ENABLE1 0x2c | 97 | #define PIC_WDOG1_ENABLE1 0x2c |
98 | #define PIC_WDOG1_BEATCMD 0x2e | 98 | #define PIC_WDOG1_BEATCMD 0x2e |
99 | #define PIC_WDOG1_BEAT0 0x30 | 99 | #define PIC_WDOG1_BEAT0 0x30 |
100 | #define PIC_WDOG1_BEAT1 0x32 | 100 | #define PIC_WDOG1_BEAT1 0x32 |
101 | 101 | ||
102 | #define PIC_WDOG_MAXVAL(i) (PIC_WDOG0_MAXVAL + ((i) ? 7 : 0)) | 102 | #define PIC_WDOG_MAXVAL(i) (PIC_WDOG0_MAXVAL + ((i) ? 7 : 0)) |
103 | #define PIC_WDOG_COUNT(i) (PIC_WDOG0_COUNT + ((i) ? 7 : 0)) | 103 | #define PIC_WDOG_COUNT(i) (PIC_WDOG0_COUNT + ((i) ? 7 : 0)) |
104 | #define PIC_WDOG_ENABLE0(i) (PIC_WDOG0_ENABLE0 + ((i) ? 7 : 0)) | 104 | #define PIC_WDOG_ENABLE0(i) (PIC_WDOG0_ENABLE0 + ((i) ? 7 : 0)) |
105 | #define PIC_WDOG_ENABLE1(i) (PIC_WDOG0_ENABLE1 + ((i) ? 7 : 0)) | 105 | #define PIC_WDOG_ENABLE1(i) (PIC_WDOG0_ENABLE1 + ((i) ? 7 : 0)) |
106 | #define PIC_WDOG_BEATCMD(i) (PIC_WDOG0_BEATCMD + ((i) ? 7 : 0)) | 106 | #define PIC_WDOG_BEATCMD(i) (PIC_WDOG0_BEATCMD + ((i) ? 7 : 0)) |
107 | #define PIC_WDOG_BEAT0(i) (PIC_WDOG0_BEAT0 + ((i) ? 7 : 0)) | 107 | #define PIC_WDOG_BEAT0(i) (PIC_WDOG0_BEAT0 + ((i) ? 7 : 0)) |
108 | #define PIC_WDOG_BEAT1(i) (PIC_WDOG0_BEAT1 + ((i) ? 7 : 0)) | 108 | #define PIC_WDOG_BEAT1(i) (PIC_WDOG0_BEAT1 + ((i) ? 7 : 0)) |
109 | 109 | ||
110 | #define PIC_TIMER0_MAXVAL 0x34 | 110 | #define PIC_TIMER0_MAXVAL 0x34 |
111 | #define PIC_TIMER1_MAXVAL 0x36 | 111 | #define PIC_TIMER1_MAXVAL 0x36 |
@@ -127,28 +127,28 @@ | |||
127 | #define PIC_TIMER7_COUNT 0x52 | 127 | #define PIC_TIMER7_COUNT 0x52 |
128 | #define PIC_TIMER_COUNT(i) (PIC_TIMER0_COUNT + ((i) * 2)) | 128 | #define PIC_TIMER_COUNT(i) (PIC_TIMER0_COUNT + ((i) * 2)) |
129 | 129 | ||
130 | #define PIC_ITE0_N0_N1 0x54 | 130 | #define PIC_ITE0_N0_N1 0x54 |
131 | #define PIC_ITE1_N0_N1 0x58 | 131 | #define PIC_ITE1_N0_N1 0x58 |
132 | #define PIC_ITE2_N0_N1 0x5c | 132 | #define PIC_ITE2_N0_N1 0x5c |
133 | #define PIC_ITE3_N0_N1 0x60 | 133 | #define PIC_ITE3_N0_N1 0x60 |
134 | #define PIC_ITE4_N0_N1 0x64 | 134 | #define PIC_ITE4_N0_N1 0x64 |
135 | #define PIC_ITE5_N0_N1 0x68 | 135 | #define PIC_ITE5_N0_N1 0x68 |
136 | #define PIC_ITE6_N0_N1 0x6c | 136 | #define PIC_ITE6_N0_N1 0x6c |
137 | #define PIC_ITE7_N0_N1 0x70 | 137 | #define PIC_ITE7_N0_N1 0x70 |
138 | #define PIC_ITE_N0_N1(i) (PIC_ITE0_N0_N1 + ((i) * 4)) | 138 | #define PIC_ITE_N0_N1(i) (PIC_ITE0_N0_N1 + ((i) * 4)) |
139 | 139 | ||
140 | #define PIC_ITE0_N2_N3 0x56 | 140 | #define PIC_ITE0_N2_N3 0x56 |
141 | #define PIC_ITE1_N2_N3 0x5a | 141 | #define PIC_ITE1_N2_N3 0x5a |
142 | #define PIC_ITE2_N2_N3 0x5e | 142 | #define PIC_ITE2_N2_N3 0x5e |
143 | #define PIC_ITE3_N2_N3 0x62 | 143 | #define PIC_ITE3_N2_N3 0x62 |
144 | #define PIC_ITE4_N2_N3 0x66 | 144 | #define PIC_ITE4_N2_N3 0x66 |
145 | #define PIC_ITE5_N2_N3 0x6a | 145 | #define PIC_ITE5_N2_N3 0x6a |
146 | #define PIC_ITE6_N2_N3 0x6e | 146 | #define PIC_ITE6_N2_N3 0x6e |
147 | #define PIC_ITE7_N2_N3 0x72 | 147 | #define PIC_ITE7_N2_N3 0x72 |
148 | #define PIC_ITE_N2_N3(i) (PIC_ITE0_N2_N3 + ((i) * 4)) | 148 | #define PIC_ITE_N2_N3(i) (PIC_ITE0_N2_N3 + ((i) * 4)) |
149 | 149 | ||
150 | #define PIC_IRT0 0x74 | 150 | #define PIC_IRT0 0x74 |
151 | #define PIC_IRT(i) (PIC_IRT0 + ((i) * 2)) | 151 | #define PIC_IRT(i) (PIC_IRT0 + ((i) * 2)) |
152 | 152 | ||
153 | #define TIMER_CYCLES_MAXVAL 0xffffffffffffffffULL | 153 | #define TIMER_CYCLES_MAXVAL 0xffffffffffffffffULL |
154 | 154 | ||
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/sys.h b/arch/mips/include/asm/netlogic/xlp-hal/sys.h index 258e8cc00e99..470e52bfc061 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/sys.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/sys.h | |||
@@ -40,89 +40,89 @@ | |||
40 | * @author Netlogic Microsystems | 40 | * @author Netlogic Microsystems |
41 | * @brief HAL for System configuration registers | 41 | * @brief HAL for System configuration registers |
42 | */ | 42 | */ |
43 | #define SYS_CHIP_RESET 0x00 | 43 | #define SYS_CHIP_RESET 0x00 |
44 | #define SYS_POWER_ON_RESET_CFG 0x01 | 44 | #define SYS_POWER_ON_RESET_CFG 0x01 |
45 | #define SYS_EFUSE_DEVICE_CFG_STATUS0 0x02 | 45 | #define SYS_EFUSE_DEVICE_CFG_STATUS0 0x02 |
46 | #define SYS_EFUSE_DEVICE_CFG_STATUS1 0x03 | 46 | #define SYS_EFUSE_DEVICE_CFG_STATUS1 0x03 |
47 | #define SYS_EFUSE_DEVICE_CFG_STATUS2 0x04 | 47 | #define SYS_EFUSE_DEVICE_CFG_STATUS2 0x04 |
48 | #define SYS_EFUSE_DEVICE_CFG3 0x05 | 48 | #define SYS_EFUSE_DEVICE_CFG3 0x05 |
49 | #define SYS_EFUSE_DEVICE_CFG4 0x06 | 49 | #define SYS_EFUSE_DEVICE_CFG4 0x06 |
50 | #define SYS_EFUSE_DEVICE_CFG5 0x07 | 50 | #define SYS_EFUSE_DEVICE_CFG5 0x07 |
51 | #define SYS_EFUSE_DEVICE_CFG6 0x08 | 51 | #define SYS_EFUSE_DEVICE_CFG6 0x08 |
52 | #define SYS_EFUSE_DEVICE_CFG7 0x09 | 52 | #define SYS_EFUSE_DEVICE_CFG7 0x09 |
53 | #define SYS_PLL_CTRL 0x0a | 53 | #define SYS_PLL_CTRL 0x0a |
54 | #define SYS_CPU_RESET 0x0b | 54 | #define SYS_CPU_RESET 0x0b |
55 | #define SYS_CPU_NONCOHERENT_MODE 0x0d | 55 | #define SYS_CPU_NONCOHERENT_MODE 0x0d |
56 | #define SYS_CORE_DFS_DIS_CTRL 0x0e | 56 | #define SYS_CORE_DFS_DIS_CTRL 0x0e |
57 | #define SYS_CORE_DFS_RST_CTRL 0x0f | 57 | #define SYS_CORE_DFS_RST_CTRL 0x0f |
58 | #define SYS_CORE_DFS_BYP_CTRL 0x10 | 58 | #define SYS_CORE_DFS_BYP_CTRL 0x10 |
59 | #define SYS_CORE_DFS_PHA_CTRL 0x11 | 59 | #define SYS_CORE_DFS_PHA_CTRL 0x11 |
60 | #define SYS_CORE_DFS_DIV_INC_CTRL 0x12 | 60 | #define SYS_CORE_DFS_DIV_INC_CTRL 0x12 |
61 | #define SYS_CORE_DFS_DIV_DEC_CTRL 0x13 | 61 | #define SYS_CORE_DFS_DIV_DEC_CTRL 0x13 |
62 | #define SYS_CORE_DFS_DIV_VALUE 0x14 | 62 | #define SYS_CORE_DFS_DIV_VALUE 0x14 |
63 | #define SYS_RESET 0x15 | 63 | #define SYS_RESET 0x15 |
64 | #define SYS_DFS_DIS_CTRL 0x16 | 64 | #define SYS_DFS_DIS_CTRL 0x16 |
65 | #define SYS_DFS_RST_CTRL 0x17 | 65 | #define SYS_DFS_RST_CTRL 0x17 |
66 | #define SYS_DFS_BYP_CTRL 0x18 | 66 | #define SYS_DFS_BYP_CTRL 0x18 |
67 | #define SYS_DFS_DIV_INC_CTRL 0x19 | 67 | #define SYS_DFS_DIV_INC_CTRL 0x19 |
68 | #define SYS_DFS_DIV_DEC_CTRL 0x1a | 68 | #define SYS_DFS_DIV_DEC_CTRL 0x1a |
69 | #define SYS_DFS_DIV_VALUE0 0x1b | 69 | #define SYS_DFS_DIV_VALUE0 0x1b |
70 | #define SYS_DFS_DIV_VALUE1 0x1c | 70 | #define SYS_DFS_DIV_VALUE1 0x1c |
71 | #define SYS_SENSE_AMP_DLY 0x1d | 71 | #define SYS_SENSE_AMP_DLY 0x1d |
72 | #define SYS_SOC_SENSE_AMP_DLY 0x1e | 72 | #define SYS_SOC_SENSE_AMP_DLY 0x1e |
73 | #define SYS_CTRL0 0x1f | 73 | #define SYS_CTRL0 0x1f |
74 | #define SYS_CTRL1 0x20 | 74 | #define SYS_CTRL1 0x20 |
75 | #define SYS_TIMEOUT_BS1 0x21 | 75 | #define SYS_TIMEOUT_BS1 0x21 |
76 | #define SYS_BYTE_SWAP 0x22 | 76 | #define SYS_BYTE_SWAP 0x22 |
77 | #define SYS_VRM_VID 0x23 | 77 | #define SYS_VRM_VID 0x23 |
78 | #define SYS_PWR_RAM_CMD 0x24 | 78 | #define SYS_PWR_RAM_CMD 0x24 |
79 | #define SYS_PWR_RAM_ADDR 0x25 | 79 | #define SYS_PWR_RAM_ADDR 0x25 |
80 | #define SYS_PWR_RAM_DATA0 0x26 | 80 | #define SYS_PWR_RAM_DATA0 0x26 |
81 | #define SYS_PWR_RAM_DATA1 0x27 | 81 | #define SYS_PWR_RAM_DATA1 0x27 |
82 | #define SYS_PWR_RAM_DATA2 0x28 | 82 | #define SYS_PWR_RAM_DATA2 0x28 |
83 | #define SYS_PWR_UCODE 0x29 | 83 | #define SYS_PWR_UCODE 0x29 |
84 | #define SYS_CPU0_PWR_STATUS 0x2a | 84 | #define SYS_CPU0_PWR_STATUS 0x2a |
85 | #define SYS_CPU1_PWR_STATUS 0x2b | 85 | #define SYS_CPU1_PWR_STATUS 0x2b |
86 | #define SYS_CPU2_PWR_STATUS 0x2c | 86 | #define SYS_CPU2_PWR_STATUS 0x2c |
87 | #define SYS_CPU3_PWR_STATUS 0x2d | 87 | #define SYS_CPU3_PWR_STATUS 0x2d |
88 | #define SYS_CPU4_PWR_STATUS 0x2e | 88 | #define SYS_CPU4_PWR_STATUS 0x2e |
89 | #define SYS_CPU5_PWR_STATUS 0x2f | 89 | #define SYS_CPU5_PWR_STATUS 0x2f |
90 | #define SYS_CPU6_PWR_STATUS 0x30 | 90 | #define SYS_CPU6_PWR_STATUS 0x30 |
91 | #define SYS_CPU7_PWR_STATUS 0x31 | 91 | #define SYS_CPU7_PWR_STATUS 0x31 |
92 | #define SYS_STATUS 0x32 | 92 | #define SYS_STATUS 0x32 |
93 | #define SYS_INT_POL 0x33 | 93 | #define SYS_INT_POL 0x33 |
94 | #define SYS_INT_TYPE 0x34 | 94 | #define SYS_INT_TYPE 0x34 |
95 | #define SYS_INT_STATUS 0x35 | 95 | #define SYS_INT_STATUS 0x35 |
96 | #define SYS_INT_MASK0 0x36 | 96 | #define SYS_INT_MASK0 0x36 |
97 | #define SYS_INT_MASK1 0x37 | 97 | #define SYS_INT_MASK1 0x37 |
98 | #define SYS_UCO_S_ECC 0x38 | 98 | #define SYS_UCO_S_ECC 0x38 |
99 | #define SYS_UCO_M_ECC 0x39 | 99 | #define SYS_UCO_M_ECC 0x39 |
100 | #define SYS_UCO_ADDR 0x3a | 100 | #define SYS_UCO_ADDR 0x3a |
101 | #define SYS_UCO_INSTR 0x3b | 101 | #define SYS_UCO_INSTR 0x3b |
102 | #define SYS_MEM_BIST0 0x3c | 102 | #define SYS_MEM_BIST0 0x3c |
103 | #define SYS_MEM_BIST1 0x3d | 103 | #define SYS_MEM_BIST1 0x3d |
104 | #define SYS_MEM_BIST2 0x3e | 104 | #define SYS_MEM_BIST2 0x3e |
105 | #define SYS_MEM_BIST3 0x3f | 105 | #define SYS_MEM_BIST3 0x3f |
106 | #define SYS_MEM_BIST4 0x40 | 106 | #define SYS_MEM_BIST4 0x40 |
107 | #define SYS_MEM_BIST5 0x41 | 107 | #define SYS_MEM_BIST5 0x41 |
108 | #define SYS_MEM_BIST6 0x42 | 108 | #define SYS_MEM_BIST6 0x42 |
109 | #define SYS_MEM_BIST7 0x43 | 109 | #define SYS_MEM_BIST7 0x43 |
110 | #define SYS_MEM_BIST8 0x44 | 110 | #define SYS_MEM_BIST8 0x44 |
111 | #define SYS_MEM_BIST9 0x45 | 111 | #define SYS_MEM_BIST9 0x45 |
112 | #define SYS_MEM_BIST10 0x46 | 112 | #define SYS_MEM_BIST10 0x46 |
113 | #define SYS_MEM_BIST11 0x47 | 113 | #define SYS_MEM_BIST11 0x47 |
114 | #define SYS_MEM_BIST12 0x48 | 114 | #define SYS_MEM_BIST12 0x48 |
115 | #define SYS_SCRTCH0 0x49 | 115 | #define SYS_SCRTCH0 0x49 |
116 | #define SYS_SCRTCH1 0x4a | 116 | #define SYS_SCRTCH1 0x4a |
117 | #define SYS_SCRTCH2 0x4b | 117 | #define SYS_SCRTCH2 0x4b |
118 | #define SYS_SCRTCH3 0x4c | 118 | #define SYS_SCRTCH3 0x4c |
119 | 119 | ||
120 | #ifndef __ASSEMBLY__ | 120 | #ifndef __ASSEMBLY__ |
121 | 121 | ||
122 | #define nlm_read_sys_reg(b, r) nlm_read_reg(b, r) | 122 | #define nlm_read_sys_reg(b, r) nlm_read_reg(b, r) |
123 | #define nlm_write_sys_reg(b, r, v) nlm_write_reg(b, r, v) | 123 | #define nlm_write_sys_reg(b, r, v) nlm_write_reg(b, r, v) |
124 | #define nlm_get_sys_pcibase(node) nlm_pcicfg_base(XLP_IO_SYS_OFFSET(node)) | 124 | #define nlm_get_sys_pcibase(node) nlm_pcicfg_base(XLP_IO_SYS_OFFSET(node)) |
125 | #define nlm_get_sys_regbase(node) (nlm_get_sys_pcibase(node) + XLP_IO_PCI_HDRSZ) | 125 | #define nlm_get_sys_regbase(node) (nlm_get_sys_pcibase(node) + XLP_IO_PCI_HDRSZ) |
126 | 126 | ||
127 | #endif | 127 | #endif |
128 | #endif | 128 | #endif |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/uart.h b/arch/mips/include/asm/netlogic/xlp-hal/uart.h index 6a7046ca094d..86d16e1e6072 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/uart.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/uart.h | |||
@@ -91,8 +91,8 @@ | |||
91 | 91 | ||
92 | #if !defined(LOCORE) && !defined(__ASSEMBLY__) | 92 | #if !defined(LOCORE) && !defined(__ASSEMBLY__) |
93 | 93 | ||
94 | #define nlm_read_uart_reg(b, r) nlm_read_reg(b, r) | 94 | #define nlm_read_uart_reg(b, r) nlm_read_reg(b, r) |
95 | #define nlm_write_uart_reg(b, r, v) nlm_write_reg(b, r, v) | 95 | #define nlm_write_uart_reg(b, r, v) nlm_write_reg(b, r, v) |
96 | #define nlm_get_uart_pcibase(node, inst) \ | 96 | #define nlm_get_uart_pcibase(node, inst) \ |
97 | nlm_pcicfg_base(XLP_IO_UART_OFFSET(node, inst)) | 97 | nlm_pcicfg_base(XLP_IO_UART_OFFSET(node, inst)) |
98 | #define nlm_get_uart_regbase(node, inst) \ | 98 | #define nlm_get_uart_regbase(node, inst) \ |
diff --git a/arch/mips/include/asm/netlogic/xlr/fmn.h b/arch/mips/include/asm/netlogic/xlr/fmn.h index 68d5167c86bb..2a78929cef73 100644 --- a/arch/mips/include/asm/netlogic/xlr/fmn.h +++ b/arch/mips/include/asm/netlogic/xlr/fmn.h | |||
@@ -38,108 +38,108 @@ | |||
38 | #include <asm/netlogic/mips-extns.h> /* for COP2 access */ | 38 | #include <asm/netlogic/mips-extns.h> /* for COP2 access */ |
39 | 39 | ||
40 | /* Station IDs */ | 40 | /* Station IDs */ |
41 | #define FMN_STNID_CPU0 0x00 | 41 | #define FMN_STNID_CPU0 0x00 |
42 | #define FMN_STNID_CPU1 0x08 | 42 | #define FMN_STNID_CPU1 0x08 |
43 | #define FMN_STNID_CPU2 0x10 | 43 | #define FMN_STNID_CPU2 0x10 |
44 | #define FMN_STNID_CPU3 0x18 | 44 | #define FMN_STNID_CPU3 0x18 |
45 | #define FMN_STNID_CPU4 0x20 | 45 | #define FMN_STNID_CPU4 0x20 |
46 | #define FMN_STNID_CPU5 0x28 | 46 | #define FMN_STNID_CPU5 0x28 |
47 | #define FMN_STNID_CPU6 0x30 | 47 | #define FMN_STNID_CPU6 0x30 |
48 | #define FMN_STNID_CPU7 0x38 | 48 | #define FMN_STNID_CPU7 0x38 |
49 | 49 | ||
50 | #define FMN_STNID_XGS0_TX 64 | 50 | #define FMN_STNID_XGS0_TX 64 |
51 | #define FMN_STNID_XMAC0_00_TX 64 | 51 | #define FMN_STNID_XMAC0_00_TX 64 |
52 | #define FMN_STNID_XMAC0_01_TX 65 | 52 | #define FMN_STNID_XMAC0_01_TX 65 |
53 | #define FMN_STNID_XMAC0_02_TX 66 | 53 | #define FMN_STNID_XMAC0_02_TX 66 |
54 | #define FMN_STNID_XMAC0_03_TX 67 | 54 | #define FMN_STNID_XMAC0_03_TX 67 |
55 | #define FMN_STNID_XMAC0_04_TX 68 | 55 | #define FMN_STNID_XMAC0_04_TX 68 |
56 | #define FMN_STNID_XMAC0_05_TX 69 | 56 | #define FMN_STNID_XMAC0_05_TX 69 |
57 | #define FMN_STNID_XMAC0_06_TX 70 | 57 | #define FMN_STNID_XMAC0_06_TX 70 |
58 | #define FMN_STNID_XMAC0_07_TX 71 | 58 | #define FMN_STNID_XMAC0_07_TX 71 |
59 | #define FMN_STNID_XMAC0_08_TX 72 | 59 | #define FMN_STNID_XMAC0_08_TX 72 |
60 | #define FMN_STNID_XMAC0_09_TX 73 | 60 | #define FMN_STNID_XMAC0_09_TX 73 |
61 | #define FMN_STNID_XMAC0_10_TX 74 | 61 | #define FMN_STNID_XMAC0_10_TX 74 |
62 | #define FMN_STNID_XMAC0_11_TX 75 | 62 | #define FMN_STNID_XMAC0_11_TX 75 |
63 | #define FMN_STNID_XMAC0_12_TX 76 | 63 | #define FMN_STNID_XMAC0_12_TX 76 |
64 | #define FMN_STNID_XMAC0_13_TX 77 | 64 | #define FMN_STNID_XMAC0_13_TX 77 |
65 | #define FMN_STNID_XMAC0_14_TX 78 | 65 | #define FMN_STNID_XMAC0_14_TX 78 |
66 | #define FMN_STNID_XMAC0_15_TX 79 | 66 | #define FMN_STNID_XMAC0_15_TX 79 |
67 | 67 | ||
68 | #define FMN_STNID_XGS1_TX 80 | 68 | #define FMN_STNID_XGS1_TX 80 |
69 | #define FMN_STNID_XMAC1_00_TX 80 | 69 | #define FMN_STNID_XMAC1_00_TX 80 |
70 | #define FMN_STNID_XMAC1_01_TX 81 | 70 | #define FMN_STNID_XMAC1_01_TX 81 |
71 | #define FMN_STNID_XMAC1_02_TX 82 | 71 | #define FMN_STNID_XMAC1_02_TX 82 |
72 | #define FMN_STNID_XMAC1_03_TX 83 | 72 | #define FMN_STNID_XMAC1_03_TX 83 |
73 | #define FMN_STNID_XMAC1_04_TX 84 | 73 | #define FMN_STNID_XMAC1_04_TX 84 |
74 | #define FMN_STNID_XMAC1_05_TX 85 | 74 | #define FMN_STNID_XMAC1_05_TX 85 |
75 | #define FMN_STNID_XMAC1_06_TX 86 | 75 | #define FMN_STNID_XMAC1_06_TX 86 |
76 | #define FMN_STNID_XMAC1_07_TX 87 | 76 | #define FMN_STNID_XMAC1_07_TX 87 |
77 | #define FMN_STNID_XMAC1_08_TX 88 | 77 | #define FMN_STNID_XMAC1_08_TX 88 |
78 | #define FMN_STNID_XMAC1_09_TX 89 | 78 | #define FMN_STNID_XMAC1_09_TX 89 |
79 | #define FMN_STNID_XMAC1_10_TX 90 | 79 | #define FMN_STNID_XMAC1_10_TX 90 |
80 | #define FMN_STNID_XMAC1_11_TX 91 | 80 | #define FMN_STNID_XMAC1_11_TX 91 |
81 | #define FMN_STNID_XMAC1_12_TX 92 | 81 | #define FMN_STNID_XMAC1_12_TX 92 |
82 | #define FMN_STNID_XMAC1_13_TX 93 | 82 | #define FMN_STNID_XMAC1_13_TX 93 |
83 | #define FMN_STNID_XMAC1_14_TX 94 | 83 | #define FMN_STNID_XMAC1_14_TX 94 |
84 | #define FMN_STNID_XMAC1_15_TX 95 | 84 | #define FMN_STNID_XMAC1_15_TX 95 |
85 | 85 | ||
86 | #define FMN_STNID_GMAC 96 | 86 | #define FMN_STNID_GMAC 96 |
87 | #define FMN_STNID_GMACJFR_0 96 | 87 | #define FMN_STNID_GMACJFR_0 96 |
88 | #define FMN_STNID_GMACRFR_0 97 | 88 | #define FMN_STNID_GMACRFR_0 97 |
89 | #define FMN_STNID_GMACTX0 98 | 89 | #define FMN_STNID_GMACTX0 98 |
90 | #define FMN_STNID_GMACTX1 99 | 90 | #define FMN_STNID_GMACTX1 99 |
91 | #define FMN_STNID_GMACTX2 100 | 91 | #define FMN_STNID_GMACTX2 100 |
92 | #define FMN_STNID_GMACTX3 101 | 92 | #define FMN_STNID_GMACTX3 101 |
93 | #define FMN_STNID_GMACJFR_1 102 | 93 | #define FMN_STNID_GMACJFR_1 102 |
94 | #define FMN_STNID_GMACRFR_1 103 | 94 | #define FMN_STNID_GMACRFR_1 103 |
95 | 95 | ||
96 | #define FMN_STNID_DMA 104 | 96 | #define FMN_STNID_DMA 104 |
97 | #define FMN_STNID_DMA_0 104 | 97 | #define FMN_STNID_DMA_0 104 |
98 | #define FMN_STNID_DMA_1 105 | 98 | #define FMN_STNID_DMA_1 105 |
99 | #define FMN_STNID_DMA_2 106 | 99 | #define FMN_STNID_DMA_2 106 |
100 | #define FMN_STNID_DMA_3 107 | 100 | #define FMN_STNID_DMA_3 107 |
101 | 101 | ||
102 | #define FMN_STNID_XGS0FR 112 | 102 | #define FMN_STNID_XGS0FR 112 |
103 | #define FMN_STNID_XMAC0JFR 112 | 103 | #define FMN_STNID_XMAC0JFR 112 |
104 | #define FMN_STNID_XMAC0RFR 113 | 104 | #define FMN_STNID_XMAC0RFR 113 |
105 | 105 | ||
106 | #define FMN_STNID_XGS1FR 114 | 106 | #define FMN_STNID_XGS1FR 114 |
107 | #define FMN_STNID_XMAC1JFR 114 | 107 | #define FMN_STNID_XMAC1JFR 114 |
108 | #define FMN_STNID_XMAC1RFR 115 | 108 | #define FMN_STNID_XMAC1RFR 115 |
109 | #define FMN_STNID_SEC 120 | 109 | #define FMN_STNID_SEC 120 |
110 | #define FMN_STNID_SEC0 120 | 110 | #define FMN_STNID_SEC0 120 |
111 | #define FMN_STNID_SEC1 121 | 111 | #define FMN_STNID_SEC1 121 |
112 | #define FMN_STNID_SEC2 122 | 112 | #define FMN_STNID_SEC2 122 |
113 | #define FMN_STNID_SEC3 123 | 113 | #define FMN_STNID_SEC3 123 |
114 | #define FMN_STNID_PK0 124 | 114 | #define FMN_STNID_PK0 124 |
115 | #define FMN_STNID_SEC_RSA 124 | 115 | #define FMN_STNID_SEC_RSA 124 |
116 | #define FMN_STNID_SEC_RSVD0 125 | 116 | #define FMN_STNID_SEC_RSVD0 125 |
117 | #define FMN_STNID_SEC_RSVD1 126 | 117 | #define FMN_STNID_SEC_RSVD1 126 |
118 | #define FMN_STNID_SEC_RSVD2 127 | 118 | #define FMN_STNID_SEC_RSVD2 127 |
119 | 119 | ||
120 | #define FMN_STNID_GMAC1 80 | 120 | #define FMN_STNID_GMAC1 80 |
121 | #define FMN_STNID_GMAC1_FR_0 81 | 121 | #define FMN_STNID_GMAC1_FR_0 81 |
122 | #define FMN_STNID_GMAC1_TX0 82 | 122 | #define FMN_STNID_GMAC1_TX0 82 |
123 | #define FMN_STNID_GMAC1_TX1 83 | 123 | #define FMN_STNID_GMAC1_TX1 83 |
124 | #define FMN_STNID_GMAC1_TX2 84 | 124 | #define FMN_STNID_GMAC1_TX2 84 |
125 | #define FMN_STNID_GMAC1_TX3 85 | 125 | #define FMN_STNID_GMAC1_TX3 85 |
126 | #define FMN_STNID_GMAC1_FR_1 87 | 126 | #define FMN_STNID_GMAC1_FR_1 87 |
127 | #define FMN_STNID_GMAC0 96 | 127 | #define FMN_STNID_GMAC0 96 |
128 | #define FMN_STNID_GMAC0_FR_0 97 | 128 | #define FMN_STNID_GMAC0_FR_0 97 |
129 | #define FMN_STNID_GMAC0_TX0 98 | 129 | #define FMN_STNID_GMAC0_TX0 98 |
130 | #define FMN_STNID_GMAC0_TX1 99 | 130 | #define FMN_STNID_GMAC0_TX1 99 |
131 | #define FMN_STNID_GMAC0_TX2 100 | 131 | #define FMN_STNID_GMAC0_TX2 100 |
132 | #define FMN_STNID_GMAC0_TX3 101 | 132 | #define FMN_STNID_GMAC0_TX3 101 |
133 | #define FMN_STNID_GMAC0_FR_1 103 | 133 | #define FMN_STNID_GMAC0_FR_1 103 |
134 | #define FMN_STNID_CMP_0 108 | 134 | #define FMN_STNID_CMP_0 108 |
135 | #define FMN_STNID_CMP_1 109 | 135 | #define FMN_STNID_CMP_1 109 |
136 | #define FMN_STNID_CMP_2 110 | 136 | #define FMN_STNID_CMP_2 110 |
137 | #define FMN_STNID_CMP_3 111 | 137 | #define FMN_STNID_CMP_3 111 |
138 | #define FMN_STNID_PCIE_0 116 | 138 | #define FMN_STNID_PCIE_0 116 |
139 | #define FMN_STNID_PCIE_1 117 | 139 | #define FMN_STNID_PCIE_1 117 |
140 | #define FMN_STNID_PCIE_2 118 | 140 | #define FMN_STNID_PCIE_2 118 |
141 | #define FMN_STNID_PCIE_3 119 | 141 | #define FMN_STNID_PCIE_3 119 |
142 | #define FMN_STNID_XLS_PK0 121 | 142 | #define FMN_STNID_XLS_PK0 121 |
143 | 143 | ||
144 | #define nlm_read_c2_cc0(s) __read_32bit_c2_register($16, s) | 144 | #define nlm_read_c2_cc0(s) __read_32bit_c2_register($16, s) |
145 | #define nlm_read_c2_cc1(s) __read_32bit_c2_register($17, s) | 145 | #define nlm_read_c2_cc1(s) __read_32bit_c2_register($17, s) |
@@ -175,25 +175,25 @@ | |||
175 | #define nlm_write_c2_cc14(s, v) __write_32bit_c2_register($30, s, v) | 175 | #define nlm_write_c2_cc14(s, v) __write_32bit_c2_register($30, s, v) |
176 | #define nlm_write_c2_cc15(s, v) __write_32bit_c2_register($31, s, v) | 176 | #define nlm_write_c2_cc15(s, v) __write_32bit_c2_register($31, s, v) |
177 | 177 | ||
178 | #define nlm_read_c2_status(sel) __read_32bit_c2_register($2, 0) | 178 | #define nlm_read_c2_status(sel) __read_32bit_c2_register($2, 0) |
179 | #define nlm_read_c2_config() __read_32bit_c2_register($3, 0) | 179 | #define nlm_read_c2_config() __read_32bit_c2_register($3, 0) |
180 | #define nlm_write_c2_config(v) __write_32bit_c2_register($3, 0, v) | 180 | #define nlm_write_c2_config(v) __write_32bit_c2_register($3, 0, v) |
181 | #define nlm_read_c2_bucksize(b) __read_32bit_c2_register($4, b) | 181 | #define nlm_read_c2_bucksize(b) __read_32bit_c2_register($4, b) |
182 | #define nlm_write_c2_bucksize(b, v) __write_32bit_c2_register($4, b, v) | 182 | #define nlm_write_c2_bucksize(b, v) __write_32bit_c2_register($4, b, v) |
183 | 183 | ||
184 | #define nlm_read_c2_rx_msg0() __read_64bit_c2_register($1, 0) | 184 | #define nlm_read_c2_rx_msg0() __read_64bit_c2_register($1, 0) |
185 | #define nlm_read_c2_rx_msg1() __read_64bit_c2_register($1, 1) | 185 | #define nlm_read_c2_rx_msg1() __read_64bit_c2_register($1, 1) |
186 | #define nlm_read_c2_rx_msg2() __read_64bit_c2_register($1, 2) | 186 | #define nlm_read_c2_rx_msg2() __read_64bit_c2_register($1, 2) |
187 | #define nlm_read_c2_rx_msg3() __read_64bit_c2_register($1, 3) | 187 | #define nlm_read_c2_rx_msg3() __read_64bit_c2_register($1, 3) |
188 | 188 | ||
189 | #define nlm_write_c2_tx_msg0(v) __write_64bit_c2_register($0, 0, v) | 189 | #define nlm_write_c2_tx_msg0(v) __write_64bit_c2_register($0, 0, v) |
190 | #define nlm_write_c2_tx_msg1(v) __write_64bit_c2_register($0, 1, v) | 190 | #define nlm_write_c2_tx_msg1(v) __write_64bit_c2_register($0, 1, v) |
191 | #define nlm_write_c2_tx_msg2(v) __write_64bit_c2_register($0, 2, v) | 191 | #define nlm_write_c2_tx_msg2(v) __write_64bit_c2_register($0, 2, v) |
192 | #define nlm_write_c2_tx_msg3(v) __write_64bit_c2_register($0, 3, v) | 192 | #define nlm_write_c2_tx_msg3(v) __write_64bit_c2_register($0, 3, v) |
193 | 193 | ||
194 | #define FMN_STN_RX_QSIZE 256 | 194 | #define FMN_STN_RX_QSIZE 256 |
195 | #define FMN_NSTATIONS 128 | 195 | #define FMN_NSTATIONS 128 |
196 | #define FMN_CORE_NBUCKETS 8 | 196 | #define FMN_CORE_NBUCKETS 8 |
197 | 197 | ||
198 | static inline void nlm_msgsnd(unsigned int stid) | 198 | static inline void nlm_msgsnd(unsigned int stid) |
199 | { | 199 | { |
diff --git a/arch/mips/include/asm/netlogic/xlr/iomap.h b/arch/mips/include/asm/netlogic/xlr/iomap.h index 2e768f032e83..ff4533d6ee64 100644 --- a/arch/mips/include/asm/netlogic/xlr/iomap.h +++ b/arch/mips/include/asm/netlogic/xlr/iomap.h | |||
@@ -35,66 +35,66 @@ | |||
35 | #ifndef _ASM_NLM_IOMAP_H | 35 | #ifndef _ASM_NLM_IOMAP_H |
36 | #define _ASM_NLM_IOMAP_H | 36 | #define _ASM_NLM_IOMAP_H |
37 | 37 | ||
38 | #define DEFAULT_NETLOGIC_IO_BASE CKSEG1ADDR(0x1ef00000) | 38 | #define DEFAULT_NETLOGIC_IO_BASE CKSEG1ADDR(0x1ef00000) |
39 | #define NETLOGIC_IO_DDR2_CHN0_OFFSET 0x01000 | 39 | #define NETLOGIC_IO_DDR2_CHN0_OFFSET 0x01000 |
40 | #define NETLOGIC_IO_DDR2_CHN1_OFFSET 0x02000 | 40 | #define NETLOGIC_IO_DDR2_CHN1_OFFSET 0x02000 |
41 | #define NETLOGIC_IO_DDR2_CHN2_OFFSET 0x03000 | 41 | #define NETLOGIC_IO_DDR2_CHN2_OFFSET 0x03000 |
42 | #define NETLOGIC_IO_DDR2_CHN3_OFFSET 0x04000 | 42 | #define NETLOGIC_IO_DDR2_CHN3_OFFSET 0x04000 |
43 | #define NETLOGIC_IO_PIC_OFFSET 0x08000 | 43 | #define NETLOGIC_IO_PIC_OFFSET 0x08000 |
44 | #define NETLOGIC_IO_UART_0_OFFSET 0x14000 | 44 | #define NETLOGIC_IO_UART_0_OFFSET 0x14000 |
45 | #define NETLOGIC_IO_UART_1_OFFSET 0x15100 | 45 | #define NETLOGIC_IO_UART_1_OFFSET 0x15100 |
46 | 46 | ||
47 | #define NETLOGIC_IO_SIZE 0x1000 | 47 | #define NETLOGIC_IO_SIZE 0x1000 |
48 | 48 | ||
49 | #define NETLOGIC_IO_BRIDGE_OFFSET 0x00000 | 49 | #define NETLOGIC_IO_BRIDGE_OFFSET 0x00000 |
50 | 50 | ||
51 | #define NETLOGIC_IO_RLD2_CHN0_OFFSET 0x05000 | 51 | #define NETLOGIC_IO_RLD2_CHN0_OFFSET 0x05000 |
52 | #define NETLOGIC_IO_RLD2_CHN1_OFFSET 0x06000 | 52 | #define NETLOGIC_IO_RLD2_CHN1_OFFSET 0x06000 |
53 | 53 | ||
54 | #define NETLOGIC_IO_SRAM_OFFSET 0x07000 | 54 | #define NETLOGIC_IO_SRAM_OFFSET 0x07000 |
55 | 55 | ||
56 | #define NETLOGIC_IO_PCIX_OFFSET 0x09000 | 56 | #define NETLOGIC_IO_PCIX_OFFSET 0x09000 |
57 | #define NETLOGIC_IO_HT_OFFSET 0x0A000 | 57 | #define NETLOGIC_IO_HT_OFFSET 0x0A000 |
58 | 58 | ||
59 | #define NETLOGIC_IO_SECURITY_OFFSET 0x0B000 | 59 | #define NETLOGIC_IO_SECURITY_OFFSET 0x0B000 |
60 | 60 | ||
61 | #define NETLOGIC_IO_GMAC_0_OFFSET 0x0C000 | 61 | #define NETLOGIC_IO_GMAC_0_OFFSET 0x0C000 |
62 | #define NETLOGIC_IO_GMAC_1_OFFSET 0x0D000 | 62 | #define NETLOGIC_IO_GMAC_1_OFFSET 0x0D000 |
63 | #define NETLOGIC_IO_GMAC_2_OFFSET 0x0E000 | 63 | #define NETLOGIC_IO_GMAC_2_OFFSET 0x0E000 |
64 | #define NETLOGIC_IO_GMAC_3_OFFSET 0x0F000 | 64 | #define NETLOGIC_IO_GMAC_3_OFFSET 0x0F000 |
65 | 65 | ||
66 | /* XLS devices */ | 66 | /* XLS devices */ |
67 | #define NETLOGIC_IO_GMAC_4_OFFSET 0x20000 | 67 | #define NETLOGIC_IO_GMAC_4_OFFSET 0x20000 |
68 | #define NETLOGIC_IO_GMAC_5_OFFSET 0x21000 | 68 | #define NETLOGIC_IO_GMAC_5_OFFSET 0x21000 |
69 | #define NETLOGIC_IO_GMAC_6_OFFSET 0x22000 | 69 | #define NETLOGIC_IO_GMAC_6_OFFSET 0x22000 |
70 | #define NETLOGIC_IO_GMAC_7_OFFSET 0x23000 | 70 | #define NETLOGIC_IO_GMAC_7_OFFSET 0x23000 |
71 | 71 | ||
72 | #define NETLOGIC_IO_PCIE_0_OFFSET 0x1E000 | 72 | #define NETLOGIC_IO_PCIE_0_OFFSET 0x1E000 |
73 | #define NETLOGIC_IO_PCIE_1_OFFSET 0x1F000 | 73 | #define NETLOGIC_IO_PCIE_1_OFFSET 0x1F000 |
74 | #define NETLOGIC_IO_SRIO_0_OFFSET 0x1E000 | 74 | #define NETLOGIC_IO_SRIO_0_OFFSET 0x1E000 |
75 | #define NETLOGIC_IO_SRIO_1_OFFSET 0x1F000 | 75 | #define NETLOGIC_IO_SRIO_1_OFFSET 0x1F000 |
76 | 76 | ||
77 | #define NETLOGIC_IO_USB_0_OFFSET 0x24000 | 77 | #define NETLOGIC_IO_USB_0_OFFSET 0x24000 |
78 | #define NETLOGIC_IO_USB_1_OFFSET 0x25000 | 78 | #define NETLOGIC_IO_USB_1_OFFSET 0x25000 |
79 | 79 | ||
80 | #define NETLOGIC_IO_COMP_OFFSET 0x1D000 | 80 | #define NETLOGIC_IO_COMP_OFFSET 0x1D000 |
81 | /* end XLS devices */ | 81 | /* end XLS devices */ |
82 | 82 | ||
83 | /* XLR devices */ | 83 | /* XLR devices */ |
84 | #define NETLOGIC_IO_SPI4_0_OFFSET 0x10000 | 84 | #define NETLOGIC_IO_SPI4_0_OFFSET 0x10000 |
85 | #define NETLOGIC_IO_XGMAC_0_OFFSET 0x11000 | 85 | #define NETLOGIC_IO_XGMAC_0_OFFSET 0x11000 |
86 | #define NETLOGIC_IO_SPI4_1_OFFSET 0x12000 | 86 | #define NETLOGIC_IO_SPI4_1_OFFSET 0x12000 |
87 | #define NETLOGIC_IO_XGMAC_1_OFFSET 0x13000 | 87 | #define NETLOGIC_IO_XGMAC_1_OFFSET 0x13000 |
88 | /* end XLR devices */ | 88 | /* end XLR devices */ |
89 | 89 | ||
90 | #define NETLOGIC_IO_I2C_0_OFFSET 0x16000 | 90 | #define NETLOGIC_IO_I2C_0_OFFSET 0x16000 |
91 | #define NETLOGIC_IO_I2C_1_OFFSET 0x17000 | 91 | #define NETLOGIC_IO_I2C_1_OFFSET 0x17000 |
92 | 92 | ||
93 | #define NETLOGIC_IO_GPIO_OFFSET 0x18000 | 93 | #define NETLOGIC_IO_GPIO_OFFSET 0x18000 |
94 | #define NETLOGIC_IO_FLASH_OFFSET 0x19000 | 94 | #define NETLOGIC_IO_FLASH_OFFSET 0x19000 |
95 | #define NETLOGIC_IO_TB_OFFSET 0x1C000 | 95 | #define NETLOGIC_IO_TB_OFFSET 0x1C000 |
96 | 96 | ||
97 | #define NETLOGIC_CPLD_OFFSET KSEG1ADDR(0x1d840000) | 97 | #define NETLOGIC_CPLD_OFFSET KSEG1ADDR(0x1d840000) |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Base Address (Virtual) of the PCI Config address space | 100 | * Base Address (Virtual) of the PCI Config address space |
@@ -102,8 +102,8 @@ | |||
102 | * Config space spans 256 (num of buses) * 256 (num functions) * 256 bytes | 102 | * Config space spans 256 (num of buses) * 256 (num functions) * 256 bytes |
103 | * ie 1<<24 = 16M | 103 | * ie 1<<24 = 16M |
104 | */ | 104 | */ |
105 | #define DEFAULT_PCI_CONFIG_BASE 0x18000000 | 105 | #define DEFAULT_PCI_CONFIG_BASE 0x18000000 |
106 | #define DEFAULT_HT_TYPE0_CFG_BASE 0x16000000 | 106 | #define DEFAULT_HT_TYPE0_CFG_BASE 0x16000000 |
107 | #define DEFAULT_HT_TYPE1_CFG_BASE 0x17000000 | 107 | #define DEFAULT_HT_TYPE1_CFG_BASE 0x17000000 |
108 | 108 | ||
109 | #endif | 109 | #endif |
diff --git a/arch/mips/include/asm/netlogic/xlr/msidef.h b/arch/mips/include/asm/netlogic/xlr/msidef.h index 7e39d40be4f5..c95d18edf12f 100644 --- a/arch/mips/include/asm/netlogic/xlr/msidef.h +++ b/arch/mips/include/asm/netlogic/xlr/msidef.h | |||
@@ -45,21 +45,21 @@ | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | #define MSI_DATA_VECTOR_SHIFT 0 | 47 | #define MSI_DATA_VECTOR_SHIFT 0 |
48 | #define MSI_DATA_VECTOR_MASK 0x000000ff | 48 | #define MSI_DATA_VECTOR_MASK 0x000000ff |
49 | #define MSI_DATA_VECTOR(v) (((v) << MSI_DATA_VECTOR_SHIFT) & \ | 49 | #define MSI_DATA_VECTOR(v) (((v) << MSI_DATA_VECTOR_SHIFT) & \ |
50 | MSI_DATA_VECTOR_MASK) | 50 | MSI_DATA_VECTOR_MASK) |
51 | 51 | ||
52 | #define MSI_DATA_DELIVERY_MODE_SHIFT 8 | 52 | #define MSI_DATA_DELIVERY_MODE_SHIFT 8 |
53 | #define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_MODE_SHIFT) | 53 | #define MSI_DATA_DELIVERY_FIXED (0 << MSI_DATA_DELIVERY_MODE_SHIFT) |
54 | #define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_MODE_SHIFT) | 54 | #define MSI_DATA_DELIVERY_LOWPRI (1 << MSI_DATA_DELIVERY_MODE_SHIFT) |
55 | 55 | ||
56 | #define MSI_DATA_LEVEL_SHIFT 14 | 56 | #define MSI_DATA_LEVEL_SHIFT 14 |
57 | #define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT) | 57 | #define MSI_DATA_LEVEL_DEASSERT (0 << MSI_DATA_LEVEL_SHIFT) |
58 | #define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT) | 58 | #define MSI_DATA_LEVEL_ASSERT (1 << MSI_DATA_LEVEL_SHIFT) |
59 | 59 | ||
60 | #define MSI_DATA_TRIGGER_SHIFT 15 | 60 | #define MSI_DATA_TRIGGER_SHIFT 15 |
61 | #define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT) | 61 | #define MSI_DATA_TRIGGER_EDGE (0 << MSI_DATA_TRIGGER_SHIFT) |
62 | #define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT) | 62 | #define MSI_DATA_TRIGGER_LEVEL (1 << MSI_DATA_TRIGGER_SHIFT) |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * Shift/mask fields for msi address | 65 | * Shift/mask fields for msi address |
@@ -69,16 +69,16 @@ | |||
69 | #define MSI_ADDR_BASE_LO 0xfee00000 | 69 | #define MSI_ADDR_BASE_LO 0xfee00000 |
70 | 70 | ||
71 | #define MSI_ADDR_DEST_MODE_SHIFT 2 | 71 | #define MSI_ADDR_DEST_MODE_SHIFT 2 |
72 | #define MSI_ADDR_DEST_MODE_PHYSICAL (0 << MSI_ADDR_DEST_MODE_SHIFT) | 72 | #define MSI_ADDR_DEST_MODE_PHYSICAL (0 << MSI_ADDR_DEST_MODE_SHIFT) |
73 | #define MSI_ADDR_DEST_MODE_LOGICAL (1 << MSI_ADDR_DEST_MODE_SHIFT) | 73 | #define MSI_ADDR_DEST_MODE_LOGICAL (1 << MSI_ADDR_DEST_MODE_SHIFT) |
74 | 74 | ||
75 | #define MSI_ADDR_REDIRECTION_SHIFT 3 | 75 | #define MSI_ADDR_REDIRECTION_SHIFT 3 |
76 | #define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT) | 76 | #define MSI_ADDR_REDIRECTION_CPU (0 << MSI_ADDR_REDIRECTION_SHIFT) |
77 | #define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT) | 77 | #define MSI_ADDR_REDIRECTION_LOWPRI (1 << MSI_ADDR_REDIRECTION_SHIFT) |
78 | 78 | ||
79 | #define MSI_ADDR_DEST_ID_SHIFT 12 | 79 | #define MSI_ADDR_DEST_ID_SHIFT 12 |
80 | #define MSI_ADDR_DEST_ID_MASK 0x00ffff0 | 80 | #define MSI_ADDR_DEST_ID_MASK 0x00ffff0 |
81 | #define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \ | 81 | #define MSI_ADDR_DEST_ID(dest) (((dest) << MSI_ADDR_DEST_ID_SHIFT) & \ |
82 | MSI_ADDR_DEST_ID_MASK) | 82 | MSI_ADDR_DEST_ID_MASK) |
83 | 83 | ||
84 | #endif /* ASM_RMI_MSIDEF_H */ | 84 | #endif /* ASM_RMI_MSIDEF_H */ |
diff --git a/arch/mips/include/asm/netlogic/xlr/pic.h b/arch/mips/include/asm/netlogic/xlr/pic.h index 9a691b1f91ba..2f549453585e 100644 --- a/arch/mips/include/asm/netlogic/xlr/pic.h +++ b/arch/mips/include/asm/netlogic/xlr/pic.h | |||
@@ -116,7 +116,7 @@ | |||
116 | #define PIC_TIMER_COUNT_0_BASE 0x120 | 116 | #define PIC_TIMER_COUNT_0_BASE 0x120 |
117 | #define PIC_TIMER_COUNT_1_BASE 0x130 | 117 | #define PIC_TIMER_COUNT_1_BASE 0x130 |
118 | 118 | ||
119 | #define PIC_IRT_0(picintr) (PIC_IRT_0_BASE + (picintr)) | 119 | #define PIC_IRT_0(picintr) (PIC_IRT_0_BASE + (picintr)) |
120 | #define PIC_IRT_1(picintr) (PIC_IRT_1_BASE + (picintr)) | 120 | #define PIC_IRT_1(picintr) (PIC_IRT_1_BASE + (picintr)) |
121 | 121 | ||
122 | #define PIC_TIMER_MAXVAL_0(i) (PIC_TIMER_MAXVAL_0_BASE + (i)) | 122 | #define PIC_TIMER_MAXVAL_0(i) (PIC_TIMER_MAXVAL_0_BASE + (i)) |
@@ -130,9 +130,9 @@ | |||
130 | * 8-39. This leaves the IRQ 0-7 for cpu interrupts like | 130 | * 8-39. This leaves the IRQ 0-7 for cpu interrupts like |
131 | * count/compare and FMN | 131 | * count/compare and FMN |
132 | */ | 132 | */ |
133 | #define PIC_IRQ_BASE 8 | 133 | #define PIC_IRQ_BASE 8 |
134 | #define PIC_INTR_TO_IRQ(i) (PIC_IRQ_BASE + (i)) | 134 | #define PIC_INTR_TO_IRQ(i) (PIC_IRQ_BASE + (i)) |
135 | #define PIC_IRQ_TO_INTR(i) ((i) - PIC_IRQ_BASE) | 135 | #define PIC_IRQ_TO_INTR(i) ((i) - PIC_IRQ_BASE) |
136 | 136 | ||
137 | #define PIC_IRT_FIRST_IRQ PIC_IRQ_BASE | 137 | #define PIC_IRT_FIRST_IRQ PIC_IRQ_BASE |
138 | #define PIC_WD_IRQ PIC_INTR_TO_IRQ(PIC_IRT_WD_INDEX) | 138 | #define PIC_WD_IRQ PIC_INTR_TO_IRQ(PIC_IRT_WD_INDEX) |
@@ -168,7 +168,7 @@ | |||
168 | #define PIC_BRIDGE_AERR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_INDEX) | 168 | #define PIC_BRIDGE_AERR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_INDEX) |
169 | #define PIC_BRIDGE_BERR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_BERR_INDEX) | 169 | #define PIC_BRIDGE_BERR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_BERR_INDEX) |
170 | #define PIC_BRIDGE_TB_XLR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_TB_XLR_INDEX) | 170 | #define PIC_BRIDGE_TB_XLR_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_TB_XLR_INDEX) |
171 | #define PIC_BRIDGE_AERR_NMI_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_NMI_INDEX) | 171 | #define PIC_BRIDGE_AERR_NMI_IRQ PIC_INTR_TO_IRQ(PIC_IRT_BRIDGE_AERR_NMI_INDEX) |
172 | /* XLS defines */ | 172 | /* XLS defines */ |
173 | #define PIC_GMAC_4_IRQ PIC_INTR_TO_IRQ(PIC_IRT_GMAC4_INDEX) | 173 | #define PIC_GMAC_4_IRQ PIC_INTR_TO_IRQ(PIC_IRT_GMAC4_INDEX) |
174 | #define PIC_GMAC_5_IRQ PIC_INTR_TO_IRQ(PIC_IRT_GMAC5_INDEX) | 174 | #define PIC_GMAC_5_IRQ PIC_INTR_TO_IRQ(PIC_IRT_GMAC5_INDEX) |
diff --git a/arch/mips/include/asm/nile4.h b/arch/mips/include/asm/nile4.h index af0e51a9f68a..2e2436d0e94e 100644 --- a/arch/mips/include/asm/nile4.h +++ b/arch/mips/include/asm/nile4.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * asm-mips/nile4.h -- NEC Vrc-5074 Nile 4 definitions | 2 | * asm-mips/nile4.h -- NEC Vrc-5074 Nile 4 definitions |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> | 4 | * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> |
5 | * Sony Software Development Center Europe (SDCE), Brussels | 5 | * Sony Software Development Center Europe (SDCE), Brussels |
6 | * | 6 | * |
7 | * This file is based on the following documentation: | 7 | * This file is based on the following documentation: |
8 | * | 8 | * |
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Physical Device Address Registers (PDARs) | 20 | * Physical Device Address Registers (PDARs) |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define NILE4_SDRAM0 0x0000 /* SDRAM Bank 0 [R/W] */ | 23 | #define NILE4_SDRAM0 0x0000 /* SDRAM Bank 0 [R/W] */ |
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | 38 | ||
39 | /* | 39 | /* |
40 | * CPU Interface Registers | 40 | * CPU Interface Registers |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #define NILE4_CPUSTAT 0x0080 /* CPU Status [R/W] */ | 43 | #define NILE4_CPUSTAT 0x0080 /* CPU Status [R/W] */ |
@@ -50,7 +50,7 @@ | |||
50 | 50 | ||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Memory-Interface Registers | 53 | * Memory-Interface Registers |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #define NILE4_MEMCTRL 0x00C0 /* Memory Control */ | 56 | #define NILE4_MEMCTRL 0x00C0 /* Memory Control */ |
@@ -59,7 +59,7 @@ | |||
59 | 59 | ||
60 | 60 | ||
61 | /* | 61 | /* |
62 | * PCI-Bus Registers | 62 | * PCI-Bus Registers |
63 | */ | 63 | */ |
64 | 64 | ||
65 | #define NILE4_PCICTRL 0x00E0 /* PCI Control [R/W] */ | 65 | #define NILE4_PCICTRL 0x00E0 /* PCI Control [R/W] */ |
@@ -70,7 +70,7 @@ | |||
70 | 70 | ||
71 | 71 | ||
72 | /* | 72 | /* |
73 | * Local-Bus Registers | 73 | * Local-Bus Registers |
74 | */ | 74 | */ |
75 | 75 | ||
76 | #define NILE4_LCNFG 0x0100 /* Local Bus Configuration [R/W] */ | 76 | #define NILE4_LCNFG 0x0100 /* Local Bus Configuration [R/W] */ |
@@ -88,7 +88,7 @@ | |||
88 | 88 | ||
89 | 89 | ||
90 | /* | 90 | /* |
91 | * DMA Registers | 91 | * DMA Registers |
92 | */ | 92 | */ |
93 | 93 | ||
94 | #define NILE4_DMACTRL0 0x0180 /* DMA Control 0 [R/W] */ | 94 | #define NILE4_DMACTRL0 0x0180 /* DMA Control 0 [R/W] */ |
@@ -100,7 +100,7 @@ | |||
100 | 100 | ||
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Timer Registers | 103 | * Timer Registers |
104 | */ | 104 | */ |
105 | 105 | ||
106 | #define NILE4_T0CTRL 0x01C0 /* SDRAM Refresh Control [R/W] */ | 106 | #define NILE4_T0CTRL 0x01C0 /* SDRAM Refresh Control [R/W] */ |
@@ -114,7 +114,7 @@ | |||
114 | 114 | ||
115 | 115 | ||
116 | /* | 116 | /* |
117 | * PCI Configuration Space Registers | 117 | * PCI Configuration Space Registers |
118 | */ | 118 | */ |
119 | 119 | ||
120 | #define NILE4_PCI_BASE 0x0200 | 120 | #define NILE4_PCI_BASE 0x0200 |
@@ -153,10 +153,10 @@ | |||
153 | 153 | ||
154 | 154 | ||
155 | /* | 155 | /* |
156 | * Serial-Port Registers | 156 | * Serial-Port Registers |
157 | */ | 157 | */ |
158 | 158 | ||
159 | #define NILE4_UART_BASE 0x0300 | 159 | #define NILE4_UART_BASE 0x0300 |
160 | 160 | ||
161 | #define NILE4_UARTRBR 0x0300 /* UART Receiver Data Buffer [R] */ | 161 | #define NILE4_UARTRBR 0x0300 /* UART Receiver Data Buffer [R] */ |
162 | #define NILE4_UARTTHR 0x0300 /* UART Transmitter Data Holding [W] */ | 162 | #define NILE4_UARTTHR 0x0300 /* UART Transmitter Data Holding [W] */ |
@@ -175,7 +175,7 @@ | |||
175 | 175 | ||
176 | 176 | ||
177 | /* | 177 | /* |
178 | * Interrupt Lines | 178 | * Interrupt Lines |
179 | */ | 179 | */ |
180 | 180 | ||
181 | #define NILE4_INT_CPCE 0 /* CPU-Interface Parity-Error Interrupt */ | 181 | #define NILE4_INT_CPCE 0 /* CPU-Interface Parity-Error Interrupt */ |
@@ -185,7 +185,7 @@ | |||
185 | #define NILE4_INT_UART 4 /* UART Interrupt */ | 185 | #define NILE4_INT_UART 4 /* UART Interrupt */ |
186 | #define NILE4_INT_WDOG 5 /* Watchdog Timer Interrupt */ | 186 | #define NILE4_INT_WDOG 5 /* Watchdog Timer Interrupt */ |
187 | #define NILE4_INT_GPT 6 /* General-Purpose Timer Interrupt */ | 187 | #define NILE4_INT_GPT 6 /* General-Purpose Timer Interrupt */ |
188 | #define NILE4_INT_LBRTD 7 /* Local-Bus Ready Timer Interrupt */ | 188 | #define NILE4_INT_LBRTD 7 /* Local-Bus Ready Timer Interrupt */ |
189 | #define NILE4_INT_INTA 8 /* PCI Interrupt Signal INTA# */ | 189 | #define NILE4_INT_INTA 8 /* PCI Interrupt Signal INTA# */ |
190 | #define NILE4_INT_INTB 9 /* PCI Interrupt Signal INTB# */ | 190 | #define NILE4_INT_INTB 9 /* PCI Interrupt Signal INTB# */ |
191 | #define NILE4_INT_INTC 10 /* PCI Interrupt Signal INTC# */ | 191 | #define NILE4_INT_INTC 10 /* PCI Interrupt Signal INTC# */ |
@@ -197,7 +197,7 @@ | |||
197 | 197 | ||
198 | 198 | ||
199 | /* | 199 | /* |
200 | * Nile 4 Register Access | 200 | * Nile 4 Register Access |
201 | */ | 201 | */ |
202 | 202 | ||
203 | static inline void nile4_sync(void) | 203 | static inline void nile4_sync(void) |
@@ -247,7 +247,7 @@ static inline u8 nile4_in8(u32 offset) | |||
247 | 247 | ||
248 | 248 | ||
249 | /* | 249 | /* |
250 | * Physical Device Address Registers | 250 | * Physical Device Address Registers |
251 | */ | 251 | */ |
252 | 252 | ||
253 | extern void nile4_set_pdar(u32 pdar, u32 phys, u32 size, int width, | 253 | extern void nile4_set_pdar(u32 pdar, u32 phys, u32 size, int width, |
@@ -255,7 +255,7 @@ extern void nile4_set_pdar(u32 pdar, u32 phys, u32 size, int width, | |||
255 | 255 | ||
256 | 256 | ||
257 | /* | 257 | /* |
258 | * PCI Master Registers | 258 | * PCI Master Registers |
259 | */ | 259 | */ |
260 | 260 | ||
261 | #define NILE4_PCICMD_IACK 0 /* PCI Interrupt Acknowledge */ | 261 | #define NILE4_PCICMD_IACK 0 /* PCI Interrupt Acknowledge */ |
@@ -265,9 +265,9 @@ extern void nile4_set_pdar(u32 pdar, u32 phys, u32 size, int width, | |||
265 | 265 | ||
266 | 266 | ||
267 | /* | 267 | /* |
268 | * PCI Address Spaces | 268 | * PCI Address Spaces |
269 | * | 269 | * |
270 | * Note that these are multiplexed using PCIINIT[01]! | 270 | * Note that these are multiplexed using PCIINIT[01]! |
271 | */ | 271 | */ |
272 | 272 | ||
273 | #define NILE4_PCI_IO_BASE 0xa6000000 | 273 | #define NILE4_PCI_IO_BASE 0xa6000000 |
@@ -280,7 +280,7 @@ extern void nile4_set_pmr(u32 pmr, u32 type, u32 addr); | |||
280 | 280 | ||
281 | 281 | ||
282 | /* | 282 | /* |
283 | * Interrupt Programming | 283 | * Interrupt Programming |
284 | */ | 284 | */ |
285 | 285 | ||
286 | #define NUM_I8259_INTERRUPTS 16 | 286 | #define NUM_I8259_INTERRUPTS 16 |
diff --git a/arch/mips/include/asm/octeon/cvmx-address.h b/arch/mips/include/asm/octeon/cvmx-address.h index 3c74d826e2e6..e2d874e681f6 100644 --- a/arch/mips/include/asm/octeon/cvmx-address.h +++ b/arch/mips/include/asm/octeon/cvmx-address.h | |||
@@ -84,20 +84,20 @@ typedef enum { | |||
84 | * Octeon-I HW never interprets this X (<39:36> reserved | 84 | * Octeon-I HW never interprets this X (<39:36> reserved |
85 | * for future expansion), software should set to 0. | 85 | * for future expansion), software should set to 0. |
86 | * | 86 | * |
87 | * - 0x0 XXX0 0000 0000 to DRAM Cached | 87 | * - 0x0 XXX0 0000 0000 to DRAM Cached |
88 | * - 0x0 XXX0 0FFF FFFF | 88 | * - 0x0 XXX0 0FFF FFFF |
89 | * | 89 | * |
90 | * - 0x0 XXX0 1000 0000 to Boot Bus Uncached (Converted to 0x1 00X0 1000 0000 | 90 | * - 0x0 XXX0 1000 0000 to Boot Bus Uncached (Converted to 0x1 00X0 1000 0000 |
91 | * - 0x0 XXX0 1FFF FFFF + EJTAG to 0x1 00X0 1FFF FFFF) | 91 | * - 0x0 XXX0 1FFF FFFF + EJTAG to 0x1 00X0 1FFF FFFF) |
92 | * | 92 | * |
93 | * - 0x0 XXX0 2000 0000 to DRAM Cached | 93 | * - 0x0 XXX0 2000 0000 to DRAM Cached |
94 | * - 0x0 XXXF FFFF FFFF | 94 | * - 0x0 XXXF FFFF FFFF |
95 | * | 95 | * |
96 | * - 0x1 00X0 0000 0000 to Boot Bus Uncached | 96 | * - 0x1 00X0 0000 0000 to Boot Bus Uncached |
97 | * - 0x1 00XF FFFF FFFF | 97 | * - 0x1 00XF FFFF FFFF |
98 | * | 98 | * |
99 | * - 0x1 01X0 0000 0000 to Other NCB Uncached | 99 | * - 0x1 01X0 0000 0000 to Other NCB Uncached |
100 | * - 0x1 FFXF FFFF FFFF devices | 100 | * - 0x1 FFXF FFFF FFFF devices |
101 | * | 101 | * |
102 | * Decode of all Octeon addresses | 102 | * Decode of all Octeon addresses |
103 | */ | 103 | */ |
@@ -129,9 +129,9 @@ typedef union { | |||
129 | */ | 129 | */ |
130 | struct { | 130 | struct { |
131 | uint64_t R:2; /* CVMX_MIPS_SPACE_XKPHYS in this case */ | 131 | uint64_t R:2; /* CVMX_MIPS_SPACE_XKPHYS in this case */ |
132 | uint64_t cca:3; /* ignored by octeon */ | 132 | uint64_t cca:3; /* ignored by octeon */ |
133 | uint64_t mbz:10; | 133 | uint64_t mbz:10; |
134 | uint64_t pa:49; /* physical address */ | 134 | uint64_t pa:49; /* physical address */ |
135 | } sxkphys; | 135 | } sxkphys; |
136 | 136 | ||
137 | /* physical address */ | 137 | /* physical address */ |
@@ -253,22 +253,22 @@ typedef union { | |||
253 | #define CVMX_OCT_DID_ASX1 23ULL | 253 | #define CVMX_OCT_DID_ASX1 23ULL |
254 | #define CVMX_OCT_DID_IOB 30ULL | 254 | #define CVMX_OCT_DID_IOB 30ULL |
255 | 255 | ||
256 | #define CVMX_OCT_DID_PKT_SEND CVMX_FULL_DID(CVMX_OCT_DID_PKT, 2ULL) | 256 | #define CVMX_OCT_DID_PKT_SEND CVMX_FULL_DID(CVMX_OCT_DID_PKT, 2ULL) |
257 | #define CVMX_OCT_DID_TAG_SWTAG CVMX_FULL_DID(CVMX_OCT_DID_TAG, 0ULL) | 257 | #define CVMX_OCT_DID_TAG_SWTAG CVMX_FULL_DID(CVMX_OCT_DID_TAG, 0ULL) |
258 | #define CVMX_OCT_DID_TAG_TAG1 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 1ULL) | 258 | #define CVMX_OCT_DID_TAG_TAG1 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 1ULL) |
259 | #define CVMX_OCT_DID_TAG_TAG2 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 2ULL) | 259 | #define CVMX_OCT_DID_TAG_TAG2 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 2ULL) |
260 | #define CVMX_OCT_DID_TAG_TAG3 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 3ULL) | 260 | #define CVMX_OCT_DID_TAG_TAG3 CVMX_FULL_DID(CVMX_OCT_DID_TAG, 3ULL) |
261 | #define CVMX_OCT_DID_TAG_NULL_RD CVMX_FULL_DID(CVMX_OCT_DID_TAG, 4ULL) | 261 | #define CVMX_OCT_DID_TAG_NULL_RD CVMX_FULL_DID(CVMX_OCT_DID_TAG, 4ULL) |
262 | #define CVMX_OCT_DID_TAG_CSR CVMX_FULL_DID(CVMX_OCT_DID_TAG, 7ULL) | 262 | #define CVMX_OCT_DID_TAG_CSR CVMX_FULL_DID(CVMX_OCT_DID_TAG, 7ULL) |
263 | #define CVMX_OCT_DID_FAU_FAI CVMX_FULL_DID(CVMX_OCT_DID_IOB, 0ULL) | 263 | #define CVMX_OCT_DID_FAU_FAI CVMX_FULL_DID(CVMX_OCT_DID_IOB, 0ULL) |
264 | #define CVMX_OCT_DID_TIM_CSR CVMX_FULL_DID(CVMX_OCT_DID_TIM, 0ULL) | 264 | #define CVMX_OCT_DID_TIM_CSR CVMX_FULL_DID(CVMX_OCT_DID_TIM, 0ULL) |
265 | #define CVMX_OCT_DID_KEY_RW CVMX_FULL_DID(CVMX_OCT_DID_KEY, 0ULL) | 265 | #define CVMX_OCT_DID_KEY_RW CVMX_FULL_DID(CVMX_OCT_DID_KEY, 0ULL) |
266 | #define CVMX_OCT_DID_PCI_6 CVMX_FULL_DID(CVMX_OCT_DID_PCI, 6ULL) | 266 | #define CVMX_OCT_DID_PCI_6 CVMX_FULL_DID(CVMX_OCT_DID_PCI, 6ULL) |
267 | #define CVMX_OCT_DID_MIS_BOO CVMX_FULL_DID(CVMX_OCT_DID_MIS, 0ULL) | 267 | #define CVMX_OCT_DID_MIS_BOO CVMX_FULL_DID(CVMX_OCT_DID_MIS, 0ULL) |
268 | #define CVMX_OCT_DID_PCI_RML CVMX_FULL_DID(CVMX_OCT_DID_PCI, 0ULL) | 268 | #define CVMX_OCT_DID_PCI_RML CVMX_FULL_DID(CVMX_OCT_DID_PCI, 0ULL) |
269 | #define CVMX_OCT_DID_IPD_CSR CVMX_FULL_DID(CVMX_OCT_DID_IPD, 7ULL) | 269 | #define CVMX_OCT_DID_IPD_CSR CVMX_FULL_DID(CVMX_OCT_DID_IPD, 7ULL) |
270 | #define CVMX_OCT_DID_DFA_CSR CVMX_FULL_DID(CVMX_OCT_DID_DFA, 7ULL) | 270 | #define CVMX_OCT_DID_DFA_CSR CVMX_FULL_DID(CVMX_OCT_DID_DFA, 7ULL) |
271 | #define CVMX_OCT_DID_MIS_CSR CVMX_FULL_DID(CVMX_OCT_DID_MIS, 7ULL) | 271 | #define CVMX_OCT_DID_MIS_CSR CVMX_FULL_DID(CVMX_OCT_DID_MIS, 7ULL) |
272 | #define CVMX_OCT_DID_ZIP_CSR CVMX_FULL_DID(CVMX_OCT_DID_ZIP, 0ULL) | 272 | #define CVMX_OCT_DID_ZIP_CSR CVMX_FULL_DID(CVMX_OCT_DID_ZIP, 0ULL) |
273 | 273 | ||
274 | #endif /* __CVMX_ADDRESS_H__ */ | 274 | #endif /* __CVMX_ADDRESS_H__ */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-bootinfo.h b/arch/mips/include/asm/octeon/cvmx-bootinfo.h index 1db1dc2724cb..284fa8d773ba 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-bootinfo.h | |||
@@ -91,11 +91,11 @@ struct cvmx_bootinfo { | |||
91 | #if (CVMX_BOOTINFO_MIN_VER >= 1) | 91 | #if (CVMX_BOOTINFO_MIN_VER >= 1) |
92 | /* | 92 | /* |
93 | * Several boards support compact flash on the Octeon boot | 93 | * Several boards support compact flash on the Octeon boot |
94 | * bus. The CF memory spaces may be mapped to different | 94 | * bus. The CF memory spaces may be mapped to different |
95 | * addresses on different boards. These are the physical | 95 | * addresses on different boards. These are the physical |
96 | * addresses, so care must be taken to use the correct | 96 | * addresses, so care must be taken to use the correct |
97 | * XKPHYS/KSEG0 addressing depending on the application's | 97 | * XKPHYS/KSEG0 addressing depending on the application's |
98 | * ABI. These values will be 0 if CF is not present. | 98 | * ABI. These values will be 0 if CF is not present. |
99 | */ | 99 | */ |
100 | uint64_t compact_flash_common_base_addr; | 100 | uint64_t compact_flash_common_base_addr; |
101 | uint64_t compact_flash_attribute_base_addr; | 101 | uint64_t compact_flash_attribute_base_addr; |
@@ -131,7 +131,7 @@ struct cvmx_bootinfo { | |||
131 | #define CVMX_BOOTINFO_CFG_FLAG_NO_MAGIC (1ull << 3) | 131 | #define CVMX_BOOTINFO_CFG_FLAG_NO_MAGIC (1ull << 3) |
132 | /* This flag is set if the TLB mappings are not contained in the | 132 | /* This flag is set if the TLB mappings are not contained in the |
133 | * 0x10000000 - 0x20000000 boot bus region. */ | 133 | * 0x10000000 - 0x20000000 boot bus region. */ |
134 | #define CVMX_BOOTINFO_CFG_FLAG_OVERSIZE_TLB_MAPPING (1ull << 4) | 134 | #define CVMX_BOOTINFO_CFG_FLAG_OVERSIZE_TLB_MAPPING (1ull << 4) |
135 | #define CVMX_BOOTINFO_CFG_FLAG_BREAK (1ull << 5) | 135 | #define CVMX_BOOTINFO_CFG_FLAG_BREAK (1ull << 5) |
136 | 136 | ||
137 | #endif /* (CVMX_BOOTINFO_MAJ_VER == 1) */ | 137 | #endif /* (CVMX_BOOTINFO_MAJ_VER == 1) */ |
@@ -164,9 +164,9 @@ enum cvmx_board_types_enum { | |||
164 | CVMX_BOARD_TYPE_EBT5600 = 22, | 164 | CVMX_BOARD_TYPE_EBT5600 = 22, |
165 | CVMX_BOARD_TYPE_EBH5201 = 23, | 165 | CVMX_BOARD_TYPE_EBH5201 = 23, |
166 | CVMX_BOARD_TYPE_EBT5200 = 24, | 166 | CVMX_BOARD_TYPE_EBT5200 = 24, |
167 | CVMX_BOARD_TYPE_CB5600 = 25, | 167 | CVMX_BOARD_TYPE_CB5600 = 25, |
168 | CVMX_BOARD_TYPE_CB5601 = 26, | 168 | CVMX_BOARD_TYPE_CB5601 = 26, |
169 | CVMX_BOARD_TYPE_CB5200 = 27, | 169 | CVMX_BOARD_TYPE_CB5200 = 27, |
170 | /* Special 'generic' board type, supports many boards */ | 170 | /* Special 'generic' board type, supports many boards */ |
171 | CVMX_BOARD_TYPE_GENERIC = 28, | 171 | CVMX_BOARD_TYPE_GENERIC = 28, |
172 | CVMX_BOARD_TYPE_EBH5610 = 29, | 172 | CVMX_BOARD_TYPE_EBH5610 = 29, |
@@ -223,7 +223,7 @@ enum cvmx_board_types_enum { | |||
223 | CVMX_BOARD_TYPE_CUST_DEFINED_MAX = 20000, | 223 | CVMX_BOARD_TYPE_CUST_DEFINED_MAX = 20000, |
224 | 224 | ||
225 | /* | 225 | /* |
226 | * Set aside a range for customer private use. The SDK won't | 226 | * Set aside a range for customer private use. The SDK won't |
227 | * use any numbers in this range. | 227 | * use any numbers in this range. |
228 | */ | 228 | */ |
229 | CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001, | 229 | CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001, |
diff --git a/arch/mips/include/asm/octeon/cvmx-bootmem.h b/arch/mips/include/asm/octeon/cvmx-bootmem.h index 42db2be663f1..352f1dc2508b 100644 --- a/arch/mips/include/asm/octeon/cvmx-bootmem.h +++ b/arch/mips/include/asm/octeon/cvmx-bootmem.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #define CVMX_BOOTMEM_NUM_NAMED_BLOCKS 64 | 39 | #define CVMX_BOOTMEM_NUM_NAMED_BLOCKS 64 |
40 | 40 | ||
41 | /* minimum alignment of bootmem alloced blocks */ | 41 | /* minimum alignment of bootmem alloced blocks */ |
42 | #define CVMX_BOOTMEM_ALIGNMENT_SIZE (16ull) | 42 | #define CVMX_BOOTMEM_ALIGNMENT_SIZE (16ull) |
43 | 43 | ||
44 | /* Flags for cvmx_bootmem_phy_mem* functions */ | 44 | /* Flags for cvmx_bootmem_phy_mem* functions */ |
45 | /* Allocate from end of block instead of beginning */ | 45 | /* Allocate from end of block instead of beginning */ |
@@ -151,8 +151,8 @@ extern void *cvmx_bootmem_alloc(uint64_t size, uint64_t alignment); | |||
151 | * memory cannot be allocated at the specified address. | 151 | * memory cannot be allocated at the specified address. |
152 | * | 152 | * |
153 | * @size: Size in bytes of block to allocate | 153 | * @size: Size in bytes of block to allocate |
154 | * @address: Physical address to allocate memory at. If this memory is not | 154 | * @address: Physical address to allocate memory at. If this memory is not |
155 | * available, the allocation fails. | 155 | * available, the allocation fails. |
156 | * @alignment: Alignment required - must be power of 2 | 156 | * @alignment: Alignment required - must be power of 2 |
157 | * Returns pointer to block of memory, NULL on error | 157 | * Returns pointer to block of memory, NULL on error |
158 | */ | 158 | */ |
@@ -181,7 +181,7 @@ extern void *cvmx_bootmem_alloc_range(uint64_t size, uint64_t alignment, | |||
181 | * @name: name of block to free | 181 | * @name: name of block to free |
182 | * | 182 | * |
183 | * Returns 0 on failure, | 183 | * Returns 0 on failure, |
184 | * !0 on success | 184 | * !0 on success |
185 | */ | 185 | */ |
186 | 186 | ||
187 | 187 | ||
@@ -210,9 +210,9 @@ extern void *cvmx_bootmem_alloc_named(uint64_t size, uint64_t alignment, | |||
210 | * | 210 | * |
211 | * @size: Size in bytes of block to allocate | 211 | * @size: Size in bytes of block to allocate |
212 | * @address: Physical address to allocate memory at. If this | 212 | * @address: Physical address to allocate memory at. If this |
213 | * memory is not available, the allocation fails. | 213 | * memory is not available, the allocation fails. |
214 | * @name: name of block - must be less than CVMX_BOOTMEM_NAME_LEN | 214 | * @name: name of block - must be less than CVMX_BOOTMEM_NAME_LEN |
215 | * bytes | 215 | * bytes |
216 | * | 216 | * |
217 | * Returns a pointer to block of memory, NULL on error | 217 | * Returns a pointer to block of memory, NULL on error |
218 | */ | 218 | */ |
@@ -249,7 +249,7 @@ extern int cvmx_bootmem_free_named(char *name); | |||
249 | * @name: name of block to free | 249 | * @name: name of block to free |
250 | * | 250 | * |
251 | * Returns pointer to named block descriptor on success | 251 | * Returns pointer to named block descriptor on success |
252 | * 0 on failure | 252 | * 0 on failure |
253 | */ | 253 | */ |
254 | struct cvmx_bootmem_named_block_desc *cvmx_bootmem_find_named_block(char *name); | 254 | struct cvmx_bootmem_named_block_desc *cvmx_bootmem_find_named_block(char *name); |
255 | 255 | ||
@@ -258,20 +258,20 @@ struct cvmx_bootmem_named_block_desc *cvmx_bootmem_find_named_block(char *name); | |||
258 | * (optional) requested address and alignment. | 258 | * (optional) requested address and alignment. |
259 | * | 259 | * |
260 | * @req_size: size of region to allocate. All requests are rounded up | 260 | * @req_size: size of region to allocate. All requests are rounded up |
261 | * to be a multiple CVMX_BOOTMEM_ALIGNMENT_SIZE bytes size | 261 | * to be a multiple CVMX_BOOTMEM_ALIGNMENT_SIZE bytes size |
262 | * | 262 | * |
263 | * @address_min: Minimum address that block can occupy. | 263 | * @address_min: Minimum address that block can occupy. |
264 | * | 264 | * |
265 | * @address_max: Specifies the maximum address_min (inclusive) that | 265 | * @address_max: Specifies the maximum address_min (inclusive) that |
266 | * the allocation can use. | 266 | * the allocation can use. |
267 | * | 267 | * |
268 | * @alignment: Requested alignment of the block. If this alignment | 268 | * @alignment: Requested alignment of the block. If this alignment |
269 | * cannot be met, the allocation fails. This must be a | 269 | * cannot be met, the allocation fails. This must be a |
270 | * power of 2. (Note: Alignment of | 270 | * power of 2. (Note: Alignment of |
271 | * CVMX_BOOTMEM_ALIGNMENT_SIZE bytes is required, and | 271 | * CVMX_BOOTMEM_ALIGNMENT_SIZE bytes is required, and |
272 | * internally enforced. Requested alignments of less than | 272 | * internally enforced. Requested alignments of less than |
273 | * CVMX_BOOTMEM_ALIGNMENT_SIZE are set to | 273 | * CVMX_BOOTMEM_ALIGNMENT_SIZE are set to |
274 | * CVMX_BOOTMEM_ALIGNMENT_SIZE.) | 274 | * CVMX_BOOTMEM_ALIGNMENT_SIZE.) |
275 | * | 275 | * |
276 | * @flags: Flags to control options for the allocation. | 276 | * @flags: Flags to control options for the allocation. |
277 | * | 277 | * |
@@ -285,21 +285,21 @@ int64_t cvmx_bootmem_phy_alloc(uint64_t req_size, uint64_t address_min, | |||
285 | * Allocates a named block of physical memory from the free list, at | 285 | * Allocates a named block of physical memory from the free list, at |
286 | * (optional) requested address and alignment. | 286 | * (optional) requested address and alignment. |
287 | * | 287 | * |
288 | * @param size size of region to allocate. All requests are rounded | 288 | * @param size size of region to allocate. All requests are rounded |
289 | * up to be a multiple CVMX_BOOTMEM_ALIGNMENT_SIZE | 289 | * up to be a multiple CVMX_BOOTMEM_ALIGNMENT_SIZE |
290 | * bytes size | 290 | * bytes size |
291 | * @param min_addr Minimum address that block can occupy. | 291 | * @param min_addr Minimum address that block can occupy. |
292 | * @param max_addr Specifies the maximum address_min (inclusive) that | 292 | * @param max_addr Specifies the maximum address_min (inclusive) that |
293 | * the allocation can use. | 293 | * the allocation can use. |
294 | * @param alignment Requested alignment of the block. If this | 294 | * @param alignment Requested alignment of the block. If this |
295 | * alignment cannot be met, the allocation fails. | 295 | * alignment cannot be met, the allocation fails. |
296 | * This must be a power of 2. (Note: Alignment of | 296 | * This must be a power of 2. (Note: Alignment of |
297 | * CVMX_BOOTMEM_ALIGNMENT_SIZE bytes is required, and | 297 | * CVMX_BOOTMEM_ALIGNMENT_SIZE bytes is required, and |
298 | * internally enforced. Requested alignments of less | 298 | * internally enforced. Requested alignments of less |
299 | * than CVMX_BOOTMEM_ALIGNMENT_SIZE are set to | 299 | * than CVMX_BOOTMEM_ALIGNMENT_SIZE are set to |
300 | * CVMX_BOOTMEM_ALIGNMENT_SIZE.) | 300 | * CVMX_BOOTMEM_ALIGNMENT_SIZE.) |
301 | * @param name name to assign to named block | 301 | * @param name name to assign to named block |
302 | * @param flags Flags to control options for the allocation. | 302 | * @param flags Flags to control options for the allocation. |
303 | * | 303 | * |
304 | * @return physical address of block allocated, or -1 on failure | 304 | * @return physical address of block allocated, or -1 on failure |
305 | */ | 305 | */ |
@@ -312,14 +312,14 @@ int64_t cvmx_bootmem_phy_named_block_alloc(uint64_t size, uint64_t min_addr, | |||
312 | * Finds a named memory block by name. | 312 | * Finds a named memory block by name. |
313 | * Also used for finding an unused entry in the named block table. | 313 | * Also used for finding an unused entry in the named block table. |
314 | * | 314 | * |
315 | * @name: Name of memory block to find. If NULL pointer given, then | 315 | * @name: Name of memory block to find. If NULL pointer given, then |
316 | * finds unused descriptor, if available. | 316 | * finds unused descriptor, if available. |
317 | * | 317 | * |
318 | * @flags: Flags to control options for the allocation. | 318 | * @flags: Flags to control options for the allocation. |
319 | * | 319 | * |
320 | * Returns Pointer to memory block descriptor, NULL if not found. | 320 | * Returns Pointer to memory block descriptor, NULL if not found. |
321 | * If NULL returned when name parameter is NULL, then no memory | 321 | * If NULL returned when name parameter is NULL, then no memory |
322 | * block descriptors are available. | 322 | * block descriptors are available. |
323 | */ | 323 | */ |
324 | struct cvmx_bootmem_named_block_desc * | 324 | struct cvmx_bootmem_named_block_desc * |
325 | cvmx_bootmem_phy_named_block_find(char *name, uint32_t flags); | 325 | cvmx_bootmem_phy_named_block_find(char *name, uint32_t flags); |
@@ -331,31 +331,31 @@ cvmx_bootmem_phy_named_block_find(char *name, uint32_t flags); | |||
331 | * @flags: flags for passing options | 331 | * @flags: flags for passing options |
332 | * | 332 | * |
333 | * Returns 0 on failure | 333 | * Returns 0 on failure |
334 | * 1 on success | 334 | * 1 on success |
335 | */ | 335 | */ |
336 | int cvmx_bootmem_phy_named_block_free(char *name, uint32_t flags); | 336 | int cvmx_bootmem_phy_named_block_free(char *name, uint32_t flags); |
337 | 337 | ||
338 | /** | 338 | /** |
339 | * Frees a block to the bootmem allocator list. This must | 339 | * Frees a block to the bootmem allocator list. This must |
340 | * be used with care, as the size provided must match the size | 340 | * be used with care, as the size provided must match the size |
341 | * of the block that was allocated, or the list will become | 341 | * of the block that was allocated, or the list will become |
342 | * corrupted. | 342 | * corrupted. |
343 | * | 343 | * |
344 | * IMPORTANT: This is only intended to be used as part of named block | 344 | * IMPORTANT: This is only intended to be used as part of named block |
345 | * frees and initial population of the free memory list. | 345 | * frees and initial population of the free memory list. |
346 | * * | 346 | * * |
347 | * | 347 | * |
348 | * @phy_addr: physical address of block | 348 | * @phy_addr: physical address of block |
349 | * @size: size of block in bytes. | 349 | * @size: size of block in bytes. |
350 | * @flags: flags for passing options | 350 | * @flags: flags for passing options |
351 | * | 351 | * |
352 | * Returns 1 on success, | 352 | * Returns 1 on success, |
353 | * 0 on failure | 353 | * 0 on failure |
354 | */ | 354 | */ |
355 | int __cvmx_bootmem_phy_free(uint64_t phy_addr, uint64_t size, uint32_t flags); | 355 | int __cvmx_bootmem_phy_free(uint64_t phy_addr, uint64_t size, uint32_t flags); |
356 | 356 | ||
357 | /** | 357 | /** |
358 | * Locks the bootmem allocator. This is useful in certain situations | 358 | * Locks the bootmem allocator. This is useful in certain situations |
359 | * where multiple allocations must be made without being interrupted. | 359 | * where multiple allocations must be made without being interrupted. |
360 | * This should be used with the CVMX_BOOTMEM_FLAG_NO_LOCKING flag. | 360 | * This should be used with the CVMX_BOOTMEM_FLAG_NO_LOCKING flag. |
361 | * | 361 | * |
diff --git a/arch/mips/include/asm/octeon/cvmx-cmd-queue.h b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h index fed91125317f..024a71b2bff9 100644 --- a/arch/mips/include/asm/octeon/cvmx-cmd-queue.h +++ b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h | |||
@@ -244,33 +244,33 @@ static inline void __cvmx_cmd_queue_lock(cvmx_cmd_queue_id_t queue_id, | |||
244 | ".set noreorder\n" | 244 | ".set noreorder\n" |
245 | "1:\n" | 245 | "1:\n" |
246 | /* Atomic add one to ticket_ptr */ | 246 | /* Atomic add one to ticket_ptr */ |
247 | "ll %[my_ticket], %[ticket_ptr]\n" | 247 | "ll %[my_ticket], %[ticket_ptr]\n" |
248 | /* and store the original value */ | 248 | /* and store the original value */ |
249 | "li %[ticket], 1\n" | 249 | "li %[ticket], 1\n" |
250 | /* in my_ticket */ | 250 | /* in my_ticket */ |
251 | "baddu %[ticket], %[my_ticket]\n" | 251 | "baddu %[ticket], %[my_ticket]\n" |
252 | "sc %[ticket], %[ticket_ptr]\n" | 252 | "sc %[ticket], %[ticket_ptr]\n" |
253 | "beqz %[ticket], 1b\n" | 253 | "beqz %[ticket], 1b\n" |
254 | " nop\n" | 254 | " nop\n" |
255 | /* Load the current now_serving ticket */ | 255 | /* Load the current now_serving ticket */ |
256 | "lbu %[ticket], %[now_serving]\n" | 256 | "lbu %[ticket], %[now_serving]\n" |
257 | "2:\n" | 257 | "2:\n" |
258 | /* Jump out if now_serving == my_ticket */ | 258 | /* Jump out if now_serving == my_ticket */ |
259 | "beq %[ticket], %[my_ticket], 4f\n" | 259 | "beq %[ticket], %[my_ticket], 4f\n" |
260 | /* Find out how many tickets are in front of me */ | 260 | /* Find out how many tickets are in front of me */ |
261 | " subu %[ticket], %[my_ticket], %[ticket]\n" | 261 | " subu %[ticket], %[my_ticket], %[ticket]\n" |
262 | /* Use tickets in front of me minus one to delay */ | 262 | /* Use tickets in front of me minus one to delay */ |
263 | "subu %[ticket], 1\n" | 263 | "subu %[ticket], 1\n" |
264 | /* Delay will be ((tickets in front)-1)*32 loops */ | 264 | /* Delay will be ((tickets in front)-1)*32 loops */ |
265 | "cins %[ticket], %[ticket], 5, 7\n" | 265 | "cins %[ticket], %[ticket], 5, 7\n" |
266 | "3:\n" | 266 | "3:\n" |
267 | /* Loop here until our ticket might be up */ | 267 | /* Loop here until our ticket might be up */ |
268 | "bnez %[ticket], 3b\n" | 268 | "bnez %[ticket], 3b\n" |
269 | " subu %[ticket], 1\n" | 269 | " subu %[ticket], 1\n" |
270 | /* Jump back up to check out ticket again */ | 270 | /* Jump back up to check out ticket again */ |
271 | "b 2b\n" | 271 | "b 2b\n" |
272 | /* Load the current now_serving ticket */ | 272 | /* Load the current now_serving ticket */ |
273 | " lbu %[ticket], %[now_serving]\n" | 273 | " lbu %[ticket], %[now_serving]\n" |
274 | "4:\n" | 274 | "4:\n" |
275 | ".set pop\n" : | 275 | ".set pop\n" : |
276 | [ticket_ptr] "=m"(__cvmx_cmd_queue_state_ptr->ticket[__cvmx_cmd_queue_get_index(queue_id)]), | 276 | [ticket_ptr] "=m"(__cvmx_cmd_queue_state_ptr->ticket[__cvmx_cmd_queue_get_index(queue_id)]), |
@@ -313,9 +313,9 @@ static inline __cvmx_cmd_queue_state_t | |||
313 | * | 313 | * |
314 | * @queue_id: Hardware command queue to write to | 314 | * @queue_id: Hardware command queue to write to |
315 | * @use_locking: | 315 | * @use_locking: |
316 | * Use internal locking to ensure exclusive access for queue | 316 | * Use internal locking to ensure exclusive access for queue |
317 | * updates. If you don't use this locking you must ensure | 317 | * updates. If you don't use this locking you must ensure |
318 | * exclusivity some other way. Locking is strongly recommended. | 318 | * exclusivity some other way. Locking is strongly recommended. |
319 | * @cmd_count: Number of command words to write | 319 | * @cmd_count: Number of command words to write |
320 | * @cmds: Array of commands to write | 320 | * @cmds: Array of commands to write |
321 | * | 321 | * |
@@ -411,9 +411,9 @@ static inline cvmx_cmd_queue_result_t cvmx_cmd_queue_write(cvmx_cmd_queue_id_t | |||
411 | * | 411 | * |
412 | * @queue_id: Hardware command queue to write to | 412 | * @queue_id: Hardware command queue to write to |
413 | * @use_locking: | 413 | * @use_locking: |
414 | * Use internal locking to ensure exclusive access for queue | 414 | * Use internal locking to ensure exclusive access for queue |
415 | * updates. If you don't use this locking you must ensure | 415 | * updates. If you don't use this locking you must ensure |
416 | * exclusivity some other way. Locking is strongly recommended. | 416 | * exclusivity some other way. Locking is strongly recommended. |
417 | * @cmd1: Command | 417 | * @cmd1: Command |
418 | * @cmd2: Command | 418 | * @cmd2: Command |
419 | * | 419 | * |
@@ -510,9 +510,9 @@ static inline cvmx_cmd_queue_result_t cvmx_cmd_queue_write2(cvmx_cmd_queue_id_t | |||
510 | * | 510 | * |
511 | * @queue_id: Hardware command queue to write to | 511 | * @queue_id: Hardware command queue to write to |
512 | * @use_locking: | 512 | * @use_locking: |
513 | * Use internal locking to ensure exclusive access for queue | 513 | * Use internal locking to ensure exclusive access for queue |
514 | * updates. If you don't use this locking you must ensure | 514 | * updates. If you don't use this locking you must ensure |
515 | * exclusivity some other way. Locking is strongly recommended. | 515 | * exclusivity some other way. Locking is strongly recommended. |
516 | * @cmd1: Command | 516 | * @cmd1: Command |
517 | * @cmd2: Command | 517 | * @cmd2: Command |
518 | * @cmd3: Command | 518 | * @cmd3: Command |
diff --git a/arch/mips/include/asm/octeon/cvmx-config.h b/arch/mips/include/asm/octeon/cvmx-config.h index 26835d1b43b8..f7dd17d0dc22 100644 --- a/arch/mips/include/asm/octeon/cvmx-config.h +++ b/arch/mips/include/asm/octeon/cvmx-config.h | |||
@@ -31,13 +31,13 @@ | |||
31 | 31 | ||
32 | /* Pools in use */ | 32 | /* Pools in use */ |
33 | /* Packet buffers */ | 33 | /* Packet buffers */ |
34 | #define CVMX_FPA_PACKET_POOL (0) | 34 | #define CVMX_FPA_PACKET_POOL (0) |
35 | #define CVMX_FPA_PACKET_POOL_SIZE CVMX_FPA_POOL_0_SIZE | 35 | #define CVMX_FPA_PACKET_POOL_SIZE CVMX_FPA_POOL_0_SIZE |
36 | /* Work queue entrys */ | 36 | /* Work queue entrys */ |
37 | #define CVMX_FPA_WQE_POOL (1) | 37 | #define CVMX_FPA_WQE_POOL (1) |
38 | #define CVMX_FPA_WQE_POOL_SIZE CVMX_FPA_POOL_1_SIZE | 38 | #define CVMX_FPA_WQE_POOL_SIZE CVMX_FPA_POOL_1_SIZE |
39 | /* PKO queue command buffers */ | 39 | /* PKO queue command buffers */ |
40 | #define CVMX_FPA_OUTPUT_BUFFER_POOL (2) | 40 | #define CVMX_FPA_OUTPUT_BUFFER_POOL (2) |
41 | #define CVMX_FPA_OUTPUT_BUFFER_POOL_SIZE CVMX_FPA_POOL_2_SIZE | 41 | #define CVMX_FPA_OUTPUT_BUFFER_POOL_SIZE CVMX_FPA_POOL_2_SIZE |
42 | 42 | ||
43 | /************************* FAU allocation ********************************/ | 43 | /************************* FAU allocation ********************************/ |
@@ -45,7 +45,7 @@ | |||
45 | * in order of descending size so that all alignment constraints are | 45 | * in order of descending size so that all alignment constraints are |
46 | * automatically met. The enums are linked so that the following enum | 46 | * automatically met. The enums are linked so that the following enum |
47 | * continues allocating where the previous one left off, so the | 47 | * continues allocating where the previous one left off, so the |
48 | * numbering within each enum always starts with zero. The macros | 48 | * numbering within each enum always starts with zero. The macros |
49 | * take care of the address increment size, so the values entered | 49 | * take care of the address increment size, so the values entered |
50 | * always increase by 1. FAU registers are accessed with byte | 50 | * always increase by 1. FAU registers are accessed with byte |
51 | * addresses. | 51 | * addresses. |
@@ -90,9 +90,9 @@ typedef enum { | |||
90 | * be taken into account. | 90 | * be taken into account. |
91 | */ | 91 | */ |
92 | /* Generic scratch iobdma area */ | 92 | /* Generic scratch iobdma area */ |
93 | #define CVMX_SCR_SCRATCH (0) | 93 | #define CVMX_SCR_SCRATCH (0) |
94 | /* First location available after cvmx-config.h allocated region. */ | 94 | /* First location available after cvmx-config.h allocated region. */ |
95 | #define CVMX_SCR_REG_AVAIL_BASE (8) | 95 | #define CVMX_SCR_REG_AVAIL_BASE (8) |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * CVMX_HELPER_FIRST_MBUFF_SKIP is the number of bytes to reserve | 98 | * CVMX_HELPER_FIRST_MBUFF_SKIP is the number of bytes to reserve |
@@ -145,14 +145,14 @@ typedef enum { | |||
145 | * 1: include | 145 | * 1: include |
146 | */ | 146 | */ |
147 | #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_IP 0 | 147 | #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_IP 0 |
148 | #define CVMX_HELPER_INPUT_TAG_IPV6_DST_IP 0 | 148 | #define CVMX_HELPER_INPUT_TAG_IPV6_DST_IP 0 |
149 | #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_PORT 0 | 149 | #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_PORT 0 |
150 | #define CVMX_HELPER_INPUT_TAG_IPV6_DST_PORT 0 | 150 | #define CVMX_HELPER_INPUT_TAG_IPV6_DST_PORT 0 |
151 | #define CVMX_HELPER_INPUT_TAG_IPV6_NEXT_HEADER 0 | 151 | #define CVMX_HELPER_INPUT_TAG_IPV6_NEXT_HEADER 0 |
152 | #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_IP 0 | 152 | #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_IP 0 |
153 | #define CVMX_HELPER_INPUT_TAG_IPV4_DST_IP 0 | 153 | #define CVMX_HELPER_INPUT_TAG_IPV4_DST_IP 0 |
154 | #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_PORT 0 | 154 | #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_PORT 0 |
155 | #define CVMX_HELPER_INPUT_TAG_IPV4_DST_PORT 0 | 155 | #define CVMX_HELPER_INPUT_TAG_IPV4_DST_PORT 0 |
156 | #define CVMX_HELPER_INPUT_TAG_IPV4_PROTOCOL 0 | 156 | #define CVMX_HELPER_INPUT_TAG_IPV4_PROTOCOL 0 |
157 | #define CVMX_HELPER_INPUT_TAG_INPUT_PORT 1 | 157 | #define CVMX_HELPER_INPUT_TAG_INPUT_PORT 1 |
158 | 158 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-fau.h b/arch/mips/include/asm/octeon/cvmx-fau.h index a6939fc8ba18..ef98f7fc102f 100644 --- a/arch/mips/include/asm/octeon/cvmx-fau.h +++ b/arch/mips/include/asm/octeon/cvmx-fau.h | |||
@@ -37,13 +37,13 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define CVMX_FAU_LOAD_IO_ADDRESS cvmx_build_io_address(0x1e, 0) | 39 | #define CVMX_FAU_LOAD_IO_ADDRESS cvmx_build_io_address(0x1e, 0) |
40 | #define CVMX_FAU_BITS_SCRADDR 63, 56 | 40 | #define CVMX_FAU_BITS_SCRADDR 63, 56 |
41 | #define CVMX_FAU_BITS_LEN 55, 48 | 41 | #define CVMX_FAU_BITS_LEN 55, 48 |
42 | #define CVMX_FAU_BITS_INEVAL 35, 14 | 42 | #define CVMX_FAU_BITS_INEVAL 35, 14 |
43 | #define CVMX_FAU_BITS_TAGWAIT 13, 13 | 43 | #define CVMX_FAU_BITS_TAGWAIT 13, 13 |
44 | #define CVMX_FAU_BITS_NOADD 13, 13 | 44 | #define CVMX_FAU_BITS_NOADD 13, 13 |
45 | #define CVMX_FAU_BITS_SIZE 12, 11 | 45 | #define CVMX_FAU_BITS_SIZE 12, 11 |
46 | #define CVMX_FAU_BITS_REGISTER 10, 0 | 46 | #define CVMX_FAU_BITS_REGISTER 10, 0 |
47 | 47 | ||
48 | typedef enum { | 48 | typedef enum { |
49 | CVMX_FAU_OP_SIZE_8 = 0, | 49 | CVMX_FAU_OP_SIZE_8 = 0, |
@@ -109,11 +109,11 @@ typedef union { | |||
109 | * Builds a store I/O address for writing to the FAU | 109 | * Builds a store I/O address for writing to the FAU |
110 | * | 110 | * |
111 | * @noadd: 0 = Store value is atomically added to the current value | 111 | * @noadd: 0 = Store value is atomically added to the current value |
112 | * 1 = Store value is atomically written over the current value | 112 | * 1 = Store value is atomically written over the current value |
113 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 113 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
114 | * - Step by 2 for 16 bit access. | 114 | * - Step by 2 for 16 bit access. |
115 | * - Step by 4 for 32 bit access. | 115 | * - Step by 4 for 32 bit access. |
116 | * - Step by 8 for 64 bit access. | 116 | * - Step by 8 for 64 bit access. |
117 | * Returns Address to store for atomic update | 117 | * Returns Address to store for atomic update |
118 | */ | 118 | */ |
119 | static inline uint64_t __cvmx_fau_store_address(uint64_t noadd, uint64_t reg) | 119 | static inline uint64_t __cvmx_fau_store_address(uint64_t noadd, uint64_t reg) |
@@ -127,16 +127,16 @@ static inline uint64_t __cvmx_fau_store_address(uint64_t noadd, uint64_t reg) | |||
127 | * Builds a I/O address for accessing the FAU | 127 | * Builds a I/O address for accessing the FAU |
128 | * | 128 | * |
129 | * @tagwait: Should the atomic add wait for the current tag switch | 129 | * @tagwait: Should the atomic add wait for the current tag switch |
130 | * operation to complete. | 130 | * operation to complete. |
131 | * - 0 = Don't wait | 131 | * - 0 = Don't wait |
132 | * - 1 = Wait for tag switch to complete | 132 | * - 1 = Wait for tag switch to complete |
133 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 133 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
134 | * - Step by 2 for 16 bit access. | 134 | * - Step by 2 for 16 bit access. |
135 | * - Step by 4 for 32 bit access. | 135 | * - Step by 4 for 32 bit access. |
136 | * - Step by 8 for 64 bit access. | 136 | * - Step by 8 for 64 bit access. |
137 | * @value: Signed value to add. | 137 | * @value: Signed value to add. |
138 | * Note: When performing 32 and 64 bit access, only the low | 138 | * Note: When performing 32 and 64 bit access, only the low |
139 | * 22 bits are available. | 139 | * 22 bits are available. |
140 | * Returns Address to read from for atomic update | 140 | * Returns Address to read from for atomic update |
141 | */ | 141 | */ |
142 | static inline uint64_t __cvmx_fau_atomic_address(uint64_t tagwait, uint64_t reg, | 142 | static inline uint64_t __cvmx_fau_atomic_address(uint64_t tagwait, uint64_t reg, |
@@ -152,9 +152,9 @@ static inline uint64_t __cvmx_fau_atomic_address(uint64_t tagwait, uint64_t reg, | |||
152 | * Perform an atomic 64 bit add | 152 | * Perform an atomic 64 bit add |
153 | * | 153 | * |
154 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 154 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
155 | * - Step by 8 for 64 bit access. | 155 | * - Step by 8 for 64 bit access. |
156 | * @value: Signed value to add. | 156 | * @value: Signed value to add. |
157 | * Note: Only the low 22 bits are available. | 157 | * Note: Only the low 22 bits are available. |
158 | * Returns Value of the register before the update | 158 | * Returns Value of the register before the update |
159 | */ | 159 | */ |
160 | static inline int64_t cvmx_fau_fetch_and_add64(cvmx_fau_reg_64_t reg, | 160 | static inline int64_t cvmx_fau_fetch_and_add64(cvmx_fau_reg_64_t reg, |
@@ -167,9 +167,9 @@ static inline int64_t cvmx_fau_fetch_and_add64(cvmx_fau_reg_64_t reg, | |||
167 | * Perform an atomic 32 bit add | 167 | * Perform an atomic 32 bit add |
168 | * | 168 | * |
169 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 169 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
170 | * - Step by 4 for 32 bit access. | 170 | * - Step by 4 for 32 bit access. |
171 | * @value: Signed value to add. | 171 | * @value: Signed value to add. |
172 | * Note: Only the low 22 bits are available. | 172 | * Note: Only the low 22 bits are available. |
173 | * Returns Value of the register before the update | 173 | * Returns Value of the register before the update |
174 | */ | 174 | */ |
175 | static inline int32_t cvmx_fau_fetch_and_add32(cvmx_fau_reg_32_t reg, | 175 | static inline int32_t cvmx_fau_fetch_and_add32(cvmx_fau_reg_32_t reg, |
@@ -182,7 +182,7 @@ static inline int32_t cvmx_fau_fetch_and_add32(cvmx_fau_reg_32_t reg, | |||
182 | * Perform an atomic 16 bit add | 182 | * Perform an atomic 16 bit add |
183 | * | 183 | * |
184 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 184 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
185 | * - Step by 2 for 16 bit access. | 185 | * - Step by 2 for 16 bit access. |
186 | * @value: Signed value to add. | 186 | * @value: Signed value to add. |
187 | * Returns Value of the register before the update | 187 | * Returns Value of the register before the update |
188 | */ | 188 | */ |
@@ -209,12 +209,12 @@ static inline int8_t cvmx_fau_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) | |||
209 | * completes | 209 | * completes |
210 | * | 210 | * |
211 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 211 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
212 | * - Step by 8 for 64 bit access. | 212 | * - Step by 8 for 64 bit access. |
213 | * @value: Signed value to add. | 213 | * @value: Signed value to add. |
214 | * Note: Only the low 22 bits are available. | 214 | * Note: Only the low 22 bits are available. |
215 | * Returns If a timeout occurs, the error bit will be set. Otherwise | 215 | * Returns If a timeout occurs, the error bit will be set. Otherwise |
216 | * the value of the register before the update will be | 216 | * the value of the register before the update will be |
217 | * returned | 217 | * returned |
218 | */ | 218 | */ |
219 | static inline cvmx_fau_tagwait64_t | 219 | static inline cvmx_fau_tagwait64_t |
220 | cvmx_fau_tagwait_fetch_and_add64(cvmx_fau_reg_64_t reg, int64_t value) | 220 | cvmx_fau_tagwait_fetch_and_add64(cvmx_fau_reg_64_t reg, int64_t value) |
@@ -233,12 +233,12 @@ cvmx_fau_tagwait_fetch_and_add64(cvmx_fau_reg_64_t reg, int64_t value) | |||
233 | * completes | 233 | * completes |
234 | * | 234 | * |
235 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 235 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
236 | * - Step by 4 for 32 bit access. | 236 | * - Step by 4 for 32 bit access. |
237 | * @value: Signed value to add. | 237 | * @value: Signed value to add. |
238 | * Note: Only the low 22 bits are available. | 238 | * Note: Only the low 22 bits are available. |
239 | * Returns If a timeout occurs, the error bit will be set. Otherwise | 239 | * Returns If a timeout occurs, the error bit will be set. Otherwise |
240 | * the value of the register before the update will be | 240 | * the value of the register before the update will be |
241 | * returned | 241 | * returned |
242 | */ | 242 | */ |
243 | static inline cvmx_fau_tagwait32_t | 243 | static inline cvmx_fau_tagwait32_t |
244 | cvmx_fau_tagwait_fetch_and_add32(cvmx_fau_reg_32_t reg, int32_t value) | 244 | cvmx_fau_tagwait_fetch_and_add32(cvmx_fau_reg_32_t reg, int32_t value) |
@@ -257,11 +257,11 @@ cvmx_fau_tagwait_fetch_and_add32(cvmx_fau_reg_32_t reg, int32_t value) | |||
257 | * completes | 257 | * completes |
258 | * | 258 | * |
259 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 259 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
260 | * - Step by 2 for 16 bit access. | 260 | * - Step by 2 for 16 bit access. |
261 | * @value: Signed value to add. | 261 | * @value: Signed value to add. |
262 | * Returns If a timeout occurs, the error bit will be set. Otherwise | 262 | * Returns If a timeout occurs, the error bit will be set. Otherwise |
263 | * the value of the register before the update will be | 263 | * the value of the register before the update will be |
264 | * returned | 264 | * returned |
265 | */ | 265 | */ |
266 | static inline cvmx_fau_tagwait16_t | 266 | static inline cvmx_fau_tagwait16_t |
267 | cvmx_fau_tagwait_fetch_and_add16(cvmx_fau_reg_16_t reg, int16_t value) | 267 | cvmx_fau_tagwait_fetch_and_add16(cvmx_fau_reg_16_t reg, int16_t value) |
@@ -282,8 +282,8 @@ cvmx_fau_tagwait_fetch_and_add16(cvmx_fau_reg_16_t reg, int16_t value) | |||
282 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 282 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
283 | * @value: Signed value to add. | 283 | * @value: Signed value to add. |
284 | * Returns If a timeout occurs, the error bit will be set. Otherwise | 284 | * Returns If a timeout occurs, the error bit will be set. Otherwise |
285 | * the value of the register before the update will be | 285 | * the value of the register before the update will be |
286 | * returned | 286 | * returned |
287 | */ | 287 | */ |
288 | static inline cvmx_fau_tagwait8_t | 288 | static inline cvmx_fau_tagwait8_t |
289 | cvmx_fau_tagwait_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) | 289 | cvmx_fau_tagwait_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) |
@@ -301,21 +301,21 @@ cvmx_fau_tagwait_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) | |||
301 | * | 301 | * |
302 | * @scraddr: Scratch pad byte address to write to. Must be 8 byte aligned | 302 | * @scraddr: Scratch pad byte address to write to. Must be 8 byte aligned |
303 | * @value: Signed value to add. | 303 | * @value: Signed value to add. |
304 | * Note: When performing 32 and 64 bit access, only the low | 304 | * Note: When performing 32 and 64 bit access, only the low |
305 | * 22 bits are available. | 305 | * 22 bits are available. |
306 | * @tagwait: Should the atomic add wait for the current tag switch | 306 | * @tagwait: Should the atomic add wait for the current tag switch |
307 | * operation to complete. | 307 | * operation to complete. |
308 | * - 0 = Don't wait | 308 | * - 0 = Don't wait |
309 | * - 1 = Wait for tag switch to complete | 309 | * - 1 = Wait for tag switch to complete |
310 | * @size: The size of the operation: | 310 | * @size: The size of the operation: |
311 | * - CVMX_FAU_OP_SIZE_8 (0) = 8 bits | 311 | * - CVMX_FAU_OP_SIZE_8 (0) = 8 bits |
312 | * - CVMX_FAU_OP_SIZE_16 (1) = 16 bits | 312 | * - CVMX_FAU_OP_SIZE_16 (1) = 16 bits |
313 | * - CVMX_FAU_OP_SIZE_32 (2) = 32 bits | 313 | * - CVMX_FAU_OP_SIZE_32 (2) = 32 bits |
314 | * - CVMX_FAU_OP_SIZE_64 (3) = 64 bits | 314 | * - CVMX_FAU_OP_SIZE_64 (3) = 64 bits |
315 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 315 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
316 | * - Step by 2 for 16 bit access. | 316 | * - Step by 2 for 16 bit access. |
317 | * - Step by 4 for 32 bit access. | 317 | * - Step by 4 for 32 bit access. |
318 | * - Step by 8 for 64 bit access. | 318 | * - Step by 8 for 64 bit access. |
319 | * Returns Data to write using cvmx_send_single | 319 | * Returns Data to write using cvmx_send_single |
320 | */ | 320 | */ |
321 | static inline uint64_t __cvmx_fau_iobdma_data(uint64_t scraddr, int64_t value, | 321 | static inline uint64_t __cvmx_fau_iobdma_data(uint64_t scraddr, int64_t value, |
@@ -337,11 +337,11 @@ static inline uint64_t __cvmx_fau_iobdma_data(uint64_t scraddr, int64_t value, | |||
337 | * placed in the scratch memory at byte address scraddr. | 337 | * placed in the scratch memory at byte address scraddr. |
338 | * | 338 | * |
339 | * @scraddr: Scratch memory byte address to put response in. | 339 | * @scraddr: Scratch memory byte address to put response in. |
340 | * Must be 8 byte aligned. | 340 | * Must be 8 byte aligned. |
341 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 341 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
342 | * - Step by 8 for 64 bit access. | 342 | * - Step by 8 for 64 bit access. |
343 | * @value: Signed value to add. | 343 | * @value: Signed value to add. |
344 | * Note: Only the low 22 bits are available. | 344 | * Note: Only the low 22 bits are available. |
345 | * Returns Placed in the scratch pad register | 345 | * Returns Placed in the scratch pad register |
346 | */ | 346 | */ |
347 | static inline void cvmx_fau_async_fetch_and_add64(uint64_t scraddr, | 347 | static inline void cvmx_fau_async_fetch_and_add64(uint64_t scraddr, |
@@ -357,11 +357,11 @@ static inline void cvmx_fau_async_fetch_and_add64(uint64_t scraddr, | |||
357 | * placed in the scratch memory at byte address scraddr. | 357 | * placed in the scratch memory at byte address scraddr. |
358 | * | 358 | * |
359 | * @scraddr: Scratch memory byte address to put response in. | 359 | * @scraddr: Scratch memory byte address to put response in. |
360 | * Must be 8 byte aligned. | 360 | * Must be 8 byte aligned. |
361 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 361 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
362 | * - Step by 4 for 32 bit access. | 362 | * - Step by 4 for 32 bit access. |
363 | * @value: Signed value to add. | 363 | * @value: Signed value to add. |
364 | * Note: Only the low 22 bits are available. | 364 | * Note: Only the low 22 bits are available. |
365 | * Returns Placed in the scratch pad register | 365 | * Returns Placed in the scratch pad register |
366 | */ | 366 | */ |
367 | static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr, | 367 | static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr, |
@@ -377,9 +377,9 @@ static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr, | |||
377 | * placed in the scratch memory at byte address scraddr. | 377 | * placed in the scratch memory at byte address scraddr. |
378 | * | 378 | * |
379 | * @scraddr: Scratch memory byte address to put response in. | 379 | * @scraddr: Scratch memory byte address to put response in. |
380 | * Must be 8 byte aligned. | 380 | * Must be 8 byte aligned. |
381 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 381 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
382 | * - Step by 2 for 16 bit access. | 382 | * - Step by 2 for 16 bit access. |
383 | * @value: Signed value to add. | 383 | * @value: Signed value to add. |
384 | * Returns Placed in the scratch pad register | 384 | * Returns Placed in the scratch pad register |
385 | */ | 385 | */ |
@@ -396,7 +396,7 @@ static inline void cvmx_fau_async_fetch_and_add16(uint64_t scraddr, | |||
396 | * placed in the scratch memory at byte address scraddr. | 396 | * placed in the scratch memory at byte address scraddr. |
397 | * | 397 | * |
398 | * @scraddr: Scratch memory byte address to put response in. | 398 | * @scraddr: Scratch memory byte address to put response in. |
399 | * Must be 8 byte aligned. | 399 | * Must be 8 byte aligned. |
400 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 400 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
401 | * @value: Signed value to add. | 401 | * @value: Signed value to add. |
402 | * Returns Placed in the scratch pad register | 402 | * Returns Placed in the scratch pad register |
@@ -414,14 +414,14 @@ static inline void cvmx_fau_async_fetch_and_add8(uint64_t scraddr, | |||
414 | * switch completes. | 414 | * switch completes. |
415 | * | 415 | * |
416 | * @scraddr: Scratch memory byte address to put response in. Must be | 416 | * @scraddr: Scratch memory byte address to put response in. Must be |
417 | * 8 byte aligned. If a timeout occurs, the error bit (63) | 417 | * 8 byte aligned. If a timeout occurs, the error bit (63) |
418 | * will be set. Otherwise the value of the register before | 418 | * will be set. Otherwise the value of the register before |
419 | * the update will be returned | 419 | * the update will be returned |
420 | * | 420 | * |
421 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 421 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
422 | * - Step by 8 for 64 bit access. | 422 | * - Step by 8 for 64 bit access. |
423 | * @value: Signed value to add. | 423 | * @value: Signed value to add. |
424 | * Note: Only the low 22 bits are available. | 424 | * Note: Only the low 22 bits are available. |
425 | * Returns Placed in the scratch pad register | 425 | * Returns Placed in the scratch pad register |
426 | */ | 426 | */ |
427 | static inline void cvmx_fau_async_tagwait_fetch_and_add64(uint64_t scraddr, | 427 | static inline void cvmx_fau_async_tagwait_fetch_and_add64(uint64_t scraddr, |
@@ -437,14 +437,14 @@ static inline void cvmx_fau_async_tagwait_fetch_and_add64(uint64_t scraddr, | |||
437 | * switch completes. | 437 | * switch completes. |
438 | * | 438 | * |
439 | * @scraddr: Scratch memory byte address to put response in. Must be | 439 | * @scraddr: Scratch memory byte address to put response in. Must be |
440 | * 8 byte aligned. If a timeout occurs, the error bit (63) | 440 | * 8 byte aligned. If a timeout occurs, the error bit (63) |
441 | * will be set. Otherwise the value of the register before | 441 | * will be set. Otherwise the value of the register before |
442 | * the update will be returned | 442 | * the update will be returned |
443 | * | 443 | * |
444 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 444 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
445 | * - Step by 4 for 32 bit access. | 445 | * - Step by 4 for 32 bit access. |
446 | * @value: Signed value to add. | 446 | * @value: Signed value to add. |
447 | * Note: Only the low 22 bits are available. | 447 | * Note: Only the low 22 bits are available. |
448 | * Returns Placed in the scratch pad register | 448 | * Returns Placed in the scratch pad register |
449 | */ | 449 | */ |
450 | static inline void cvmx_fau_async_tagwait_fetch_and_add32(uint64_t scraddr, | 450 | static inline void cvmx_fau_async_tagwait_fetch_and_add32(uint64_t scraddr, |
@@ -460,12 +460,12 @@ static inline void cvmx_fau_async_tagwait_fetch_and_add32(uint64_t scraddr, | |||
460 | * switch completes. | 460 | * switch completes. |
461 | * | 461 | * |
462 | * @scraddr: Scratch memory byte address to put response in. Must be | 462 | * @scraddr: Scratch memory byte address to put response in. Must be |
463 | * 8 byte aligned. If a timeout occurs, the error bit (63) | 463 | * 8 byte aligned. If a timeout occurs, the error bit (63) |
464 | * will be set. Otherwise the value of the register before | 464 | * will be set. Otherwise the value of the register before |
465 | * the update will be returned | 465 | * the update will be returned |
466 | * | 466 | * |
467 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 467 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
468 | * - Step by 2 for 16 bit access. | 468 | * - Step by 2 for 16 bit access. |
469 | * @value: Signed value to add. | 469 | * @value: Signed value to add. |
470 | * | 470 | * |
471 | * Returns Placed in the scratch pad register | 471 | * Returns Placed in the scratch pad register |
@@ -483,9 +483,9 @@ static inline void cvmx_fau_async_tagwait_fetch_and_add16(uint64_t scraddr, | |||
483 | * switch completes. | 483 | * switch completes. |
484 | * | 484 | * |
485 | * @scraddr: Scratch memory byte address to put response in. Must be | 485 | * @scraddr: Scratch memory byte address to put response in. Must be |
486 | * 8 byte aligned. If a timeout occurs, the error bit (63) | 486 | * 8 byte aligned. If a timeout occurs, the error bit (63) |
487 | * will be set. Otherwise the value of the register before | 487 | * will be set. Otherwise the value of the register before |
488 | * the update will be returned | 488 | * the update will be returned |
489 | * | 489 | * |
490 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 490 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
491 | * @value: Signed value to add. | 491 | * @value: Signed value to add. |
@@ -504,7 +504,7 @@ static inline void cvmx_fau_async_tagwait_fetch_and_add8(uint64_t scraddr, | |||
504 | * Perform an atomic 64 bit add | 504 | * Perform an atomic 64 bit add |
505 | * | 505 | * |
506 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 506 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
507 | * - Step by 8 for 64 bit access. | 507 | * - Step by 8 for 64 bit access. |
508 | * @value: Signed value to add. | 508 | * @value: Signed value to add. |
509 | */ | 509 | */ |
510 | static inline void cvmx_fau_atomic_add64(cvmx_fau_reg_64_t reg, int64_t value) | 510 | static inline void cvmx_fau_atomic_add64(cvmx_fau_reg_64_t reg, int64_t value) |
@@ -516,7 +516,7 @@ static inline void cvmx_fau_atomic_add64(cvmx_fau_reg_64_t reg, int64_t value) | |||
516 | * Perform an atomic 32 bit add | 516 | * Perform an atomic 32 bit add |
517 | * | 517 | * |
518 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 518 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
519 | * - Step by 4 for 32 bit access. | 519 | * - Step by 4 for 32 bit access. |
520 | * @value: Signed value to add. | 520 | * @value: Signed value to add. |
521 | */ | 521 | */ |
522 | static inline void cvmx_fau_atomic_add32(cvmx_fau_reg_32_t reg, int32_t value) | 522 | static inline void cvmx_fau_atomic_add32(cvmx_fau_reg_32_t reg, int32_t value) |
@@ -528,7 +528,7 @@ static inline void cvmx_fau_atomic_add32(cvmx_fau_reg_32_t reg, int32_t value) | |||
528 | * Perform an atomic 16 bit add | 528 | * Perform an atomic 16 bit add |
529 | * | 529 | * |
530 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 530 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
531 | * - Step by 2 for 16 bit access. | 531 | * - Step by 2 for 16 bit access. |
532 | * @value: Signed value to add. | 532 | * @value: Signed value to add. |
533 | */ | 533 | */ |
534 | static inline void cvmx_fau_atomic_add16(cvmx_fau_reg_16_t reg, int16_t value) | 534 | static inline void cvmx_fau_atomic_add16(cvmx_fau_reg_16_t reg, int16_t value) |
@@ -551,7 +551,7 @@ static inline void cvmx_fau_atomic_add8(cvmx_fau_reg_8_t reg, int8_t value) | |||
551 | * Perform an atomic 64 bit write | 551 | * Perform an atomic 64 bit write |
552 | * | 552 | * |
553 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 553 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
554 | * - Step by 8 for 64 bit access. | 554 | * - Step by 8 for 64 bit access. |
555 | * @value: Signed value to write. | 555 | * @value: Signed value to write. |
556 | */ | 556 | */ |
557 | static inline void cvmx_fau_atomic_write64(cvmx_fau_reg_64_t reg, int64_t value) | 557 | static inline void cvmx_fau_atomic_write64(cvmx_fau_reg_64_t reg, int64_t value) |
@@ -563,7 +563,7 @@ static inline void cvmx_fau_atomic_write64(cvmx_fau_reg_64_t reg, int64_t value) | |||
563 | * Perform an atomic 32 bit write | 563 | * Perform an atomic 32 bit write |
564 | * | 564 | * |
565 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 565 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
566 | * - Step by 4 for 32 bit access. | 566 | * - Step by 4 for 32 bit access. |
567 | * @value: Signed value to write. | 567 | * @value: Signed value to write. |
568 | */ | 568 | */ |
569 | static inline void cvmx_fau_atomic_write32(cvmx_fau_reg_32_t reg, int32_t value) | 569 | static inline void cvmx_fau_atomic_write32(cvmx_fau_reg_32_t reg, int32_t value) |
@@ -575,7 +575,7 @@ static inline void cvmx_fau_atomic_write32(cvmx_fau_reg_32_t reg, int32_t value) | |||
575 | * Perform an atomic 16 bit write | 575 | * Perform an atomic 16 bit write |
576 | * | 576 | * |
577 | * @reg: FAU atomic register to access. 0 <= reg < 2048. | 577 | * @reg: FAU atomic register to access. 0 <= reg < 2048. |
578 | * - Step by 2 for 16 bit access. | 578 | * - Step by 2 for 16 bit access. |
579 | * @value: Signed value to write. | 579 | * @value: Signed value to write. |
580 | */ | 580 | */ |
581 | static inline void cvmx_fau_atomic_write16(cvmx_fau_reg_16_t reg, int16_t value) | 581 | static inline void cvmx_fau_atomic_write16(cvmx_fau_reg_16_t reg, int16_t value) |
diff --git a/arch/mips/include/asm/octeon/cvmx-fpa.h b/arch/mips/include/asm/octeon/cvmx-fpa.h index 541a1ae02b6f..aa26a2ce5a0e 100644 --- a/arch/mips/include/asm/octeon/cvmx-fpa.h +++ b/arch/mips/include/asm/octeon/cvmx-fpa.h | |||
@@ -39,9 +39,9 @@ | |||
39 | #include <asm/octeon/cvmx-address.h> | 39 | #include <asm/octeon/cvmx-address.h> |
40 | #include <asm/octeon/cvmx-fpa-defs.h> | 40 | #include <asm/octeon/cvmx-fpa-defs.h> |
41 | 41 | ||
42 | #define CVMX_FPA_NUM_POOLS 8 | 42 | #define CVMX_FPA_NUM_POOLS 8 |
43 | #define CVMX_FPA_MIN_BLOCK_SIZE 128 | 43 | #define CVMX_FPA_MIN_BLOCK_SIZE 128 |
44 | #define CVMX_FPA_ALIGNMENT 128 | 44 | #define CVMX_FPA_ALIGNMENT 128 |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * Structure describing the data format used for stores to the FPA. | 47 | * Structure describing the data format used for stores to the FPA. |
@@ -186,8 +186,8 @@ static inline void *cvmx_fpa_alloc(uint64_t pool) | |||
186 | /** | 186 | /** |
187 | * Asynchronously get a new block from the FPA | 187 | * Asynchronously get a new block from the FPA |
188 | * | 188 | * |
189 | * @scr_addr: Local scratch address to put response in. This is a byte address, | 189 | * @scr_addr: Local scratch address to put response in. This is a byte address, |
190 | * but must be 8 byte aligned. | 190 | * but must be 8 byte aligned. |
191 | * @pool: Pool to get the block from | 191 | * @pool: Pool to get the block from |
192 | */ | 192 | */ |
193 | static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool) | 193 | static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool) |
@@ -212,7 +212,7 @@ static inline void cvmx_fpa_async_alloc(uint64_t scr_addr, uint64_t pool) | |||
212 | * @ptr: Block to free | 212 | * @ptr: Block to free |
213 | * @pool: Pool to put it in | 213 | * @pool: Pool to put it in |
214 | * @num_cache_lines: | 214 | * @num_cache_lines: |
215 | * Cache lines to invalidate | 215 | * Cache lines to invalidate |
216 | */ | 216 | */ |
217 | static inline void cvmx_fpa_free_nosync(void *ptr, uint64_t pool, | 217 | static inline void cvmx_fpa_free_nosync(void *ptr, uint64_t pool, |
218 | uint64_t num_cache_lines) | 218 | uint64_t num_cache_lines) |
@@ -234,7 +234,7 @@ static inline void cvmx_fpa_free_nosync(void *ptr, uint64_t pool, | |||
234 | * @ptr: Block to free | 234 | * @ptr: Block to free |
235 | * @pool: Pool to put it in | 235 | * @pool: Pool to put it in |
236 | * @num_cache_lines: | 236 | * @num_cache_lines: |
237 | * Cache lines to invalidate | 237 | * Cache lines to invalidate |
238 | */ | 238 | */ |
239 | static inline void cvmx_fpa_free(void *ptr, uint64_t pool, | 239 | static inline void cvmx_fpa_free(void *ptr, uint64_t pool, |
240 | uint64_t num_cache_lines) | 240 | uint64_t num_cache_lines) |
@@ -245,7 +245,7 @@ static inline void cvmx_fpa_free(void *ptr, uint64_t pool, | |||
245 | CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool)); | 245 | CVMX_ADDR_DIDSPACE(CVMX_FULL_DID(CVMX_OCT_DID_FPA, pool)); |
246 | /* | 246 | /* |
247 | * Make sure that any previous writes to memory go out before | 247 | * Make sure that any previous writes to memory go out before |
248 | * we free this buffer. This also serves as a barrier to | 248 | * we free this buffer. This also serves as a barrier to |
249 | * prevent GCC from reordering operations to after the | 249 | * prevent GCC from reordering operations to after the |
250 | * free. | 250 | * free. |
251 | */ | 251 | */ |
@@ -259,17 +259,17 @@ static inline void cvmx_fpa_free(void *ptr, uint64_t pool, | |||
259 | * This can only be called once per pool. Make sure proper | 259 | * This can only be called once per pool. Make sure proper |
260 | * locking enforces this. | 260 | * locking enforces this. |
261 | * | 261 | * |
262 | * @pool: Pool to initialize | 262 | * @pool: Pool to initialize |
263 | * 0 <= pool < 8 | 263 | * 0 <= pool < 8 |
264 | * @name: Constant character string to name this pool. | 264 | * @name: Constant character string to name this pool. |
265 | * String is not copied. | 265 | * String is not copied. |
266 | * @buffer: Pointer to the block of memory to use. This must be | 266 | * @buffer: Pointer to the block of memory to use. This must be |
267 | * accessible by all processors and external hardware. | 267 | * accessible by all processors and external hardware. |
268 | * @block_size: Size for each block controlled by the FPA | 268 | * @block_size: Size for each block controlled by the FPA |
269 | * @num_blocks: Number of blocks | 269 | * @num_blocks: Number of blocks |
270 | * | 270 | * |
271 | * Returns 0 on Success, | 271 | * Returns 0 on Success, |
272 | * -1 on failure | 272 | * -1 on failure |
273 | */ | 273 | */ |
274 | extern int cvmx_fpa_setup_pool(uint64_t pool, const char *name, void *buffer, | 274 | extern int cvmx_fpa_setup_pool(uint64_t pool, const char *name, void *buffer, |
275 | uint64_t block_size, uint64_t num_blocks); | 275 | uint64_t block_size, uint64_t num_blocks); |
@@ -282,8 +282,8 @@ extern int cvmx_fpa_setup_pool(uint64_t pool, const char *name, void *buffer, | |||
282 | * | 282 | * |
283 | * @pool: Pool to shutdown | 283 | * @pool: Pool to shutdown |
284 | * Returns Zero on success | 284 | * Returns Zero on success |
285 | * - Positive is count of missing buffers | 285 | * - Positive is count of missing buffers |
286 | * - Negative is too many buffers or corrupted pointers | 286 | * - Negative is too many buffers or corrupted pointers |
287 | */ | 287 | */ |
288 | extern uint64_t cvmx_fpa_shutdown_pool(uint64_t pool); | 288 | extern uint64_t cvmx_fpa_shutdown_pool(uint64_t pool); |
289 | 289 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-board.h b/arch/mips/include/asm/octeon/cvmx-helper-board.h index 442f508eaac9..41785dd0ddd0 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-board.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-board.h | |||
@@ -48,7 +48,7 @@ typedef enum { | |||
48 | * Fake IPD port, the RGMII/MII interface may use different PHY, use | 48 | * Fake IPD port, the RGMII/MII interface may use different PHY, use |
49 | * this macro to return appropriate MIX address to read the PHY. | 49 | * this macro to return appropriate MIX address to read the PHY. |
50 | */ | 50 | */ |
51 | #define CVMX_HELPER_BOARD_MGMT_IPD_PORT -10 | 51 | #define CVMX_HELPER_BOARD_MGMT_IPD_PORT -10 |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * cvmx_override_board_link_get(int ipd_port) is a function | 54 | * cvmx_override_board_link_get(int ipd_port) is a function |
@@ -86,10 +86,10 @@ extern int cvmx_helper_board_get_mii_address(int ipd_port); | |||
86 | * | 86 | * |
87 | * @phy_addr: The address of the PHY to program | 87 | * @phy_addr: The address of the PHY to program |
88 | * @link_flags: | 88 | * @link_flags: |
89 | * Flags to control autonegotiation. Bit 0 is autonegotiation | 89 | * Flags to control autonegotiation. Bit 0 is autonegotiation |
90 | * enable/disable to maintain backware compatibility. | 90 | * enable/disable to maintain backware compatibility. |
91 | * @link_info: Link speed to program. If the speed is zero and autonegotiation | 91 | * @link_info: Link speed to program. If the speed is zero and autonegotiation |
92 | * is enabled, all possible negotiation speeds are advertised. | 92 | * is enabled, all possible negotiation speeds are advertised. |
93 | * | 93 | * |
94 | * Returns Zero on success, negative on failure | 94 | * Returns Zero on success, negative on failure |
95 | */ | 95 | */ |
@@ -111,10 +111,10 @@ int cvmx_helper_board_link_set_phy(int phy_addr, | |||
111 | * enumeration from the bootloader. | 111 | * enumeration from the bootloader. |
112 | * | 112 | * |
113 | * @ipd_port: IPD input port associated with the port we want to get link | 113 | * @ipd_port: IPD input port associated with the port we want to get link |
114 | * status for. | 114 | * status for. |
115 | * | 115 | * |
116 | * Returns The ports link status. If the link isn't fully resolved, this must | 116 | * Returns The ports link status. If the link isn't fully resolved, this must |
117 | * return zero. | 117 | * return zero. |
118 | */ | 118 | */ |
119 | extern cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port); | 119 | extern cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port); |
120 | 120 | ||
@@ -134,10 +134,10 @@ extern cvmx_helper_link_info_t __cvmx_helper_board_link_get(int ipd_port); | |||
134 | * | 134 | * |
135 | * @interface: Interface to probe | 135 | * @interface: Interface to probe |
136 | * @supported_ports: | 136 | * @supported_ports: |
137 | * Number of ports Octeon supports. | 137 | * Number of ports Octeon supports. |
138 | * | 138 | * |
139 | * Returns Number of ports the actual board supports. Many times this will | 139 | * Returns Number of ports the actual board supports. Many times this will |
140 | * simple be "support_ports". | 140 | * simple be "support_ports". |
141 | */ | 141 | */ |
142 | extern int __cvmx_helper_board_interface_probe(int interface, | 142 | extern int __cvmx_helper_board_interface_probe(int interface, |
143 | int supported_ports); | 143 | int supported_ports); |
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h b/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h index 78295ba0050f..4d7a3db3a9f6 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-rgmii.h | |||
@@ -98,9 +98,9 @@ extern int __cvmx_helper_rgmii_link_set(int ipd_port, | |||
98 | * | 98 | * |
99 | * @ipd_port: IPD/PKO port to loopback. | 99 | * @ipd_port: IPD/PKO port to loopback. |
100 | * @enable_internal: | 100 | * @enable_internal: |
101 | * Non zero if you want internal loopback | 101 | * Non zero if you want internal loopback |
102 | * @enable_external: | 102 | * @enable_external: |
103 | * Non zero if you want external loopback | 103 | * Non zero if you want external loopback |
104 | * | 104 | * |
105 | * Returns Zero on success, negative on failure. | 105 | * Returns Zero on success, negative on failure. |
106 | */ | 106 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h b/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h index 9a9b6c103ede..4debb1c5153d 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-sgmii.h | |||
@@ -92,9 +92,9 @@ extern int __cvmx_helper_sgmii_link_set(int ipd_port, | |||
92 | * | 92 | * |
93 | * @ipd_port: IPD/PKO port to loopback. | 93 | * @ipd_port: IPD/PKO port to loopback. |
94 | * @enable_internal: | 94 | * @enable_internal: |
95 | * Non zero if you want internal loopback | 95 | * Non zero if you want internal loopback |
96 | * @enable_external: | 96 | * @enable_external: |
97 | * Non zero if you want external loopback | 97 | * Non zero if you want external loopback |
98 | * | 98 | * |
99 | * Returns Zero on success, negative on failure. | 99 | * Returns Zero on success, negative on failure. |
100 | */ | 100 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-util.h b/arch/mips/include/asm/octeon/cvmx-helper-util.h index 6a6e52fc22c1..e217aba1f523 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-util.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-util.h | |||
@@ -57,11 +57,11 @@ extern int cvmx_helper_dump_packet(cvmx_wqe_t *work); | |||
57 | * | 57 | * |
58 | * @queue: Input queue to setup RED on (0-7) | 58 | * @queue: Input queue to setup RED on (0-7) |
59 | * @pass_thresh: | 59 | * @pass_thresh: |
60 | * Packets will begin slowly dropping when there are less than | 60 | * Packets will begin slowly dropping when there are less than |
61 | * this many packet buffers free in FPA 0. | 61 | * this many packet buffers free in FPA 0. |
62 | * @drop_thresh: | 62 | * @drop_thresh: |
63 | * All incomming packets will be dropped when there are less | 63 | * All incomming packets will be dropped when there are less |
64 | * than this many free packet buffers in FPA 0. | 64 | * than this many free packet buffers in FPA 0. |
65 | * Returns Zero on success. Negative on failure | 65 | * Returns Zero on success. Negative on failure |
66 | */ | 66 | */ |
67 | extern int cvmx_helper_setup_red_queue(int queue, int pass_thresh, | 67 | extern int cvmx_helper_setup_red_queue(int queue, int pass_thresh, |
@@ -71,11 +71,11 @@ extern int cvmx_helper_setup_red_queue(int queue, int pass_thresh, | |||
71 | * Setup Random Early Drop to automatically begin dropping packets. | 71 | * Setup Random Early Drop to automatically begin dropping packets. |
72 | * | 72 | * |
73 | * @pass_thresh: | 73 | * @pass_thresh: |
74 | * Packets will begin slowly dropping when there are less than | 74 | * Packets will begin slowly dropping when there are less than |
75 | * this many packet buffers free in FPA 0. | 75 | * this many packet buffers free in FPA 0. |
76 | * @drop_thresh: | 76 | * @drop_thresh: |
77 | * All incomming packets will be dropped when there are less | 77 | * All incomming packets will be dropped when there are less |
78 | * than this many free packet buffers in FPA 0. | 78 | * than this many free packet buffers in FPA 0. |
79 | * Returns Zero on success. Negative on failure | 79 | * Returns Zero on success. Negative on failure |
80 | */ | 80 | */ |
81 | extern int cvmx_helper_setup_red(int pass_thresh, int drop_thresh); | 81 | extern int cvmx_helper_setup_red(int pass_thresh, int drop_thresh); |
@@ -84,7 +84,7 @@ extern int cvmx_helper_setup_red(int pass_thresh, int drop_thresh); | |||
84 | * Get the version of the CVMX libraries. | 84 | * Get the version of the CVMX libraries. |
85 | * | 85 | * |
86 | * Returns Version string. Note this buffer is allocated statically | 86 | * Returns Version string. Note this buffer is allocated statically |
87 | * and will be shared by all callers. | 87 | * and will be shared by all callers. |
88 | */ | 88 | */ |
89 | extern const char *cvmx_helper_get_version(void); | 89 | extern const char *cvmx_helper_get_version(void); |
90 | 90 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-helper-xaui.h b/arch/mips/include/asm/octeon/cvmx-helper-xaui.h index f6fbc4f45b56..5e89ed703eaa 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper-xaui.h +++ b/arch/mips/include/asm/octeon/cvmx-helper-xaui.h | |||
@@ -92,9 +92,9 @@ extern int __cvmx_helper_xaui_link_set(int ipd_port, | |||
92 | * | 92 | * |
93 | * @ipd_port: IPD/PKO port to loopback. | 93 | * @ipd_port: IPD/PKO port to loopback. |
94 | * @enable_internal: | 94 | * @enable_internal: |
95 | * Non zero if you want internal loopback | 95 | * Non zero if you want internal loopback |
96 | * @enable_external: | 96 | * @enable_external: |
97 | * Non zero if you want external loopback | 97 | * Non zero if you want external loopback |
98 | * | 98 | * |
99 | * Returns Zero on success, negative on failure. | 99 | * Returns Zero on success, negative on failure. |
100 | */ | 100 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-helper.h b/arch/mips/include/asm/octeon/cvmx-helper.h index 691c8142cd4f..5a3090dc6f2f 100644 --- a/arch/mips/include/asm/octeon/cvmx-helper.h +++ b/arch/mips/include/asm/octeon/cvmx-helper.h | |||
@@ -93,12 +93,12 @@ extern void (*cvmx_override_ipd_port_setup) (int ipd_port); | |||
93 | /** | 93 | /** |
94 | * This function enables the IPD and also enables the packet interfaces. | 94 | * This function enables the IPD and also enables the packet interfaces. |
95 | * The packet interfaces (RGMII and SPI) must be enabled after the | 95 | * The packet interfaces (RGMII and SPI) must be enabled after the |
96 | * IPD. This should be called by the user program after any additional | 96 | * IPD. This should be called by the user program after any additional |
97 | * IPD configuration changes are made if CVMX_HELPER_ENABLE_IPD | 97 | * IPD configuration changes are made if CVMX_HELPER_ENABLE_IPD |
98 | * is not set in the executive-config.h file. | 98 | * is not set in the executive-config.h file. |
99 | * | 99 | * |
100 | * Returns 0 on success | 100 | * Returns 0 on success |
101 | * -1 on failure | 101 | * -1 on failure |
102 | */ | 102 | */ |
103 | extern int cvmx_helper_ipd_and_packet_input_enable(void); | 103 | extern int cvmx_helper_ipd_and_packet_input_enable(void); |
104 | 104 | ||
@@ -128,7 +128,7 @@ extern int cvmx_helper_initialize_packet_io_local(void); | |||
128 | * @interface: Which interface to return port count for. | 128 | * @interface: Which interface to return port count for. |
129 | * | 129 | * |
130 | * Returns Port count for interface | 130 | * Returns Port count for interface |
131 | * -1 for uninitialized interface | 131 | * -1 for uninitialized interface |
132 | */ | 132 | */ |
133 | extern int cvmx_helper_ports_on_interface(int interface); | 133 | extern int cvmx_helper_ports_on_interface(int interface); |
134 | 134 | ||
@@ -150,7 +150,7 @@ extern int cvmx_helper_get_number_of_interfaces(void); | |||
150 | * @interface: Interface to probe | 150 | * @interface: Interface to probe |
151 | * | 151 | * |
152 | * Returns Mode of the interface. Unknown or unsupported interfaces return | 152 | * Returns Mode of the interface. Unknown or unsupported interfaces return |
153 | * DISABLED. | 153 | * DISABLED. |
154 | */ | 154 | */ |
155 | extern cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int | 155 | extern cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int |
156 | interface); | 156 | interface); |
@@ -214,9 +214,9 @@ extern int cvmx_helper_interface_enumerate(int interface); | |||
214 | * | 214 | * |
215 | * @ipd_port: IPD/PKO port to loopback. | 215 | * @ipd_port: IPD/PKO port to loopback. |
216 | * @enable_internal: | 216 | * @enable_internal: |
217 | * Non zero if you want internal loopback | 217 | * Non zero if you want internal loopback |
218 | * @enable_external: | 218 | * @enable_external: |
219 | * Non zero if you want external loopback | 219 | * Non zero if you want external loopback |
220 | * | 220 | * |
221 | * Returns Zero on success, negative on failure. | 221 | * Returns Zero on success, negative on failure. |
222 | */ | 222 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-ipd.h b/arch/mips/include/asm/octeon/cvmx-ipd.h index 115a552c5c7f..e13490ebbb27 100644 --- a/arch/mips/include/asm/octeon/cvmx-ipd.h +++ b/arch/mips/include/asm/octeon/cvmx-ipd.h | |||
@@ -38,8 +38,8 @@ | |||
38 | #include <asm/octeon/cvmx-ipd-defs.h> | 38 | #include <asm/octeon/cvmx-ipd-defs.h> |
39 | 39 | ||
40 | enum cvmx_ipd_mode { | 40 | enum cvmx_ipd_mode { |
41 | CVMX_IPD_OPC_MODE_STT = 0LL, /* All blocks DRAM, not cached in L2 */ | 41 | CVMX_IPD_OPC_MODE_STT = 0LL, /* All blocks DRAM, not cached in L2 */ |
42 | CVMX_IPD_OPC_MODE_STF = 1LL, /* All bloccks into L2 */ | 42 | CVMX_IPD_OPC_MODE_STF = 1LL, /* All bloccks into L2 */ |
43 | CVMX_IPD_OPC_MODE_STF1_STT = 2LL, /* 1st block L2, rest DRAM */ | 43 | CVMX_IPD_OPC_MODE_STF1_STT = 2LL, /* 1st block L2, rest DRAM */ |
44 | CVMX_IPD_OPC_MODE_STF2_STT = 3LL /* 1st, 2nd blocks L2, rest DRAM */ | 44 | CVMX_IPD_OPC_MODE_STF2_STT = 3LL /* 1st, 2nd blocks L2, rest DRAM */ |
45 | }; | 45 | }; |
@@ -60,17 +60,17 @@ typedef cvmx_ipd_first_next_ptr_back_t cvmx_ipd_second_next_ptr_back_t; | |||
60 | * | 60 | * |
61 | * @mbuff_size: Packets buffer size in 8 byte words | 61 | * @mbuff_size: Packets buffer size in 8 byte words |
62 | * @first_mbuff_skip: | 62 | * @first_mbuff_skip: |
63 | * Number of 8 byte words to skip in the first buffer | 63 | * Number of 8 byte words to skip in the first buffer |
64 | * @not_first_mbuff_skip: | 64 | * @not_first_mbuff_skip: |
65 | * Number of 8 byte words to skip in each following buffer | 65 | * Number of 8 byte words to skip in each following buffer |
66 | * @first_back: Must be same as first_mbuff_skip / 128 | 66 | * @first_back: Must be same as first_mbuff_skip / 128 |
67 | * @second_back: | 67 | * @second_back: |
68 | * Must be same as not_first_mbuff_skip / 128 | 68 | * Must be same as not_first_mbuff_skip / 128 |
69 | * @wqe_fpa_pool: | 69 | * @wqe_fpa_pool: |
70 | * FPA pool to get work entries from | 70 | * FPA pool to get work entries from |
71 | * @cache_mode: | 71 | * @cache_mode: |
72 | * @back_pres_enable_flag: | 72 | * @back_pres_enable_flag: |
73 | * Enable or disable port back pressure | 73 | * Enable or disable port back pressure |
74 | */ | 74 | */ |
75 | static inline void cvmx_ipd_config(uint64_t mbuff_size, | 75 | static inline void cvmx_ipd_config(uint64_t mbuff_size, |
76 | uint64_t first_mbuff_skip, | 76 | uint64_t first_mbuff_skip, |
diff --git a/arch/mips/include/asm/octeon/cvmx-l2c.h b/arch/mips/include/asm/octeon/cvmx-l2c.h index 2c8ff9e33ec3..11c0a8fa8eb5 100644 --- a/arch/mips/include/asm/octeon/cvmx-l2c.h +++ b/arch/mips/include/asm/octeon/cvmx-l2c.h | |||
@@ -33,13 +33,13 @@ | |||
33 | #ifndef __CVMX_L2C_H__ | 33 | #ifndef __CVMX_L2C_H__ |
34 | #define __CVMX_L2C_H__ | 34 | #define __CVMX_L2C_H__ |
35 | 35 | ||
36 | #define CVMX_L2_ASSOC cvmx_l2c_get_num_assoc() /* Deprecated macro, use function */ | 36 | #define CVMX_L2_ASSOC cvmx_l2c_get_num_assoc() /* Deprecated macro, use function */ |
37 | #define CVMX_L2_SET_BITS cvmx_l2c_get_set_bits() /* Deprecated macro, use function */ | 37 | #define CVMX_L2_SET_BITS cvmx_l2c_get_set_bits() /* Deprecated macro, use function */ |
38 | #define CVMX_L2_SETS cvmx_l2c_get_num_sets() /* Deprecated macro, use function */ | 38 | #define CVMX_L2_SETS cvmx_l2c_get_num_sets() /* Deprecated macro, use function */ |
39 | 39 | ||
40 | 40 | ||
41 | #define CVMX_L2C_IDX_ADDR_SHIFT 7 /* based on 128 byte cache line size */ | 41 | #define CVMX_L2C_IDX_ADDR_SHIFT 7 /* based on 128 byte cache line size */ |
42 | #define CVMX_L2C_IDX_MASK (cvmx_l2c_get_num_sets() - 1) | 42 | #define CVMX_L2C_IDX_MASK (cvmx_l2c_get_num_sets() - 1) |
43 | 43 | ||
44 | /* Defines for index aliasing computations */ | 44 | /* Defines for index aliasing computations */ |
45 | #define CVMX_L2C_TAG_ADDR_ALIAS_SHIFT (CVMX_L2C_IDX_ADDR_SHIFT + cvmx_l2c_get_set_bits()) | 45 | #define CVMX_L2C_TAG_ADDR_ALIAS_SHIFT (CVMX_L2C_IDX_ADDR_SHIFT + cvmx_l2c_get_set_bits()) |
@@ -67,91 +67,91 @@ union cvmx_l2c_tag { | |||
67 | 67 | ||
68 | /* L2C Performance Counter events. */ | 68 | /* L2C Performance Counter events. */ |
69 | enum cvmx_l2c_event { | 69 | enum cvmx_l2c_event { |
70 | CVMX_L2C_EVENT_CYCLES = 0, | 70 | CVMX_L2C_EVENT_CYCLES = 0, |
71 | CVMX_L2C_EVENT_INSTRUCTION_MISS = 1, | 71 | CVMX_L2C_EVENT_INSTRUCTION_MISS = 1, |
72 | CVMX_L2C_EVENT_INSTRUCTION_HIT = 2, | 72 | CVMX_L2C_EVENT_INSTRUCTION_HIT = 2, |
73 | CVMX_L2C_EVENT_DATA_MISS = 3, | 73 | CVMX_L2C_EVENT_DATA_MISS = 3, |
74 | CVMX_L2C_EVENT_DATA_HIT = 4, | 74 | CVMX_L2C_EVENT_DATA_HIT = 4, |
75 | CVMX_L2C_EVENT_MISS = 5, | 75 | CVMX_L2C_EVENT_MISS = 5, |
76 | CVMX_L2C_EVENT_HIT = 6, | 76 | CVMX_L2C_EVENT_HIT = 6, |
77 | CVMX_L2C_EVENT_VICTIM_HIT = 7, | 77 | CVMX_L2C_EVENT_VICTIM_HIT = 7, |
78 | CVMX_L2C_EVENT_INDEX_CONFLICT = 8, | 78 | CVMX_L2C_EVENT_INDEX_CONFLICT = 8, |
79 | CVMX_L2C_EVENT_TAG_PROBE = 9, | 79 | CVMX_L2C_EVENT_TAG_PROBE = 9, |
80 | CVMX_L2C_EVENT_TAG_UPDATE = 10, | 80 | CVMX_L2C_EVENT_TAG_UPDATE = 10, |
81 | CVMX_L2C_EVENT_TAG_COMPLETE = 11, | 81 | CVMX_L2C_EVENT_TAG_COMPLETE = 11, |
82 | CVMX_L2C_EVENT_TAG_DIRTY = 12, | 82 | CVMX_L2C_EVENT_TAG_DIRTY = 12, |
83 | CVMX_L2C_EVENT_DATA_STORE_NOP = 13, | 83 | CVMX_L2C_EVENT_DATA_STORE_NOP = 13, |
84 | CVMX_L2C_EVENT_DATA_STORE_READ = 14, | 84 | CVMX_L2C_EVENT_DATA_STORE_READ = 14, |
85 | CVMX_L2C_EVENT_DATA_STORE_WRITE = 15, | 85 | CVMX_L2C_EVENT_DATA_STORE_WRITE = 15, |
86 | CVMX_L2C_EVENT_FILL_DATA_VALID = 16, | 86 | CVMX_L2C_EVENT_FILL_DATA_VALID = 16, |
87 | CVMX_L2C_EVENT_WRITE_REQUEST = 17, | 87 | CVMX_L2C_EVENT_WRITE_REQUEST = 17, |
88 | CVMX_L2C_EVENT_READ_REQUEST = 18, | 88 | CVMX_L2C_EVENT_READ_REQUEST = 18, |
89 | CVMX_L2C_EVENT_WRITE_DATA_VALID = 19, | 89 | CVMX_L2C_EVENT_WRITE_DATA_VALID = 19, |
90 | CVMX_L2C_EVENT_XMC_NOP = 20, | 90 | CVMX_L2C_EVENT_XMC_NOP = 20, |
91 | CVMX_L2C_EVENT_XMC_LDT = 21, | 91 | CVMX_L2C_EVENT_XMC_LDT = 21, |
92 | CVMX_L2C_EVENT_XMC_LDI = 22, | 92 | CVMX_L2C_EVENT_XMC_LDI = 22, |
93 | CVMX_L2C_EVENT_XMC_LDD = 23, | 93 | CVMX_L2C_EVENT_XMC_LDD = 23, |
94 | CVMX_L2C_EVENT_XMC_STF = 24, | 94 | CVMX_L2C_EVENT_XMC_STF = 24, |
95 | CVMX_L2C_EVENT_XMC_STT = 25, | 95 | CVMX_L2C_EVENT_XMC_STT = 25, |
96 | CVMX_L2C_EVENT_XMC_STP = 26, | 96 | CVMX_L2C_EVENT_XMC_STP = 26, |
97 | CVMX_L2C_EVENT_XMC_STC = 27, | 97 | CVMX_L2C_EVENT_XMC_STC = 27, |
98 | CVMX_L2C_EVENT_XMC_DWB = 28, | 98 | CVMX_L2C_EVENT_XMC_DWB = 28, |
99 | CVMX_L2C_EVENT_XMC_PL2 = 29, | 99 | CVMX_L2C_EVENT_XMC_PL2 = 29, |
100 | CVMX_L2C_EVENT_XMC_PSL1 = 30, | 100 | CVMX_L2C_EVENT_XMC_PSL1 = 30, |
101 | CVMX_L2C_EVENT_XMC_IOBLD = 31, | 101 | CVMX_L2C_EVENT_XMC_IOBLD = 31, |
102 | CVMX_L2C_EVENT_XMC_IOBST = 32, | 102 | CVMX_L2C_EVENT_XMC_IOBST = 32, |
103 | CVMX_L2C_EVENT_XMC_IOBDMA = 33, | 103 | CVMX_L2C_EVENT_XMC_IOBDMA = 33, |
104 | CVMX_L2C_EVENT_XMC_IOBRSP = 34, | 104 | CVMX_L2C_EVENT_XMC_IOBRSP = 34, |
105 | CVMX_L2C_EVENT_XMC_BUS_VALID = 35, | 105 | CVMX_L2C_EVENT_XMC_BUS_VALID = 35, |
106 | CVMX_L2C_EVENT_XMC_MEM_DATA = 36, | 106 | CVMX_L2C_EVENT_XMC_MEM_DATA = 36, |
107 | CVMX_L2C_EVENT_XMC_REFL_DATA = 37, | 107 | CVMX_L2C_EVENT_XMC_REFL_DATA = 37, |
108 | CVMX_L2C_EVENT_XMC_IOBRSP_DATA = 38, | 108 | CVMX_L2C_EVENT_XMC_IOBRSP_DATA = 38, |
109 | CVMX_L2C_EVENT_RSC_NOP = 39, | 109 | CVMX_L2C_EVENT_RSC_NOP = 39, |
110 | CVMX_L2C_EVENT_RSC_STDN = 40, | 110 | CVMX_L2C_EVENT_RSC_STDN = 40, |
111 | CVMX_L2C_EVENT_RSC_FILL = 41, | 111 | CVMX_L2C_EVENT_RSC_FILL = 41, |
112 | CVMX_L2C_EVENT_RSC_REFL = 42, | 112 | CVMX_L2C_EVENT_RSC_REFL = 42, |
113 | CVMX_L2C_EVENT_RSC_STIN = 43, | 113 | CVMX_L2C_EVENT_RSC_STIN = 43, |
114 | CVMX_L2C_EVENT_RSC_SCIN = 44, | 114 | CVMX_L2C_EVENT_RSC_SCIN = 44, |
115 | CVMX_L2C_EVENT_RSC_SCFL = 45, | 115 | CVMX_L2C_EVENT_RSC_SCFL = 45, |
116 | CVMX_L2C_EVENT_RSC_SCDN = 46, | 116 | CVMX_L2C_EVENT_RSC_SCDN = 46, |
117 | CVMX_L2C_EVENT_RSC_DATA_VALID = 47, | 117 | CVMX_L2C_EVENT_RSC_DATA_VALID = 47, |
118 | CVMX_L2C_EVENT_RSC_VALID_FILL = 48, | 118 | CVMX_L2C_EVENT_RSC_VALID_FILL = 48, |
119 | CVMX_L2C_EVENT_RSC_VALID_STRSP = 49, | 119 | CVMX_L2C_EVENT_RSC_VALID_STRSP = 49, |
120 | CVMX_L2C_EVENT_RSC_VALID_REFL = 50, | 120 | CVMX_L2C_EVENT_RSC_VALID_REFL = 50, |
121 | CVMX_L2C_EVENT_LRF_REQ = 51, | 121 | CVMX_L2C_EVENT_LRF_REQ = 51, |
122 | CVMX_L2C_EVENT_DT_RD_ALLOC = 52, | 122 | CVMX_L2C_EVENT_DT_RD_ALLOC = 52, |
123 | CVMX_L2C_EVENT_DT_WR_INVAL = 53, | 123 | CVMX_L2C_EVENT_DT_WR_INVAL = 53, |
124 | CVMX_L2C_EVENT_MAX | 124 | CVMX_L2C_EVENT_MAX |
125 | }; | 125 | }; |
126 | 126 | ||
127 | /* L2C Performance Counter events for Octeon2. */ | 127 | /* L2C Performance Counter events for Octeon2. */ |
128 | enum cvmx_l2c_tad_event { | 128 | enum cvmx_l2c_tad_event { |
129 | CVMX_L2C_TAD_EVENT_NONE = 0, | 129 | CVMX_L2C_TAD_EVENT_NONE = 0, |
130 | CVMX_L2C_TAD_EVENT_TAG_HIT = 1, | 130 | CVMX_L2C_TAD_EVENT_TAG_HIT = 1, |
131 | CVMX_L2C_TAD_EVENT_TAG_MISS = 2, | 131 | CVMX_L2C_TAD_EVENT_TAG_MISS = 2, |
132 | CVMX_L2C_TAD_EVENT_TAG_NOALLOC = 3, | 132 | CVMX_L2C_TAD_EVENT_TAG_NOALLOC = 3, |
133 | CVMX_L2C_TAD_EVENT_TAG_VICTIM = 4, | 133 | CVMX_L2C_TAD_EVENT_TAG_VICTIM = 4, |
134 | CVMX_L2C_TAD_EVENT_SC_FAIL = 5, | 134 | CVMX_L2C_TAD_EVENT_SC_FAIL = 5, |
135 | CVMX_L2C_TAD_EVENT_SC_PASS = 6, | 135 | CVMX_L2C_TAD_EVENT_SC_PASS = 6, |
136 | CVMX_L2C_TAD_EVENT_LFB_VALID = 7, | 136 | CVMX_L2C_TAD_EVENT_LFB_VALID = 7, |
137 | CVMX_L2C_TAD_EVENT_LFB_WAIT_LFB = 8, | 137 | CVMX_L2C_TAD_EVENT_LFB_WAIT_LFB = 8, |
138 | CVMX_L2C_TAD_EVENT_LFB_WAIT_VAB = 9, | 138 | CVMX_L2C_TAD_EVENT_LFB_WAIT_VAB = 9, |
139 | CVMX_L2C_TAD_EVENT_QUAD0_INDEX = 128, | 139 | CVMX_L2C_TAD_EVENT_QUAD0_INDEX = 128, |
140 | CVMX_L2C_TAD_EVENT_QUAD0_READ = 129, | 140 | CVMX_L2C_TAD_EVENT_QUAD0_READ = 129, |
141 | CVMX_L2C_TAD_EVENT_QUAD0_BANK = 130, | 141 | CVMX_L2C_TAD_EVENT_QUAD0_BANK = 130, |
142 | CVMX_L2C_TAD_EVENT_QUAD0_WDAT = 131, | 142 | CVMX_L2C_TAD_EVENT_QUAD0_WDAT = 131, |
143 | CVMX_L2C_TAD_EVENT_QUAD1_INDEX = 144, | 143 | CVMX_L2C_TAD_EVENT_QUAD1_INDEX = 144, |
144 | CVMX_L2C_TAD_EVENT_QUAD1_READ = 145, | 144 | CVMX_L2C_TAD_EVENT_QUAD1_READ = 145, |
145 | CVMX_L2C_TAD_EVENT_QUAD1_BANK = 146, | 145 | CVMX_L2C_TAD_EVENT_QUAD1_BANK = 146, |
146 | CVMX_L2C_TAD_EVENT_QUAD1_WDAT = 147, | 146 | CVMX_L2C_TAD_EVENT_QUAD1_WDAT = 147, |
147 | CVMX_L2C_TAD_EVENT_QUAD2_INDEX = 160, | 147 | CVMX_L2C_TAD_EVENT_QUAD2_INDEX = 160, |
148 | CVMX_L2C_TAD_EVENT_QUAD2_READ = 161, | 148 | CVMX_L2C_TAD_EVENT_QUAD2_READ = 161, |
149 | CVMX_L2C_TAD_EVENT_QUAD2_BANK = 162, | 149 | CVMX_L2C_TAD_EVENT_QUAD2_BANK = 162, |
150 | CVMX_L2C_TAD_EVENT_QUAD2_WDAT = 163, | 150 | CVMX_L2C_TAD_EVENT_QUAD2_WDAT = 163, |
151 | CVMX_L2C_TAD_EVENT_QUAD3_INDEX = 176, | 151 | CVMX_L2C_TAD_EVENT_QUAD3_INDEX = 176, |
152 | CVMX_L2C_TAD_EVENT_QUAD3_READ = 177, | 152 | CVMX_L2C_TAD_EVENT_QUAD3_READ = 177, |
153 | CVMX_L2C_TAD_EVENT_QUAD3_BANK = 178, | 153 | CVMX_L2C_TAD_EVENT_QUAD3_BANK = 178, |
154 | CVMX_L2C_TAD_EVENT_QUAD3_WDAT = 179, | 154 | CVMX_L2C_TAD_EVENT_QUAD3_WDAT = 179, |
155 | CVMX_L2C_TAD_EVENT_MAX | 155 | CVMX_L2C_TAD_EVENT_MAX |
156 | }; | 156 | }; |
157 | 157 | ||
@@ -159,10 +159,10 @@ enum cvmx_l2c_tad_event { | |||
159 | * Configure one of the four L2 Cache performance counters to capture event | 159 | * Configure one of the four L2 Cache performance counters to capture event |
160 | * occurrences. | 160 | * occurrences. |
161 | * | 161 | * |
162 | * @counter: The counter to configure. Range 0..3. | 162 | * @counter: The counter to configure. Range 0..3. |
163 | * @event: The type of L2 Cache event occurrence to count. | 163 | * @event: The type of L2 Cache event occurrence to count. |
164 | * @clear_on_read: When asserted, any read of the performance counter | 164 | * @clear_on_read: When asserted, any read of the performance counter |
165 | * clears the counter. | 165 | * clears the counter. |
166 | * | 166 | * |
167 | * @note The routine does not clear the counter. | 167 | * @note The routine does not clear the counter. |
168 | */ | 168 | */ |
@@ -184,8 +184,8 @@ uint64_t cvmx_l2c_read_perf(uint32_t counter); | |||
184 | * @core: The core processor of interest. | 184 | * @core: The core processor of interest. |
185 | * | 185 | * |
186 | * Returns The mask specifying the partitioning. 0 bits in mask indicates | 186 | * Returns The mask specifying the partitioning. 0 bits in mask indicates |
187 | * the cache 'ways' that a core can evict from. | 187 | * the cache 'ways' that a core can evict from. |
188 | * -1 on error | 188 | * -1 on error |
189 | */ | 189 | */ |
190 | int cvmx_l2c_get_core_way_partition(uint32_t core); | 190 | int cvmx_l2c_get_core_way_partition(uint32_t core); |
191 | 191 | ||
@@ -194,16 +194,16 @@ int cvmx_l2c_get_core_way_partition(uint32_t core); | |||
194 | * | 194 | * |
195 | * @core: The core that the partitioning applies to. | 195 | * @core: The core that the partitioning applies to. |
196 | * @mask: The partitioning of the ways expressed as a binary | 196 | * @mask: The partitioning of the ways expressed as a binary |
197 | * mask. A 0 bit allows the core to evict cache lines from | 197 | * mask. A 0 bit allows the core to evict cache lines from |
198 | * a way, while a 1 bit blocks the core from evicting any | 198 | * a way, while a 1 bit blocks the core from evicting any |
199 | * lines from that way. There must be at least one allowed | 199 | * lines from that way. There must be at least one allowed |
200 | * way (0 bit) in the mask. | 200 | * way (0 bit) in the mask. |
201 | * | 201 | * |
202 | 202 | ||
203 | * @note If any ways are blocked for all cores and the HW blocks, then | 203 | * @note If any ways are blocked for all cores and the HW blocks, then |
204 | * those ways will never have any cache lines evicted from them. | 204 | * those ways will never have any cache lines evicted from them. |
205 | * All cores and the hardware blocks are free to read from all | 205 | * All cores and the hardware blocks are free to read from all |
206 | * ways regardless of the partitioning. | 206 | * ways regardless of the partitioning. |
207 | */ | 207 | */ |
208 | int cvmx_l2c_set_core_way_partition(uint32_t core, uint32_t mask); | 208 | int cvmx_l2c_set_core_way_partition(uint32_t core, uint32_t mask); |
209 | 209 | ||
@@ -211,8 +211,8 @@ int cvmx_l2c_set_core_way_partition(uint32_t core, uint32_t mask); | |||
211 | * Return the L2 Cache way partitioning for the hw blocks. | 211 | * Return the L2 Cache way partitioning for the hw blocks. |
212 | * | 212 | * |
213 | * Returns The mask specifying the reserved way. 0 bits in mask indicates | 213 | * Returns The mask specifying the reserved way. 0 bits in mask indicates |
214 | * the cache 'ways' that a core can evict from. | 214 | * the cache 'ways' that a core can evict from. |
215 | * -1 on error | 215 | * -1 on error |
216 | */ | 216 | */ |
217 | int cvmx_l2c_get_hw_way_partition(void); | 217 | int cvmx_l2c_get_hw_way_partition(void); |
218 | 218 | ||
@@ -220,16 +220,16 @@ int cvmx_l2c_get_hw_way_partition(void); | |||
220 | * Partitions the L2 cache for the hardware blocks. | 220 | * Partitions the L2 cache for the hardware blocks. |
221 | * | 221 | * |
222 | * @mask: The partitioning of the ways expressed as a binary | 222 | * @mask: The partitioning of the ways expressed as a binary |
223 | * mask. A 0 bit allows the core to evict cache lines from | 223 | * mask. A 0 bit allows the core to evict cache lines from |
224 | * a way, while a 1 bit blocks the core from evicting any | 224 | * a way, while a 1 bit blocks the core from evicting any |
225 | * lines from that way. There must be at least one allowed | 225 | * lines from that way. There must be at least one allowed |
226 | * way (0 bit) in the mask. | 226 | * way (0 bit) in the mask. |
227 | * | 227 | * |
228 | 228 | ||
229 | * @note If any ways are blocked for all cores and the HW blocks, then | 229 | * @note If any ways are blocked for all cores and the HW blocks, then |
230 | * those ways will never have any cache lines evicted from them. | 230 | * those ways will never have any cache lines evicted from them. |
231 | * All cores and the hardware blocks are free to read from all | 231 | * All cores and the hardware blocks are free to read from all |
232 | * ways regardless of the partitioning. | 232 | * ways regardless of the partitioning. |
233 | */ | 233 | */ |
234 | int cvmx_l2c_set_hw_way_partition(uint32_t mask); | 234 | int cvmx_l2c_set_hw_way_partition(uint32_t mask); |
235 | 235 | ||
@@ -240,7 +240,7 @@ int cvmx_l2c_set_hw_way_partition(uint32_t mask); | |||
240 | * @addr: physical address of line to lock | 240 | * @addr: physical address of line to lock |
241 | * | 241 | * |
242 | * Returns 0 on success, | 242 | * Returns 0 on success, |
243 | * 1 if line not locked. | 243 | * 1 if line not locked. |
244 | */ | 244 | */ |
245 | int cvmx_l2c_lock_line(uint64_t addr); | 245 | int cvmx_l2c_lock_line(uint64_t addr); |
246 | 246 | ||
@@ -258,7 +258,7 @@ int cvmx_l2c_lock_line(uint64_t addr); | |||
258 | * @len: Length (in bytes) of region to lock | 258 | * @len: Length (in bytes) of region to lock |
259 | * | 259 | * |
260 | * Returns Number of requested lines that where not locked. | 260 | * Returns Number of requested lines that where not locked. |
261 | * 0 on success (all locked) | 261 | * 0 on success (all locked) |
262 | */ | 262 | */ |
263 | int cvmx_l2c_lock_mem_region(uint64_t start, uint64_t len); | 263 | int cvmx_l2c_lock_mem_region(uint64_t start, uint64_t len); |
264 | 264 | ||
@@ -272,7 +272,7 @@ int cvmx_l2c_lock_mem_region(uint64_t start, uint64_t len); | |||
272 | * @address: Physical address to unlock | 272 | * @address: Physical address to unlock |
273 | * | 273 | * |
274 | * Returns 0: line not unlocked | 274 | * Returns 0: line not unlocked |
275 | * 1: line unlocked | 275 | * 1: line unlocked |
276 | */ | 276 | */ |
277 | int cvmx_l2c_unlock_line(uint64_t address); | 277 | int cvmx_l2c_unlock_line(uint64_t address); |
278 | 278 | ||
@@ -290,7 +290,7 @@ int cvmx_l2c_unlock_mem_region(uint64_t start, uint64_t len); | |||
290 | * Read the L2 controller tag for a given location in L2 | 290 | * Read the L2 controller tag for a given location in L2 |
291 | * | 291 | * |
292 | * @association: | 292 | * @association: |
293 | * Which association to read line from | 293 | * Which association to read line from |
294 | * @index: Which way to read from. | 294 | * @index: Which way to read from. |
295 | * | 295 | * |
296 | * Returns l2c tag structure for line requested. | 296 | * Returns l2c tag structure for line requested. |
diff --git a/arch/mips/include/asm/octeon/cvmx-mdio.h b/arch/mips/include/asm/octeon/cvmx-mdio.h index 6f0cd182cec8..9f6a4f32a83c 100644 --- a/arch/mips/include/asm/octeon/cvmx-mdio.h +++ b/arch/mips/include/asm/octeon/cvmx-mdio.h | |||
@@ -246,21 +246,21 @@ typedef union { | |||
246 | } cvmx_mdio_phy_reg_mmd_address_data_t; | 246 | } cvmx_mdio_phy_reg_mmd_address_data_t; |
247 | 247 | ||
248 | /* Operating request encodings. */ | 248 | /* Operating request encodings. */ |
249 | #define MDIO_CLAUSE_22_WRITE 0 | 249 | #define MDIO_CLAUSE_22_WRITE 0 |
250 | #define MDIO_CLAUSE_22_READ 1 | 250 | #define MDIO_CLAUSE_22_READ 1 |
251 | 251 | ||
252 | #define MDIO_CLAUSE_45_ADDRESS 0 | 252 | #define MDIO_CLAUSE_45_ADDRESS 0 |
253 | #define MDIO_CLAUSE_45_WRITE 1 | 253 | #define MDIO_CLAUSE_45_WRITE 1 |
254 | #define MDIO_CLAUSE_45_READ_INC 2 | 254 | #define MDIO_CLAUSE_45_READ_INC 2 |
255 | #define MDIO_CLAUSE_45_READ 3 | 255 | #define MDIO_CLAUSE_45_READ 3 |
256 | 256 | ||
257 | /* MMD identifiers, mostly for accessing devices within XENPAK modules. */ | 257 | /* MMD identifiers, mostly for accessing devices within XENPAK modules. */ |
258 | #define CVMX_MMD_DEVICE_PMA_PMD 1 | 258 | #define CVMX_MMD_DEVICE_PMA_PMD 1 |
259 | #define CVMX_MMD_DEVICE_WIS 2 | 259 | #define CVMX_MMD_DEVICE_WIS 2 |
260 | #define CVMX_MMD_DEVICE_PCS 3 | 260 | #define CVMX_MMD_DEVICE_PCS 3 |
261 | #define CVMX_MMD_DEVICE_PHY_XS 4 | 261 | #define CVMX_MMD_DEVICE_PHY_XS 4 |
262 | #define CVMX_MMD_DEVICE_DTS_XS 5 | 262 | #define CVMX_MMD_DEVICE_DTS_XS 5 |
263 | #define CVMX_MMD_DEVICE_TC 6 | 263 | #define CVMX_MMD_DEVICE_TC 6 |
264 | #define CVMX_MMD_DEVICE_CL22_EXT 29 | 264 | #define CVMX_MMD_DEVICE_CL22_EXT 29 |
265 | #define CVMX_MMD_DEVICE_VENDOR_1 30 | 265 | #define CVMX_MMD_DEVICE_VENDOR_1 30 |
266 | #define CVMX_MMD_DEVICE_VENDOR_2 31 | 266 | #define CVMX_MMD_DEVICE_VENDOR_2 31 |
@@ -291,7 +291,7 @@ static inline void __cvmx_mdio_set_clause22_mode(int bus_id) | |||
291 | * registers controlling auto negotiation. | 291 | * registers controlling auto negotiation. |
292 | * | 292 | * |
293 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) | 293 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) |
294 | * support multiple busses. | 294 | * support multiple busses. |
295 | * @phy_id: The MII phy id | 295 | * @phy_id: The MII phy id |
296 | * @location: Register location to read | 296 | * @location: Register location to read |
297 | * | 297 | * |
@@ -328,13 +328,13 @@ static inline int cvmx_mdio_read(int bus_id, int phy_id, int location) | |||
328 | * registers controlling auto negotiation. | 328 | * registers controlling auto negotiation. |
329 | * | 329 | * |
330 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) | 330 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) |
331 | * support multiple busses. | 331 | * support multiple busses. |
332 | * @phy_id: The MII phy id | 332 | * @phy_id: The MII phy id |
333 | * @location: Register location to write | 333 | * @location: Register location to write |
334 | * @val: Value to write | 334 | * @val: Value to write |
335 | * | 335 | * |
336 | * Returns -1 on error | 336 | * Returns -1 on error |
337 | * 0 on success | 337 | * 0 on success |
338 | */ | 338 | */ |
339 | static inline int cvmx_mdio_write(int bus_id, int phy_id, int location, int val) | 339 | static inline int cvmx_mdio_write(int bus_id, int phy_id, int location, int val) |
340 | { | 340 | { |
@@ -370,7 +370,7 @@ static inline int cvmx_mdio_write(int bus_id, int phy_id, int location, int val) | |||
370 | * read PHY registers controlling auto negotiation. | 370 | * read PHY registers controlling auto negotiation. |
371 | * | 371 | * |
372 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) | 372 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) |
373 | * support multiple busses. | 373 | * support multiple busses. |
374 | * @phy_id: The MII phy id | 374 | * @phy_id: The MII phy id |
375 | * @device: MDIO Managable Device (MMD) id | 375 | * @device: MDIO Managable Device (MMD) id |
376 | * @location: Register location to read | 376 | * @location: Register location to read |
@@ -407,7 +407,7 @@ static inline int cvmx_mdio_45_read(int bus_id, int phy_id, int device, | |||
407 | } while (smi_wr.s.pending && --timeout); | 407 | } while (smi_wr.s.pending && --timeout); |
408 | if (timeout <= 0) { | 408 | if (timeout <= 0) { |
409 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " | 409 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " |
410 | "device %2d register %2d TIME OUT(address)\n", | 410 | "device %2d register %2d TIME OUT(address)\n", |
411 | bus_id, phy_id, device, location); | 411 | bus_id, phy_id, device, location); |
412 | return -1; | 412 | return -1; |
413 | } | 413 | } |
@@ -425,7 +425,7 @@ static inline int cvmx_mdio_45_read(int bus_id, int phy_id, int device, | |||
425 | 425 | ||
426 | if (timeout <= 0) { | 426 | if (timeout <= 0) { |
427 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " | 427 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " |
428 | "device %2d register %2d TIME OUT(data)\n", | 428 | "device %2d register %2d TIME OUT(data)\n", |
429 | bus_id, phy_id, device, location); | 429 | bus_id, phy_id, device, location); |
430 | return -1; | 430 | return -1; |
431 | } | 431 | } |
@@ -434,7 +434,7 @@ static inline int cvmx_mdio_45_read(int bus_id, int phy_id, int device, | |||
434 | return smi_rd.s.dat; | 434 | return smi_rd.s.dat; |
435 | else { | 435 | else { |
436 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " | 436 | cvmx_dprintf("cvmx_mdio_45_read: bus_id %d phy_id %2d " |
437 | "device %2d register %2d INVALID READ\n", | 437 | "device %2d register %2d INVALID READ\n", |
438 | bus_id, phy_id, device, location); | 438 | bus_id, phy_id, device, location); |
439 | return -1; | 439 | return -1; |
440 | } | 440 | } |
@@ -445,14 +445,14 @@ static inline int cvmx_mdio_45_read(int bus_id, int phy_id, int device, | |||
445 | * write PHY registers controlling auto negotiation. | 445 | * write PHY registers controlling auto negotiation. |
446 | * | 446 | * |
447 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) | 447 | * @bus_id: MDIO bus number. Zero on most chips, but some chips (ex CN56XX) |
448 | * support multiple busses. | 448 | * support multiple busses. |
449 | * @phy_id: The MII phy id | 449 | * @phy_id: The MII phy id |
450 | * @device: MDIO Managable Device (MMD) id | 450 | * @device: MDIO Managable Device (MMD) id |
451 | * @location: Register location to write | 451 | * @location: Register location to write |
452 | * @val: Value to write | 452 | * @val: Value to write |
453 | * | 453 | * |
454 | * Returns -1 on error | 454 | * Returns -1 on error |
455 | * 0 on success | 455 | * 0 on success |
456 | */ | 456 | */ |
457 | static inline int cvmx_mdio_45_write(int bus_id, int phy_id, int device, | 457 | static inline int cvmx_mdio_45_write(int bus_id, int phy_id, int device, |
458 | int location, int val) | 458 | int location, int val) |
diff --git a/arch/mips/include/asm/octeon/cvmx-pip-defs.h b/arch/mips/include/asm/octeon/cvmx-pip-defs.h index 05a917d6ebe5..e975c7d2e485 100644 --- a/arch/mips/include/asm/octeon/cvmx-pip-defs.h +++ b/arch/mips/include/asm/octeon/cvmx-pip-defs.h | |||
@@ -44,7 +44,7 @@ enum cvmx_pip_port_parse_mode { | |||
44 | */ | 44 | */ |
45 | CVMX_PIP_PORT_CFG_MODE_SKIPL2 = 1ull, | 45 | CVMX_PIP_PORT_CFG_MODE_SKIPL2 = 1ull, |
46 | /* | 46 | /* |
47 | * Input packets are assumed to be IP. Results from non IP | 47 | * Input packets are assumed to be IP. Results from non IP |
48 | * packets is undefined. Pointers reference the beginning of | 48 | * packets is undefined. Pointers reference the beginning of |
49 | * the IP header. | 49 | * the IP header. |
50 | */ | 50 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-pip.h b/arch/mips/include/asm/octeon/cvmx-pip.h index 9e739a640855..a76fe5a57a9f 100644 --- a/arch/mips/include/asm/octeon/cvmx-pip.h +++ b/arch/mips/include/asm/octeon/cvmx-pip.h | |||
@@ -37,8 +37,8 @@ | |||
37 | #include <asm/octeon/cvmx-fpa.h> | 37 | #include <asm/octeon/cvmx-fpa.h> |
38 | #include <asm/octeon/cvmx-pip-defs.h> | 38 | #include <asm/octeon/cvmx-pip-defs.h> |
39 | 39 | ||
40 | #define CVMX_PIP_NUM_INPUT_PORTS 40 | 40 | #define CVMX_PIP_NUM_INPUT_PORTS 40 |
41 | #define CVMX_PIP_NUM_WATCHERS 4 | 41 | #define CVMX_PIP_NUM_WATCHERS 4 |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * Encodes the different error and exception codes | 44 | * Encodes the different error and exception codes |
@@ -92,10 +92,10 @@ typedef enum { | |||
92 | 92 | ||
93 | /** | 93 | /** |
94 | * NOTES | 94 | * NOTES |
95 | * late collision (data received before collision) | 95 | * late collision (data received before collision) |
96 | * late collisions cannot be detected by the receiver | 96 | * late collisions cannot be detected by the receiver |
97 | * they would appear as JAM bits which would appear as bad FCS | 97 | * they would appear as JAM bits which would appear as bad FCS |
98 | * or carrier extend error which is CVMX_PIP_EXTEND_ERR | 98 | * or carrier extend error which is CVMX_PIP_EXTEND_ERR |
99 | */ | 99 | */ |
100 | typedef enum { | 100 | typedef enum { |
101 | /* No error */ | 101 | /* No error */ |
@@ -122,11 +122,11 @@ typedef enum { | |||
122 | * error) | 122 | * error) |
123 | */ | 123 | */ |
124 | CVMX_PIP_UNDER_FCS_ERR = 6ull, | 124 | CVMX_PIP_UNDER_FCS_ERR = 6ull, |
125 | /* RGM 7 = FCS error */ | 125 | /* RGM 7 = FCS error */ |
126 | CVMX_PIP_GMX_FCS_ERR = 7ull, | 126 | CVMX_PIP_GMX_FCS_ERR = 7ull, |
127 | /* RGM+SPI 8 = min frame error (pkt len < min frame len) */ | 127 | /* RGM+SPI 8 = min frame error (pkt len < min frame len) */ |
128 | CVMX_PIP_UNDER_ERR = 8ull, | 128 | CVMX_PIP_UNDER_ERR = 8ull, |
129 | /* RGM 9 = Frame carrier extend error */ | 129 | /* RGM 9 = Frame carrier extend error */ |
130 | CVMX_PIP_EXTEND_ERR = 9ull, | 130 | CVMX_PIP_EXTEND_ERR = 9ull, |
131 | /* | 131 | /* |
132 | * RGM 10 = length mismatch (len did not match len in L2 | 132 | * RGM 10 = length mismatch (len did not match len in L2 |
@@ -161,10 +161,10 @@ typedef enum { | |||
161 | CVMX_PIP_PIP_L2_MAL_HDR = 18L | 161 | CVMX_PIP_PIP_L2_MAL_HDR = 18L |
162 | /* | 162 | /* |
163 | * NOTES: xx = late collision (data received before collision) | 163 | * NOTES: xx = late collision (data received before collision) |
164 | * late collisions cannot be detected by the receiver | 164 | * late collisions cannot be detected by the receiver |
165 | * they would appear as JAM bits which would appear as | 165 | * they would appear as JAM bits which would appear as |
166 | * bad FCS or carrier extend error which is | 166 | * bad FCS or carrier extend error which is |
167 | * CVMX_PIP_EXTEND_ERR | 167 | * CVMX_PIP_EXTEND_ERR |
168 | */ | 168 | */ |
169 | } cvmx_pip_rcv_err_t; | 169 | } cvmx_pip_rcv_err_t; |
170 | 170 | ||
@@ -192,13 +192,13 @@ typedef struct { | |||
192 | /* Number of packets processed by PIP */ | 192 | /* Number of packets processed by PIP */ |
193 | uint32_t packets; | 193 | uint32_t packets; |
194 | /* | 194 | /* |
195 | * Number of indentified L2 multicast packets. Does not | 195 | * Number of indentified L2 multicast packets. Does not |
196 | * include broadcast packets. Only includes packets whose | 196 | * include broadcast packets. Only includes packets whose |
197 | * parse mode is SKIP_TO_L2 | 197 | * parse mode is SKIP_TO_L2 |
198 | */ | 198 | */ |
199 | uint32_t multicast_packets; | 199 | uint32_t multicast_packets; |
200 | /* | 200 | /* |
201 | * Number of indentified L2 broadcast packets. Does not | 201 | * Number of indentified L2 broadcast packets. Does not |
202 | * include multicast packets. Only includes packets whose | 202 | * include multicast packets. Only includes packets whose |
203 | * parse mode is SKIP_TO_L2 | 203 | * parse mode is SKIP_TO_L2 |
204 | */ | 204 | */ |
@@ -287,7 +287,7 @@ typedef union { | |||
287 | * @port_num: Port number to configure | 287 | * @port_num: Port number to configure |
288 | * @port_cfg: Port hardware configuration | 288 | * @port_cfg: Port hardware configuration |
289 | * @port_tag_cfg: | 289 | * @port_tag_cfg: |
290 | * Port POW tagging configuration | 290 | * Port POW tagging configuration |
291 | */ | 291 | */ |
292 | static inline void cvmx_pip_config_port(uint64_t port_num, | 292 | static inline void cvmx_pip_config_port(uint64_t port_num, |
293 | union cvmx_pip_prt_cfgx port_cfg, | 293 | union cvmx_pip_prt_cfgx port_cfg, |
@@ -298,20 +298,20 @@ static inline void cvmx_pip_config_port(uint64_t port_num, | |||
298 | } | 298 | } |
299 | #if 0 | 299 | #if 0 |
300 | /** | 300 | /** |
301 | * @deprecated This function is a thin wrapper around the Pass1 version | 301 | * @deprecated This function is a thin wrapper around the Pass1 version |
302 | * of the CVMX_PIP_QOS_WATCHX CSR; Pass2 has added a field for | 302 | * of the CVMX_PIP_QOS_WATCHX CSR; Pass2 has added a field for |
303 | * setting the group that is incompatible with this function, | 303 | * setting the group that is incompatible with this function, |
304 | * the preferred upgrade path is to use the CSR directly. | 304 | * the preferred upgrade path is to use the CSR directly. |
305 | * | 305 | * |
306 | * Configure the global QoS packet watchers. Each watcher is | 306 | * Configure the global QoS packet watchers. Each watcher is |
307 | * capable of matching a field in a packet to determine the | 307 | * capable of matching a field in a packet to determine the |
308 | * QoS queue for scheduling. | 308 | * QoS queue for scheduling. |
309 | * | 309 | * |
310 | * @watcher: Watcher number to configure (0 - 3). | 310 | * @watcher: Watcher number to configure (0 - 3). |
311 | * @match_type: Watcher match type | 311 | * @match_type: Watcher match type |
312 | * @match_value: | 312 | * @match_value: |
313 | * Value the watcher will match against | 313 | * Value the watcher will match against |
314 | * @qos: QoS queue for packets matching this watcher | 314 | * @qos: QoS queue for packets matching this watcher |
315 | */ | 315 | */ |
316 | static inline void cvmx_pip_config_watcher(uint64_t watcher, | 316 | static inline void cvmx_pip_config_watcher(uint64_t watcher, |
317 | cvmx_pip_qos_watch_types match_type, | 317 | cvmx_pip_qos_watch_types match_type, |
@@ -331,7 +331,7 @@ static inline void cvmx_pip_config_watcher(uint64_t watcher, | |||
331 | * Configure the VLAN priority to QoS queue mapping. | 331 | * Configure the VLAN priority to QoS queue mapping. |
332 | * | 332 | * |
333 | * @vlan_priority: | 333 | * @vlan_priority: |
334 | * VLAN priority (0-7) | 334 | * VLAN priority (0-7) |
335 | * @qos: QoS queue for packets matching this watcher | 335 | * @qos: QoS queue for packets matching this watcher |
336 | */ | 336 | */ |
337 | static inline void cvmx_pip_config_vlan_qos(uint64_t vlan_priority, | 337 | static inline void cvmx_pip_config_vlan_qos(uint64_t vlan_priority, |
@@ -451,10 +451,10 @@ static inline void cvmx_pip_get_port_status(uint64_t port_num, uint64_t clear, | |||
451 | * | 451 | * |
452 | * @interface: Interface to configure (0 or 1) | 452 | * @interface: Interface to configure (0 or 1) |
453 | * @invert_result: | 453 | * @invert_result: |
454 | * Invert the result of the CRC | 454 | * Invert the result of the CRC |
455 | * @reflect: Reflect | 455 | * @reflect: Reflect |
456 | * @initialization_vector: | 456 | * @initialization_vector: |
457 | * CRC initialization vector | 457 | * CRC initialization vector |
458 | */ | 458 | */ |
459 | static inline void cvmx_pip_config_crc(uint64_t interface, | 459 | static inline void cvmx_pip_config_crc(uint64_t interface, |
460 | uint64_t invert_result, uint64_t reflect, | 460 | uint64_t invert_result, uint64_t reflect, |
@@ -500,13 +500,13 @@ static inline void cvmx_pip_tag_mask_clear(uint64_t mask_index) | |||
500 | * | 500 | * |
501 | * @mask_index: Which tag mask to modify (0..3) | 501 | * @mask_index: Which tag mask to modify (0..3) |
502 | * @offset: Offset into the bitmask to set bits at. Use the GCC macro | 502 | * @offset: Offset into the bitmask to set bits at. Use the GCC macro |
503 | * offsetof() to determine the offsets into packet headers. | 503 | * offsetof() to determine the offsets into packet headers. |
504 | * For example, offsetof(ethhdr, protocol) returns the offset | 504 | * For example, offsetof(ethhdr, protocol) returns the offset |
505 | * of the ethernet protocol field. The bitmask selects which | 505 | * of the ethernet protocol field. The bitmask selects which |
506 | * bytes to include the the tag, with bit offset X selecting | 506 | * bytes to include the the tag, with bit offset X selecting |
507 | * byte at offset X from the beginning of the packet data. | 507 | * byte at offset X from the beginning of the packet data. |
508 | * @len: Number of bytes to include. Usually this is the sizeof() | 508 | * @len: Number of bytes to include. Usually this is the sizeof() |
509 | * the field. | 509 | * the field. |
510 | */ | 510 | */ |
511 | static inline void cvmx_pip_tag_mask_set(uint64_t mask_index, uint64_t offset, | 511 | static inline void cvmx_pip_tag_mask_set(uint64_t mask_index, uint64_t offset, |
512 | uint64_t len) | 512 | uint64_t len) |
diff --git a/arch/mips/include/asm/octeon/cvmx-pko.h b/arch/mips/include/asm/octeon/cvmx-pko.h index c6daeedf1f81..f7d2a6718849 100644 --- a/arch/mips/include/asm/octeon/cvmx-pko.h +++ b/arch/mips/include/asm/octeon/cvmx-pko.h | |||
@@ -69,16 +69,16 @@ | |||
69 | #define CVMX_PKO_COMMAND_BUFFER_SIZE_ADJUST (1) | 69 | #define CVMX_PKO_COMMAND_BUFFER_SIZE_ADJUST (1) |
70 | 70 | ||
71 | #define CVMX_PKO_MAX_OUTPUT_QUEUES_STATIC 256 | 71 | #define CVMX_PKO_MAX_OUTPUT_QUEUES_STATIC 256 |
72 | #define CVMX_PKO_MAX_OUTPUT_QUEUES ((OCTEON_IS_MODEL(OCTEON_CN31XX) || \ | 72 | #define CVMX_PKO_MAX_OUTPUT_QUEUES ((OCTEON_IS_MODEL(OCTEON_CN31XX) || \ |
73 | OCTEON_IS_MODEL(OCTEON_CN3010) || OCTEON_IS_MODEL(OCTEON_CN3005) || \ | 73 | OCTEON_IS_MODEL(OCTEON_CN3010) || OCTEON_IS_MODEL(OCTEON_CN3005) || \ |
74 | OCTEON_IS_MODEL(OCTEON_CN50XX)) ? 32 : \ | 74 | OCTEON_IS_MODEL(OCTEON_CN50XX)) ? 32 : \ |
75 | (OCTEON_IS_MODEL(OCTEON_CN58XX) || \ | 75 | (OCTEON_IS_MODEL(OCTEON_CN58XX) || \ |
76 | OCTEON_IS_MODEL(OCTEON_CN56XX)) ? 256 : 128) | 76 | OCTEON_IS_MODEL(OCTEON_CN56XX)) ? 256 : 128) |
77 | #define CVMX_PKO_NUM_OUTPUT_PORTS 40 | 77 | #define CVMX_PKO_NUM_OUTPUT_PORTS 40 |
78 | /* use this for queues that are not used */ | 78 | /* use this for queues that are not used */ |
79 | #define CVMX_PKO_MEM_QUEUE_PTRS_ILLEGAL_PID 63 | 79 | #define CVMX_PKO_MEM_QUEUE_PTRS_ILLEGAL_PID 63 |
80 | #define CVMX_PKO_QUEUE_STATIC_PRIORITY 9 | 80 | #define CVMX_PKO_QUEUE_STATIC_PRIORITY 9 |
81 | #define CVMX_PKO_ILLEGAL_QUEUE 0xFFFF | 81 | #define CVMX_PKO_ILLEGAL_QUEUE 0xFFFF |
82 | #define CVMX_PKO_MAX_QUEUE_DEPTH 0 | 82 | #define CVMX_PKO_MAX_QUEUE_DEPTH 0 |
83 | 83 | ||
84 | typedef enum { | 84 | typedef enum { |
@@ -269,13 +269,13 @@ extern void cvmx_pko_shutdown(void); | |||
269 | /** | 269 | /** |
270 | * Configure a output port and the associated queues for use. | 270 | * Configure a output port and the associated queues for use. |
271 | * | 271 | * |
272 | * @port: Port to configure. | 272 | * @port: Port to configure. |
273 | * @base_queue: First queue number to associate with this port. | 273 | * @base_queue: First queue number to associate with this port. |
274 | * @num_queues: Number of queues t oassociate with this port | 274 | * @num_queues: Number of queues t oassociate with this port |
275 | * @priority: Array of priority levels for each queue. Values are | 275 | * @priority: Array of priority levels for each queue. Values are |
276 | * allowed to be 1-8. A value of 8 get 8 times the traffic | 276 | * allowed to be 1-8. A value of 8 get 8 times the traffic |
277 | * of a value of 1. There must be num_queues elements in the | 277 | * of a value of 1. There must be num_queues elements in the |
278 | * array. | 278 | * array. |
279 | */ | 279 | */ |
280 | extern cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, | 280 | extern cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, |
281 | uint64_t base_queue, | 281 | uint64_t base_queue, |
@@ -285,7 +285,7 @@ extern cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, | |||
285 | /** | 285 | /** |
286 | * Ring the packet output doorbell. This tells the packet | 286 | * Ring the packet output doorbell. This tells the packet |
287 | * output hardware that "len" command words have been added | 287 | * output hardware that "len" command words have been added |
288 | * to its pending list. This command includes the required | 288 | * to its pending list. This command includes the required |
289 | * CVMX_SYNCWS before the doorbell ring. | 289 | * CVMX_SYNCWS before the doorbell ring. |
290 | * | 290 | * |
291 | * @port: Port the packet is for | 291 | * @port: Port the packet is for |
@@ -322,18 +322,18 @@ static inline void cvmx_pko_doorbell(uint64_t port, uint64_t queue, | |||
322 | * The use_locking parameter allows the caller to use three | 322 | * The use_locking parameter allows the caller to use three |
323 | * possible locking modes. | 323 | * possible locking modes. |
324 | * - CVMX_PKO_LOCK_NONE | 324 | * - CVMX_PKO_LOCK_NONE |
325 | * - PKO doesn't do any locking. It is the responsibility | 325 | * - PKO doesn't do any locking. It is the responsibility |
326 | * of the application to make sure that no other core | 326 | * of the application to make sure that no other core |
327 | * is accessing the same queue at the same time. | 327 | * is accessing the same queue at the same time. |
328 | * - CVMX_PKO_LOCK_ATOMIC_TAG | 328 | * - CVMX_PKO_LOCK_ATOMIC_TAG |
329 | * - PKO performs an atomic tagswitch to insure exclusive | 329 | * - PKO performs an atomic tagswitch to insure exclusive |
330 | * access to the output queue. This will maintain | 330 | * access to the output queue. This will maintain |
331 | * packet ordering on output. | 331 | * packet ordering on output. |
332 | * - CVMX_PKO_LOCK_CMD_QUEUE | 332 | * - CVMX_PKO_LOCK_CMD_QUEUE |
333 | * - PKO uses the common command queue locks to insure | 333 | * - PKO uses the common command queue locks to insure |
334 | * exclusive access to the output queue. This is a | 334 | * exclusive access to the output queue. This is a |
335 | * memory based ll/sc. This is the most portable | 335 | * memory based ll/sc. This is the most portable |
336 | * locking mechanism. | 336 | * locking mechanism. |
337 | * | 337 | * |
338 | * NOTE: If atomic locking is used, the POW entry CANNOT be | 338 | * NOTE: If atomic locking is used, the POW entry CANNOT be |
339 | * descheduled, as it does not contain a valid WQE pointer. | 339 | * descheduled, as it does not contain a valid WQE pointer. |
@@ -341,7 +341,7 @@ static inline void cvmx_pko_doorbell(uint64_t port, uint64_t queue, | |||
341 | * @port: Port to send it on | 341 | * @port: Port to send it on |
342 | * @queue: Queue to use | 342 | * @queue: Queue to use |
343 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or | 343 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or |
344 | * CVMX_PKO_LOCK_CMD_QUEUE | 344 | * CVMX_PKO_LOCK_CMD_QUEUE |
345 | */ | 345 | */ |
346 | 346 | ||
347 | static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, | 347 | static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, |
@@ -351,11 +351,11 @@ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, | |||
351 | /* | 351 | /* |
352 | * Must do a full switch here to handle all cases. We | 352 | * Must do a full switch here to handle all cases. We |
353 | * use a fake WQE pointer, as the POW does not access | 353 | * use a fake WQE pointer, as the POW does not access |
354 | * this memory. The WQE pointer and group are only | 354 | * this memory. The WQE pointer and group are only |
355 | * used if this work is descheduled, which is not | 355 | * used if this work is descheduled, which is not |
356 | * supported by the | 356 | * supported by the |
357 | * cvmx_pko_send_packet_prepare/cvmx_pko_send_packet_finish | 357 | * cvmx_pko_send_packet_prepare/cvmx_pko_send_packet_finish |
358 | * combination. Note that this is a special case in | 358 | * combination. Note that this is a special case in |
359 | * which these fake values can be used - this is not a | 359 | * which these fake values can be used - this is not a |
360 | * general technique. | 360 | * general technique. |
361 | */ | 361 | */ |
@@ -377,10 +377,10 @@ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, | |||
377 | * @port: Port to send it on | 377 | * @port: Port to send it on |
378 | * @queue: Queue to use | 378 | * @queue: Queue to use |
379 | * @pko_command: | 379 | * @pko_command: |
380 | * PKO HW command word | 380 | * PKO HW command word |
381 | * @packet: Packet to send | 381 | * @packet: Packet to send |
382 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or | 382 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or |
383 | * CVMX_PKO_LOCK_CMD_QUEUE | 383 | * CVMX_PKO_LOCK_CMD_QUEUE |
384 | * | 384 | * |
385 | * Returns returns CVMX_PKO_SUCCESS on success, or error code on | 385 | * Returns returns CVMX_PKO_SUCCESS on success, or error code on |
386 | * failure of output | 386 | * failure of output |
@@ -418,12 +418,12 @@ static inline cvmx_pko_status_t cvmx_pko_send_packet_finish( | |||
418 | * @port: Port to send it on | 418 | * @port: Port to send it on |
419 | * @queue: Queue to use | 419 | * @queue: Queue to use |
420 | * @pko_command: | 420 | * @pko_command: |
421 | * PKO HW command word | 421 | * PKO HW command word |
422 | * @packet: Packet to send | 422 | * @packet: Packet to send |
423 | * @addr: Plysical address of a work queue entry or physical address | 423 | * @addr: Plysical address of a work queue entry or physical address |
424 | * to zero on complete. | 424 | * to zero on complete. |
425 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or | 425 | * @use_locking: CVMX_PKO_LOCK_NONE, CVMX_PKO_LOCK_ATOMIC_TAG, or |
426 | * CVMX_PKO_LOCK_CMD_QUEUE | 426 | * CVMX_PKO_LOCK_CMD_QUEUE |
427 | * | 427 | * |
428 | * Returns returns CVMX_PKO_SUCCESS on success, or error code on | 428 | * Returns returns CVMX_PKO_SUCCESS on success, or error code on |
429 | * failure of output | 429 | * failure of output |
@@ -588,7 +588,7 @@ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear, | |||
588 | * @port: Port to rate limit | 588 | * @port: Port to rate limit |
589 | * @packets_s: Maximum packet/sec | 589 | * @packets_s: Maximum packet/sec |
590 | * @burst: Maximum number of packets to burst in a row before rate | 590 | * @burst: Maximum number of packets to burst in a row before rate |
591 | * limiting cuts in. | 591 | * limiting cuts in. |
592 | * | 592 | * |
593 | * Returns Zero on success, negative on failure | 593 | * Returns Zero on success, negative on failure |
594 | */ | 594 | */ |
@@ -601,7 +601,7 @@ extern int cvmx_pko_rate_limit_packets(int port, int packets_s, int burst); | |||
601 | * @port: Port to rate limit | 601 | * @port: Port to rate limit |
602 | * @bits_s: PKO rate limit in bits/sec | 602 | * @bits_s: PKO rate limit in bits/sec |
603 | * @burst: Maximum number of bits to burst before rate | 603 | * @burst: Maximum number of bits to burst before rate |
604 | * limiting cuts in. | 604 | * limiting cuts in. |
605 | * | 605 | * |
606 | * Returns Zero on success, negative on failure | 606 | * Returns Zero on success, negative on failure |
607 | */ | 607 | */ |
diff --git a/arch/mips/include/asm/octeon/cvmx-pow.h b/arch/mips/include/asm/octeon/cvmx-pow.h index 92742b241a51..4b4d0ecfd9eb 100644 --- a/arch/mips/include/asm/octeon/cvmx-pow.h +++ b/arch/mips/include/asm/octeon/cvmx-pow.h | |||
@@ -70,7 +70,7 @@ enum cvmx_pow_tag_type { | |||
70 | * The work queue entry from the order - NEVER tag switch from | 70 | * The work queue entry from the order - NEVER tag switch from |
71 | * NULL to NULL | 71 | * NULL to NULL |
72 | */ | 72 | */ |
73 | CVMX_POW_TAG_TYPE_NULL = 2L, | 73 | CVMX_POW_TAG_TYPE_NULL = 2L, |
74 | /* A tag switch to NULL, and there is no space reserved in POW | 74 | /* A tag switch to NULL, and there is no space reserved in POW |
75 | * - NEVER tag switch to NULL_NULL | 75 | * - NEVER tag switch to NULL_NULL |
76 | * - NEVER tag switch from NULL_NULL | 76 | * - NEVER tag switch from NULL_NULL |
@@ -90,7 +90,7 @@ typedef enum { | |||
90 | } cvmx_pow_wait_t; | 90 | } cvmx_pow_wait_t; |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * POW tag operations. These are used in the data stored to the POW. | 93 | * POW tag operations. These are used in the data stored to the POW. |
94 | */ | 94 | */ |
95 | typedef enum { | 95 | typedef enum { |
96 | /* | 96 | /* |
@@ -341,14 +341,14 @@ typedef union { | |||
341 | * lists. The two memory-input queue lists associated | 341 | * lists. The two memory-input queue lists associated |
342 | * with each QOS level are: | 342 | * with each QOS level are: |
343 | * | 343 | * |
344 | * - qosgrp = 0, qosgrp = 8: QOS0 | 344 | * - qosgrp = 0, qosgrp = 8: QOS0 |
345 | * - qosgrp = 1, qosgrp = 9: QOS1 | 345 | * - qosgrp = 1, qosgrp = 9: QOS1 |
346 | * - qosgrp = 2, qosgrp = 10: QOS2 | 346 | * - qosgrp = 2, qosgrp = 10: QOS2 |
347 | * - qosgrp = 3, qosgrp = 11: QOS3 | 347 | * - qosgrp = 3, qosgrp = 11: QOS3 |
348 | * - qosgrp = 4, qosgrp = 12: QOS4 | 348 | * - qosgrp = 4, qosgrp = 12: QOS4 |
349 | * - qosgrp = 5, qosgrp = 13: QOS5 | 349 | * - qosgrp = 5, qosgrp = 13: QOS5 |
350 | * - qosgrp = 6, qosgrp = 14: QOS6 | 350 | * - qosgrp = 6, qosgrp = 14: QOS6 |
351 | * - qosgrp = 7, qosgrp = 15: QOS7 | 351 | * - qosgrp = 7, qosgrp = 15: QOS7 |
352 | */ | 352 | */ |
353 | uint64_t qosgrp:4; | 353 | uint64_t qosgrp:4; |
354 | /* | 354 | /* |
@@ -942,11 +942,11 @@ typedef union { | |||
942 | * operations. | 942 | * operations. |
943 | * | 943 | * |
944 | * NOTE: The following is the behavior of the pending switch bit at the PP | 944 | * NOTE: The following is the behavior of the pending switch bit at the PP |
945 | * for POW stores (i.e. when did<7:3> == 0xc) | 945 | * for POW stores (i.e. when did<7:3> == 0xc) |
946 | * - did<2:0> == 0 => pending switch bit is set | 946 | * - did<2:0> == 0 => pending switch bit is set |
947 | * - did<2:0> == 1 => no affect on the pending switch bit | 947 | * - did<2:0> == 1 => no affect on the pending switch bit |
948 | * - did<2:0> == 3 => pending switch bit is cleared | 948 | * - did<2:0> == 3 => pending switch bit is cleared |
949 | * - did<2:0> == 7 => no affect on the pending switch bit | 949 | * - did<2:0> == 7 => no affect on the pending switch bit |
950 | * - did<2:0> == others => must not be used | 950 | * - did<2:0> == others => must not be used |
951 | * - No other loads/stores have an affect on the pending switch bit | 951 | * - No other loads/stores have an affect on the pending switch bit |
952 | * - The switch bus from POW can clear the pending switch bit | 952 | * - The switch bus from POW can clear the pending switch bit |
@@ -1053,7 +1053,7 @@ static inline cvmx_wqe_t *cvmx_pow_get_current_wqp(void) | |||
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | #ifndef CVMX_MF_CHORD | 1055 | #ifndef CVMX_MF_CHORD |
1056 | #define CVMX_MF_CHORD(dest) CVMX_RDHWR(dest, 30) | 1056 | #define CVMX_MF_CHORD(dest) CVMX_RDHWR(dest, 30) |
1057 | #endif | 1057 | #endif |
1058 | 1058 | ||
1059 | /** | 1059 | /** |
@@ -1097,7 +1097,7 @@ static inline void cvmx_pow_tag_sw_wait(void) | |||
1097 | * so the caller must ensure that there is not a pending tag switch. | 1097 | * so the caller must ensure that there is not a pending tag switch. |
1098 | * | 1098 | * |
1099 | * @wait: When set, call stalls until work becomes avaiable, or times out. | 1099 | * @wait: When set, call stalls until work becomes avaiable, or times out. |
1100 | * If not set, returns immediately. | 1100 | * If not set, returns immediately. |
1101 | * | 1101 | * |
1102 | * Returns Returns the WQE pointer from POW. Returns NULL if no work | 1102 | * Returns Returns the WQE pointer from POW. Returns NULL if no work |
1103 | * was available. | 1103 | * was available. |
@@ -1131,7 +1131,7 @@ static inline cvmx_wqe_t *cvmx_pow_work_request_sync_nocheck(cvmx_pow_wait_t | |||
1131 | * requesting the new work. | 1131 | * requesting the new work. |
1132 | * | 1132 | * |
1133 | * @wait: When set, call stalls until work becomes avaiable, or times out. | 1133 | * @wait: When set, call stalls until work becomes avaiable, or times out. |
1134 | * If not set, returns immediately. | 1134 | * If not set, returns immediately. |
1135 | * | 1135 | * |
1136 | * Returns Returns the WQE pointer from POW. Returns NULL if no work | 1136 | * Returns Returns the WQE pointer from POW. Returns NULL if no work |
1137 | * was available. | 1137 | * was available. |
@@ -1148,7 +1148,7 @@ static inline cvmx_wqe_t *cvmx_pow_work_request_sync(cvmx_pow_wait_t wait) | |||
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | /** | 1150 | /** |
1151 | * Synchronous null_rd request. Requests a switch out of NULL_NULL POW state. | 1151 | * Synchronous null_rd request. Requests a switch out of NULL_NULL POW state. |
1152 | * This function waits for any previous tag switch to complete before | 1152 | * This function waits for any previous tag switch to complete before |
1153 | * requesting the null_rd. | 1153 | * requesting the null_rd. |
1154 | * | 1154 | * |
@@ -1183,11 +1183,11 @@ static inline enum cvmx_pow_tag_type cvmx_pow_work_request_null_rd(void) | |||
1183 | * there is not a pending tag switch. | 1183 | * there is not a pending tag switch. |
1184 | * | 1184 | * |
1185 | * @scr_addr: Scratch memory address that response will be returned | 1185 | * @scr_addr: Scratch memory address that response will be returned |
1186 | * to, which is either a valid WQE, or a response with the | 1186 | * to, which is either a valid WQE, or a response with the |
1187 | * invalid bit set. Byte address, must be 8 byte aligned. | 1187 | * invalid bit set. Byte address, must be 8 byte aligned. |
1188 | * | 1188 | * |
1189 | * @wait: 1 to cause response to wait for work to become available (or | 1189 | * @wait: 1 to cause response to wait for work to become available (or |
1190 | * timeout), 0 to cause response to return immediately | 1190 | * timeout), 0 to cause response to return immediately |
1191 | */ | 1191 | */ |
1192 | static inline void cvmx_pow_work_request_async_nocheck(int scr_addr, | 1192 | static inline void cvmx_pow_work_request_async_nocheck(int scr_addr, |
1193 | cvmx_pow_wait_t wait) | 1193 | cvmx_pow_wait_t wait) |
@@ -1212,11 +1212,11 @@ static inline void cvmx_pow_work_request_async_nocheck(int scr_addr, | |||
1212 | * tag switch to complete before requesting the new work. | 1212 | * tag switch to complete before requesting the new work. |
1213 | * | 1213 | * |
1214 | * @scr_addr: Scratch memory address that response will be returned | 1214 | * @scr_addr: Scratch memory address that response will be returned |
1215 | * to, which is either a valid WQE, or a response with the | 1215 | * to, which is either a valid WQE, or a response with the |
1216 | * invalid bit set. Byte address, must be 8 byte aligned. | 1216 | * invalid bit set. Byte address, must be 8 byte aligned. |
1217 | * | 1217 | * |
1218 | * @wait: 1 to cause response to wait for work to become available (or | 1218 | * @wait: 1 to cause response to wait for work to become available (or |
1219 | * timeout), 0 to cause response to return immediately | 1219 | * timeout), 0 to cause response to return immediately |
1220 | */ | 1220 | */ |
1221 | static inline void cvmx_pow_work_request_async(int scr_addr, | 1221 | static inline void cvmx_pow_work_request_async(int scr_addr, |
1222 | cvmx_pow_wait_t wait) | 1222 | cvmx_pow_wait_t wait) |
@@ -1234,7 +1234,7 @@ static inline void cvmx_pow_work_request_async(int scr_addr, | |||
1234 | * to wait for the response. | 1234 | * to wait for the response. |
1235 | * | 1235 | * |
1236 | * @scr_addr: Scratch memory address to get result from Byte address, | 1236 | * @scr_addr: Scratch memory address to get result from Byte address, |
1237 | * must be 8 byte aligned. | 1237 | * must be 8 byte aligned. |
1238 | * | 1238 | * |
1239 | * Returns Returns the WQE from the scratch register, or NULL if no | 1239 | * Returns Returns the WQE from the scratch register, or NULL if no |
1240 | * work was available. | 1240 | * work was available. |
@@ -1260,7 +1260,7 @@ static inline cvmx_wqe_t *cvmx_pow_work_response_async(int scr_addr) | |||
1260 | * @wqe_ptr: pointer to a work queue entry returned by the POW | 1260 | * @wqe_ptr: pointer to a work queue entry returned by the POW |
1261 | * | 1261 | * |
1262 | * Returns 0 if pointer is valid | 1262 | * Returns 0 if pointer is valid |
1263 | * 1 if invalid (no work was returned) | 1263 | * 1 if invalid (no work was returned) |
1264 | */ | 1264 | */ |
1265 | static inline uint64_t cvmx_pow_work_invalid(cvmx_wqe_t *wqe_ptr) | 1265 | static inline uint64_t cvmx_pow_work_invalid(cvmx_wqe_t *wqe_ptr) |
1266 | { | 1266 | { |
@@ -1314,7 +1314,7 @@ static inline void cvmx_pow_tag_sw_nocheck(uint32_t tag, | |||
1314 | /* | 1314 | /* |
1315 | * Note that WQE in DRAM is not updated here, as the POW does | 1315 | * Note that WQE in DRAM is not updated here, as the POW does |
1316 | * not read from DRAM once the WQE is in flight. See hardware | 1316 | * not read from DRAM once the WQE is in flight. See hardware |
1317 | * manual for complete details. It is the application's | 1317 | * manual for complete details. It is the application's |
1318 | * responsibility to keep track of the current tag value if | 1318 | * responsibility to keep track of the current tag value if |
1319 | * that is important. | 1319 | * that is important. |
1320 | */ | 1320 | */ |
@@ -1361,7 +1361,7 @@ static inline void cvmx_pow_tag_sw(uint32_t tag, | |||
1361 | /* | 1361 | /* |
1362 | * Note that WQE in DRAM is not updated here, as the POW does | 1362 | * Note that WQE in DRAM is not updated here, as the POW does |
1363 | * not read from DRAM once the WQE is in flight. See hardware | 1363 | * not read from DRAM once the WQE is in flight. See hardware |
1364 | * manual for complete details. It is the application's | 1364 | * manual for complete details. It is the application's |
1365 | * responsibility to keep track of the current tag value if | 1365 | * responsibility to keep track of the current tag value if |
1366 | * that is important. | 1366 | * that is important. |
1367 | */ | 1367 | */ |
@@ -1390,7 +1390,7 @@ static inline void cvmx_pow_tag_sw(uint32_t tag, | |||
1390 | * previous tag switch has completed. | 1390 | * previous tag switch has completed. |
1391 | * | 1391 | * |
1392 | * @wqp: pointer to work queue entry to submit. This entry is | 1392 | * @wqp: pointer to work queue entry to submit. This entry is |
1393 | * updated to match the other parameters | 1393 | * updated to match the other parameters |
1394 | * @tag: tag value to be assigned to work queue entry | 1394 | * @tag: tag value to be assigned to work queue entry |
1395 | * @tag_type: type of tag | 1395 | * @tag_type: type of tag |
1396 | * @group: group value for the work queue entry. | 1396 | * @group: group value for the work queue entry. |
@@ -1429,7 +1429,7 @@ static inline void cvmx_pow_tag_sw_full_nocheck(cvmx_wqe_t *wqp, uint32_t tag, | |||
1429 | /* | 1429 | /* |
1430 | * Note that WQE in DRAM is not updated here, as the POW does | 1430 | * Note that WQE in DRAM is not updated here, as the POW does |
1431 | * not read from DRAM once the WQE is in flight. See hardware | 1431 | * not read from DRAM once the WQE is in flight. See hardware |
1432 | * manual for complete details. It is the application's | 1432 | * manual for complete details. It is the application's |
1433 | * responsibility to keep track of the current tag value if | 1433 | * responsibility to keep track of the current tag value if |
1434 | * that is important. | 1434 | * that is important. |
1435 | */ | 1435 | */ |
@@ -1468,10 +1468,10 @@ static inline void cvmx_pow_tag_sw_full_nocheck(cvmx_wqe_t *wqp, uint32_t tag, | |||
1468 | * before requesting the tag switch. | 1468 | * before requesting the tag switch. |
1469 | * | 1469 | * |
1470 | * @wqp: pointer to work queue entry to submit. This entry is updated | 1470 | * @wqp: pointer to work queue entry to submit. This entry is updated |
1471 | * to match the other parameters | 1471 | * to match the other parameters |
1472 | * @tag: tag value to be assigned to work queue entry | 1472 | * @tag: tag value to be assigned to work queue entry |
1473 | * @tag_type: type of tag | 1473 | * @tag_type: type of tag |
1474 | * @group: group value for the work queue entry. | 1474 | * @group: group value for the work queue entry. |
1475 | */ | 1475 | */ |
1476 | static inline void cvmx_pow_tag_sw_full(cvmx_wqe_t *wqp, uint32_t tag, | 1476 | static inline void cvmx_pow_tag_sw_full(cvmx_wqe_t *wqp, uint32_t tag, |
1477 | enum cvmx_pow_tag_type tag_type, | 1477 | enum cvmx_pow_tag_type tag_type, |
@@ -1560,7 +1560,7 @@ static inline void cvmx_pow_tag_sw_null(void) | |||
1560 | * unrelated to the tag that the core currently holds. | 1560 | * unrelated to the tag that the core currently holds. |
1561 | * | 1561 | * |
1562 | * @wqp: pointer to work queue entry to submit. This entry is | 1562 | * @wqp: pointer to work queue entry to submit. This entry is |
1563 | * updated to match the other parameters | 1563 | * updated to match the other parameters |
1564 | * @tag: tag value to be assigned to work queue entry | 1564 | * @tag: tag value to be assigned to work queue entry |
1565 | * @tag_type: type of tag | 1565 | * @tag_type: type of tag |
1566 | * @qos: Input queue to add to. | 1566 | * @qos: Input queue to add to. |
@@ -1592,7 +1592,7 @@ static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag, | |||
1592 | ptr.sio.offset = cvmx_ptr_to_phys(wqp); | 1592 | ptr.sio.offset = cvmx_ptr_to_phys(wqp); |
1593 | 1593 | ||
1594 | /* | 1594 | /* |
1595 | * SYNC write to memory before the work submit. This is | 1595 | * SYNC write to memory before the work submit. This is |
1596 | * necessary as POW may read values from DRAM at this time. | 1596 | * necessary as POW may read values from DRAM at this time. |
1597 | */ | 1597 | */ |
1598 | CVMX_SYNCWS; | 1598 | CVMX_SYNCWS; |
@@ -1604,11 +1604,11 @@ static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag, | |||
1604 | * indicates which groups each core will accept work from. There are | 1604 | * indicates which groups each core will accept work from. There are |
1605 | * 16 groups. | 1605 | * 16 groups. |
1606 | * | 1606 | * |
1607 | * @core_num: core to apply mask to | 1607 | * @core_num: core to apply mask to |
1608 | * @mask: Group mask. There are 16 groups, so only bits 0-15 are valid, | 1608 | * @mask: Group mask. There are 16 groups, so only bits 0-15 are valid, |
1609 | * representing groups 0-15. | 1609 | * representing groups 0-15. |
1610 | * Each 1 bit in the mask enables the core to accept work from | 1610 | * Each 1 bit in the mask enables the core to accept work from |
1611 | * the corresponding group. | 1611 | * the corresponding group. |
1612 | */ | 1612 | */ |
1613 | static inline void cvmx_pow_set_group_mask(uint64_t core_num, uint64_t mask) | 1613 | static inline void cvmx_pow_set_group_mask(uint64_t core_num, uint64_t mask) |
1614 | { | 1614 | { |
@@ -1623,14 +1623,14 @@ static inline void cvmx_pow_set_group_mask(uint64_t core_num, uint64_t mask) | |||
1623 | * This function sets POW static priorities for a core. Each input queue has | 1623 | * This function sets POW static priorities for a core. Each input queue has |
1624 | * an associated priority value. | 1624 | * an associated priority value. |
1625 | * | 1625 | * |
1626 | * @core_num: core to apply priorities to | 1626 | * @core_num: core to apply priorities to |
1627 | * @priority: Vector of 8 priorities, one per POW Input Queue (0-7). | 1627 | * @priority: Vector of 8 priorities, one per POW Input Queue (0-7). |
1628 | * Highest priority is 0 and lowest is 7. A priority value | 1628 | * Highest priority is 0 and lowest is 7. A priority value |
1629 | * of 0xF instructs POW to skip the Input Queue when | 1629 | * of 0xF instructs POW to skip the Input Queue when |
1630 | * scheduling to this specific core. | 1630 | * scheduling to this specific core. |
1631 | * NOTE: priorities should not have gaps in values, meaning | 1631 | * NOTE: priorities should not have gaps in values, meaning |
1632 | * {0,1,1,1,1,1,1,1} is a valid configuration while | 1632 | * {0,1,1,1,1,1,1,1} is a valid configuration while |
1633 | * {0,2,2,2,2,2,2,2} is not. | 1633 | * {0,2,2,2,2,2,2,2} is not. |
1634 | */ | 1634 | */ |
1635 | static inline void cvmx_pow_set_priority(uint64_t core_num, | 1635 | static inline void cvmx_pow_set_priority(uint64_t core_num, |
1636 | const uint8_t priority[]) | 1636 | const uint8_t priority[]) |
@@ -1708,8 +1708,8 @@ static inline void cvmx_pow_set_priority(uint64_t core_num, | |||
1708 | * @tag_type: New tag type | 1708 | * @tag_type: New tag type |
1709 | * @group: New group value | 1709 | * @group: New group value |
1710 | * @no_sched: Control whether this work queue entry will be rescheduled. | 1710 | * @no_sched: Control whether this work queue entry will be rescheduled. |
1711 | * - 1 : don't schedule this work | 1711 | * - 1 : don't schedule this work |
1712 | * - 0 : allow this work to be scheduled. | 1712 | * - 0 : allow this work to be scheduled. |
1713 | */ | 1713 | */ |
1714 | static inline void cvmx_pow_tag_sw_desched_nocheck( | 1714 | static inline void cvmx_pow_tag_sw_desched_nocheck( |
1715 | uint32_t tag, | 1715 | uint32_t tag, |
@@ -1794,8 +1794,8 @@ static inline void cvmx_pow_tag_sw_desched_nocheck( | |||
1794 | * @tag_type: New tag type | 1794 | * @tag_type: New tag type |
1795 | * @group: New group value | 1795 | * @group: New group value |
1796 | * @no_sched: Control whether this work queue entry will be rescheduled. | 1796 | * @no_sched: Control whether this work queue entry will be rescheduled. |
1797 | * - 1 : don't schedule this work | 1797 | * - 1 : don't schedule this work |
1798 | * - 0 : allow this work to be scheduled. | 1798 | * - 0 : allow this work to be scheduled. |
1799 | */ | 1799 | */ |
1800 | static inline void cvmx_pow_tag_sw_desched(uint32_t tag, | 1800 | static inline void cvmx_pow_tag_sw_desched(uint32_t tag, |
1801 | enum cvmx_pow_tag_type tag_type, | 1801 | enum cvmx_pow_tag_type tag_type, |
@@ -1819,8 +1819,8 @@ static inline void cvmx_pow_tag_sw_desched(uint32_t tag, | |||
1819 | * Descchedules the current work queue entry. | 1819 | * Descchedules the current work queue entry. |
1820 | * | 1820 | * |
1821 | * @no_sched: no schedule flag value to be set on the work queue | 1821 | * @no_sched: no schedule flag value to be set on the work queue |
1822 | * entry. If this is set the entry will not be | 1822 | * entry. If this is set the entry will not be |
1823 | * rescheduled. | 1823 | * rescheduled. |
1824 | */ | 1824 | */ |
1825 | static inline void cvmx_pow_desched(uint64_t no_sched) | 1825 | static inline void cvmx_pow_desched(uint64_t no_sched) |
1826 | { | 1826 | { |
@@ -1863,7 +1863,7 @@ static inline void cvmx_pow_desched(uint64_t no_sched) | |||
1863 | *****************************************************/ | 1863 | *****************************************************/ |
1864 | 1864 | ||
1865 | /* | 1865 | /* |
1866 | * Number of bits of the tag used by software. The SW bits are always | 1866 | * Number of bits of the tag used by software. The SW bits are always |
1867 | * a contiguous block of the high starting at bit 31. The hardware | 1867 | * a contiguous block of the high starting at bit 31. The hardware |
1868 | * bits are always the low bits. By default, the top 8 bits of the | 1868 | * bits are always the low bits. By default, the top 8 bits of the |
1869 | * tag are reserved for software, and the low 24 are set by the IPD | 1869 | * tag are reserved for software, and the low 24 are set by the IPD |
@@ -1890,7 +1890,7 @@ static inline void cvmx_pow_desched(uint64_t no_sched) | |||
1890 | * are defined here. | 1890 | * are defined here. |
1891 | */ | 1891 | */ |
1892 | /* Mask for the value portion of the tag */ | 1892 | /* Mask for the value portion of the tag */ |
1893 | #define CVMX_TAG_SUBGROUP_MASK 0xFFFF | 1893 | #define CVMX_TAG_SUBGROUP_MASK 0xFFFF |
1894 | #define CVMX_TAG_SUBGROUP_SHIFT 16 | 1894 | #define CVMX_TAG_SUBGROUP_SHIFT 16 |
1895 | #define CVMX_TAG_SUBGROUP_PKO 0x1 | 1895 | #define CVMX_TAG_SUBGROUP_PKO 0x1 |
1896 | 1896 | ||
@@ -1905,12 +1905,12 @@ static inline void cvmx_pow_desched(uint64_t no_sched) | |||
1905 | * This function creates a 32 bit tag value from the two values provided. | 1905 | * This function creates a 32 bit tag value from the two values provided. |
1906 | * | 1906 | * |
1907 | * @sw_bits: The upper bits (number depends on configuration) are set | 1907 | * @sw_bits: The upper bits (number depends on configuration) are set |
1908 | * to this value. The remainder of bits are set by the | 1908 | * to this value. The remainder of bits are set by the |
1909 | * hw_bits parameter. | 1909 | * hw_bits parameter. |
1910 | * | 1910 | * |
1911 | * @hw_bits: The lower bits (number depends on configuration) are set | 1911 | * @hw_bits: The lower bits (number depends on configuration) are set |
1912 | * to this value. The remainder of bits are set by the | 1912 | * to this value. The remainder of bits are set by the |
1913 | * sw_bits parameter. | 1913 | * sw_bits parameter. |
1914 | * | 1914 | * |
1915 | * Returns 32 bit value of the combined hw and sw bits. | 1915 | * Returns 32 bit value of the combined hw and sw bits. |
1916 | */ | 1916 | */ |
@@ -1957,7 +1957,7 @@ static inline uint32_t cvmx_pow_tag_get_hw_bits(uint64_t tag) | |||
1957 | * | 1957 | * |
1958 | * @buffer: Buffer to store capture into | 1958 | * @buffer: Buffer to store capture into |
1959 | * @buffer_size: | 1959 | * @buffer_size: |
1960 | * The size of the supplied buffer | 1960 | * The size of the supplied buffer |
1961 | * | 1961 | * |
1962 | * Returns Zero on success, negative on failure | 1962 | * Returns Zero on success, negative on failure |
1963 | */ | 1963 | */ |
@@ -1968,7 +1968,7 @@ extern int cvmx_pow_capture(void *buffer, int buffer_size); | |||
1968 | * | 1968 | * |
1969 | * @buffer: POW capture from cvmx_pow_capture() | 1969 | * @buffer: POW capture from cvmx_pow_capture() |
1970 | * @buffer_size: | 1970 | * @buffer_size: |
1971 | * Size of the buffer | 1971 | * Size of the buffer |
1972 | */ | 1972 | */ |
1973 | extern void cvmx_pow_display(void *buffer, int buffer_size); | 1973 | extern void cvmx_pow_display(void *buffer, int buffer_size); |
1974 | 1974 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-scratch.h b/arch/mips/include/asm/octeon/cvmx-scratch.h index 96b70cfd6245..8d21cc5e4e40 100644 --- a/arch/mips/include/asm/octeon/cvmx-scratch.h +++ b/arch/mips/include/asm/octeon/cvmx-scratch.h | |||
@@ -39,7 +39,7 @@ | |||
39 | * Note: This define must be a long, not a long long in order to | 39 | * Note: This define must be a long, not a long long in order to |
40 | * compile without warnings for both 32bit and 64bit. | 40 | * compile without warnings for both 32bit and 64bit. |
41 | */ | 41 | */ |
42 | #define CVMX_SCRATCH_BASE (-32768l) /* 0xffffffffffff8000 */ | 42 | #define CVMX_SCRATCH_BASE (-32768l) /* 0xffffffffffff8000 */ |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * Reads an 8 bit value from the processor local scratchpad memory. | 45 | * Reads an 8 bit value from the processor local scratchpad memory. |
diff --git a/arch/mips/include/asm/octeon/cvmx-spi.h b/arch/mips/include/asm/octeon/cvmx-spi.h index 3bf53b537bcf..d5038cc4b475 100644 --- a/arch/mips/include/asm/octeon/cvmx-spi.h +++ b/arch/mips/include/asm/octeon/cvmx-spi.h | |||
@@ -84,11 +84,11 @@ static inline int cvmx_spi_is_spi_interface(int interface) | |||
84 | * Initialize and start the SPI interface. | 84 | * Initialize and start the SPI interface. |
85 | * | 85 | * |
86 | * @interface: The identifier of the packet interface to configure and | 86 | * @interface: The identifier of the packet interface to configure and |
87 | * use as a SPI interface. | 87 | * use as a SPI interface. |
88 | * @mode: The operating mode for the SPI interface. The interface | 88 | * @mode: The operating mode for the SPI interface. The interface |
89 | * can operate as a full duplex (both Tx and Rx data paths | 89 | * can operate as a full duplex (both Tx and Rx data paths |
90 | * active) or as a halfplex (either the Tx data path is | 90 | * active) or as a halfplex (either the Tx data path is |
91 | * active or the Rx data path is active, but not both). | 91 | * active or the Rx data path is active, but not both). |
92 | * @timeout: Timeout to wait for clock synchronization in seconds | 92 | * @timeout: Timeout to wait for clock synchronization in seconds |
93 | * @num_ports: Number of SPI ports to configure | 93 | * @num_ports: Number of SPI ports to configure |
94 | * | 94 | * |
@@ -102,11 +102,11 @@ extern int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode, | |||
102 | * with its corespondant system. | 102 | * with its corespondant system. |
103 | * | 103 | * |
104 | * @interface: The identifier of the packet interface to configure and | 104 | * @interface: The identifier of the packet interface to configure and |
105 | * use as a SPI interface. | 105 | * use as a SPI interface. |
106 | * @mode: The operating mode for the SPI interface. The interface | 106 | * @mode: The operating mode for the SPI interface. The interface |
107 | * can operate as a full duplex (both Tx and Rx data paths | 107 | * can operate as a full duplex (both Tx and Rx data paths |
108 | * active) or as a halfplex (either the Tx data path is | 108 | * active) or as a halfplex (either the Tx data path is |
109 | * active or the Rx data path is active, but not both). | 109 | * active or the Rx data path is active, but not both). |
110 | * @timeout: Timeout to wait for clock synchronization in seconds | 110 | * @timeout: Timeout to wait for clock synchronization in seconds |
111 | * Returns Zero on success, negative of failure. | 111 | * Returns Zero on success, negative of failure. |
112 | */ | 112 | */ |
@@ -154,7 +154,7 @@ static inline union cvmx_gmxx_rxx_rx_inbnd cvmx_spi4000_check_speed( | |||
154 | /** | 154 | /** |
155 | * Get current SPI4 initialization callbacks | 155 | * Get current SPI4 initialization callbacks |
156 | * | 156 | * |
157 | * @callbacks: Pointer to the callbacks structure.to fill | 157 | * @callbacks: Pointer to the callbacks structure.to fill |
158 | * | 158 | * |
159 | * Returns Pointer to cvmx_spi_callbacks_t structure. | 159 | * Returns Pointer to cvmx_spi_callbacks_t structure. |
160 | */ | 160 | */ |
@@ -171,11 +171,11 @@ extern void cvmx_spi_set_callbacks(cvmx_spi_callbacks_t *new_callbacks); | |||
171 | * Callback to perform SPI4 reset | 171 | * Callback to perform SPI4 reset |
172 | * | 172 | * |
173 | * @interface: The identifier of the packet interface to configure and | 173 | * @interface: The identifier of the packet interface to configure and |
174 | * use as a SPI interface. | 174 | * use as a SPI interface. |
175 | * @mode: The operating mode for the SPI interface. The interface | 175 | * @mode: The operating mode for the SPI interface. The interface |
176 | * can operate as a full duplex (both Tx and Rx data paths | 176 | * can operate as a full duplex (both Tx and Rx data paths |
177 | * active) or as a halfplex (either the Tx data path is | 177 | * active) or as a halfplex (either the Tx data path is |
178 | * active or the Rx data path is active, but not both). | 178 | * active or the Rx data path is active, but not both). |
179 | * | 179 | * |
180 | * Returns Zero on success, non-zero error code on failure (will cause | 180 | * Returns Zero on success, non-zero error code on failure (will cause |
181 | * SPI initialization to abort) | 181 | * SPI initialization to abort) |
@@ -187,11 +187,11 @@ extern int cvmx_spi_reset_cb(int interface, cvmx_spi_mode_t mode); | |||
187 | * detection | 187 | * detection |
188 | * | 188 | * |
189 | * @interface: The identifier of the packet interface to configure and | 189 | * @interface: The identifier of the packet interface to configure and |
190 | * use as a SPI interface. | 190 | * use as a SPI interface. |
191 | * @mode: The operating mode for the SPI interface. The interface | 191 | * @mode: The operating mode for the SPI interface. The interface |
192 | * can operate as a full duplex (both Tx and Rx data paths | 192 | * can operate as a full duplex (both Tx and Rx data paths |
193 | * active) or as a halfplex (either the Tx data path is | 193 | * active) or as a halfplex (either the Tx data path is |
194 | * active or the Rx data path is active, but not both). | 194 | * active or the Rx data path is active, but not both). |
195 | * @num_ports: Number of ports to configure on SPI | 195 | * @num_ports: Number of ports to configure on SPI |
196 | * | 196 | * |
197 | * Returns Zero on success, non-zero error code on failure (will cause | 197 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -204,11 +204,11 @@ extern int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode, | |||
204 | * Callback to perform clock detection | 204 | * Callback to perform clock detection |
205 | * | 205 | * |
206 | * @interface: The identifier of the packet interface to configure and | 206 | * @interface: The identifier of the packet interface to configure and |
207 | * use as a SPI interface. | 207 | * use as a SPI interface. |
208 | * @mode: The operating mode for the SPI interface. The interface | 208 | * @mode: The operating mode for the SPI interface. The interface |
209 | * can operate as a full duplex (both Tx and Rx data paths | 209 | * can operate as a full duplex (both Tx and Rx data paths |
210 | * active) or as a halfplex (either the Tx data path is | 210 | * active) or as a halfplex (either the Tx data path is |
211 | * active or the Rx data path is active, but not both). | 211 | * active or the Rx data path is active, but not both). |
212 | * @timeout: Timeout to wait for clock synchronization in seconds | 212 | * @timeout: Timeout to wait for clock synchronization in seconds |
213 | * | 213 | * |
214 | * Returns Zero on success, non-zero error code on failure (will cause | 214 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -221,11 +221,11 @@ extern int cvmx_spi_clock_detect_cb(int interface, cvmx_spi_mode_t mode, | |||
221 | * Callback to perform link training | 221 | * Callback to perform link training |
222 | * | 222 | * |
223 | * @interface: The identifier of the packet interface to configure and | 223 | * @interface: The identifier of the packet interface to configure and |
224 | * use as a SPI interface. | 224 | * use as a SPI interface. |
225 | * @mode: The operating mode for the SPI interface. The interface | 225 | * @mode: The operating mode for the SPI interface. The interface |
226 | * can operate as a full duplex (both Tx and Rx data paths | 226 | * can operate as a full duplex (both Tx and Rx data paths |
227 | * active) or as a halfplex (either the Tx data path is | 227 | * active) or as a halfplex (either the Tx data path is |
228 | * active or the Rx data path is active, but not both). | 228 | * active or the Rx data path is active, but not both). |
229 | * @timeout: Timeout to wait for link to be trained (in seconds) | 229 | * @timeout: Timeout to wait for link to be trained (in seconds) |
230 | * | 230 | * |
231 | * Returns Zero on success, non-zero error code on failure (will cause | 231 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -238,11 +238,11 @@ extern int cvmx_spi_training_cb(int interface, cvmx_spi_mode_t mode, | |||
238 | * Callback to perform calendar data synchronization | 238 | * Callback to perform calendar data synchronization |
239 | * | 239 | * |
240 | * @interface: The identifier of the packet interface to configure and | 240 | * @interface: The identifier of the packet interface to configure and |
241 | * use as a SPI interface. | 241 | * use as a SPI interface. |
242 | * @mode: The operating mode for the SPI interface. The interface | 242 | * @mode: The operating mode for the SPI interface. The interface |
243 | * can operate as a full duplex (both Tx and Rx data paths | 243 | * can operate as a full duplex (both Tx and Rx data paths |
244 | * active) or as a halfplex (either the Tx data path is | 244 | * active) or as a halfplex (either the Tx data path is |
245 | * active or the Rx data path is active, but not both). | 245 | * active or the Rx data path is active, but not both). |
246 | * @timeout: Timeout to wait for calendar data in seconds | 246 | * @timeout: Timeout to wait for calendar data in seconds |
247 | * | 247 | * |
248 | * Returns Zero on success, non-zero error code on failure (will cause | 248 | * Returns Zero on success, non-zero error code on failure (will cause |
@@ -255,11 +255,11 @@ extern int cvmx_spi_calendar_sync_cb(int interface, cvmx_spi_mode_t mode, | |||
255 | * Callback to handle interface up | 255 | * Callback to handle interface up |
256 | * | 256 | * |
257 | * @interface: The identifier of the packet interface to configure and | 257 | * @interface: The identifier of the packet interface to configure and |
258 | * use as a SPI interface. | 258 | * use as a SPI interface. |
259 | * @mode: The operating mode for the SPI interface. The interface | 259 | * @mode: The operating mode for the SPI interface. The interface |
260 | * can operate as a full duplex (both Tx and Rx data paths | 260 | * can operate as a full duplex (both Tx and Rx data paths |
261 | * active) or as a halfplex (either the Tx data path is | 261 | * active) or as a halfplex (either the Tx data path is |
262 | * active or the Rx data path is active, but not both). | 262 | * active or the Rx data path is active, but not both). |
263 | * | 263 | * |
264 | * Returns Zero on success, non-zero error code on failure (will cause | 264 | * Returns Zero on success, non-zero error code on failure (will cause |
265 | * SPI initialization to abort) | 265 | * SPI initialization to abort) |
diff --git a/arch/mips/include/asm/octeon/cvmx-spinlock.h b/arch/mips/include/asm/octeon/cvmx-spinlock.h index a672abb1bc4f..4f09cff8b8c0 100644 --- a/arch/mips/include/asm/octeon/cvmx-spinlock.h +++ b/arch/mips/include/asm/octeon/cvmx-spinlock.h | |||
@@ -26,7 +26,7 @@ | |||
26 | ***********************license end**************************************/ | 26 | ***********************license end**************************************/ |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * Implementation of spinlocks for Octeon CVMX. Although similar in | 29 | * Implementation of spinlocks for Octeon CVMX. Although similar in |
30 | * function to Linux kernel spinlocks, they are not compatible. | 30 | * function to Linux kernel spinlocks, they are not compatible. |
31 | * Octeon CVMX spinlocks are only used to synchronize with the boot | 31 | * Octeon CVMX spinlocks are only used to synchronize with the boot |
32 | * monitor and other non-Linux programs running in the system. | 32 | * monitor and other non-Linux programs running in the system. |
@@ -50,8 +50,8 @@ typedef struct { | |||
50 | } cvmx_spinlock_t; | 50 | } cvmx_spinlock_t; |
51 | 51 | ||
52 | /* note - macros not expanded in inline ASM, so values hardcoded */ | 52 | /* note - macros not expanded in inline ASM, so values hardcoded */ |
53 | #define CVMX_SPINLOCK_UNLOCKED_VAL 0 | 53 | #define CVMX_SPINLOCK_UNLOCKED_VAL 0 |
54 | #define CVMX_SPINLOCK_LOCKED_VAL 1 | 54 | #define CVMX_SPINLOCK_LOCKED_VAL 1 |
55 | 55 | ||
56 | #define CVMX_SPINLOCK_UNLOCKED_INITIALIZER {CVMX_SPINLOCK_UNLOCKED_VAL} | 56 | #define CVMX_SPINLOCK_UNLOCKED_INITIALIZER {CVMX_SPINLOCK_UNLOCKED_VAL} |
57 | 57 | ||
@@ -96,7 +96,7 @@ static inline void cvmx_spinlock_unlock(cvmx_spinlock_t *lock) | |||
96 | * @lock: pointer to lock structure | 96 | * @lock: pointer to lock structure |
97 | * | 97 | * |
98 | * Returns 0: lock successfully taken | 98 | * Returns 0: lock successfully taken |
99 | * 1: lock not taken, held by someone else | 99 | * 1: lock not taken, held by someone else |
100 | * These return values match the Linux semantics. | 100 | * These return values match the Linux semantics. |
101 | */ | 101 | */ |
102 | 102 | ||
@@ -104,16 +104,16 @@ static inline unsigned int cvmx_spinlock_trylock(cvmx_spinlock_t *lock) | |||
104 | { | 104 | { |
105 | unsigned int tmp; | 105 | unsigned int tmp; |
106 | 106 | ||
107 | __asm__ __volatile__(".set noreorder \n" | 107 | __asm__ __volatile__(".set noreorder \n" |
108 | "1: ll %[tmp], %[val] \n" | 108 | "1: ll %[tmp], %[val] \n" |
109 | /* if lock held, fail immediately */ | 109 | /* if lock held, fail immediately */ |
110 | " bnez %[tmp], 2f \n" | 110 | " bnez %[tmp], 2f \n" |
111 | " li %[tmp], 1 \n" | 111 | " li %[tmp], 1 \n" |
112 | " sc %[tmp], %[val] \n" | 112 | " sc %[tmp], %[val] \n" |
113 | " beqz %[tmp], 1b \n" | 113 | " beqz %[tmp], 1b \n" |
114 | " li %[tmp], 0 \n" | 114 | " li %[tmp], 0 \n" |
115 | "2: \n" | 115 | "2: \n" |
116 | ".set reorder \n" : | 116 | ".set reorder \n" : |
117 | [val] "+m"(lock->value), [tmp] "=&r"(tmp) | 117 | [val] "+m"(lock->value), [tmp] "=&r"(tmp) |
118 | : : "memory"); | 118 | : : "memory"); |
119 | 119 | ||
@@ -129,14 +129,14 @@ static inline void cvmx_spinlock_lock(cvmx_spinlock_t *lock) | |||
129 | { | 129 | { |
130 | unsigned int tmp; | 130 | unsigned int tmp; |
131 | 131 | ||
132 | __asm__ __volatile__(".set noreorder \n" | 132 | __asm__ __volatile__(".set noreorder \n" |
133 | "1: ll %[tmp], %[val] \n" | 133 | "1: ll %[tmp], %[val] \n" |
134 | " bnez %[tmp], 1b \n" | 134 | " bnez %[tmp], 1b \n" |
135 | " li %[tmp], 1 \n" | 135 | " li %[tmp], 1 \n" |
136 | " sc %[tmp], %[val] \n" | 136 | " sc %[tmp], %[val] \n" |
137 | " beqz %[tmp], 1b \n" | 137 | " beqz %[tmp], 1b \n" |
138 | " nop \n" | 138 | " nop \n" |
139 | ".set reorder \n" : | 139 | ".set reorder \n" : |
140 | [val] "+m"(lock->value), [tmp] "=&r"(tmp) | 140 | [val] "+m"(lock->value), [tmp] "=&r"(tmp) |
141 | : : "memory"); | 141 | : : "memory"); |
142 | 142 | ||
@@ -163,17 +163,17 @@ static inline void cvmx_spinlock_bit_lock(uint32_t *word) | |||
163 | unsigned int tmp; | 163 | unsigned int tmp; |
164 | unsigned int sav; | 164 | unsigned int sav; |
165 | 165 | ||
166 | __asm__ __volatile__(".set noreorder \n" | 166 | __asm__ __volatile__(".set noreorder \n" |
167 | ".set noat \n" | 167 | ".set noat \n" |
168 | "1: ll %[tmp], %[val] \n" | 168 | "1: ll %[tmp], %[val] \n" |
169 | " bbit1 %[tmp], 31, 1b \n" | 169 | " bbit1 %[tmp], 31, 1b \n" |
170 | " li $at, 1 \n" | 170 | " li $at, 1 \n" |
171 | " ins %[tmp], $at, 31, 1 \n" | 171 | " ins %[tmp], $at, 31, 1 \n" |
172 | " sc %[tmp], %[val] \n" | 172 | " sc %[tmp], %[val] \n" |
173 | " beqz %[tmp], 1b \n" | 173 | " beqz %[tmp], 1b \n" |
174 | " nop \n" | 174 | " nop \n" |
175 | ".set at \n" | 175 | ".set at \n" |
176 | ".set reorder \n" : | 176 | ".set reorder \n" : |
177 | [val] "+m"(*word), [tmp] "=&r"(tmp), [sav] "=&r"(sav) | 177 | [val] "+m"(*word), [tmp] "=&r"(tmp), [sav] "=&r"(sav) |
178 | : : "memory"); | 178 | : : "memory"); |
179 | 179 | ||
@@ -187,7 +187,7 @@ static inline void cvmx_spinlock_bit_lock(uint32_t *word) | |||
187 | * | 187 | * |
188 | * @word: word to lock bit 31 of | 188 | * @word: word to lock bit 31 of |
189 | * Returns 0: lock successfully taken | 189 | * Returns 0: lock successfully taken |
190 | * 1: lock not taken, held by someone else | 190 | * 1: lock not taken, held by someone else |
191 | * These return values match the Linux semantics. | 191 | * These return values match the Linux semantics. |
192 | */ | 192 | */ |
193 | static inline unsigned int cvmx_spinlock_bit_trylock(uint32_t *word) | 193 | static inline unsigned int cvmx_spinlock_bit_trylock(uint32_t *word) |
@@ -198,15 +198,15 @@ static inline unsigned int cvmx_spinlock_bit_trylock(uint32_t *word) | |||
198 | ".set noat\n" | 198 | ".set noat\n" |
199 | "1: ll %[tmp], %[val] \n" | 199 | "1: ll %[tmp], %[val] \n" |
200 | /* if lock held, fail immediately */ | 200 | /* if lock held, fail immediately */ |
201 | " bbit1 %[tmp], 31, 2f \n" | 201 | " bbit1 %[tmp], 31, 2f \n" |
202 | " li $at, 1 \n" | 202 | " li $at, 1 \n" |
203 | " ins %[tmp], $at, 31, 1 \n" | 203 | " ins %[tmp], $at, 31, 1 \n" |
204 | " sc %[tmp], %[val] \n" | 204 | " sc %[tmp], %[val] \n" |
205 | " beqz %[tmp], 1b \n" | 205 | " beqz %[tmp], 1b \n" |
206 | " li %[tmp], 0 \n" | 206 | " li %[tmp], 0 \n" |
207 | "2: \n" | 207 | "2: \n" |
208 | ".set at \n" | 208 | ".set at \n" |
209 | ".set reorder \n" : | 209 | ".set reorder \n" : |
210 | [val] "+m"(*word), [tmp] "=&r"(tmp) | 210 | [val] "+m"(*word), [tmp] "=&r"(tmp) |
211 | : : "memory"); | 211 | : : "memory"); |
212 | 212 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx-sysinfo.h b/arch/mips/include/asm/octeon/cvmx-sysinfo.h index 61dd5741afe4..2131197422e5 100644 --- a/arch/mips/include/asm/octeon/cvmx-sysinfo.h +++ b/arch/mips/include/asm/octeon/cvmx-sysinfo.h | |||
@@ -85,7 +85,7 @@ struct cvmx_sysinfo { | |||
85 | char board_serial_number[OCTEON_SERIAL_LEN]; | 85 | char board_serial_number[OCTEON_SERIAL_LEN]; |
86 | /* | 86 | /* |
87 | * Several boards support compact flash on the Octeon boot | 87 | * Several boards support compact flash on the Octeon boot |
88 | * bus. The CF memory spaces may be mapped to different | 88 | * bus. The CF memory spaces may be mapped to different |
89 | * addresses on different boards. These values will be 0 if | 89 | * addresses on different boards. These values will be 0 if |
90 | * CF is not present. Note that these addresses are physical | 90 | * CF is not present. Note that these addresses are physical |
91 | * addresses, and it is up to the application to use the | 91 | * addresses, and it is up to the application to use the |
@@ -123,25 +123,25 @@ extern struct cvmx_sysinfo *cvmx_sysinfo_get(void); | |||
123 | 123 | ||
124 | /** | 124 | /** |
125 | * This function is used in non-simple executive environments (such as | 125 | * This function is used in non-simple executive environments (such as |
126 | * Linux kernel, u-boot, etc.) to configure the minimal fields that | 126 | * Linux kernel, u-boot, etc.) to configure the minimal fields that |
127 | * are required to use simple executive files directly. | 127 | * are required to use simple executive files directly. |
128 | * | 128 | * |
129 | * Locking (if required) must be handled outside of this | 129 | * Locking (if required) must be handled outside of this |
130 | * function | 130 | * function |
131 | * | 131 | * |
132 | * @phy_mem_desc_ptr: Pointer to global physical memory descriptor | 132 | * @phy_mem_desc_ptr: Pointer to global physical memory descriptor |
133 | * (bootmem descriptor) @board_type: Octeon board | 133 | * (bootmem descriptor) @board_type: Octeon board |
134 | * type enumeration | 134 | * type enumeration |
135 | * | 135 | * |
136 | * @board_rev_major: | 136 | * @board_rev_major: |
137 | * Board major revision | 137 | * Board major revision |
138 | * @board_rev_minor: | 138 | * @board_rev_minor: |
139 | * Board minor revision | 139 | * Board minor revision |
140 | * @cpu_clock_hz: | 140 | * @cpu_clock_hz: |
141 | * CPU clock freqency in hertz | 141 | * CPU clock freqency in hertz |
142 | * | 142 | * |
143 | * Returns 0: Failure | 143 | * Returns 0: Failure |
144 | * 1: success | 144 | * 1: success |
145 | */ | 145 | */ |
146 | extern int cvmx_sysinfo_minimal_initialize(void *phy_mem_desc_ptr, | 146 | extern int cvmx_sysinfo_minimal_initialize(void *phy_mem_desc_ptr, |
147 | uint16_t board_type, | 147 | uint16_t board_type, |
diff --git a/arch/mips/include/asm/octeon/cvmx-wqe.h b/arch/mips/include/asm/octeon/cvmx-wqe.h index df762389e271..aa0d3d0de75c 100644 --- a/arch/mips/include/asm/octeon/cvmx-wqe.h +++ b/arch/mips/include/asm/octeon/cvmx-wqe.h | |||
@@ -101,23 +101,23 @@ typedef union { | |||
101 | * - 1 = Malformed L4 | 101 | * - 1 = Malformed L4 |
102 | * - 2 = L4 Checksum Error: the L4 checksum value is | 102 | * - 2 = L4 Checksum Error: the L4 checksum value is |
103 | * - 3 = UDP Length Error: The UDP length field would | 103 | * - 3 = UDP Length Error: The UDP length field would |
104 | * make the UDP data longer than what remains in | 104 | * make the UDP data longer than what remains in |
105 | * the IP packet (as defined by the IP header | 105 | * the IP packet (as defined by the IP header |
106 | * length field). | 106 | * length field). |
107 | * - 4 = Bad L4 Port: either the source or destination | 107 | * - 4 = Bad L4 Port: either the source or destination |
108 | * TCP/UDP port is 0. | 108 | * TCP/UDP port is 0. |
109 | * - 8 = TCP FIN Only: the packet is TCP and only the | 109 | * - 8 = TCP FIN Only: the packet is TCP and only the |
110 | * FIN flag set. | 110 | * FIN flag set. |
111 | * - 9 = TCP No Flags: the packet is TCP and no flags | 111 | * - 9 = TCP No Flags: the packet is TCP and no flags |
112 | * are set. | 112 | * are set. |
113 | * - 10 = TCP FIN RST: the packet is TCP and both FIN | 113 | * - 10 = TCP FIN RST: the packet is TCP and both FIN |
114 | * and RST are set. | 114 | * and RST are set. |
115 | * - 11 = TCP SYN URG: the packet is TCP and both SYN | 115 | * - 11 = TCP SYN URG: the packet is TCP and both SYN |
116 | * and URG are set. | 116 | * and URG are set. |
117 | * - 12 = TCP SYN RST: the packet is TCP and both SYN | 117 | * - 12 = TCP SYN RST: the packet is TCP and both SYN |
118 | * and RST are set. | 118 | * and RST are set. |
119 | * - 13 = TCP SYN FIN: the packet is TCP and both SYN | 119 | * - 13 = TCP SYN FIN: the packet is TCP and both SYN |
120 | * and FIN are set. | 120 | * and FIN are set. |
121 | */ | 121 | */ |
122 | uint64_t L4_error:1; | 122 | uint64_t L4_error:1; |
123 | /* set if the packet is a fragment */ | 123 | /* set if the packet is a fragment */ |
@@ -127,16 +127,16 @@ typedef union { | |||
127 | * failure indicated in err_code below, decode: | 127 | * failure indicated in err_code below, decode: |
128 | * | 128 | * |
129 | * - 1 = Not IP: the IP version field is neither 4 nor | 129 | * - 1 = Not IP: the IP version field is neither 4 nor |
130 | * 6. | 130 | * 6. |
131 | * - 2 = IPv4 Header Checksum Error: the IPv4 header | 131 | * - 2 = IPv4 Header Checksum Error: the IPv4 header |
132 | * has a checksum violation. | 132 | * has a checksum violation. |
133 | * - 3 = IP Malformed Header: the packet is not long | 133 | * - 3 = IP Malformed Header: the packet is not long |
134 | * enough to contain the IP header. | 134 | * enough to contain the IP header. |
135 | * - 4 = IP Malformed: the packet is not long enough | 135 | * - 4 = IP Malformed: the packet is not long enough |
136 | * to contain the bytes indicated by the IP | 136 | * to contain the bytes indicated by the IP |
137 | * header. Pad is allowed. | 137 | * header. Pad is allowed. |
138 | * - 5 = IP TTL Hop: the IPv4 TTL field or the IPv6 | 138 | * - 5 = IP TTL Hop: the IPv4 TTL field or the IPv6 |
139 | * Hop Count field are zero. | 139 | * Hop Count field are zero. |
140 | * - 6 = IP Options | 140 | * - 6 = IP Options |
141 | */ | 141 | */ |
142 | uint64_t IP_exc:1; | 142 | uint64_t IP_exc:1; |
@@ -243,46 +243,46 @@ typedef union { | |||
243 | * decode: | 243 | * decode: |
244 | * | 244 | * |
245 | * - 1 = partial error: a packet was partially | 245 | * - 1 = partial error: a packet was partially |
246 | * received, but internal buffering / bandwidth | 246 | * received, but internal buffering / bandwidth |
247 | * was not adequate to receive the entire | 247 | * was not adequate to receive the entire |
248 | * packet. | 248 | * packet. |
249 | * - 2 = jabber error: the RGMII packet was too large | 249 | * - 2 = jabber error: the RGMII packet was too large |
250 | * and is truncated. | 250 | * and is truncated. |
251 | * - 3 = overrun error: the RGMII packet is longer | 251 | * - 3 = overrun error: the RGMII packet is longer |
252 | * than allowed and had an FCS error. | 252 | * than allowed and had an FCS error. |
253 | * - 4 = oversize error: the RGMII packet is longer | 253 | * - 4 = oversize error: the RGMII packet is longer |
254 | * than allowed. | 254 | * than allowed. |
255 | * - 5 = alignment error: the RGMII packet is not an | 255 | * - 5 = alignment error: the RGMII packet is not an |
256 | * integer number of bytes | 256 | * integer number of bytes |
257 | * and had an FCS error (100M and 10M only). | 257 | * and had an FCS error (100M and 10M only). |
258 | * - 6 = fragment error: the RGMII packet is shorter | 258 | * - 6 = fragment error: the RGMII packet is shorter |
259 | * than allowed and had an FCS error. | 259 | * than allowed and had an FCS error. |
260 | * - 7 = GMX FCS error: the RGMII packet had an FCS | 260 | * - 7 = GMX FCS error: the RGMII packet had an FCS |
261 | * error. | 261 | * error. |
262 | * - 8 = undersize error: the RGMII packet is shorter | 262 | * - 8 = undersize error: the RGMII packet is shorter |
263 | * than allowed. | 263 | * than allowed. |
264 | * - 9 = extend error: the RGMII packet had an extend | 264 | * - 9 = extend error: the RGMII packet had an extend |
265 | * error. | 265 | * error. |
266 | * - 10 = length mismatch error: the RGMII packet had | 266 | * - 10 = length mismatch error: the RGMII packet had |
267 | * a length that did not match the length field | 267 | * a length that did not match the length field |
268 | * in the L2 HDR. | 268 | * in the L2 HDR. |
269 | * - 11 = RGMII RX error/SPI4 DIP4 Error: the RGMII | 269 | * - 11 = RGMII RX error/SPI4 DIP4 Error: the RGMII |
270 | * packet had one or more data reception errors | 270 | * packet had one or more data reception errors |
271 | * (RXERR) or the SPI4 packet had one or more | 271 | * (RXERR) or the SPI4 packet had one or more |
272 | * DIP4 errors. | 272 | * DIP4 errors. |
273 | * - 12 = RGMII skip error/SPI4 Abort Error: the RGMII | 273 | * - 12 = RGMII skip error/SPI4 Abort Error: the RGMII |
274 | * packet was not large enough to cover the | 274 | * packet was not large enough to cover the |
275 | * skipped bytes or the SPI4 packet was | 275 | * skipped bytes or the SPI4 packet was |
276 | * terminated with an About EOPS. | 276 | * terminated with an About EOPS. |
277 | * - 13 = RGMII nibble error/SPI4 Port NXA Error: the | 277 | * - 13 = RGMII nibble error/SPI4 Port NXA Error: the |
278 | * RGMII packet had a studder error (data not | 278 | * RGMII packet had a studder error (data not |
279 | * repeated - 10/100M only) or the SPI4 packet | 279 | * repeated - 10/100M only) or the SPI4 packet |
280 | * was sent to an NXA. | 280 | * was sent to an NXA. |
281 | * - 16 = FCS error: a SPI4.2 packet had an FCS error. | 281 | * - 16 = FCS error: a SPI4.2 packet had an FCS error. |
282 | * - 17 = Skip error: a packet was not large enough to | 282 | * - 17 = Skip error: a packet was not large enough to |
283 | * cover the skipped bytes. | 283 | * cover the skipped bytes. |
284 | * - 18 = L2 header malformed: the packet is not long | 284 | * - 18 = L2 header malformed: the packet is not long |
285 | * enough to contain the L2. | 285 | * enough to contain the L2. |
286 | */ | 286 | */ |
287 | 287 | ||
288 | uint64_t rcv_error:1; | 288 | uint64_t rcv_error:1; |
@@ -309,7 +309,7 @@ typedef struct { | |||
309 | 309 | ||
310 | /***************************************************************** | 310 | /***************************************************************** |
311 | * WORD 0 | 311 | * WORD 0 |
312 | * HW WRITE: the following 64 bits are filled by HW when a packet arrives | 312 | * HW WRITE: the following 64 bits are filled by HW when a packet arrives |
313 | */ | 313 | */ |
314 | 314 | ||
315 | /** | 315 | /** |
@@ -323,14 +323,14 @@ typedef struct { | |||
323 | /** | 323 | /** |
324 | * Next pointer used by hardware for list maintenance. | 324 | * Next pointer used by hardware for list maintenance. |
325 | * May be written/read by HW before the work queue | 325 | * May be written/read by HW before the work queue |
326 | * entry is scheduled to a PP | 326 | * entry is scheduled to a PP |
327 | * (Only 36 bits used in Octeon 1) | 327 | * (Only 36 bits used in Octeon 1) |
328 | */ | 328 | */ |
329 | uint64_t next_ptr:40; | 329 | uint64_t next_ptr:40; |
330 | 330 | ||
331 | /***************************************************************** | 331 | /***************************************************************** |
332 | * WORD 1 | 332 | * WORD 1 |
333 | * HW WRITE: the following 64 bits are filled by HW when a packet arrives | 333 | * HW WRITE: the following 64 bits are filled by HW when a packet arrives |
334 | */ | 334 | */ |
335 | 335 | ||
336 | /** | 336 | /** |
@@ -362,8 +362,8 @@ typedef struct { | |||
362 | 362 | ||
363 | /** | 363 | /** |
364 | * WORD 2 HW WRITE: the following 64-bits are filled in by | 364 | * WORD 2 HW WRITE: the following 64-bits are filled in by |
365 | * hardware when a packet arrives This indicates a variety of | 365 | * hardware when a packet arrives This indicates a variety of |
366 | * status and error conditions. | 366 | * status and error conditions. |
367 | */ | 367 | */ |
368 | cvmx_pip_wqe_word2 word2; | 368 | cvmx_pip_wqe_word2 word2; |
369 | 369 | ||
@@ -373,15 +373,15 @@ typedef struct { | |||
373 | union cvmx_buf_ptr packet_ptr; | 373 | union cvmx_buf_ptr packet_ptr; |
374 | 374 | ||
375 | /** | 375 | /** |
376 | * HW WRITE: octeon will fill in a programmable amount from the | 376 | * HW WRITE: octeon will fill in a programmable amount from the |
377 | * packet, up to (at most, but perhaps less) the amount | 377 | * packet, up to (at most, but perhaps less) the amount |
378 | * needed to fill the work queue entry to 128 bytes | 378 | * needed to fill the work queue entry to 128 bytes |
379 | * | 379 | * |
380 | * If the packet is recognized to be IP, the hardware starts | 380 | * If the packet is recognized to be IP, the hardware starts |
381 | * (except that the IPv4 header is padded for appropriate | 381 | * (except that the IPv4 header is padded for appropriate |
382 | * alignment) writing here where the IP header starts. If the | 382 | * alignment) writing here where the IP header starts. If the |
383 | * packet is not recognized to be IP, the hardware starts | 383 | * packet is not recognized to be IP, the hardware starts |
384 | * writing the beginning of the packet here. | 384 | * writing the beginning of the packet here. |
385 | */ | 385 | */ |
386 | uint8_t packet_data[96]; | 386 | uint8_t packet_data[96]; |
387 | 387 | ||
diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h index db58beab6cb2..f991e7701d3d 100644 --- a/arch/mips/include/asm/octeon/cvmx.h +++ b/arch/mips/include/asm/octeon/cvmx.h | |||
@@ -76,14 +76,14 @@ enum cvmx_mips_space { | |||
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #if CVMX_ENABLE_DEBUG_PRINTS | 78 | #if CVMX_ENABLE_DEBUG_PRINTS |
79 | #define cvmx_dprintf printk | 79 | #define cvmx_dprintf printk |
80 | #else | 80 | #else |
81 | #define cvmx_dprintf(...) {} | 81 | #define cvmx_dprintf(...) {} |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #define CVMX_MAX_CORES (16) | 84 | #define CVMX_MAX_CORES (16) |
85 | #define CVMX_CACHE_LINE_SIZE (128) /* In bytes */ | 85 | #define CVMX_CACHE_LINE_SIZE (128) /* In bytes */ |
86 | #define CVMX_CACHE_LINE_MASK (CVMX_CACHE_LINE_SIZE - 1) /* In bytes */ | 86 | #define CVMX_CACHE_LINE_MASK (CVMX_CACHE_LINE_SIZE - 1) /* In bytes */ |
87 | #define CVMX_CACHE_LINE_ALIGNED __attribute__ ((aligned(CVMX_CACHE_LINE_SIZE))) | 87 | #define CVMX_CACHE_LINE_ALIGNED __attribute__ ((aligned(CVMX_CACHE_LINE_SIZE))) |
88 | #define CAST64(v) ((long long)(long)(v)) | 88 | #define CAST64(v) ((long long)(long)(v)) |
89 | #define CASTPTR(type, v) ((type *)(long)(v)) | 89 | #define CASTPTR(type, v) ((type *)(long)(v)) |
@@ -133,8 +133,8 @@ static inline uint64_t cvmx_build_io_address(uint64_t major_did, | |||
133 | * | 133 | * |
134 | * Example: cvmx_build_bits(39,24,value) | 134 | * Example: cvmx_build_bits(39,24,value) |
135 | * <pre> | 135 | * <pre> |
136 | * 6 5 4 3 3 2 1 | 136 | * 6 5 4 3 3 2 1 |
137 | * 3 5 7 9 1 3 5 7 0 | 137 | * 3 5 7 9 1 3 5 7 0 |
138 | * +-------+-------+-------+-------+-------+-------+-------+------+ | 138 | * +-------+-------+-------+-------+-------+-------+-------+------+ |
139 | * 000000000000000000000000___________value000000000000000000000000 | 139 | * 000000000000000000000000___________value000000000000000000000000 |
140 | * </pre> | 140 | * </pre> |
@@ -183,7 +183,7 @@ static inline uint64_t cvmx_ptr_to_phys(void *ptr) | |||
183 | * memory pointer (void *). | 183 | * memory pointer (void *). |
184 | * | 184 | * |
185 | * @physical_address: | 185 | * @physical_address: |
186 | * Hardware physical address to memory | 186 | * Hardware physical address to memory |
187 | * Returns Pointer to memory | 187 | * Returns Pointer to memory |
188 | */ | 188 | */ |
189 | static inline void *cvmx_phys_to_ptr(uint64_t physical_address) | 189 | static inline void *cvmx_phys_to_ptr(uint64_t physical_address) |
@@ -207,10 +207,10 @@ static inline void *cvmx_phys_to_ptr(uint64_t physical_address) | |||
207 | 207 | ||
208 | /* We have a full 64bit ABI. Writing to a 64bit address can be done with | 208 | /* We have a full 64bit ABI. Writing to a 64bit address can be done with |
209 | a simple volatile pointer */ | 209 | a simple volatile pointer */ |
210 | #define CVMX_BUILD_WRITE64(TYPE, ST) \ | 210 | #define CVMX_BUILD_WRITE64(TYPE, ST) \ |
211 | static inline void cvmx_write64_##TYPE(uint64_t addr, TYPE##_t val) \ | 211 | static inline void cvmx_write64_##TYPE(uint64_t addr, TYPE##_t val) \ |
212 | { \ | 212 | { \ |
213 | *CASTPTR(volatile TYPE##_t, addr) = val; \ | 213 | *CASTPTR(volatile TYPE##_t, addr) = val; \ |
214 | } | 214 | } |
215 | 215 | ||
216 | 216 | ||
@@ -221,19 +221,19 @@ static inline void cvmx_write64_##TYPE(uint64_t addr, TYPE##_t val) \ | |||
221 | 221 | ||
222 | /* We have a full 64bit ABI. Writing to a 64bit address can be done with | 222 | /* We have a full 64bit ABI. Writing to a 64bit address can be done with |
223 | a simple volatile pointer */ | 223 | a simple volatile pointer */ |
224 | #define CVMX_BUILD_READ64(TYPE, LT) \ | 224 | #define CVMX_BUILD_READ64(TYPE, LT) \ |
225 | static inline TYPE##_t cvmx_read64_##TYPE(uint64_t addr) \ | 225 | static inline TYPE##_t cvmx_read64_##TYPE(uint64_t addr) \ |
226 | { \ | 226 | { \ |
227 | return *CASTPTR(volatile TYPE##_t, addr); \ | 227 | return *CASTPTR(volatile TYPE##_t, addr); \ |
228 | } | 228 | } |
229 | 229 | ||
230 | 230 | ||
231 | /* The following defines 8 functions for writing to a 64bit address. Each | 231 | /* The following defines 8 functions for writing to a 64bit address. Each |
232 | takes two arguments, the address and the value to write. | 232 | takes two arguments, the address and the value to write. |
233 | cvmx_write64_int64 cvmx_write64_uint64 | 233 | cvmx_write64_int64 cvmx_write64_uint64 |
234 | cvmx_write64_int32 cvmx_write64_uint32 | 234 | cvmx_write64_int32 cvmx_write64_uint32 |
235 | cvmx_write64_int16 cvmx_write64_uint16 | 235 | cvmx_write64_int16 cvmx_write64_uint16 |
236 | cvmx_write64_int8 cvmx_write64_uint8 */ | 236 | cvmx_write64_int8 cvmx_write64_uint8 */ |
237 | CVMX_BUILD_WRITE64(int64, "sd"); | 237 | CVMX_BUILD_WRITE64(int64, "sd"); |
238 | CVMX_BUILD_WRITE64(int32, "sw"); | 238 | CVMX_BUILD_WRITE64(int32, "sw"); |
239 | CVMX_BUILD_WRITE64(int16, "sh"); | 239 | CVMX_BUILD_WRITE64(int16, "sh"); |
@@ -246,10 +246,10 @@ CVMX_BUILD_WRITE64(uint8, "sb"); | |||
246 | 246 | ||
247 | /* The following defines 8 functions for reading from a 64bit address. Each | 247 | /* The following defines 8 functions for reading from a 64bit address. Each |
248 | takes the address as the only argument | 248 | takes the address as the only argument |
249 | cvmx_read64_int64 cvmx_read64_uint64 | 249 | cvmx_read64_int64 cvmx_read64_uint64 |
250 | cvmx_read64_int32 cvmx_read64_uint32 | 250 | cvmx_read64_int32 cvmx_read64_uint32 |
251 | cvmx_read64_int16 cvmx_read64_uint16 | 251 | cvmx_read64_int16 cvmx_read64_uint16 |
252 | cvmx_read64_int8 cvmx_read64_uint8 */ | 252 | cvmx_read64_int8 cvmx_read64_uint8 */ |
253 | CVMX_BUILD_READ64(int64, "ld"); | 253 | CVMX_BUILD_READ64(int64, "ld"); |
254 | CVMX_BUILD_READ64(int32, "lw"); | 254 | CVMX_BUILD_READ64(int32, "lw"); |
255 | CVMX_BUILD_READ64(int16, "lh"); | 255 | CVMX_BUILD_READ64(int16, "lh"); |
@@ -389,7 +389,7 @@ static inline void cvmx_wait(uint64_t cycles) | |||
389 | 389 | ||
390 | /** | 390 | /** |
391 | * Reads a chip global cycle counter. This counts CPU cycles since | 391 | * Reads a chip global cycle counter. This counts CPU cycles since |
392 | * chip reset. The counter is 64 bit. | 392 | * chip reset. The counter is 64 bit. |
393 | * This register does not exist on CN38XX pass 1 silicion | 393 | * This register does not exist on CN38XX pass 1 silicion |
394 | * | 394 | * |
395 | * Returns Global chip cycle count since chip reset. | 395 | * Returns Global chip cycle count since chip reset. |
@@ -453,7 +453,7 @@ static inline uint32_t cvmx_octeon_num_cores(void) | |||
453 | 453 | ||
454 | /** | 454 | /** |
455 | * Read a byte of fuse data | 455 | * Read a byte of fuse data |
456 | * @byte_addr: address to read | 456 | * @byte_addr: address to read |
457 | * | 457 | * |
458 | * Returns fuse value: 0 or 1 | 458 | * Returns fuse value: 0 or 1 |
459 | */ | 459 | */ |
diff --git a/arch/mips/include/asm/octeon/octeon-feature.h b/arch/mips/include/asm/octeon/octeon-feature.h index 8008da2f8779..90e05a8d4b15 100644 --- a/arch/mips/include/asm/octeon/octeon-feature.h +++ b/arch/mips/include/asm/octeon/octeon-feature.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <asm/octeon/cvmx-rnm-defs.h> | 35 | #include <asm/octeon/cvmx-rnm-defs.h> |
36 | 36 | ||
37 | enum octeon_feature { | 37 | enum octeon_feature { |
38 | /* CN68XX uses port kinds for packet interface */ | 38 | /* CN68XX uses port kinds for packet interface */ |
39 | OCTEON_FEATURE_PKND, | 39 | OCTEON_FEATURE_PKND, |
40 | /* CN68XX has different fields in word0 - word2 */ | 40 | /* CN68XX has different fields in word0 - word2 */ |
41 | OCTEON_FEATURE_CN68XX_WQE, | 41 | OCTEON_FEATURE_CN68XX_WQE, |
@@ -51,7 +51,7 @@ enum octeon_feature { | |||
51 | OCTEON_FEATURE_DORM_CRYPTO, | 51 | OCTEON_FEATURE_DORM_CRYPTO, |
52 | /* Does this Octeon support PCI express? */ | 52 | /* Does this Octeon support PCI express? */ |
53 | OCTEON_FEATURE_PCIE, | 53 | OCTEON_FEATURE_PCIE, |
54 | /* Does this Octeon support SRIOs */ | 54 | /* Does this Octeon support SRIOs */ |
55 | OCTEON_FEATURE_SRIO, | 55 | OCTEON_FEATURE_SRIO, |
56 | /* Does this Octeon support Interlaken */ | 56 | /* Does this Octeon support Interlaken */ |
57 | OCTEON_FEATURE_ILK, | 57 | OCTEON_FEATURE_ILK, |
@@ -75,7 +75,7 @@ enum octeon_feature { | |||
75 | /* Octeon MDIO block supports clause 45 transactions for 10 | 75 | /* Octeon MDIO block supports clause 45 transactions for 10 |
76 | * Gig support */ | 76 | * Gig support */ |
77 | OCTEON_FEATURE_MDIO_CLAUSE_45, | 77 | OCTEON_FEATURE_MDIO_CLAUSE_45, |
78 | /* | 78 | /* |
79 | * CN52XX and CN56XX used a block named NPEI for PCIe | 79 | * CN52XX and CN56XX used a block named NPEI for PCIe |
80 | * access. Newer chips replaced this with SLI+DPI. | 80 | * access. Newer chips replaced this with SLI+DPI. |
81 | */ | 81 | */ |
@@ -94,10 +94,10 @@ static inline int cvmx_fuse_read(int fuse); | |||
94 | * be kept out of fast path code. | 94 | * be kept out of fast path code. |
95 | * | 95 | * |
96 | * @feature: Feature to check for. This should always be a constant so the | 96 | * @feature: Feature to check for. This should always be a constant so the |
97 | * compiler can remove the switch statement through optimization. | 97 | * compiler can remove the switch statement through optimization. |
98 | * | 98 | * |
99 | * Returns Non zero if the feature exists. Zero if the feature does not | 99 | * Returns Non zero if the feature exists. Zero if the feature does not |
100 | * exist. | 100 | * exist. |
101 | */ | 101 | */ |
102 | static inline int octeon_has_feature(enum octeon_feature feature) | 102 | static inline int octeon_has_feature(enum octeon_feature feature) |
103 | { | 103 | { |
diff --git a/arch/mips/include/asm/octeon/octeon-model.h b/arch/mips/include/asm/octeon/octeon-model.h index 349bb2ba840c..e2c122c6a657 100644 --- a/arch/mips/include/asm/octeon/octeon-model.h +++ b/arch/mips/include/asm/octeon/octeon-model.h | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | /* | 30 | /* |
31 | * The defines below should be used with the OCTEON_IS_MODEL() macro | 31 | * The defines below should be used with the OCTEON_IS_MODEL() macro |
32 | * to determine what model of chip the software is running on. Models | 32 | * to determine what model of chip the software is running on. Models |
33 | * ending in 'XX' match multiple models (families), while specific | 33 | * ending in 'XX' match multiple models (families), while specific |
34 | * models match only that model. If a pass (revision) is specified, | 34 | * models match only that model. If a pass (revision) is specified, |
35 | * then only that revision will be matched. Care should be taken when | 35 | * then only that revision will be matched. Care should be taken when |
@@ -40,183 +40,183 @@ | |||
40 | * subject to change at anytime without notice. | 40 | * subject to change at anytime without notice. |
41 | * | 41 | * |
42 | * NOTE: only the OCTEON_IS_MODEL() macro/function and the OCTEON_CN* | 42 | * NOTE: only the OCTEON_IS_MODEL() macro/function and the OCTEON_CN* |
43 | * macros should be used outside of this file. All other macros are | 43 | * macros should be used outside of this file. All other macros are |
44 | * for internal use only, and may change without notice. | 44 | * for internal use only, and may change without notice. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #define OCTEON_FAMILY_MASK 0x00ffff00 | 47 | #define OCTEON_FAMILY_MASK 0x00ffff00 |
48 | 48 | ||
49 | /* Flag bits in top byte */ | 49 | /* Flag bits in top byte */ |
50 | /* Ignores revision in model checks */ | 50 | /* Ignores revision in model checks */ |
51 | #define OM_IGNORE_REVISION 0x01000000 | 51 | #define OM_IGNORE_REVISION 0x01000000 |
52 | /* Check submodels */ | 52 | /* Check submodels */ |
53 | #define OM_CHECK_SUBMODEL 0x02000000 | 53 | #define OM_CHECK_SUBMODEL 0x02000000 |
54 | /* Match all models previous than the one specified */ | 54 | /* Match all models previous than the one specified */ |
55 | #define OM_MATCH_PREVIOUS_MODELS 0x04000000 | 55 | #define OM_MATCH_PREVIOUS_MODELS 0x04000000 |
56 | /* Ignores the minor revison on newer parts */ | 56 | /* Ignores the minor revison on newer parts */ |
57 | #define OM_IGNORE_MINOR_REVISION 0x08000000 | 57 | #define OM_IGNORE_MINOR_REVISION 0x08000000 |
58 | #define OM_FLAG_MASK 0xff000000 | 58 | #define OM_FLAG_MASK 0xff000000 |
59 | 59 | ||
60 | /* Match all cn5XXX Octeon models. */ | 60 | /* Match all cn5XXX Octeon models. */ |
61 | #define OM_MATCH_5XXX_FAMILY_MODELS 0x20000000 | 61 | #define OM_MATCH_5XXX_FAMILY_MODELS 0x20000000 |
62 | /* Match all cn6XXX Octeon models. */ | 62 | /* Match all cn6XXX Octeon models. */ |
63 | #define OM_MATCH_6XXX_FAMILY_MODELS 0x40000000 | 63 | #define OM_MATCH_6XXX_FAMILY_MODELS 0x40000000 |
64 | /* Match all cnf7XXX Octeon models. */ | 64 | /* Match all cnf7XXX Octeon models. */ |
65 | #define OM_MATCH_F7XXX_FAMILY_MODELS 0x80000000 | 65 | #define OM_MATCH_F7XXX_FAMILY_MODELS 0x80000000 |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * CNF7XXX models with new revision encoding | 68 | * CNF7XXX models with new revision encoding |
69 | */ | 69 | */ |
70 | #define OCTEON_CNF71XX_PASS1_0 0x000d9400 | 70 | #define OCTEON_CNF71XX_PASS1_0 0x000d9400 |
71 | 71 | ||
72 | #define OCTEON_CNF71XX (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_REVISION) | 72 | #define OCTEON_CNF71XX (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_REVISION) |
73 | #define OCTEON_CNF71XX_PASS1_X (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 73 | #define OCTEON_CNF71XX_PASS1_X (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * CN6XXX models with new revision encoding | 76 | * CN6XXX models with new revision encoding |
77 | */ | 77 | */ |
78 | #define OCTEON_CN68XX_PASS1_0 0x000d9100 | 78 | #define OCTEON_CN68XX_PASS1_0 0x000d9100 |
79 | #define OCTEON_CN68XX_PASS1_1 0x000d9101 | 79 | #define OCTEON_CN68XX_PASS1_1 0x000d9101 |
80 | #define OCTEON_CN68XX_PASS1_2 0x000d9102 | 80 | #define OCTEON_CN68XX_PASS1_2 0x000d9102 |
81 | #define OCTEON_CN68XX_PASS2_0 0x000d9108 | 81 | #define OCTEON_CN68XX_PASS2_0 0x000d9108 |
82 | 82 | ||
83 | #define OCTEON_CN68XX (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_REVISION) | 83 | #define OCTEON_CN68XX (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_REVISION) |
84 | #define OCTEON_CN68XX_PASS1_X (OCTEON_CN68XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 84 | #define OCTEON_CN68XX_PASS1_X (OCTEON_CN68XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
85 | #define OCTEON_CN68XX_PASS2_X (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 85 | #define OCTEON_CN68XX_PASS2_X (OCTEON_CN68XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
86 | 86 | ||
87 | #define OCTEON_CN68XX_PASS1 OCTEON_CN68XX_PASS1_X | 87 | #define OCTEON_CN68XX_PASS1 OCTEON_CN68XX_PASS1_X |
88 | #define OCTEON_CN68XX_PASS2 OCTEON_CN68XX_PASS2_X | 88 | #define OCTEON_CN68XX_PASS2 OCTEON_CN68XX_PASS2_X |
89 | 89 | ||
90 | #define OCTEON_CN66XX_PASS1_0 0x000d9200 | 90 | #define OCTEON_CN66XX_PASS1_0 0x000d9200 |
91 | #define OCTEON_CN66XX_PASS1_2 0x000d9202 | 91 | #define OCTEON_CN66XX_PASS1_2 0x000d9202 |
92 | 92 | ||
93 | #define OCTEON_CN66XX (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_REVISION) | 93 | #define OCTEON_CN66XX (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_REVISION) |
94 | #define OCTEON_CN66XX_PASS1_X (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 94 | #define OCTEON_CN66XX_PASS1_X (OCTEON_CN66XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
95 | 95 | ||
96 | #define OCTEON_CN63XX_PASS1_0 0x000d9000 | 96 | #define OCTEON_CN63XX_PASS1_0 0x000d9000 |
97 | #define OCTEON_CN63XX_PASS1_1 0x000d9001 | 97 | #define OCTEON_CN63XX_PASS1_1 0x000d9001 |
98 | #define OCTEON_CN63XX_PASS1_2 0x000d9002 | 98 | #define OCTEON_CN63XX_PASS1_2 0x000d9002 |
99 | #define OCTEON_CN63XX_PASS2_0 0x000d9008 | 99 | #define OCTEON_CN63XX_PASS2_0 0x000d9008 |
100 | #define OCTEON_CN63XX_PASS2_1 0x000d9009 | 100 | #define OCTEON_CN63XX_PASS2_1 0x000d9009 |
101 | #define OCTEON_CN63XX_PASS2_2 0x000d900a | 101 | #define OCTEON_CN63XX_PASS2_2 0x000d900a |
102 | 102 | ||
103 | #define OCTEON_CN63XX (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_REVISION) | 103 | #define OCTEON_CN63XX (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_REVISION) |
104 | #define OCTEON_CN63XX_PASS1_X (OCTEON_CN63XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 104 | #define OCTEON_CN63XX_PASS1_X (OCTEON_CN63XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
105 | #define OCTEON_CN63XX_PASS2_X (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 105 | #define OCTEON_CN63XX_PASS2_X (OCTEON_CN63XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
106 | 106 | ||
107 | #define OCTEON_CN61XX_PASS1_0 0x000d9300 | 107 | #define OCTEON_CN61XX_PASS1_0 0x000d9300 |
108 | 108 | ||
109 | #define OCTEON_CN61XX (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_REVISION) | 109 | #define OCTEON_CN61XX (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_REVISION) |
110 | #define OCTEON_CN61XX_PASS1_X (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 110 | #define OCTEON_CN61XX_PASS1_X (OCTEON_CN61XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * CN5XXX models with new revision encoding | 113 | * CN5XXX models with new revision encoding |
114 | */ | 114 | */ |
115 | #define OCTEON_CN58XX_PASS1_0 0x000d0300 | 115 | #define OCTEON_CN58XX_PASS1_0 0x000d0300 |
116 | #define OCTEON_CN58XX_PASS1_1 0x000d0301 | 116 | #define OCTEON_CN58XX_PASS1_1 0x000d0301 |
117 | #define OCTEON_CN58XX_PASS1_2 0x000d0303 | 117 | #define OCTEON_CN58XX_PASS1_2 0x000d0303 |
118 | #define OCTEON_CN58XX_PASS2_0 0x000d0308 | 118 | #define OCTEON_CN58XX_PASS2_0 0x000d0308 |
119 | #define OCTEON_CN58XX_PASS2_1 0x000d0309 | 119 | #define OCTEON_CN58XX_PASS2_1 0x000d0309 |
120 | #define OCTEON_CN58XX_PASS2_2 0x000d030a | 120 | #define OCTEON_CN58XX_PASS2_2 0x000d030a |
121 | #define OCTEON_CN58XX_PASS2_3 0x000d030b | 121 | #define OCTEON_CN58XX_PASS2_3 0x000d030b |
122 | 122 | ||
123 | #define OCTEON_CN58XX (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_REVISION) | 123 | #define OCTEON_CN58XX (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_REVISION) |
124 | #define OCTEON_CN58XX_PASS1_X (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 124 | #define OCTEON_CN58XX_PASS1_X (OCTEON_CN58XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
125 | #define OCTEON_CN58XX_PASS2_X (OCTEON_CN58XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 125 | #define OCTEON_CN58XX_PASS2_X (OCTEON_CN58XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
126 | #define OCTEON_CN58XX_PASS1 OCTEON_CN58XX_PASS1_X | 126 | #define OCTEON_CN58XX_PASS1 OCTEON_CN58XX_PASS1_X |
127 | #define OCTEON_CN58XX_PASS2 OCTEON_CN58XX_PASS2_X | 127 | #define OCTEON_CN58XX_PASS2 OCTEON_CN58XX_PASS2_X |
128 | 128 | ||
129 | #define OCTEON_CN56XX_PASS1_0 0x000d0400 | 129 | #define OCTEON_CN56XX_PASS1_0 0x000d0400 |
130 | #define OCTEON_CN56XX_PASS1_1 0x000d0401 | 130 | #define OCTEON_CN56XX_PASS1_1 0x000d0401 |
131 | #define OCTEON_CN56XX_PASS2_0 0x000d0408 | 131 | #define OCTEON_CN56XX_PASS2_0 0x000d0408 |
132 | #define OCTEON_CN56XX_PASS2_1 0x000d0409 | 132 | #define OCTEON_CN56XX_PASS2_1 0x000d0409 |
133 | 133 | ||
134 | #define OCTEON_CN56XX (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_REVISION) | 134 | #define OCTEON_CN56XX (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_REVISION) |
135 | #define OCTEON_CN56XX_PASS1_X (OCTEON_CN56XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 135 | #define OCTEON_CN56XX_PASS1_X (OCTEON_CN56XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
136 | #define OCTEON_CN56XX_PASS2_X (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 136 | #define OCTEON_CN56XX_PASS2_X (OCTEON_CN56XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
137 | #define OCTEON_CN56XX_PASS1 OCTEON_CN56XX_PASS1_X | 137 | #define OCTEON_CN56XX_PASS1 OCTEON_CN56XX_PASS1_X |
138 | #define OCTEON_CN56XX_PASS2 OCTEON_CN56XX_PASS2_X | 138 | #define OCTEON_CN56XX_PASS2 OCTEON_CN56XX_PASS2_X |
139 | 139 | ||
140 | #define OCTEON_CN57XX OCTEON_CN56XX | 140 | #define OCTEON_CN57XX OCTEON_CN56XX |
141 | #define OCTEON_CN57XX_PASS1 OCTEON_CN56XX_PASS1 | 141 | #define OCTEON_CN57XX_PASS1 OCTEON_CN56XX_PASS1 |
142 | #define OCTEON_CN57XX_PASS2 OCTEON_CN56XX_PASS2 | 142 | #define OCTEON_CN57XX_PASS2 OCTEON_CN56XX_PASS2 |
143 | 143 | ||
144 | #define OCTEON_CN55XX OCTEON_CN56XX | 144 | #define OCTEON_CN55XX OCTEON_CN56XX |
145 | #define OCTEON_CN55XX_PASS1 OCTEON_CN56XX_PASS1 | 145 | #define OCTEON_CN55XX_PASS1 OCTEON_CN56XX_PASS1 |
146 | #define OCTEON_CN55XX_PASS2 OCTEON_CN56XX_PASS2 | 146 | #define OCTEON_CN55XX_PASS2 OCTEON_CN56XX_PASS2 |
147 | 147 | ||
148 | #define OCTEON_CN54XX OCTEON_CN56XX | 148 | #define OCTEON_CN54XX OCTEON_CN56XX |
149 | #define OCTEON_CN54XX_PASS1 OCTEON_CN56XX_PASS1 | 149 | #define OCTEON_CN54XX_PASS1 OCTEON_CN56XX_PASS1 |
150 | #define OCTEON_CN54XX_PASS2 OCTEON_CN56XX_PASS2 | 150 | #define OCTEON_CN54XX_PASS2 OCTEON_CN56XX_PASS2 |
151 | 151 | ||
152 | #define OCTEON_CN50XX_PASS1_0 0x000d0600 | 152 | #define OCTEON_CN50XX_PASS1_0 0x000d0600 |
153 | 153 | ||
154 | #define OCTEON_CN50XX (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_REVISION) | 154 | #define OCTEON_CN50XX (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_REVISION) |
155 | #define OCTEON_CN50XX_PASS1_X (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 155 | #define OCTEON_CN50XX_PASS1_X (OCTEON_CN50XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
156 | #define OCTEON_CN50XX_PASS1 OCTEON_CN50XX_PASS1_X | 156 | #define OCTEON_CN50XX_PASS1 OCTEON_CN50XX_PASS1_X |
157 | 157 | ||
158 | /* | 158 | /* |
159 | * NOTE: Octeon CN5000F model is not identifiable using the | 159 | * NOTE: Octeon CN5000F model is not identifiable using the |
160 | * OCTEON_IS_MODEL() functions, but are treated as CN50XX. | 160 | * OCTEON_IS_MODEL() functions, but are treated as CN50XX. |
161 | */ | 161 | */ |
162 | 162 | ||
163 | #define OCTEON_CN52XX_PASS1_0 0x000d0700 | 163 | #define OCTEON_CN52XX_PASS1_0 0x000d0700 |
164 | #define OCTEON_CN52XX_PASS2_0 0x000d0708 | 164 | #define OCTEON_CN52XX_PASS2_0 0x000d0708 |
165 | 165 | ||
166 | #define OCTEON_CN52XX (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_REVISION) | 166 | #define OCTEON_CN52XX (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_REVISION) |
167 | #define OCTEON_CN52XX_PASS1_X (OCTEON_CN52XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) | 167 | #define OCTEON_CN52XX_PASS1_X (OCTEON_CN52XX_PASS1_0 | OM_IGNORE_MINOR_REVISION) |
168 | #define OCTEON_CN52XX_PASS2_X (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) | 168 | #define OCTEON_CN52XX_PASS2_X (OCTEON_CN52XX_PASS2_0 | OM_IGNORE_MINOR_REVISION) |
169 | #define OCTEON_CN52XX_PASS1 OCTEON_CN52XX_PASS1_X | 169 | #define OCTEON_CN52XX_PASS1 OCTEON_CN52XX_PASS1_X |
170 | #define OCTEON_CN52XX_PASS2 OCTEON_CN52XX_PASS2_X | 170 | #define OCTEON_CN52XX_PASS2 OCTEON_CN52XX_PASS2_X |
171 | 171 | ||
172 | /* | 172 | /* |
173 | * CN3XXX models with old revision enconding | 173 | * CN3XXX models with old revision enconding |
174 | */ | 174 | */ |
175 | #define OCTEON_CN38XX_PASS1 0x000d0000 | 175 | #define OCTEON_CN38XX_PASS1 0x000d0000 |
176 | #define OCTEON_CN38XX_PASS2 0x000d0001 | 176 | #define OCTEON_CN38XX_PASS2 0x000d0001 |
177 | #define OCTEON_CN38XX_PASS3 0x000d0003 | 177 | #define OCTEON_CN38XX_PASS3 0x000d0003 |
178 | #define OCTEON_CN38XX (OCTEON_CN38XX_PASS3 | OM_IGNORE_REVISION) | 178 | #define OCTEON_CN38XX (OCTEON_CN38XX_PASS3 | OM_IGNORE_REVISION) |
179 | 179 | ||
180 | #define OCTEON_CN36XX OCTEON_CN38XX | 180 | #define OCTEON_CN36XX OCTEON_CN38XX |
181 | #define OCTEON_CN36XX_PASS2 OCTEON_CN38XX_PASS2 | 181 | #define OCTEON_CN36XX_PASS2 OCTEON_CN38XX_PASS2 |
182 | #define OCTEON_CN36XX_PASS3 OCTEON_CN38XX_PASS3 | 182 | #define OCTEON_CN36XX_PASS3 OCTEON_CN38XX_PASS3 |
183 | 183 | ||
184 | /* The OCTEON_CN31XX matches CN31XX models and the CN3020 */ | 184 | /* The OCTEON_CN31XX matches CN31XX models and the CN3020 */ |
185 | #define OCTEON_CN31XX_PASS1 0x000d0100 | 185 | #define OCTEON_CN31XX_PASS1 0x000d0100 |
186 | #define OCTEON_CN31XX_PASS1_1 0x000d0102 | 186 | #define OCTEON_CN31XX_PASS1_1 0x000d0102 |
187 | #define OCTEON_CN31XX (OCTEON_CN31XX_PASS1 | OM_IGNORE_REVISION) | 187 | #define OCTEON_CN31XX (OCTEON_CN31XX_PASS1 | OM_IGNORE_REVISION) |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * This model is only used for internal checks, it is not a valid | 190 | * This model is only used for internal checks, it is not a valid |
191 | * model for the OCTEON_MODEL environment variable. This matches the | 191 | * model for the OCTEON_MODEL environment variable. This matches the |
192 | * CN3010 and CN3005 but NOT the CN3020. | 192 | * CN3010 and CN3005 but NOT the CN3020. |
193 | */ | 193 | */ |
194 | #define OCTEON_CN30XX_PASS1 0x000d0200 | 194 | #define OCTEON_CN30XX_PASS1 0x000d0200 |
195 | #define OCTEON_CN30XX_PASS1_1 0x000d0202 | 195 | #define OCTEON_CN30XX_PASS1_1 0x000d0202 |
196 | #define OCTEON_CN30XX (OCTEON_CN30XX_PASS1 | OM_IGNORE_REVISION) | 196 | #define OCTEON_CN30XX (OCTEON_CN30XX_PASS1 | OM_IGNORE_REVISION) |
197 | 197 | ||
198 | #define OCTEON_CN3005_PASS1 (0x000d0210 | OM_CHECK_SUBMODEL) | 198 | #define OCTEON_CN3005_PASS1 (0x000d0210 | OM_CHECK_SUBMODEL) |
199 | #define OCTEON_CN3005_PASS1_0 (0x000d0210 | OM_CHECK_SUBMODEL) | 199 | #define OCTEON_CN3005_PASS1_0 (0x000d0210 | OM_CHECK_SUBMODEL) |
200 | #define OCTEON_CN3005_PASS1_1 (0x000d0212 | OM_CHECK_SUBMODEL) | 200 | #define OCTEON_CN3005_PASS1_1 (0x000d0212 | OM_CHECK_SUBMODEL) |
201 | #define OCTEON_CN3005 (OCTEON_CN3005_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) | 201 | #define OCTEON_CN3005 (OCTEON_CN3005_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) |
202 | 202 | ||
203 | #define OCTEON_CN3010_PASS1 (0x000d0200 | OM_CHECK_SUBMODEL) | 203 | #define OCTEON_CN3010_PASS1 (0x000d0200 | OM_CHECK_SUBMODEL) |
204 | #define OCTEON_CN3010_PASS1_0 (0x000d0200 | OM_CHECK_SUBMODEL) | 204 | #define OCTEON_CN3010_PASS1_0 (0x000d0200 | OM_CHECK_SUBMODEL) |
205 | #define OCTEON_CN3010_PASS1_1 (0x000d0202 | OM_CHECK_SUBMODEL) | 205 | #define OCTEON_CN3010_PASS1_1 (0x000d0202 | OM_CHECK_SUBMODEL) |
206 | #define OCTEON_CN3010 (OCTEON_CN3010_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) | 206 | #define OCTEON_CN3010 (OCTEON_CN3010_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) |
207 | 207 | ||
208 | #define OCTEON_CN3020_PASS1 (0x000d0110 | OM_CHECK_SUBMODEL) | 208 | #define OCTEON_CN3020_PASS1 (0x000d0110 | OM_CHECK_SUBMODEL) |
209 | #define OCTEON_CN3020_PASS1_0 (0x000d0110 | OM_CHECK_SUBMODEL) | 209 | #define OCTEON_CN3020_PASS1_0 (0x000d0110 | OM_CHECK_SUBMODEL) |
210 | #define OCTEON_CN3020_PASS1_1 (0x000d0112 | OM_CHECK_SUBMODEL) | 210 | #define OCTEON_CN3020_PASS1_1 (0x000d0112 | OM_CHECK_SUBMODEL) |
211 | #define OCTEON_CN3020 (OCTEON_CN3020_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) | 211 | #define OCTEON_CN3020 (OCTEON_CN3020_PASS1 | OM_IGNORE_REVISION | OM_CHECK_SUBMODEL) |
212 | 212 | ||
213 | /* | 213 | /* |
214 | * This matches the complete family of CN3xxx CPUs, and not subsequent | 214 | * This matches the complete family of CN3xxx CPUs, and not subsequent |
215 | * models | 215 | * models |
216 | */ | 216 | */ |
217 | #define OCTEON_CN3XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_PREVIOUS_MODELS | OM_IGNORE_REVISION) | 217 | #define OCTEON_CN3XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_PREVIOUS_MODELS | OM_IGNORE_REVISION) |
218 | #define OCTEON_CN5XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_5XXX_FAMILY_MODELS) | 218 | #define OCTEON_CN5XXX (OCTEON_CN58XX_PASS1_0 | OM_MATCH_5XXX_FAMILY_MODELS) |
219 | #define OCTEON_CN6XXX (OCTEON_CN63XX_PASS1_0 | OM_MATCH_6XXX_FAMILY_MODELS) | 219 | #define OCTEON_CN6XXX (OCTEON_CN63XX_PASS1_0 | OM_MATCH_6XXX_FAMILY_MODELS) |
220 | 220 | ||
221 | /* These are used to cover entire families of OCTEON processors */ | 221 | /* These are used to cover entire families of OCTEON processors */ |
222 | #define OCTEON_FAM_1 (OCTEON_CN3XXX) | 222 | #define OCTEON_FAM_1 (OCTEON_CN3XXX) |
@@ -243,18 +243,18 @@ | |||
243 | */ | 243 | */ |
244 | 244 | ||
245 | /* Masks used for the various types of model/family/revision matching */ | 245 | /* Masks used for the various types of model/family/revision matching */ |
246 | #define OCTEON_38XX_FAMILY_MASK 0x00ffff00 | 246 | #define OCTEON_38XX_FAMILY_MASK 0x00ffff00 |
247 | #define OCTEON_38XX_FAMILY_REV_MASK 0x00ffff0f | 247 | #define OCTEON_38XX_FAMILY_REV_MASK 0x00ffff0f |
248 | #define OCTEON_38XX_MODEL_MASK 0x00ffff10 | 248 | #define OCTEON_38XX_MODEL_MASK 0x00ffff10 |
249 | #define OCTEON_38XX_MODEL_REV_MASK (OCTEON_38XX_FAMILY_REV_MASK | OCTEON_38XX_MODEL_MASK) | 249 | #define OCTEON_38XX_MODEL_REV_MASK (OCTEON_38XX_FAMILY_REV_MASK | OCTEON_38XX_MODEL_MASK) |
250 | 250 | ||
251 | /* CN5XXX and later use different layout of bits in the revision ID field */ | 251 | /* CN5XXX and later use different layout of bits in the revision ID field */ |
252 | #define OCTEON_58XX_FAMILY_MASK OCTEON_38XX_FAMILY_MASK | 252 | #define OCTEON_58XX_FAMILY_MASK OCTEON_38XX_FAMILY_MASK |
253 | #define OCTEON_58XX_FAMILY_REV_MASK 0x00ffff3f | 253 | #define OCTEON_58XX_FAMILY_REV_MASK 0x00ffff3f |
254 | #define OCTEON_58XX_MODEL_MASK 0x00ffffc0 | 254 | #define OCTEON_58XX_MODEL_MASK 0x00ffffc0 |
255 | #define OCTEON_58XX_MODEL_REV_MASK (OCTEON_58XX_FAMILY_REV_MASK | OCTEON_58XX_MODEL_MASK) | 255 | #define OCTEON_58XX_MODEL_REV_MASK (OCTEON_58XX_FAMILY_REV_MASK | OCTEON_58XX_MODEL_MASK) |
256 | #define OCTEON_58XX_MODEL_MINOR_REV_MASK (OCTEON_58XX_MODEL_REV_MASK & 0x00fffff8) | 256 | #define OCTEON_58XX_MODEL_MINOR_REV_MASK (OCTEON_58XX_MODEL_REV_MASK & 0x00fffff8) |
257 | #define OCTEON_5XXX_MODEL_MASK 0x00ff0fc0 | 257 | #define OCTEON_5XXX_MODEL_MASK 0x00ff0fc0 |
258 | 258 | ||
259 | /* forward declarations */ | 259 | /* forward declarations */ |
260 | static inline uint32_t cvmx_get_proc_id(void) __attribute__ ((pure)); | 260 | static inline uint32_t cvmx_get_proc_id(void) __attribute__ ((pure)); |
@@ -264,7 +264,7 @@ static inline uint64_t cvmx_read_csr(uint64_t csr_addr); | |||
264 | 264 | ||
265 | /* NOTE: This for internal use only! */ | 265 | /* NOTE: This for internal use only! */ |
266 | #define __OCTEON_IS_MODEL_COMPILE__(arg_model, chip_model) \ | 266 | #define __OCTEON_IS_MODEL_COMPILE__(arg_model, chip_model) \ |
267 | ((((arg_model & OCTEON_38XX_FAMILY_MASK) < OCTEON_CN58XX_PASS1_0) && ( \ | 267 | ((((arg_model & OCTEON_38XX_FAMILY_MASK) < OCTEON_CN58XX_PASS1_0) && ( \ |
268 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ | 268 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ |
269 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_38XX_MODEL_MASK)) || \ | 269 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_38XX_MODEL_MASK)) || \ |
270 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ | 270 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ |
@@ -276,7 +276,7 @@ static inline uint64_t cvmx_read_csr(uint64_t csr_addr); | |||
276 | ((((arg_model) & (OM_MATCH_PREVIOUS_MODELS)) == OM_MATCH_PREVIOUS_MODELS) \ | 276 | ((((arg_model) & (OM_MATCH_PREVIOUS_MODELS)) == OM_MATCH_PREVIOUS_MODELS) \ |
277 | && (((chip_model) & OCTEON_38XX_MODEL_MASK) < ((arg_model) & OCTEON_38XX_MODEL_MASK))) \ | 277 | && (((chip_model) & OCTEON_38XX_MODEL_MASK) < ((arg_model) & OCTEON_38XX_MODEL_MASK))) \ |
278 | )) || \ | 278 | )) || \ |
279 | (((arg_model & OCTEON_38XX_FAMILY_MASK) >= OCTEON_CN58XX_PASS1_0) && ( \ | 279 | (((arg_model & OCTEON_38XX_FAMILY_MASK) >= OCTEON_CN58XX_PASS1_0) && ( \ |
280 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ | 280 | ((((arg_model) & (OM_FLAG_MASK)) == (OM_IGNORE_REVISION | OM_CHECK_SUBMODEL)) \ |
281 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_58XX_MODEL_MASK)) || \ | 281 | && __OCTEON_MATCH_MASK__((chip_model), (arg_model), OCTEON_58XX_MODEL_MASK)) || \ |
282 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ | 282 | ((((arg_model) & (OM_FLAG_MASK)) == 0) \ |
@@ -320,7 +320,7 @@ static inline int __octeon_is_model_runtime__(uint32_t model) | |||
320 | * Use of the macro in preprocessor directives ( #if OCTEON_IS_MODEL(...) ) | 320 | * Use of the macro in preprocessor directives ( #if OCTEON_IS_MODEL(...) ) |
321 | * is NOT SUPPORTED, and should be replaced with CVMX_COMPILED_FOR() | 321 | * is NOT SUPPORTED, and should be replaced with CVMX_COMPILED_FOR() |
322 | * I.e.: | 322 | * I.e.: |
323 | * #if OCTEON_IS_MODEL(OCTEON_CN56XX) -> #if CVMX_COMPILED_FOR(OCTEON_CN56XX) | 323 | * #if OCTEON_IS_MODEL(OCTEON_CN56XX) -> #if CVMX_COMPILED_FOR(OCTEON_CN56XX) |
324 | */ | 324 | */ |
325 | #define OCTEON_IS_MODEL(x) __octeon_is_model_runtime__(x) | 325 | #define OCTEON_IS_MODEL(x) __octeon_is_model_runtime__(x) |
326 | #define OCTEON_IS_COMMON_BINARY() 1 | 326 | #define OCTEON_IS_COMMON_BINARY() 1 |
diff --git a/arch/mips/include/asm/octeon/octeon.h b/arch/mips/include/asm/octeon/octeon.h index 254e9954ed71..a2eed23c49a9 100644 --- a/arch/mips/include/asm/octeon/octeon.h +++ b/arch/mips/include/asm/octeon/octeon.h | |||
@@ -75,15 +75,15 @@ struct octeon_boot_descriptor { | |||
75 | uint32_t argc; | 75 | uint32_t argc; |
76 | uint32_t argv[OCTEON_ARGV_MAX_ARGS]; | 76 | uint32_t argv[OCTEON_ARGV_MAX_ARGS]; |
77 | 77 | ||
78 | #define BOOT_FLAG_INIT_CORE (1 << 0) | 78 | #define BOOT_FLAG_INIT_CORE (1 << 0) |
79 | #define OCTEON_BL_FLAG_DEBUG (1 << 1) | 79 | #define OCTEON_BL_FLAG_DEBUG (1 << 1) |
80 | #define OCTEON_BL_FLAG_NO_MAGIC (1 << 2) | 80 | #define OCTEON_BL_FLAG_NO_MAGIC (1 << 2) |
81 | /* If set, use uart1 for console */ | 81 | /* If set, use uart1 for console */ |
82 | #define OCTEON_BL_FLAG_CONSOLE_UART1 (1 << 3) | 82 | #define OCTEON_BL_FLAG_CONSOLE_UART1 (1 << 3) |
83 | /* If set, use PCI console */ | 83 | /* If set, use PCI console */ |
84 | #define OCTEON_BL_FLAG_CONSOLE_PCI (1 << 4) | 84 | #define OCTEON_BL_FLAG_CONSOLE_PCI (1 << 4) |
85 | /* Call exit on break on serial port */ | 85 | /* Call exit on break on serial port */ |
86 | #define OCTEON_BL_FLAG_BREAK (1 << 5) | 86 | #define OCTEON_BL_FLAG_BREAK (1 << 5) |
87 | 87 | ||
88 | uint32_t flags; | 88 | uint32_t flags; |
89 | uint32_t core_mask; | 89 | uint32_t core_mask; |
diff --git a/arch/mips/include/asm/octeon/pci-octeon.h b/arch/mips/include/asm/octeon/pci-octeon.h index c66734bd3382..64ba56a02843 100644 --- a/arch/mips/include/asm/octeon/pci-octeon.h +++ b/arch/mips/include/asm/octeon/pci-octeon.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #define CVMX_PCIE_BAR1_PHYS_SIZE (1ull << 28) | 22 | #define CVMX_PCIE_BAR1_PHYS_SIZE (1ull << 28) |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * The RC base of BAR1. gen1 has a 39-bit BAR2, gen2 has 41-bit BAR2, | 25 | * The RC base of BAR1. gen1 has a 39-bit BAR2, gen2 has 41-bit BAR2, |
26 | * place BAR1 so it is the same for both. | 26 | * place BAR1 so it is the same for both. |
27 | */ | 27 | */ |
28 | #define CVMX_PCIE_BAR1_RC_BASE (1ull << 41) | 28 | #define CVMX_PCIE_BAR1_RC_BASE (1ull << 41) |
diff --git a/arch/mips/include/asm/paccess.h b/arch/mips/include/asm/paccess.h index 9ce5a1e7e14c..2474fc5d1751 100644 --- a/arch/mips/include/asm/paccess.h +++ b/arch/mips/include/asm/paccess.h | |||
@@ -43,7 +43,7 @@ struct __large_pstruct { unsigned long buf[100]; }; | |||
43 | case 1: __get_dbe_asm("lb"); break; \ | 43 | case 1: __get_dbe_asm("lb"); break; \ |
44 | case 2: __get_dbe_asm("lh"); break; \ | 44 | case 2: __get_dbe_asm("lh"); break; \ |
45 | case 4: __get_dbe_asm("lw"); break; \ | 45 | case 4: __get_dbe_asm("lw"); break; \ |
46 | case 8: __get_dbe_asm("ld"); break; \ | 46 | case 8: __get_dbe_asm("ld"); break; \ |
47 | default: __get_dbe_unknown(); break; \ | 47 | default: __get_dbe_unknown(); break; \ |
48 | } \ | 48 | } \ |
49 | x = (__typeof__(*(ptr))) __gu_val; \ | 49 | x = (__typeof__(*(ptr))) __gu_val; \ |
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index dbaec94046da..99fc547af9d3 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #define PAGE_SHIFT 16 | 31 | #define PAGE_SHIFT 16 |
32 | #endif | 32 | #endif |
33 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) | 33 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) |
34 | #define PAGE_MASK (~(PAGE_SIZE - 1)) | 34 | #define PAGE_MASK (~(PAGE_SIZE - 1)) |
35 | 35 | ||
36 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT | 36 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT |
37 | #define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) | 37 | #define HPAGE_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) |
@@ -95,11 +95,11 @@ extern void copy_user_highpage(struct page *to, struct page *from, | |||
95 | #ifdef CONFIG_64BIT_PHYS_ADDR | 95 | #ifdef CONFIG_64BIT_PHYS_ADDR |
96 | #ifdef CONFIG_CPU_MIPS32 | 96 | #ifdef CONFIG_CPU_MIPS32 |
97 | typedef struct { unsigned long pte_low, pte_high; } pte_t; | 97 | typedef struct { unsigned long pte_low, pte_high; } pte_t; |
98 | #define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) | 98 | #define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) |
99 | #define __pte(x) ({ pte_t __pte = {(x), ((unsigned long long)(x)) >> 32}; __pte; }) | 99 | #define __pte(x) ({ pte_t __pte = {(x), ((unsigned long long)(x)) >> 32}; __pte; }) |
100 | #else | 100 | #else |
101 | typedef struct { unsigned long long pte; } pte_t; | 101 | typedef struct { unsigned long long pte; } pte_t; |
102 | #define pte_val(x) ((x).pte) | 102 | #define pte_val(x) ((x).pte) |
103 | #define __pte(x) ((pte_t) { (x) } ) | 103 | #define __pte(x) ((pte_t) { (x) } ) |
104 | #endif | 104 | #endif |
105 | #else | 105 | #else |
@@ -191,8 +191,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
191 | unsigned long __pfn = (pfn); \ | 191 | unsigned long __pfn = (pfn); \ |
192 | int __n = pfn_to_nid(__pfn); \ | 192 | int __n = pfn_to_nid(__pfn); \ |
193 | ((__n >= 0) ? (__pfn < NODE_DATA(__n)->node_start_pfn + \ | 193 | ((__n >= 0) ? (__pfn < NODE_DATA(__n)->node_start_pfn + \ |
194 | NODE_DATA(__n)->node_spanned_pages) \ | 194 | NODE_DATA(__n)->node_spanned_pages) \ |
195 | : 0); \ | 195 | : 0); \ |
196 | }) | 196 | }) |
197 | 197 | ||
198 | #endif | 198 | #endif |
@@ -206,7 +206,7 @@ extern int __virt_addr_valid(const volatile void *kaddr); | |||
206 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 206 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
207 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 207 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
208 | 208 | ||
209 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \ | 209 | #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE + \ |
210 | PHYS_OFFSET) | 210 | PHYS_OFFSET) |
211 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \ | 211 | #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET - \ |
212 | PHYS_OFFSET) | 212 | PHYS_OFFSET) |
diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index d69ea743272b..e224876cc344 100644 --- a/arch/mips/include/asm/pci.h +++ b/arch/mips/include/asm/pci.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | /* | 13 | /* |
14 | * This file essentially defines the interface between board | 14 | * This file essentially defines the interface between board |
15 | * specific PCI code and MIPS common PCI code. Should potentially put | 15 | * specific PCI code and MIPS common PCI code. Should potentially put |
16 | * into include/asm/pci.h file. | 16 | * into include/asm/pci.h file. |
17 | */ | 17 | */ |
18 | 18 | ||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Each pci channel is a top-level PCI bus seem by CPU. A machine with | 23 | * Each pci channel is a top-level PCI bus seem by CPU. A machine with |
24 | * multiple PCI channels may have multiple PCI host controllers or a | 24 | * multiple PCI channels may have multiple PCI host controllers or a |
25 | * single controller supporting multiple channels. | 25 | * single controller supporting multiple channels. |
26 | */ | 26 | */ |
@@ -99,7 +99,7 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
99 | struct pci_dev; | 99 | struct pci_dev; |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * The PCI address space does equal the physical memory address space. The | 102 | * The PCI address space does equal the physical memory address space. The |
103 | * networking and block device layers use this boolean for bounce buffer | 103 | * networking and block device layers use this boolean for bounce buffer |
104 | * decisions. This is set if any hose does not have an IOMMU. | 104 | * decisions. This is set if any hose does not have an IOMMU. |
105 | */ | 105 | */ |
diff --git a/arch/mips/include/asm/pci/bridge.h b/arch/mips/include/asm/pci/bridge.h index be44fb0266da..af2c8a351ca7 100644 --- a/arch/mips/include/asm/pci/bridge.h +++ b/arch/mips/include/asm/pci/bridge.h | |||
@@ -85,7 +85,7 @@ typedef volatile struct bridge_s { | |||
85 | #define b_wid_llp b_widget.w_llp_cfg | 85 | #define b_wid_llp b_widget.w_llp_cfg |
86 | #define b_wid_tflush b_widget.w_tflush | 86 | #define b_wid_tflush b_widget.w_tflush |
87 | 87 | ||
88 | /* bridge-specific widget configuration 0x000058-0x00007F */ | 88 | /* bridge-specific widget configuration 0x000058-0x00007F */ |
89 | bridgereg_t _pad_000058; | 89 | bridgereg_t _pad_000058; |
90 | bridgereg_t b_wid_aux_err; /* 0x00005C */ | 90 | bridgereg_t b_wid_aux_err; /* 0x00005C */ |
91 | bridgereg_t _pad_000060; | 91 | bridgereg_t _pad_000060; |
@@ -167,8 +167,8 @@ typedef volatile struct bridge_s { | |||
167 | bridgereg_t __pad; /* 0x0002{80,,,88} */ | 167 | bridgereg_t __pad; /* 0x0002{80,,,88} */ |
168 | bridgereg_t reg; /* 0x0002{84,,,8C} */ | 168 | bridgereg_t reg; /* 0x0002{84,,,8C} */ |
169 | } b_rrb_map[2]; /* 0x000280 */ | 169 | } b_rrb_map[2]; /* 0x000280 */ |
170 | #define b_even_resp b_rrb_map[0].reg /* 0x000284 */ | 170 | #define b_even_resp b_rrb_map[0].reg /* 0x000284 */ |
171 | #define b_odd_resp b_rrb_map[1].reg /* 0x00028C */ | 171 | #define b_odd_resp b_rrb_map[1].reg /* 0x00028C */ |
172 | 172 | ||
173 | bridgereg_t _pad_000290; | 173 | bridgereg_t _pad_000290; |
174 | bridgereg_t b_resp_status; /* 0x000294 */ | 174 | bridgereg_t b_resp_status; /* 0x000294 */ |
@@ -233,7 +233,7 @@ typedef volatile struct bridge_s { | |||
233 | u8 _pad_030007[0x04fff8]; /* 0x030008-0x07FFFF */ | 233 | u8 _pad_030007[0x04fff8]; /* 0x030008-0x07FFFF */ |
234 | 234 | ||
235 | /* External Address Translation Entry RAM 0x080000-0x0FFFFF */ | 235 | /* External Address Translation Entry RAM 0x080000-0x0FFFFF */ |
236 | bridge_ate_t b_ext_ate_ram[0x10000]; | 236 | bridge_ate_t b_ext_ate_ram[0x10000]; |
237 | 237 | ||
238 | /* Reserved 0x100000-0x1FFFFF */ | 238 | /* Reserved 0x100000-0x1FFFFF */ |
239 | char _pad_100000[0x200000-0x100000]; | 239 | char _pad_100000[0x200000-0x100000]; |
@@ -400,7 +400,7 @@ typedef struct bridge_err_cmdword_s { | |||
400 | #define BRIDGE_REV_A 0x1 | 400 | #define BRIDGE_REV_A 0x1 |
401 | #define BRIDGE_REV_B 0x2 | 401 | #define BRIDGE_REV_B 0x2 |
402 | #define BRIDGE_REV_C 0x3 | 402 | #define BRIDGE_REV_C 0x3 |
403 | #define BRIDGE_REV_D 0x4 | 403 | #define BRIDGE_REV_D 0x4 |
404 | 404 | ||
405 | /* Bridge widget status register bits definition */ | 405 | /* Bridge widget status register bits definition */ |
406 | 406 | ||
@@ -691,21 +691,21 @@ typedef struct bridge_err_cmdword_s { | |||
691 | #define BRIDGE_CREDIT 3 | 691 | #define BRIDGE_CREDIT 3 |
692 | 692 | ||
693 | /* RRB assignment register */ | 693 | /* RRB assignment register */ |
694 | #define BRIDGE_RRB_EN 0x8 /* after shifting down */ | 694 | #define BRIDGE_RRB_EN 0x8 /* after shifting down */ |
695 | #define BRIDGE_RRB_DEV 0x7 /* after shifting down */ | 695 | #define BRIDGE_RRB_DEV 0x7 /* after shifting down */ |
696 | #define BRIDGE_RRB_VDEV 0x4 /* after shifting down */ | 696 | #define BRIDGE_RRB_VDEV 0x4 /* after shifting down */ |
697 | #define BRIDGE_RRB_PDEV 0x3 /* after shifting down */ | 697 | #define BRIDGE_RRB_PDEV 0x3 /* after shifting down */ |
698 | 698 | ||
699 | /* RRB status register */ | 699 | /* RRB status register */ |
700 | #define BRIDGE_RRB_VALID(r) (0x00010000<<(r)) | 700 | #define BRIDGE_RRB_VALID(r) (0x00010000<<(r)) |
701 | #define BRIDGE_RRB_INUSE(r) (0x00000001<<(r)) | 701 | #define BRIDGE_RRB_INUSE(r) (0x00000001<<(r)) |
702 | 702 | ||
703 | /* RRB clear register */ | 703 | /* RRB clear register */ |
704 | #define BRIDGE_RRB_CLEAR(r) (0x00000001<<(r)) | 704 | #define BRIDGE_RRB_CLEAR(r) (0x00000001<<(r)) |
705 | 705 | ||
706 | /* xbox system controller declarations */ | 706 | /* xbox system controller declarations */ |
707 | #define XBOX_BRIDGE_WID 8 | 707 | #define XBOX_BRIDGE_WID 8 |
708 | #define FLASH_PROM1_BASE 0xE00000 /* To read the xbox sysctlr status */ | 708 | #define FLASH_PROM1_BASE 0xE00000 /* To read the xbox sysctlr status */ |
709 | #define XBOX_RPS_EXISTS 1 << 6 /* RPS bit in status register */ | 709 | #define XBOX_RPS_EXISTS 1 << 6 /* RPS bit in status register */ |
710 | #define XBOX_RPS_FAIL 1 << 4 /* RPS status bit in register */ | 710 | #define XBOX_RPS_FAIL 1 << 4 /* RPS status bit in register */ |
711 | 711 | ||
@@ -838,7 +838,7 @@ struct bridge_controller { | |||
838 | bridge_t *base; | 838 | bridge_t *base; |
839 | nasid_t nasid; | 839 | nasid_t nasid; |
840 | unsigned int widget_id; | 840 | unsigned int widget_id; |
841 | unsigned int irq_cpu; | 841 | unsigned int irq_cpu; |
842 | u64 baddr; | 842 | u64 baddr; |
843 | unsigned int pci_int[8]; | 843 | unsigned int pci_int[8]; |
844 | }; | 844 | }; |
diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h index 5d56bb230345..b4204c179b97 100644 --- a/arch/mips/include/asm/pgtable-32.h +++ b/arch/mips/include/asm/pgtable-32.h | |||
@@ -47,7 +47,7 @@ | |||
47 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) | 47 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) |
48 | #define FIRST_USER_ADDRESS 0 | 48 | #define FIRST_USER_ADDRESS 0 |
49 | 49 | ||
50 | #define VMALLOC_START MAP_BASE | 50 | #define VMALLOC_START MAP_BASE |
51 | 51 | ||
52 | #define PKMAP_BASE (0xfe000000UL) | 52 | #define PKMAP_BASE (0xfe000000UL) |
53 | 53 | ||
@@ -136,7 +136,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
136 | #define pte_offset_kernel(dir, address) \ | 136 | #define pte_offset_kernel(dir, address) \ |
137 | ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) | 137 | ((pte_t *) pmd_page_vaddr(*(dir)) + __pte_offset(address)) |
138 | 138 | ||
139 | #define pte_offset_map(dir, address) \ | 139 | #define pte_offset_map(dir, address) \ |
140 | ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) | 140 | ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset(address)) |
141 | #define pte_unmap(pte) ((void)(pte)) | 141 | #define pte_unmap(pte) ((void)(pte)) |
142 | 142 | ||
@@ -155,7 +155,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
155 | 155 | ||
156 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1 ) & 0x07) | \ | 156 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1 ) & 0x07) | \ |
157 | (((_pte).pte >> 2 ) & 0x38) | \ | 157 | (((_pte).pte >> 2 ) & 0x38) | \ |
158 | (((_pte).pte >> 10) << 6 )) | 158 | (((_pte).pte >> 10) << 6 )) |
159 | 159 | ||
160 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x07) << 1 ) | \ | 160 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x07) << 1 ) | \ |
161 | (((off) & 0x38) << 2 ) | \ | 161 | (((off) & 0x38) << 2 ) | \ |
@@ -167,14 +167,14 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
167 | /* Swap entries must have VALID and GLOBAL bits cleared. */ | 167 | /* Swap entries must have VALID and GLOBAL bits cleared. */ |
168 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | 168 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) |
169 | #define __swp_type(x) (((x).val >> 2) & 0x1f) | 169 | #define __swp_type(x) (((x).val >> 2) & 0x1f) |
170 | #define __swp_offset(x) ((x).val >> 7) | 170 | #define __swp_offset(x) ((x).val >> 7) |
171 | #define __swp_entry(type,offset) \ | 171 | #define __swp_entry(type,offset) \ |
172 | ((swp_entry_t) { ((type) << 2) | ((offset) << 7) }) | 172 | ((swp_entry_t) { ((type) << 2) | ((offset) << 7) }) |
173 | #else | 173 | #else |
174 | #define __swp_type(x) (((x).val >> 8) & 0x1f) | 174 | #define __swp_type(x) (((x).val >> 8) & 0x1f) |
175 | #define __swp_offset(x) ((x).val >> 13) | 175 | #define __swp_offset(x) ((x).val >> 13) |
176 | #define __swp_entry(type,offset) \ | 176 | #define __swp_entry(type,offset) \ |
177 | ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) | 177 | ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) |
178 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) */ | 178 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) */ |
179 | 179 | ||
180 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) | 180 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) |
@@ -184,7 +184,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
184 | #define PTE_FILE_MAX_BITS 30 | 184 | #define PTE_FILE_MAX_BITS 30 |
185 | 185 | ||
186 | #define pte_to_pgoff(_pte) ((_pte).pte_high >> 2) | 186 | #define pte_to_pgoff(_pte) ((_pte).pte_high >> 2) |
187 | #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) << 2 }) | 187 | #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) << 2 }) |
188 | 188 | ||
189 | #else | 189 | #else |
190 | /* | 190 | /* |
@@ -194,7 +194,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
194 | 194 | ||
195 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1) & 0x7) | \ | 195 | #define pte_to_pgoff(_pte) ((((_pte).pte >> 1) & 0x7) | \ |
196 | (((_pte).pte >> 2) & 0x8) | \ | 196 | (((_pte).pte >> 2) & 0x8) | \ |
197 | (((_pte).pte >> 8) << 4)) | 197 | (((_pte).pte >> 8) << 4)) |
198 | 198 | ||
199 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7) << 1) | \ | 199 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7) << 1) | \ |
200 | (((off) & 0x8) << 2) | \ | 200 | (((off) & 0x8) << 2) | \ |
@@ -208,7 +208,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot) | |||
208 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high }) | 208 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high }) |
209 | #define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val }) | 209 | #define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val }) |
210 | #else | 210 | #else |
211 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 211 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
212 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 212 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
213 | #endif | 213 | #endif |
214 | 214 | ||
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 013d5f781263..e1c49a96807d 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h | |||
@@ -115,7 +115,7 @@ | |||
115 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) | 115 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) |
116 | 116 | ||
117 | #if PGDIR_SIZE >= TASK_SIZE64 | 117 | #if PGDIR_SIZE >= TASK_SIZE64 |
118 | #define USER_PTRS_PER_PGD (1) | 118 | #define USER_PTRS_PER_PGD (1) |
119 | #else | 119 | #else |
120 | #define USER_PTRS_PER_PGD (TASK_SIZE64 / PGDIR_SIZE) | 120 | #define USER_PTRS_PER_PGD (TASK_SIZE64 / PGDIR_SIZE) |
121 | #endif | 121 | #endif |
@@ -288,7 +288,7 @@ static inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) | |||
288 | #define __swp_type(x) (((x).val >> 32) & 0xff) | 288 | #define __swp_type(x) (((x).val >> 32) & 0xff) |
289 | #define __swp_offset(x) ((x).val >> 40) | 289 | #define __swp_offset(x) ((x).val >> 40) |
290 | #define __swp_entry(type, offset) ((swp_entry_t) { pte_val(mk_swap_pte((type), (offset))) }) | 290 | #define __swp_entry(type, offset) ((swp_entry_t) { pte_val(mk_swap_pte((type), (offset))) }) |
291 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 291 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
292 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 292 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
293 | 293 | ||
294 | /* | 294 | /* |
diff --git a/arch/mips/include/asm/pgtable-bits.h b/arch/mips/include/asm/pgtable-bits.h index 5a7ccc2473f8..32aea4852fb0 100644 --- a/arch/mips/include/asm/pgtable-bits.h +++ b/arch/mips/include/asm/pgtable-bits.h | |||
@@ -21,7 +21,7 @@ | |||
21 | * Similar to the Alpha port, we need to keep track of the ref | 21 | * Similar to the Alpha port, we need to keep track of the ref |
22 | * and mod bits in software. We have a software "yeah you can read | 22 | * and mod bits in software. We have a software "yeah you can read |
23 | * from this page" bit, and a hardware one which actually lets the | 23 | * from this page" bit, and a hardware one which actually lets the |
24 | * process read from the page. On the same token we have a software | 24 | * process read from the page. On the same token we have a software |
25 | * writable bit and the real hardware one which actually lets the | 25 | * writable bit and the real hardware one which actually lets the |
26 | * process write to the page, this keeps a mod bit via the hardware | 26 | * process write to the page, this keeps a mod bit via the hardware |
27 | * dirty bit. | 27 | * dirty bit. |
@@ -41,9 +41,9 @@ | |||
41 | #define _PAGE_GLOBAL (1 << 0) | 41 | #define _PAGE_GLOBAL (1 << 0) |
42 | #define _PAGE_VALID_SHIFT 1 | 42 | #define _PAGE_VALID_SHIFT 1 |
43 | #define _PAGE_VALID (1 << _PAGE_VALID_SHIFT) | 43 | #define _PAGE_VALID (1 << _PAGE_VALID_SHIFT) |
44 | #define _PAGE_SILENT_READ (1 << 1) /* synonym */ | 44 | #define _PAGE_SILENT_READ (1 << 1) /* synonym */ |
45 | #define _PAGE_DIRTY_SHIFT 2 | 45 | #define _PAGE_DIRTY_SHIFT 2 |
46 | #define _PAGE_DIRTY (1 << _PAGE_DIRTY_SHIFT) /* The MIPS dirty bit */ | 46 | #define _PAGE_DIRTY (1 << _PAGE_DIRTY_SHIFT) /* The MIPS dirty bit */ |
47 | #define _PAGE_SILENT_WRITE (1 << 2) | 47 | #define _PAGE_SILENT_WRITE (1 << 2) |
48 | #define _CACHE_SHIFT 3 | 48 | #define _CACHE_SHIFT 3 |
49 | #define _CACHE_MASK (7 << 3) | 49 | #define _CACHE_MASK (7 << 3) |
@@ -134,7 +134,7 @@ | |||
134 | #define _PAGE_HUGE (1 << _PAGE_HUGE_SHIFT) | 134 | #define _PAGE_HUGE (1 << _PAGE_HUGE_SHIFT) |
135 | #else | 135 | #else |
136 | #define _PAGE_HUGE_SHIFT (_PAGE_MODIFIED_SHIFT) | 136 | #define _PAGE_HUGE_SHIFT (_PAGE_MODIFIED_SHIFT) |
137 | #define _PAGE_HUGE ({BUG(); 1; }) /* Dummy value */ | 137 | #define _PAGE_HUGE ({BUG(); 1; }) /* Dummy value */ |
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT | 140 | #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT |
@@ -143,7 +143,7 @@ | |||
143 | #define _PAGE_SPLITTING (1 << _PAGE_SPLITTING_SHIFT) | 143 | #define _PAGE_SPLITTING (1 << _PAGE_SPLITTING_SHIFT) |
144 | #else | 144 | #else |
145 | #define _PAGE_SPLITTING_SHIFT (_PAGE_HUGE_SHIFT) | 145 | #define _PAGE_SPLITTING_SHIFT (_PAGE_HUGE_SHIFT) |
146 | #define _PAGE_SPLITTING ({BUG(); 1; }) /* Dummy value */ | 146 | #define _PAGE_SPLITTING ({BUG(); 1; }) /* Dummy value */ |
147 | #endif | 147 | #endif |
148 | 148 | ||
149 | /* Page cannot be executed */ | 149 | /* Page cannot be executed */ |
@@ -159,10 +159,10 @@ | |||
159 | 159 | ||
160 | #define _PAGE_VALID_SHIFT (_PAGE_GLOBAL_SHIFT + 1) | 160 | #define _PAGE_VALID_SHIFT (_PAGE_GLOBAL_SHIFT + 1) |
161 | #define _PAGE_VALID (1 << _PAGE_VALID_SHIFT) | 161 | #define _PAGE_VALID (1 << _PAGE_VALID_SHIFT) |
162 | /* synonym */ | 162 | /* synonym */ |
163 | #define _PAGE_SILENT_READ (_PAGE_VALID) | 163 | #define _PAGE_SILENT_READ (_PAGE_VALID) |
164 | 164 | ||
165 | /* The MIPS dirty bit */ | 165 | /* The MIPS dirty bit */ |
166 | #define _PAGE_DIRTY_SHIFT (_PAGE_VALID_SHIFT + 1) | 166 | #define _PAGE_DIRTY_SHIFT (_PAGE_VALID_SHIFT + 1) |
167 | #define _PAGE_DIRTY (1 << _PAGE_DIRTY_SHIFT) | 167 | #define _PAGE_DIRTY (1 << _PAGE_DIRTY_SHIFT) |
168 | #define _PAGE_SILENT_WRITE (_PAGE_DIRTY) | 168 | #define _PAGE_SILENT_WRITE (_PAGE_DIRTY) |
@@ -175,7 +175,7 @@ | |||
175 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR && defined(CONFIG_CPU_MIPS32) */ | 175 | #endif /* defined(CONFIG_64BIT_PHYS_ADDR && defined(CONFIG_CPU_MIPS32) */ |
176 | 176 | ||
177 | #ifndef _PFN_SHIFT | 177 | #ifndef _PFN_SHIFT |
178 | #define _PFN_SHIFT PAGE_SHIFT | 178 | #define _PFN_SHIFT PAGE_SHIFT |
179 | #endif | 179 | #endif |
180 | #define _PFN_MASK (~((1 << (_PFN_SHIFT)) - 1)) | 180 | #define _PFN_MASK (~((1 << (_PFN_SHIFT)) - 1)) |
181 | 181 | ||
@@ -230,28 +230,28 @@ static inline uint64_t pte_to_entrylo(unsigned long pte_val) | |||
230 | /* No penalty for being coherent on the SB1, so just | 230 | /* No penalty for being coherent on the SB1, so just |
231 | use it for "noncoherent" spaces, too. Shouldn't hurt. */ | 231 | use it for "noncoherent" spaces, too. Shouldn't hurt. */ |
232 | 232 | ||
233 | #define _CACHE_UNCACHED (2<<_CACHE_SHIFT) | 233 | #define _CACHE_UNCACHED (2<<_CACHE_SHIFT) |
234 | #define _CACHE_CACHABLE_COW (5<<_CACHE_SHIFT) | 234 | #define _CACHE_CACHABLE_COW (5<<_CACHE_SHIFT) |
235 | #define _CACHE_CACHABLE_NONCOHERENT (5<<_CACHE_SHIFT) | 235 | #define _CACHE_CACHABLE_NONCOHERENT (5<<_CACHE_SHIFT) |
236 | #define _CACHE_UNCACHED_ACCELERATED (7<<_CACHE_SHIFT) | 236 | #define _CACHE_UNCACHED_ACCELERATED (7<<_CACHE_SHIFT) |
237 | 237 | ||
238 | #else | 238 | #else |
239 | 239 | ||
240 | #define _CACHE_CACHABLE_NO_WA (0<<_CACHE_SHIFT) /* R4600 only */ | 240 | #define _CACHE_CACHABLE_NO_WA (0<<_CACHE_SHIFT) /* R4600 only */ |
241 | #define _CACHE_CACHABLE_WA (1<<_CACHE_SHIFT) /* R4600 only */ | 241 | #define _CACHE_CACHABLE_WA (1<<_CACHE_SHIFT) /* R4600 only */ |
242 | #define _CACHE_UNCACHED (2<<_CACHE_SHIFT) /* R4[0246]00 */ | 242 | #define _CACHE_UNCACHED (2<<_CACHE_SHIFT) /* R4[0246]00 */ |
243 | #define _CACHE_CACHABLE_NONCOHERENT (3<<_CACHE_SHIFT) /* R4[0246]00 */ | 243 | #define _CACHE_CACHABLE_NONCOHERENT (3<<_CACHE_SHIFT) /* R4[0246]00 */ |
244 | #define _CACHE_CACHABLE_CE (4<<_CACHE_SHIFT) /* R4[04]00MC only */ | 244 | #define _CACHE_CACHABLE_CE (4<<_CACHE_SHIFT) /* R4[04]00MC only */ |
245 | #define _CACHE_CACHABLE_COW (5<<_CACHE_SHIFT) /* R4[04]00MC only */ | 245 | #define _CACHE_CACHABLE_COW (5<<_CACHE_SHIFT) /* R4[04]00MC only */ |
246 | #define _CACHE_CACHABLE_COHERENT (5<<_CACHE_SHIFT) /* MIPS32R2 CMP */ | 246 | #define _CACHE_CACHABLE_COHERENT (5<<_CACHE_SHIFT) /* MIPS32R2 CMP */ |
247 | #define _CACHE_CACHABLE_CUW (6<<_CACHE_SHIFT) /* R4[04]00MC only */ | 247 | #define _CACHE_CACHABLE_CUW (6<<_CACHE_SHIFT) /* R4[04]00MC only */ |
248 | #define _CACHE_UNCACHED_ACCELERATED (7<<_CACHE_SHIFT) /* R10000 only */ | 248 | #define _CACHE_UNCACHED_ACCELERATED (7<<_CACHE_SHIFT) /* R10000 only */ |
249 | 249 | ||
250 | #endif | 250 | #endif |
251 | 251 | ||
252 | #define __READABLE (_PAGE_SILENT_READ | _PAGE_ACCESSED | (cpu_has_rixi ? 0 : _PAGE_READ)) | 252 | #define __READABLE (_PAGE_SILENT_READ | _PAGE_ACCESSED | (cpu_has_rixi ? 0 : _PAGE_READ)) |
253 | #define __WRITEABLE (_PAGE_WRITE | _PAGE_SILENT_WRITE | _PAGE_MODIFIED) | 253 | #define __WRITEABLE (_PAGE_WRITE | _PAGE_SILENT_WRITE | _PAGE_MODIFIED) |
254 | 254 | ||
255 | #define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK) | 255 | #define _PAGE_CHG_MASK (_PFN_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK) |
256 | 256 | ||
257 | #endif /* _ASM_PGTABLE_BITS_H */ | 257 | #endif /* _ASM_PGTABLE_BITS_H */ |
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index ec50d52cfb74..fdc62fb5630d 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h | |||
@@ -112,7 +112,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
112 | * it better already be global) | 112 | * it better already be global) |
113 | */ | 113 | */ |
114 | if (pte_none(*buddy)) { | 114 | if (pte_none(*buddy)) { |
115 | buddy->pte_low |= _PAGE_GLOBAL; | 115 | buddy->pte_low |= _PAGE_GLOBAL; |
116 | buddy->pte_high |= _PAGE_GLOBAL; | 116 | buddy->pte_high |= _PAGE_GLOBAL; |
117 | } | 117 | } |
118 | } | 118 | } |
@@ -319,7 +319,7 @@ static inline int pte_special(pte_t pte) { return 0; } | |||
319 | static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | 319 | static inline pte_t pte_mkspecial(pte_t pte) { return pte; } |
320 | 320 | ||
321 | /* | 321 | /* |
322 | * Macro to make mark a page protection value as "uncacheable". Note | 322 | * Macro to make mark a page protection value as "uncacheable". Note |
323 | * that "protection" is really a misnomer here as the protection value | 323 | * that "protection" is really a misnomer here as the protection value |
324 | * contains the memory attribute bits, dirty bits, and various other | 324 | * contains the memory attribute bits, dirty bits, and various other |
325 | * bits as well. | 325 | * bits as well. |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_cic_int.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_cic_int.h index c84bcf9570b1..ac863e2deb62 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_cic_int.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_cic_int.h | |||
@@ -43,14 +43,14 @@ | |||
43 | * IRQs directly forwarded to the CPU | 43 | * IRQs directly forwarded to the CPU |
44 | */ | 44 | */ |
45 | #define MSP_MIPS_INTBASE 0 | 45 | #define MSP_MIPS_INTBASE 0 |
46 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ | 46 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ |
47 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ | 47 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ |
48 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ | 48 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ |
49 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ | 49 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ |
50 | #define MSP_INT_USB 4 /* IRQ for USB, C_IRQ2 */ | 50 | #define MSP_INT_USB 4 /* IRQ for USB, C_IRQ2 */ |
51 | #define MSP_INT_SAR 5 /* IRQ for ADSL2+ SAR, C_IRQ3 */ | 51 | #define MSP_INT_SAR 5 /* IRQ for ADSL2+ SAR, C_IRQ3 */ |
52 | #define MSP_INT_CIC 6 /* IRQ for CIC block, C_IRQ4 */ | 52 | #define MSP_INT_CIC 6 /* IRQ for CIC block, C_IRQ4 */ |
53 | #define MSP_INT_SEC 7 /* IRQ for Sec engine, C_IRQ5 */ | 53 | #define MSP_INT_SEC 7 /* IRQ for Sec engine, C_IRQ5 */ |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * IRQs cascaded on CPU interrupt 4 (CAUSE bit 12, C_IRQ4) | 56 | * IRQs cascaded on CPU interrupt 4 (CAUSE bit 12, C_IRQ4) |
@@ -59,93 +59,93 @@ | |||
59 | */ | 59 | */ |
60 | #define MSP_CIC_INTBASE (MSP_MIPS_INTBASE + 8) | 60 | #define MSP_CIC_INTBASE (MSP_MIPS_INTBASE + 8) |
61 | #define MSP_INT_EXT0 (MSP_CIC_INTBASE + 0) | 61 | #define MSP_INT_EXT0 (MSP_CIC_INTBASE + 0) |
62 | /* External interrupt 0 */ | 62 | /* External interrupt 0 */ |
63 | #define MSP_INT_EXT1 (MSP_CIC_INTBASE + 1) | 63 | #define MSP_INT_EXT1 (MSP_CIC_INTBASE + 1) |
64 | /* External interrupt 1 */ | 64 | /* External interrupt 1 */ |
65 | #define MSP_INT_EXT2 (MSP_CIC_INTBASE + 2) | 65 | #define MSP_INT_EXT2 (MSP_CIC_INTBASE + 2) |
66 | /* External interrupt 2 */ | 66 | /* External interrupt 2 */ |
67 | #define MSP_INT_EXT3 (MSP_CIC_INTBASE + 3) | 67 | #define MSP_INT_EXT3 (MSP_CIC_INTBASE + 3) |
68 | /* External interrupt 3 */ | 68 | /* External interrupt 3 */ |
69 | #define MSP_INT_CPUIF (MSP_CIC_INTBASE + 4) | 69 | #define MSP_INT_CPUIF (MSP_CIC_INTBASE + 4) |
70 | /* CPU interface interrupt */ | 70 | /* CPU interface interrupt */ |
71 | #define MSP_INT_EXT4 (MSP_CIC_INTBASE + 5) | 71 | #define MSP_INT_EXT4 (MSP_CIC_INTBASE + 5) |
72 | /* External interrupt 4 */ | 72 | /* External interrupt 4 */ |
73 | #define MSP_INT_CIC_USB (MSP_CIC_INTBASE + 6) | 73 | #define MSP_INT_CIC_USB (MSP_CIC_INTBASE + 6) |
74 | /* Cascaded IRQ for USB */ | 74 | /* Cascaded IRQ for USB */ |
75 | #define MSP_INT_MBOX (MSP_CIC_INTBASE + 7) | 75 | #define MSP_INT_MBOX (MSP_CIC_INTBASE + 7) |
76 | /* Sec engine mailbox IRQ */ | 76 | /* Sec engine mailbox IRQ */ |
77 | #define MSP_INT_EXT5 (MSP_CIC_INTBASE + 8) | 77 | #define MSP_INT_EXT5 (MSP_CIC_INTBASE + 8) |
78 | /* External interrupt 5 */ | 78 | /* External interrupt 5 */ |
79 | #define MSP_INT_TDM (MSP_CIC_INTBASE + 9) | 79 | #define MSP_INT_TDM (MSP_CIC_INTBASE + 9) |
80 | /* TDM interrupt */ | 80 | /* TDM interrupt */ |
81 | #define MSP_INT_CIC_MAC0 (MSP_CIC_INTBASE + 10) | 81 | #define MSP_INT_CIC_MAC0 (MSP_CIC_INTBASE + 10) |
82 | /* Cascaded IRQ for MAC 0 */ | 82 | /* Cascaded IRQ for MAC 0 */ |
83 | #define MSP_INT_CIC_MAC1 (MSP_CIC_INTBASE + 11) | 83 | #define MSP_INT_CIC_MAC1 (MSP_CIC_INTBASE + 11) |
84 | /* Cascaded IRQ for MAC 1 */ | 84 | /* Cascaded IRQ for MAC 1 */ |
85 | #define MSP_INT_CIC_SEC (MSP_CIC_INTBASE + 12) | 85 | #define MSP_INT_CIC_SEC (MSP_CIC_INTBASE + 12) |
86 | /* Cascaded IRQ for sec engine */ | 86 | /* Cascaded IRQ for sec engine */ |
87 | #define MSP_INT_PER (MSP_CIC_INTBASE + 13) | 87 | #define MSP_INT_PER (MSP_CIC_INTBASE + 13) |
88 | /* Peripheral interrupt */ | 88 | /* Peripheral interrupt */ |
89 | #define MSP_INT_TIMER0 (MSP_CIC_INTBASE + 14) | 89 | #define MSP_INT_TIMER0 (MSP_CIC_INTBASE + 14) |
90 | /* SLP timer 0 */ | 90 | /* SLP timer 0 */ |
91 | #define MSP_INT_TIMER1 (MSP_CIC_INTBASE + 15) | 91 | #define MSP_INT_TIMER1 (MSP_CIC_INTBASE + 15) |
92 | /* SLP timer 1 */ | 92 | /* SLP timer 1 */ |
93 | #define MSP_INT_TIMER2 (MSP_CIC_INTBASE + 16) | 93 | #define MSP_INT_TIMER2 (MSP_CIC_INTBASE + 16) |
94 | /* SLP timer 2 */ | 94 | /* SLP timer 2 */ |
95 | #define MSP_INT_VPE0_TIMER (MSP_CIC_INTBASE + 17) | 95 | #define MSP_INT_VPE0_TIMER (MSP_CIC_INTBASE + 17) |
96 | /* VPE0 MIPS timer */ | 96 | /* VPE0 MIPS timer */ |
97 | #define MSP_INT_BLKCP (MSP_CIC_INTBASE + 18) | 97 | #define MSP_INT_BLKCP (MSP_CIC_INTBASE + 18) |
98 | /* Block Copy */ | 98 | /* Block Copy */ |
99 | #define MSP_INT_UART0 (MSP_CIC_INTBASE + 19) | 99 | #define MSP_INT_UART0 (MSP_CIC_INTBASE + 19) |
100 | /* UART 0 */ | 100 | /* UART 0 */ |
101 | #define MSP_INT_PCI (MSP_CIC_INTBASE + 20) | 101 | #define MSP_INT_PCI (MSP_CIC_INTBASE + 20) |
102 | /* PCI subsystem */ | 102 | /* PCI subsystem */ |
103 | #define MSP_INT_EXT6 (MSP_CIC_INTBASE + 21) | 103 | #define MSP_INT_EXT6 (MSP_CIC_INTBASE + 21) |
104 | /* External interrupt 5 */ | 104 | /* External interrupt 5 */ |
105 | #define MSP_INT_PCI_MSI (MSP_CIC_INTBASE + 22) | 105 | #define MSP_INT_PCI_MSI (MSP_CIC_INTBASE + 22) |
106 | /* PCI Message Signal */ | 106 | /* PCI Message Signal */ |
107 | #define MSP_INT_CIC_SAR (MSP_CIC_INTBASE + 23) | 107 | #define MSP_INT_CIC_SAR (MSP_CIC_INTBASE + 23) |
108 | /* Cascaded ADSL2+ SAR IRQ */ | 108 | /* Cascaded ADSL2+ SAR IRQ */ |
109 | #define MSP_INT_DSL (MSP_CIC_INTBASE + 24) | 109 | #define MSP_INT_DSL (MSP_CIC_INTBASE + 24) |
110 | /* ADSL2+ IRQ */ | 110 | /* ADSL2+ IRQ */ |
111 | #define MSP_INT_CIC_ERR (MSP_CIC_INTBASE + 25) | 111 | #define MSP_INT_CIC_ERR (MSP_CIC_INTBASE + 25) |
112 | /* SLP error condition */ | 112 | /* SLP error condition */ |
113 | #define MSP_INT_VPE1_TIMER (MSP_CIC_INTBASE + 26) | 113 | #define MSP_INT_VPE1_TIMER (MSP_CIC_INTBASE + 26) |
114 | /* VPE1 MIPS timer */ | 114 | /* VPE1 MIPS timer */ |
115 | #define MSP_INT_VPE0_PC (MSP_CIC_INTBASE + 27) | 115 | #define MSP_INT_VPE0_PC (MSP_CIC_INTBASE + 27) |
116 | /* VPE0 Performance counter */ | 116 | /* VPE0 Performance counter */ |
117 | #define MSP_INT_VPE1_PC (MSP_CIC_INTBASE + 28) | 117 | #define MSP_INT_VPE1_PC (MSP_CIC_INTBASE + 28) |
118 | /* VPE1 Performance counter */ | 118 | /* VPE1 Performance counter */ |
119 | #define MSP_INT_EXT7 (MSP_CIC_INTBASE + 29) | 119 | #define MSP_INT_EXT7 (MSP_CIC_INTBASE + 29) |
120 | /* External interrupt 5 */ | 120 | /* External interrupt 5 */ |
121 | #define MSP_INT_VPE0_SW (MSP_CIC_INTBASE + 30) | 121 | #define MSP_INT_VPE0_SW (MSP_CIC_INTBASE + 30) |
122 | /* VPE0 Software interrupt */ | 122 | /* VPE0 Software interrupt */ |
123 | #define MSP_INT_VPE1_SW (MSP_CIC_INTBASE + 31) | 123 | #define MSP_INT_VPE1_SW (MSP_CIC_INTBASE + 31) |
124 | /* VPE0 Software interrupt */ | 124 | /* VPE0 Software interrupt */ |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * IRQs cascaded on CIC PER interrupt (MSP_INT_PER) | 127 | * IRQs cascaded on CIC PER interrupt (MSP_INT_PER) |
128 | */ | 128 | */ |
129 | #define MSP_PER_INTBASE (MSP_CIC_INTBASE + 32) | 129 | #define MSP_PER_INTBASE (MSP_CIC_INTBASE + 32) |
130 | /* Reserved 0-1 */ | 130 | /* Reserved 0-1 */ |
131 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) | 131 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) |
132 | /* UART 1 */ | 132 | /* UART 1 */ |
133 | /* Reserved 3-5 */ | 133 | /* Reserved 3-5 */ |
134 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) | 134 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) |
135 | /* 2-wire */ | 135 | /* 2-wire */ |
136 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) | 136 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) |
137 | /* Peripheral timer block out 0 */ | 137 | /* Peripheral timer block out 0 */ |
138 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) | 138 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) |
139 | /* Peripheral timer block out 1 */ | 139 | /* Peripheral timer block out 1 */ |
140 | /* Reserved 9 */ | 140 | /* Reserved 9 */ |
141 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) | 141 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) |
142 | /* SPI RX complete */ | 142 | /* SPI RX complete */ |
143 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) | 143 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) |
144 | /* SPI TX complete */ | 144 | /* SPI TX complete */ |
145 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) | 145 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) |
146 | /* GPIO */ | 146 | /* GPIO */ |
147 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) | 147 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) |
148 | /* Peripheral error */ | 148 | /* Peripheral error */ |
149 | /* Reserved 14-31 */ | 149 | /* Reserved 14-31 */ |
150 | 150 | ||
151 | #endif /* !_MSP_CIC_INT_H */ | 151 | #endif /* !_MSP_CIC_INT_H */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_gpio_macros.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_gpio_macros.h index 156f320c69e7..daacebb047c2 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_gpio_macros.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_gpio_macros.h | |||
@@ -54,7 +54,7 @@ enum msp_gpio_mode { | |||
54 | MSP_GPIO_UART_OUTPUT = 0x9, /* Only GPIO 2 or 3 */ | 54 | MSP_GPIO_UART_OUTPUT = 0x9, /* Only GPIO 2 or 3 */ |
55 | MSP_GPIO_PERIF_TIMERA = 0x9, /* Only GPIO 0 or 1 */ | 55 | MSP_GPIO_PERIF_TIMERA = 0x9, /* Only GPIO 0 or 1 */ |
56 | MSP_GPIO_PERIF_TIMERB = 0xa, /* Only GPIO 0 or 1 */ | 56 | MSP_GPIO_PERIF_TIMERB = 0xa, /* Only GPIO 0 or 1 */ |
57 | MSP_GPIO_UNKNOWN = 0xb, /* No such GPIO or mode */ | 57 | MSP_GPIO_UNKNOWN = 0xb, /* No such GPIO or mode */ |
58 | }; | 58 | }; |
59 | 59 | ||
60 | /* -- Static Tables -- */ | 60 | /* -- Static Tables -- */ |
@@ -148,7 +148,7 @@ static unsigned int MSP_GPIO_MODE_ALLOWED[] = { | |||
148 | BASIC_MODE_REG_VALUE(mode, OFFSET_GPIO_NUMBER(gpio)) | 148 | BASIC_MODE_REG_VALUE(mode, OFFSET_GPIO_NUMBER(gpio)) |
149 | #define BASIC_MODE_SHIFT(gpio) \ | 149 | #define BASIC_MODE_SHIFT(gpio) \ |
150 | BASIC_MODE_REG_SHIFT(OFFSET_GPIO_NUMBER(gpio)) | 150 | BASIC_MODE_REG_SHIFT(OFFSET_GPIO_NUMBER(gpio)) |
151 | #define BASIC_MODE_FROM_REG(data, gpio) \ | 151 | #define BASIC_MODE_FROM_REG(data, gpio) \ |
152 | BASIC_MODE_REG_FROM_REG(data, OFFSET_GPIO_NUMBER(gpio)) | 152 | BASIC_MODE_REG_FROM_REG(data, OFFSET_GPIO_NUMBER(gpio)) |
153 | 153 | ||
154 | /* | 154 | /* |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_int.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_int.h index 1d9f05474820..29f8bf79d7a5 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_int.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_int.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Defines for the MSP interrupt handlers. | 2 | * Defines for the MSP interrupt handlers. |
3 | * | 3 | * |
4 | * Copyright (C) 2005, PMC-Sierra, Inc. All rights reserved. | 4 | * Copyright (C) 2005, PMC-Sierra, Inc. All rights reserved. |
5 | * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com | 5 | * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com |
6 | * | 6 | * |
7 | * ######################################################################## | 7 | * ######################################################################## |
@@ -28,7 +28,7 @@ | |||
28 | /* | 28 | /* |
29 | * The PMC-Sierra MSP product line has at least two different interrupt | 29 | * The PMC-Sierra MSP product line has at least two different interrupt |
30 | * controllers, the SLP register based scheme and the CIC interrupt | 30 | * controllers, the SLP register based scheme and the CIC interrupt |
31 | * controller block mechanism. This file distinguishes between them | 31 | * controller block mechanism. This file distinguishes between them |
32 | * so that devices see a uniform interface. | 32 | * so that devices see a uniform interface. |
33 | */ | 33 | */ |
34 | 34 | ||
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_pci.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_pci.h index 415606903617..24948cc42461 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_pci.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_pci.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #ifndef _MSP_PCI_H_ | 26 | #ifndef _MSP_PCI_H_ |
27 | #define _MSP_PCI_H_ | 27 | #define _MSP_PCI_H_ |
28 | 28 | ||
29 | #define MSP_HAS_PCI(ID) (((u32)(ID) <= 0x4236) && ((u32)(ID) >= 0x4220)) | 29 | #define MSP_HAS_PCI(ID) (((u32)(ID) <= 0x4236) && ((u32)(ID) >= 0x4220)) |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * It is convenient to program the OATRAN register so that | 32 | * It is convenient to program the OATRAN register so that |
@@ -96,24 +96,24 @@ enum | |||
96 | config_status_command, /* 1 */ | 96 | config_status_command, /* 1 */ |
97 | config_class_revision, /* 2 */ | 97 | config_class_revision, /* 2 */ |
98 | config_BIST_header_latency_cache, /* 3 */ | 98 | config_BIST_header_latency_cache, /* 3 */ |
99 | config_BAR0, /* 4 */ | 99 | config_BAR0, /* 4 */ |
100 | config_BAR1, /* 5 */ | 100 | config_BAR1, /* 5 */ |
101 | config_BAR2, /* 6 */ | 101 | config_BAR2, /* 6 */ |
102 | config_not_used7, /* 7 */ | 102 | config_not_used7, /* 7 */ |
103 | config_not_used8, /* 8 */ | 103 | config_not_used8, /* 8 */ |
104 | config_not_used9, /* 9 */ | 104 | config_not_used9, /* 9 */ |
105 | config_CIS, /* 10 */ | 105 | config_CIS, /* 10 */ |
106 | config_subsystem, /* 11 */ | 106 | config_subsystem, /* 11 */ |
107 | config_not_used12, /* 12 */ | 107 | config_not_used12, /* 12 */ |
108 | config_capabilities, /* 13 */ | 108 | config_capabilities, /* 13 */ |
109 | config_not_used14, /* 14 */ | 109 | config_not_used14, /* 14 */ |
110 | config_lat_grant_irq, /* 15 */ | 110 | config_lat_grant_irq, /* 15 */ |
111 | config_message_control,/* 16 */ | 111 | config_message_control,/* 16 */ |
112 | config_message_addr, /* 17 */ | 112 | config_message_addr, /* 17 */ |
113 | config_message_data, /* 18 */ | 113 | config_message_data, /* 18 */ |
114 | config_VPD_addr, /* 19 */ | 114 | config_VPD_addr, /* 19 */ |
115 | config_VPD_data, /* 20 */ | 115 | config_VPD_data, /* 20 */ |
116 | config_maxregs /* 21 - number of registers */ | 116 | config_maxregs /* 21 - number of registers */ |
117 | }; | 117 | }; |
118 | 118 | ||
119 | struct msp_pci_regs | 119 | struct msp_pci_regs |
@@ -132,15 +132,15 @@ struct msp_pci_regs | |||
132 | pcireg hop_unused_2C; /* +0x2C */ | 132 | pcireg hop_unused_2C; /* +0x2C */ |
133 | pcireg hop_unused_30; /* +0x30 */ | 133 | pcireg hop_unused_30; /* +0x30 */ |
134 | pcireg hop_unused_34; /* +0x34 */ | 134 | pcireg hop_unused_34; /* +0x34 */ |
135 | pcireg if_control; /* +0x38 */ | 135 | pcireg if_control; /* +0x38 */ |
136 | pcireg oatran; /* +0x3C */ | 136 | pcireg oatran; /* +0x3C */ |
137 | pcireg reset_ctl; /* +0x40 */ | 137 | pcireg reset_ctl; /* +0x40 */ |
138 | pcireg config_addr; /* +0x44 */ | 138 | pcireg config_addr; /* +0x44 */ |
139 | pcireg hop_unused_48; /* +0x48 */ | 139 | pcireg hop_unused_48; /* +0x48 */ |
140 | pcireg msg_signaled_int_status; /* +0x4C */ | 140 | pcireg msg_signaled_int_status; /* +0x4C */ |
141 | pcireg msg_signaled_int_mask; /* +0x50 */ | 141 | pcireg msg_signaled_int_mask; /* +0x50 */ |
142 | pcireg if_status; /* +0x54 */ | 142 | pcireg if_status; /* +0x54 */ |
143 | pcireg if_mask; /* +0x58 */ | 143 | pcireg if_mask; /* +0x58 */ |
144 | pcireg hop_unused_5C; /* +0x5C */ | 144 | pcireg hop_unused_5C; /* +0x5C */ |
145 | pcireg hop_unused_60; /* +0x60 */ | 145 | pcireg hop_unused_60; /* +0x60 */ |
146 | pcireg hop_unused_64; /* +0x64 */ | 146 | pcireg hop_unused_64; /* +0x64 */ |
@@ -190,9 +190,9 @@ struct msp_pci_regs | |||
190 | #define BPCI_IFSTATUS_PEI (1<<30) /* Parity error as initiator */ | 190 | #define BPCI_IFSTATUS_PEI (1<<30) /* Parity error as initiator */ |
191 | #define BPCI_IFSTATUS_PET (1<<31) /* Parity error as target */ | 191 | #define BPCI_IFSTATUS_PET (1<<31) /* Parity error as target */ |
192 | 192 | ||
193 | #define BPCI_RESETCTL_PR (1<<0) /* True if reset asserted */ | 193 | #define BPCI_RESETCTL_PR (1<<0) /* True if reset asserted */ |
194 | #define BPCI_RESETCTL_RT (1<<4) /* Release time */ | 194 | #define BPCI_RESETCTL_RT (1<<4) /* Release time */ |
195 | #define BPCI_RESETCTL_CT (1<<8) /* Config time */ | 195 | #define BPCI_RESETCTL_CT (1<<8) /* Config time */ |
196 | #define BPCI_RESETCTL_PE (1<<12) /* PCI enabled */ | 196 | #define BPCI_RESETCTL_PE (1<<12) /* PCI enabled */ |
197 | #define BPCI_RESETCTL_HM (1<<13) /* PCI host mode */ | 197 | #define BPCI_RESETCTL_HM (1<<13) /* PCI host mode */ |
198 | #define BPCI_RESETCTL_RI (1<<14) /* PCI reset in */ | 198 | #define BPCI_RESETCTL_RI (1<<14) /* PCI reset in */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h index 786d82daf8d6..4d3052ab89a2 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_prom.h | |||
@@ -40,7 +40,7 @@ | |||
40 | (((revision >= 0xb0) && (revision < 0xd0))) | 40 | (((revision >= 0xb0) && (revision < 0xd0))) |
41 | #define FPGA_IS_5000(revision) \ | 41 | #define FPGA_IS_5000(revision) \ |
42 | ((revision >= 0x80) && (revision <= 0x90)) | 42 | ((revision >= 0x80) && (revision <= 0x90)) |
43 | #define FPGA_IS_ZEUS(revision) ((revision < 0x7f)) | 43 | #define FPGA_IS_ZEUS(revision) ((revision < 0x7f)) |
44 | #define FPGA_IS_DUET(revision) \ | 44 | #define FPGA_IS_DUET(revision) \ |
45 | (((revision >= 0xa0) && (revision < 0xb0))) | 45 | (((revision >= 0xa0) && (revision < 0xb0))) |
46 | #define FPGA_IS_MSP4200(revision) ((revision >= 0xd0)) | 46 | #define FPGA_IS_MSP4200(revision) ((revision >= 0xd0)) |
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #define MACHINE_TYPE_POLO "POLO" | 49 | #define MACHINE_TYPE_POLO "POLO" |
50 | #define MACHINE_TYPE_DUET "DUET" | 50 | #define MACHINE_TYPE_DUET "DUET" |
51 | #define MACHINE_TYPE_ZEUS "ZEUS" | 51 | #define MACHINE_TYPE_ZEUS "ZEUS" |
52 | #define MACHINE_TYPE_MSP2000REVB "MSP2000REVB" | 52 | #define MACHINE_TYPE_MSP2000REVB "MSP2000REVB" |
53 | #define MACHINE_TYPE_MSP5000 "MSP5000" | 53 | #define MACHINE_TYPE_MSP5000 "MSP5000" |
54 | #define MACHINE_TYPE_MSP4200 "MSP4200" | 54 | #define MACHINE_TYPE_MSP4200 "MSP4200" |
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | #define MACHINE_TYPE_POLO_FPGA "POLO-FPGA" | 59 | #define MACHINE_TYPE_POLO_FPGA "POLO-FPGA" |
60 | #define MACHINE_TYPE_DUET_FPGA "DUET-FPGA" | 60 | #define MACHINE_TYPE_DUET_FPGA "DUET-FPGA" |
61 | #define MACHINE_TYPE_ZEUS_FPGA "ZEUS_FPGA" | 61 | #define MACHINE_TYPE_ZEUS_FPGA "ZEUS_FPGA" |
62 | #define MACHINE_TYPE_MSP2000REVB_FPGA "MSP2000REVB-FPGA" | 62 | #define MACHINE_TYPE_MSP2000REVB_FPGA "MSP2000REVB-FPGA" |
63 | #define MACHINE_TYPE_MSP5000_FPGA "MSP5000-FPGA" | 63 | #define MACHINE_TYPE_MSP5000_FPGA "MSP5000-FPGA" |
64 | #define MACHINE_TYPE_MSP4200_FPGA "MSP4200-FPGA" | 64 | #define MACHINE_TYPE_MSP4200_FPGA "MSP4200-FPGA" |
@@ -95,7 +95,7 @@ | |||
95 | #define ENET_MII 'M' | 95 | #define ENET_MII 'M' |
96 | #define ENET_RMII 'R' | 96 | #define ENET_RMII 'R' |
97 | 97 | ||
98 | #define ENETTXD_FALLING 'F' | 98 | #define ENETTXD_FALLING 'F' |
99 | #define ENETTXD_RISING 'R' | 99 | #define ENETTXD_RISING 'R' |
100 | 100 | ||
101 | #define PCI_HOST 'H' | 101 | #define PCI_HOST 'H' |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h index 7d41474e5488..2dbc7a8cec1a 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regops.h | |||
@@ -233,4 +233,4 @@ static inline u32 blocking_read_reg32(volatile u32 *const addr) | |||
233 | : "=&r" (tmp), "=m" (*address) \ | 233 | : "=&r" (tmp), "=m" (*address) \ |
234 | : "0" (tmp), "m" (*address)) | 234 | : "0" (tmp), "m" (*address)) |
235 | 235 | ||
236 | #endif /* __ASM_REGOPS_H__ */ | 236 | #endif /* __ASM_REGOPS_H__ */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regs.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regs.h index 692c1b658b92..da3a8dea2282 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regs.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_regs.h | |||
@@ -37,13 +37,13 @@ | |||
37 | 37 | ||
38 | /* | 38 | /* |
39 | ######################################################################## | 39 | ######################################################################## |
40 | # Address space and device base definitions # | 40 | # Address space and device base definitions # |
41 | ######################################################################## | 41 | ######################################################################## |
42 | */ | 42 | */ |
43 | 43 | ||
44 | /* | 44 | /* |
45 | *************************************************************************** | 45 | *************************************************************************** |
46 | * System Logic and Peripherals (ELB, UART0, etc) device address space * | 46 | * System Logic and Peripherals (ELB, UART0, etc) device address space * |
47 | *************************************************************************** | 47 | *************************************************************************** |
48 | */ | 48 | */ |
49 | #define MSP_SLP_BASE 0x1c000000 | 49 | #define MSP_SLP_BASE 0x1c000000 |
@@ -53,69 +53,69 @@ | |||
53 | #define MSP_RST_SIZE 0x0C /* System reset register space */ | 53 | #define MSP_RST_SIZE 0x0C /* System reset register space */ |
54 | 54 | ||
55 | #define MSP_WTIMER_BASE (MSP_SLP_BASE + 0x04C) | 55 | #define MSP_WTIMER_BASE (MSP_SLP_BASE + 0x04C) |
56 | /* watchdog timer base */ | 56 | /* watchdog timer base */ |
57 | #define MSP_ITIMER_BASE (MSP_SLP_BASE + 0x054) | 57 | #define MSP_ITIMER_BASE (MSP_SLP_BASE + 0x054) |
58 | /* internal timer base */ | 58 | /* internal timer base */ |
59 | #define MSP_UART0_BASE (MSP_SLP_BASE + 0x100) | 59 | #define MSP_UART0_BASE (MSP_SLP_BASE + 0x100) |
60 | /* UART0 controller base */ | 60 | /* UART0 controller base */ |
61 | #define MSP_BCPY_CTRL_BASE (MSP_SLP_BASE + 0x120) | 61 | #define MSP_BCPY_CTRL_BASE (MSP_SLP_BASE + 0x120) |
62 | /* Block Copy controller base */ | 62 | /* Block Copy controller base */ |
63 | #define MSP_BCPY_DESC_BASE (MSP_SLP_BASE + 0x160) | 63 | #define MSP_BCPY_DESC_BASE (MSP_SLP_BASE + 0x160) |
64 | /* Block Copy descriptor base */ | 64 | /* Block Copy descriptor base */ |
65 | 65 | ||
66 | /* | 66 | /* |
67 | *************************************************************************** | 67 | *************************************************************************** |
68 | * PCI address space * | 68 | * PCI address space * |
69 | *************************************************************************** | 69 | *************************************************************************** |
70 | */ | 70 | */ |
71 | #define MSP_PCI_BASE 0x19000000 | 71 | #define MSP_PCI_BASE 0x19000000 |
72 | 72 | ||
73 | /* | 73 | /* |
74 | *************************************************************************** | 74 | *************************************************************************** |
75 | * MSbus device address space * | 75 | * MSbus device address space * |
76 | *************************************************************************** | 76 | *************************************************************************** |
77 | */ | 77 | */ |
78 | #define MSP_MSB_BASE 0x18000000 | 78 | #define MSP_MSB_BASE 0x18000000 |
79 | /* MSbus address start */ | 79 | /* MSbus address start */ |
80 | #define MSP_PER_BASE (MSP_MSB_BASE + 0x400000) | 80 | #define MSP_PER_BASE (MSP_MSB_BASE + 0x400000) |
81 | /* Peripheral device registers */ | 81 | /* Peripheral device registers */ |
82 | #define MSP_MAC0_BASE (MSP_MSB_BASE + 0x600000) | 82 | #define MSP_MAC0_BASE (MSP_MSB_BASE + 0x600000) |
83 | /* MAC A device registers */ | 83 | /* MAC A device registers */ |
84 | #define MSP_MAC1_BASE (MSP_MSB_BASE + 0x700000) | 84 | #define MSP_MAC1_BASE (MSP_MSB_BASE + 0x700000) |
85 | /* MAC B device registers */ | 85 | /* MAC B device registers */ |
86 | #define MSP_MAC_SIZE 0xE0 /* MAC register space */ | 86 | #define MSP_MAC_SIZE 0xE0 /* MAC register space */ |
87 | 87 | ||
88 | #define MSP_SEC_BASE (MSP_MSB_BASE + 0x800000) | 88 | #define MSP_SEC_BASE (MSP_MSB_BASE + 0x800000) |
89 | /* Security Engine registers */ | 89 | /* Security Engine registers */ |
90 | #define MSP_MAC2_BASE (MSP_MSB_BASE + 0x900000) | 90 | #define MSP_MAC2_BASE (MSP_MSB_BASE + 0x900000) |
91 | /* MAC C device registers */ | 91 | /* MAC C device registers */ |
92 | #define MSP_ADSL2_BASE (MSP_MSB_BASE + 0xA80000) | 92 | #define MSP_ADSL2_BASE (MSP_MSB_BASE + 0xA80000) |
93 | /* ADSL2 device registers */ | 93 | /* ADSL2 device registers */ |
94 | #define MSP_USB0_BASE (MSP_MSB_BASE + 0xB00000) | 94 | #define MSP_USB0_BASE (MSP_MSB_BASE + 0xB00000) |
95 | /* USB0 device registers */ | 95 | /* USB0 device registers */ |
96 | #define MSP_USB1_BASE (MSP_MSB_BASE + 0x300000) | 96 | #define MSP_USB1_BASE (MSP_MSB_BASE + 0x300000) |
97 | /* USB1 device registers */ | 97 | /* USB1 device registers */ |
98 | #define MSP_CPUIF_BASE (MSP_MSB_BASE + 0xC00000) | 98 | #define MSP_CPUIF_BASE (MSP_MSB_BASE + 0xC00000) |
99 | /* CPU interface registers */ | 99 | /* CPU interface registers */ |
100 | 100 | ||
101 | /* Devices within the MSbus peripheral block */ | 101 | /* Devices within the MSbus peripheral block */ |
102 | #define MSP_UART1_BASE (MSP_PER_BASE + 0x030) | 102 | #define MSP_UART1_BASE (MSP_PER_BASE + 0x030) |
103 | /* UART1 controller base */ | 103 | /* UART1 controller base */ |
104 | #define MSP_SPI_BASE (MSP_PER_BASE + 0x058) | 104 | #define MSP_SPI_BASE (MSP_PER_BASE + 0x058) |
105 | /* SPI/MPI control registers */ | 105 | /* SPI/MPI control registers */ |
106 | #define MSP_TWI_BASE (MSP_PER_BASE + 0x090) | 106 | #define MSP_TWI_BASE (MSP_PER_BASE + 0x090) |
107 | /* Two-wire control registers */ | 107 | /* Two-wire control registers */ |
108 | #define MSP_PTIMER_BASE (MSP_PER_BASE + 0x0F0) | 108 | #define MSP_PTIMER_BASE (MSP_PER_BASE + 0x0F0) |
109 | /* Programmable timer control */ | 109 | /* Programmable timer control */ |
110 | 110 | ||
111 | /* | 111 | /* |
112 | *************************************************************************** | 112 | *************************************************************************** |
113 | * Physical Memory configuration address space * | 113 | * Physical Memory configuration address space * |
114 | *************************************************************************** | 114 | *************************************************************************** |
115 | */ | 115 | */ |
116 | #define MSP_MEM_CFG_BASE 0x17f00000 | 116 | #define MSP_MEM_CFG_BASE 0x17f00000 |
117 | 117 | ||
118 | #define MSP_MEM_INDIRECT_CTL_10 0x10 | 118 | #define MSP_MEM_INDIRECT_CTL_10 0x10 |
119 | 119 | ||
120 | /* | 120 | /* |
121 | * Notes: | 121 | * Notes: |
@@ -130,10 +130,10 @@ | |||
130 | * 3) These constants are for physical addresses which means that they | 130 | * 3) These constants are for physical addresses which means that they |
131 | * work correctly with "ioremap" and friends. This means that device | 131 | * work correctly with "ioremap" and friends. This means that device |
132 | * drivers will need to remap these addresses using ioremap and perhaps | 132 | * drivers will need to remap these addresses using ioremap and perhaps |
133 | * the readw/writew macros. Or they could use the regptr() macro | 133 | * the readw/writew macros. Or they could use the regptr() macro |
134 | * defined below, but the readw/writew calls are the correct thing. | 134 | * defined below, but the readw/writew calls are the correct thing. |
135 | * 4) The UARTs have an additional status register offset from the base | 135 | * 4) The UARTs have an additional status register offset from the base |
136 | * address. This register isn't used in the standard 8250 driver but | 136 | * address. This register isn't used in the standard 8250 driver but |
137 | * may be used in other software. Consult the hardware datasheet for | 137 | * may be used in other software. Consult the hardware datasheet for |
138 | * offset details. | 138 | * offset details. |
139 | * 5) For some unknown reason the security engine (MSP_SEC_BASE) registers | 139 | * 5) For some unknown reason the security engine (MSP_SEC_BASE) registers |
@@ -163,44 +163,44 @@ | |||
163 | 163 | ||
164 | /* | 164 | /* |
165 | *************************************************************************** | 165 | *************************************************************************** |
166 | * System Logic and Peripherals (RESET, ELB, etc) registers * | 166 | * System Logic and Peripherals (RESET, ELB, etc) registers * |
167 | *************************************************************************** | 167 | *************************************************************************** |
168 | */ | 168 | */ |
169 | 169 | ||
170 | /* System Control register definitions */ | 170 | /* System Control register definitions */ |
171 | #define DEV_ID_REG regptr(MSP_SLP_BASE + 0x00) | 171 | #define DEV_ID_REG regptr(MSP_SLP_BASE + 0x00) |
172 | /* Device-ID RO */ | 172 | /* Device-ID RO */ |
173 | #define FWR_ID_REG regptr(MSP_SLP_BASE + 0x04) | 173 | #define FWR_ID_REG regptr(MSP_SLP_BASE + 0x04) |
174 | /* Firmware-ID Register RW */ | 174 | /* Firmware-ID Register RW */ |
175 | #define SYS_ID_REG0 regptr(MSP_SLP_BASE + 0x08) | 175 | #define SYS_ID_REG0 regptr(MSP_SLP_BASE + 0x08) |
176 | /* System-ID Register-0 RW */ | 176 | /* System-ID Register-0 RW */ |
177 | #define SYS_ID_REG1 regptr(MSP_SLP_BASE + 0x0C) | 177 | #define SYS_ID_REG1 regptr(MSP_SLP_BASE + 0x0C) |
178 | /* System-ID Register-1 RW */ | 178 | /* System-ID Register-1 RW */ |
179 | 179 | ||
180 | /* System Reset register definitions */ | 180 | /* System Reset register definitions */ |
181 | #define RST_STS_REG regptr(MSP_SLP_BASE + 0x10) | 181 | #define RST_STS_REG regptr(MSP_SLP_BASE + 0x10) |
182 | /* System Reset Status RO */ | 182 | /* System Reset Status RO */ |
183 | #define RST_SET_REG regptr(MSP_SLP_BASE + 0x14) | 183 | #define RST_SET_REG regptr(MSP_SLP_BASE + 0x14) |
184 | /* System Set Reset WO */ | 184 | /* System Set Reset WO */ |
185 | #define RST_CLR_REG regptr(MSP_SLP_BASE + 0x18) | 185 | #define RST_CLR_REG regptr(MSP_SLP_BASE + 0x18) |
186 | /* System Clear Reset WO */ | 186 | /* System Clear Reset WO */ |
187 | 187 | ||
188 | /* System Clock Registers */ | 188 | /* System Clock Registers */ |
189 | #define PCI_SLP_REG regptr(MSP_SLP_BASE + 0x1C) | 189 | #define PCI_SLP_REG regptr(MSP_SLP_BASE + 0x1C) |
190 | /* PCI clock generator RW */ | 190 | /* PCI clock generator RW */ |
191 | #define URT_SLP_REG regptr(MSP_SLP_BASE + 0x20) | 191 | #define URT_SLP_REG regptr(MSP_SLP_BASE + 0x20) |
192 | /* UART clock generator RW */ | 192 | /* UART clock generator RW */ |
193 | /* reserved (MSP_SLP_BASE + 0x24) */ | 193 | /* reserved (MSP_SLP_BASE + 0x24) */ |
194 | /* reserved (MSP_SLP_BASE + 0x28) */ | 194 | /* reserved (MSP_SLP_BASE + 0x28) */ |
195 | #define PLL1_SLP_REG regptr(MSP_SLP_BASE + 0x2C) | 195 | #define PLL1_SLP_REG regptr(MSP_SLP_BASE + 0x2C) |
196 | /* PLL1 clock generator RW */ | 196 | /* PLL1 clock generator RW */ |
197 | #define PLL0_SLP_REG regptr(MSP_SLP_BASE + 0x30) | 197 | #define PLL0_SLP_REG regptr(MSP_SLP_BASE + 0x30) |
198 | /* PLL0 clock generator RW */ | 198 | /* PLL0 clock generator RW */ |
199 | #define MIPS_SLP_REG regptr(MSP_SLP_BASE + 0x34) | 199 | #define MIPS_SLP_REG regptr(MSP_SLP_BASE + 0x34) |
200 | /* MIPS clock generator RW */ | 200 | /* MIPS clock generator RW */ |
201 | #define VE_SLP_REG regptr(MSP_SLP_BASE + 0x38) | 201 | #define VE_SLP_REG regptr(MSP_SLP_BASE + 0x38) |
202 | /* Voice Eng clock generator RW */ | 202 | /* Voice Eng clock generator RW */ |
203 | /* reserved (MSP_SLP_BASE + 0x3C) */ | 203 | /* reserved (MSP_SLP_BASE + 0x3C) */ |
204 | #define MSB_SLP_REG regptr(MSP_SLP_BASE + 0x40) | 204 | #define MSB_SLP_REG regptr(MSP_SLP_BASE + 0x40) |
205 | /* MS-Bus clock generator RW */ | 205 | /* MS-Bus clock generator RW */ |
206 | #define SMAC_SLP_REG regptr(MSP_SLP_BASE + 0x44) | 206 | #define SMAC_SLP_REG regptr(MSP_SLP_BASE + 0x44) |
@@ -216,108 +216,108 @@ | |||
216 | #define SE_MBOX_REG regptr(MSP_SLP_BASE + 0x78) | 216 | #define SE_MBOX_REG regptr(MSP_SLP_BASE + 0x78) |
217 | /* Security Engine mailbox RW */ | 217 | /* Security Engine mailbox RW */ |
218 | #define VE_MBOX_REG regptr(MSP_SLP_BASE + 0x7C) | 218 | #define VE_MBOX_REG regptr(MSP_SLP_BASE + 0x7C) |
219 | /* Voice Engine mailbox RW */ | 219 | /* Voice Engine mailbox RW */ |
220 | 220 | ||
221 | /* ELB Controller Registers */ | 221 | /* ELB Controller Registers */ |
222 | #define CS0_CNFG_REG regptr(MSP_SLP_BASE + 0x80) | 222 | #define CS0_CNFG_REG regptr(MSP_SLP_BASE + 0x80) |
223 | /* ELB CS0 Configuration Reg */ | 223 | /* ELB CS0 Configuration Reg */ |
224 | #define CS0_ADDR_REG regptr(MSP_SLP_BASE + 0x84) | 224 | #define CS0_ADDR_REG regptr(MSP_SLP_BASE + 0x84) |
225 | /* ELB CS0 Base Address Reg */ | 225 | /* ELB CS0 Base Address Reg */ |
226 | #define CS0_MASK_REG regptr(MSP_SLP_BASE + 0x88) | 226 | #define CS0_MASK_REG regptr(MSP_SLP_BASE + 0x88) |
227 | /* ELB CS0 Mask Register */ | 227 | /* ELB CS0 Mask Register */ |
228 | #define CS0_ACCESS_REG regptr(MSP_SLP_BASE + 0x8C) | 228 | #define CS0_ACCESS_REG regptr(MSP_SLP_BASE + 0x8C) |
229 | /* ELB CS0 access register */ | 229 | /* ELB CS0 access register */ |
230 | 230 | ||
231 | #define CS1_CNFG_REG regptr(MSP_SLP_BASE + 0x90) | 231 | #define CS1_CNFG_REG regptr(MSP_SLP_BASE + 0x90) |
232 | /* ELB CS1 Configuration Reg */ | 232 | /* ELB CS1 Configuration Reg */ |
233 | #define CS1_ADDR_REG regptr(MSP_SLP_BASE + 0x94) | 233 | #define CS1_ADDR_REG regptr(MSP_SLP_BASE + 0x94) |
234 | /* ELB CS1 Base Address Reg */ | 234 | /* ELB CS1 Base Address Reg */ |
235 | #define CS1_MASK_REG regptr(MSP_SLP_BASE + 0x98) | 235 | #define CS1_MASK_REG regptr(MSP_SLP_BASE + 0x98) |
236 | /* ELB CS1 Mask Register */ | 236 | /* ELB CS1 Mask Register */ |
237 | #define CS1_ACCESS_REG regptr(MSP_SLP_BASE + 0x9C) | 237 | #define CS1_ACCESS_REG regptr(MSP_SLP_BASE + 0x9C) |
238 | /* ELB CS1 access register */ | 238 | /* ELB CS1 access register */ |
239 | 239 | ||
240 | #define CS2_CNFG_REG regptr(MSP_SLP_BASE + 0xA0) | 240 | #define CS2_CNFG_REG regptr(MSP_SLP_BASE + 0xA0) |
241 | /* ELB CS2 Configuration Reg */ | 241 | /* ELB CS2 Configuration Reg */ |
242 | #define CS2_ADDR_REG regptr(MSP_SLP_BASE + 0xA4) | 242 | #define CS2_ADDR_REG regptr(MSP_SLP_BASE + 0xA4) |
243 | /* ELB CS2 Base Address Reg */ | 243 | /* ELB CS2 Base Address Reg */ |
244 | #define CS2_MASK_REG regptr(MSP_SLP_BASE + 0xA8) | 244 | #define CS2_MASK_REG regptr(MSP_SLP_BASE + 0xA8) |
245 | /* ELB CS2 Mask Register */ | 245 | /* ELB CS2 Mask Register */ |
246 | #define CS2_ACCESS_REG regptr(MSP_SLP_BASE + 0xAC) | 246 | #define CS2_ACCESS_REG regptr(MSP_SLP_BASE + 0xAC) |
247 | /* ELB CS2 access register */ | 247 | /* ELB CS2 access register */ |
248 | 248 | ||
249 | #define CS3_CNFG_REG regptr(MSP_SLP_BASE + 0xB0) | 249 | #define CS3_CNFG_REG regptr(MSP_SLP_BASE + 0xB0) |
250 | /* ELB CS3 Configuration Reg */ | 250 | /* ELB CS3 Configuration Reg */ |
251 | #define CS3_ADDR_REG regptr(MSP_SLP_BASE + 0xB4) | 251 | #define CS3_ADDR_REG regptr(MSP_SLP_BASE + 0xB4) |
252 | /* ELB CS3 Base Address Reg */ | 252 | /* ELB CS3 Base Address Reg */ |
253 | #define CS3_MASK_REG regptr(MSP_SLP_BASE + 0xB8) | 253 | #define CS3_MASK_REG regptr(MSP_SLP_BASE + 0xB8) |
254 | /* ELB CS3 Mask Register */ | 254 | /* ELB CS3 Mask Register */ |
255 | #define CS3_ACCESS_REG regptr(MSP_SLP_BASE + 0xBC) | 255 | #define CS3_ACCESS_REG regptr(MSP_SLP_BASE + 0xBC) |
256 | /* ELB CS3 access register */ | 256 | /* ELB CS3 access register */ |
257 | 257 | ||
258 | #define CS4_CNFG_REG regptr(MSP_SLP_BASE + 0xC0) | 258 | #define CS4_CNFG_REG regptr(MSP_SLP_BASE + 0xC0) |
259 | /* ELB CS4 Configuration Reg */ | 259 | /* ELB CS4 Configuration Reg */ |
260 | #define CS4_ADDR_REG regptr(MSP_SLP_BASE + 0xC4) | 260 | #define CS4_ADDR_REG regptr(MSP_SLP_BASE + 0xC4) |
261 | /* ELB CS4 Base Address Reg */ | 261 | /* ELB CS4 Base Address Reg */ |
262 | #define CS4_MASK_REG regptr(MSP_SLP_BASE + 0xC8) | 262 | #define CS4_MASK_REG regptr(MSP_SLP_BASE + 0xC8) |
263 | /* ELB CS4 Mask Register */ | 263 | /* ELB CS4 Mask Register */ |
264 | #define CS4_ACCESS_REG regptr(MSP_SLP_BASE + 0xCC) | 264 | #define CS4_ACCESS_REG regptr(MSP_SLP_BASE + 0xCC) |
265 | /* ELB CS4 access register */ | 265 | /* ELB CS4 access register */ |
266 | 266 | ||
267 | #define CS5_CNFG_REG regptr(MSP_SLP_BASE + 0xD0) | 267 | #define CS5_CNFG_REG regptr(MSP_SLP_BASE + 0xD0) |
268 | /* ELB CS5 Configuration Reg */ | 268 | /* ELB CS5 Configuration Reg */ |
269 | #define CS5_ADDR_REG regptr(MSP_SLP_BASE + 0xD4) | 269 | #define CS5_ADDR_REG regptr(MSP_SLP_BASE + 0xD4) |
270 | /* ELB CS5 Base Address Reg */ | 270 | /* ELB CS5 Base Address Reg */ |
271 | #define CS5_MASK_REG regptr(MSP_SLP_BASE + 0xD8) | 271 | #define CS5_MASK_REG regptr(MSP_SLP_BASE + 0xD8) |
272 | /* ELB CS5 Mask Register */ | 272 | /* ELB CS5 Mask Register */ |
273 | #define CS5_ACCESS_REG regptr(MSP_SLP_BASE + 0xDC) | 273 | #define CS5_ACCESS_REG regptr(MSP_SLP_BASE + 0xDC) |
274 | /* ELB CS5 access register */ | 274 | /* ELB CS5 access register */ |
275 | 275 | ||
276 | /* reserved 0xE0 - 0xE8 */ | 276 | /* reserved 0xE0 - 0xE8 */ |
277 | #define ELB_1PC_EN_REG regptr(MSP_SLP_BASE + 0xEC) | 277 | #define ELB_1PC_EN_REG regptr(MSP_SLP_BASE + 0xEC) |
278 | /* ELB single PC card detect */ | 278 | /* ELB single PC card detect */ |
279 | 279 | ||
280 | /* reserved 0xF0 - 0xF8 */ | 280 | /* reserved 0xF0 - 0xF8 */ |
281 | #define ELB_CLK_CFG_REG regptr(MSP_SLP_BASE + 0xFC) | 281 | #define ELB_CLK_CFG_REG regptr(MSP_SLP_BASE + 0xFC) |
282 | /* SDRAM read/ELB timing Reg */ | 282 | /* SDRAM read/ELB timing Reg */ |
283 | 283 | ||
284 | /* Extended UART status registers */ | 284 | /* Extended UART status registers */ |
285 | #define UART0_STATUS_REG regptr(MSP_UART0_BASE + 0x0c0) | 285 | #define UART0_STATUS_REG regptr(MSP_UART0_BASE + 0x0c0) |
286 | /* UART Status Register 0 */ | 286 | /* UART Status Register 0 */ |
287 | #define UART1_STATUS_REG regptr(MSP_UART1_BASE + 0x170) | 287 | #define UART1_STATUS_REG regptr(MSP_UART1_BASE + 0x170) |
288 | /* UART Status Register 1 */ | 288 | /* UART Status Register 1 */ |
289 | 289 | ||
290 | /* Performance monitoring registers */ | 290 | /* Performance monitoring registers */ |
291 | #define PERF_MON_CTRL_REG regptr(MSP_SLP_BASE + 0x140) | 291 | #define PERF_MON_CTRL_REG regptr(MSP_SLP_BASE + 0x140) |
292 | /* Performance monitor control */ | 292 | /* Performance monitor control */ |
293 | #define PERF_MON_CLR_REG regptr(MSP_SLP_BASE + 0x144) | 293 | #define PERF_MON_CLR_REG regptr(MSP_SLP_BASE + 0x144) |
294 | /* Performance monitor clear */ | 294 | /* Performance monitor clear */ |
295 | #define PERF_MON_CNTH_REG regptr(MSP_SLP_BASE + 0x148) | 295 | #define PERF_MON_CNTH_REG regptr(MSP_SLP_BASE + 0x148) |
296 | /* Perf monitor counter high */ | 296 | /* Perf monitor counter high */ |
297 | #define PERF_MON_CNTL_REG regptr(MSP_SLP_BASE + 0x14C) | 297 | #define PERF_MON_CNTL_REG regptr(MSP_SLP_BASE + 0x14C) |
298 | /* Perf monitor counter low */ | 298 | /* Perf monitor counter low */ |
299 | 299 | ||
300 | /* System control registers */ | 300 | /* System control registers */ |
301 | #define SYS_CTRL_REG regptr(MSP_SLP_BASE + 0x150) | 301 | #define SYS_CTRL_REG regptr(MSP_SLP_BASE + 0x150) |
302 | /* System control register */ | 302 | /* System control register */ |
303 | #define SYS_ERR1_REG regptr(MSP_SLP_BASE + 0x154) | 303 | #define SYS_ERR1_REG regptr(MSP_SLP_BASE + 0x154) |
304 | /* System Error status 1 */ | 304 | /* System Error status 1 */ |
305 | #define SYS_ERR2_REG regptr(MSP_SLP_BASE + 0x158) | 305 | #define SYS_ERR2_REG regptr(MSP_SLP_BASE + 0x158) |
306 | /* System Error status 2 */ | 306 | /* System Error status 2 */ |
307 | #define SYS_INT_CFG_REG regptr(MSP_SLP_BASE + 0x15C) | 307 | #define SYS_INT_CFG_REG regptr(MSP_SLP_BASE + 0x15C) |
308 | /* System Interrupt config */ | 308 | /* System Interrupt config */ |
309 | 309 | ||
310 | /* Voice Engine Memory configuration */ | 310 | /* Voice Engine Memory configuration */ |
311 | #define VE_MEM_REG regptr(MSP_SLP_BASE + 0x17C) | 311 | #define VE_MEM_REG regptr(MSP_SLP_BASE + 0x17C) |
312 | /* Voice engine memory config */ | 312 | /* Voice engine memory config */ |
313 | 313 | ||
314 | /* CPU/SLP Error Status registers */ | 314 | /* CPU/SLP Error Status registers */ |
315 | #define CPU_ERR1_REG regptr(MSP_SLP_BASE + 0x180) | 315 | #define CPU_ERR1_REG regptr(MSP_SLP_BASE + 0x180) |
316 | /* CPU/SLP Error status 1 */ | 316 | /* CPU/SLP Error status 1 */ |
317 | #define CPU_ERR2_REG regptr(MSP_SLP_BASE + 0x184) | 317 | #define CPU_ERR2_REG regptr(MSP_SLP_BASE + 0x184) |
318 | /* CPU/SLP Error status 1 */ | 318 | /* CPU/SLP Error status 1 */ |
319 | 319 | ||
320 | /* Extended GPIO registers */ | 320 | /* Extended GPIO registers */ |
321 | #define EXTENDED_GPIO1_REG regptr(MSP_SLP_BASE + 0x188) | 321 | #define EXTENDED_GPIO1_REG regptr(MSP_SLP_BASE + 0x188) |
322 | #define EXTENDED_GPIO2_REG regptr(MSP_SLP_BASE + 0x18c) | 322 | #define EXTENDED_GPIO2_REG regptr(MSP_SLP_BASE + 0x18c) |
323 | #define EXTENDED_GPIO_REG EXTENDED_GPIO1_REG | 323 | #define EXTENDED_GPIO_REG EXTENDED_GPIO1_REG |
@@ -325,182 +325,182 @@ | |||
325 | 325 | ||
326 | /* System Error registers */ | 326 | /* System Error registers */ |
327 | #define SLP_ERR_STS_REG regptr(MSP_SLP_BASE + 0x190) | 327 | #define SLP_ERR_STS_REG regptr(MSP_SLP_BASE + 0x190) |
328 | /* Int status for SLP errors */ | 328 | /* Int status for SLP errors */ |
329 | #define SLP_ERR_MSK_REG regptr(MSP_SLP_BASE + 0x194) | 329 | #define SLP_ERR_MSK_REG regptr(MSP_SLP_BASE + 0x194) |
330 | /* Int mask for SLP errors */ | 330 | /* Int mask for SLP errors */ |
331 | #define SLP_ELB_ERST_REG regptr(MSP_SLP_BASE + 0x198) | 331 | #define SLP_ELB_ERST_REG regptr(MSP_SLP_BASE + 0x198) |
332 | /* External ELB reset */ | 332 | /* External ELB reset */ |
333 | #define SLP_BOOT_STS_REG regptr(MSP_SLP_BASE + 0x19C) | 333 | #define SLP_BOOT_STS_REG regptr(MSP_SLP_BASE + 0x19C) |
334 | /* Boot Status */ | 334 | /* Boot Status */ |
335 | 335 | ||
336 | /* Extended ELB addressing */ | 336 | /* Extended ELB addressing */ |
337 | #define CS0_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A0) | 337 | #define CS0_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A0) |
338 | /* CS0 Extended address */ | 338 | /* CS0 Extended address */ |
339 | #define CS1_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A4) | 339 | #define CS1_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A4) |
340 | /* CS1 Extended address */ | 340 | /* CS1 Extended address */ |
341 | #define CS2_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A8) | 341 | #define CS2_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1A8) |
342 | /* CS2 Extended address */ | 342 | /* CS2 Extended address */ |
343 | #define CS3_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1AC) | 343 | #define CS3_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1AC) |
344 | /* CS3 Extended address */ | 344 | /* CS3 Extended address */ |
345 | /* reserved 0x1B0 */ | 345 | /* reserved 0x1B0 */ |
346 | #define CS5_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1B4) | 346 | #define CS5_EXT_ADDR_REG regptr(MSP_SLP_BASE + 0x1B4) |
347 | /* CS5 Extended address */ | 347 | /* CS5 Extended address */ |
348 | 348 | ||
349 | /* PLL Adjustment registers */ | 349 | /* PLL Adjustment registers */ |
350 | #define PLL_LOCK_REG regptr(MSP_SLP_BASE + 0x200) | 350 | #define PLL_LOCK_REG regptr(MSP_SLP_BASE + 0x200) |
351 | /* PLL0 lock status */ | 351 | /* PLL0 lock status */ |
352 | #define PLL_ARST_REG regptr(MSP_SLP_BASE + 0x204) | 352 | #define PLL_ARST_REG regptr(MSP_SLP_BASE + 0x204) |
353 | /* PLL Analog reset status */ | 353 | /* PLL Analog reset status */ |
354 | #define PLL0_ADJ_REG regptr(MSP_SLP_BASE + 0x208) | 354 | #define PLL0_ADJ_REG regptr(MSP_SLP_BASE + 0x208) |
355 | /* PLL0 Adjustment value */ | 355 | /* PLL0 Adjustment value */ |
356 | #define PLL1_ADJ_REG regptr(MSP_SLP_BASE + 0x20C) | 356 | #define PLL1_ADJ_REG regptr(MSP_SLP_BASE + 0x20C) |
357 | /* PLL1 Adjustment value */ | 357 | /* PLL1 Adjustment value */ |
358 | 358 | ||
359 | /* | 359 | /* |
360 | *************************************************************************** | 360 | *************************************************************************** |
361 | * Peripheral Register definitions * | 361 | * Peripheral Register definitions * |
362 | *************************************************************************** | 362 | *************************************************************************** |
363 | */ | 363 | */ |
364 | 364 | ||
365 | /* Peripheral status */ | 365 | /* Peripheral status */ |
366 | #define PER_CTRL_REG regptr(MSP_PER_BASE + 0x50) | 366 | #define PER_CTRL_REG regptr(MSP_PER_BASE + 0x50) |
367 | /* Peripheral control register */ | 367 | /* Peripheral control register */ |
368 | #define PER_STS_REG regptr(MSP_PER_BASE + 0x54) | 368 | #define PER_STS_REG regptr(MSP_PER_BASE + 0x54) |
369 | /* Peripheral status register */ | 369 | /* Peripheral status register */ |
370 | 370 | ||
371 | /* SPI/MPI Registers */ | 371 | /* SPI/MPI Registers */ |
372 | #define SMPI_TX_SZ_REG regptr(MSP_PER_BASE + 0x58) | 372 | #define SMPI_TX_SZ_REG regptr(MSP_PER_BASE + 0x58) |
373 | /* SPI/MPI Tx Size register */ | 373 | /* SPI/MPI Tx Size register */ |
374 | #define SMPI_RX_SZ_REG regptr(MSP_PER_BASE + 0x5C) | 374 | #define SMPI_RX_SZ_REG regptr(MSP_PER_BASE + 0x5C) |
375 | /* SPI/MPI Rx Size register */ | 375 | /* SPI/MPI Rx Size register */ |
376 | #define SMPI_CTL_REG regptr(MSP_PER_BASE + 0x60) | 376 | #define SMPI_CTL_REG regptr(MSP_PER_BASE + 0x60) |
377 | /* SPI/MPI Control register */ | 377 | /* SPI/MPI Control register */ |
378 | #define SMPI_MS_REG regptr(MSP_PER_BASE + 0x64) | 378 | #define SMPI_MS_REG regptr(MSP_PER_BASE + 0x64) |
379 | /* SPI/MPI Chip Select reg */ | 379 | /* SPI/MPI Chip Select reg */ |
380 | #define SMPI_CORE_DATA_REG regptr(MSP_PER_BASE + 0xC0) | 380 | #define SMPI_CORE_DATA_REG regptr(MSP_PER_BASE + 0xC0) |
381 | /* SPI/MPI Core Data reg */ | 381 | /* SPI/MPI Core Data reg */ |
382 | #define SMPI_CORE_CTRL_REG regptr(MSP_PER_BASE + 0xC4) | 382 | #define SMPI_CORE_CTRL_REG regptr(MSP_PER_BASE + 0xC4) |
383 | /* SPI/MPI Core Control reg */ | 383 | /* SPI/MPI Core Control reg */ |
384 | #define SMPI_CORE_STAT_REG regptr(MSP_PER_BASE + 0xC8) | 384 | #define SMPI_CORE_STAT_REG regptr(MSP_PER_BASE + 0xC8) |
385 | /* SPI/MPI Core Status reg */ | 385 | /* SPI/MPI Core Status reg */ |
386 | #define SMPI_CORE_SSEL_REG regptr(MSP_PER_BASE + 0xCC) | 386 | #define SMPI_CORE_SSEL_REG regptr(MSP_PER_BASE + 0xCC) |
387 | /* SPI/MPI Core Ssel reg */ | 387 | /* SPI/MPI Core Ssel reg */ |
388 | #define SMPI_FIFO_REG regptr(MSP_PER_BASE + 0xD0) | 388 | #define SMPI_FIFO_REG regptr(MSP_PER_BASE + 0xD0) |
389 | /* SPI/MPI Data FIFO reg */ | 389 | /* SPI/MPI Data FIFO reg */ |
390 | 390 | ||
391 | /* Peripheral Block Error Registers */ | 391 | /* Peripheral Block Error Registers */ |
392 | #define PER_ERR_STS_REG regptr(MSP_PER_BASE + 0x70) | 392 | #define PER_ERR_STS_REG regptr(MSP_PER_BASE + 0x70) |
393 | /* Error Bit Status Register */ | 393 | /* Error Bit Status Register */ |
394 | #define PER_ERR_MSK_REG regptr(MSP_PER_BASE + 0x74) | 394 | #define PER_ERR_MSK_REG regptr(MSP_PER_BASE + 0x74) |
395 | /* Error Bit Mask Register */ | 395 | /* Error Bit Mask Register */ |
396 | #define PER_HDR1_REG regptr(MSP_PER_BASE + 0x78) | 396 | #define PER_HDR1_REG regptr(MSP_PER_BASE + 0x78) |
397 | /* Error Header 1 Register */ | 397 | /* Error Header 1 Register */ |
398 | #define PER_HDR2_REG regptr(MSP_PER_BASE + 0x7C) | 398 | #define PER_HDR2_REG regptr(MSP_PER_BASE + 0x7C) |
399 | /* Error Header 2 Register */ | 399 | /* Error Header 2 Register */ |
400 | 400 | ||
401 | /* Peripheral Block Interrupt Registers */ | 401 | /* Peripheral Block Interrupt Registers */ |
402 | #define PER_INT_STS_REG regptr(MSP_PER_BASE + 0x80) | 402 | #define PER_INT_STS_REG regptr(MSP_PER_BASE + 0x80) |
403 | /* Interrupt status register */ | 403 | /* Interrupt status register */ |
404 | #define PER_INT_MSK_REG regptr(MSP_PER_BASE + 0x84) | 404 | #define PER_INT_MSK_REG regptr(MSP_PER_BASE + 0x84) |
405 | /* Interrupt Mask Register */ | 405 | /* Interrupt Mask Register */ |
406 | #define GPIO_INT_STS_REG regptr(MSP_PER_BASE + 0x88) | 406 | #define GPIO_INT_STS_REG regptr(MSP_PER_BASE + 0x88) |
407 | /* GPIO interrupt status reg */ | 407 | /* GPIO interrupt status reg */ |
408 | #define GPIO_INT_MSK_REG regptr(MSP_PER_BASE + 0x8C) | 408 | #define GPIO_INT_MSK_REG regptr(MSP_PER_BASE + 0x8C) |
409 | /* GPIO interrupt MASK Reg */ | 409 | /* GPIO interrupt MASK Reg */ |
410 | 410 | ||
411 | /* POLO GPIO registers */ | 411 | /* POLO GPIO registers */ |
412 | #define POLO_GPIO_DAT1_REG regptr(MSP_PER_BASE + 0x0E0) | 412 | #define POLO_GPIO_DAT1_REG regptr(MSP_PER_BASE + 0x0E0) |
413 | /* Polo GPIO[8:0] data reg */ | 413 | /* Polo GPIO[8:0] data reg */ |
414 | #define POLO_GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x0E4) | 414 | #define POLO_GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x0E4) |
415 | /* Polo GPIO[7:0] config reg */ | 415 | /* Polo GPIO[7:0] config reg */ |
416 | #define POLO_GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x0E8) | 416 | #define POLO_GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x0E8) |
417 | /* Polo GPIO[15:8] config reg */ | 417 | /* Polo GPIO[15:8] config reg */ |
418 | #define POLO_GPIO_OD1_REG regptr(MSP_PER_BASE + 0x0EC) | 418 | #define POLO_GPIO_OD1_REG regptr(MSP_PER_BASE + 0x0EC) |
419 | /* Polo GPIO[31:0] output drive */ | 419 | /* Polo GPIO[31:0] output drive */ |
420 | #define POLO_GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x170) | 420 | #define POLO_GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x170) |
421 | /* Polo GPIO[23:16] config reg */ | 421 | /* Polo GPIO[23:16] config reg */ |
422 | #define POLO_GPIO_DAT2_REG regptr(MSP_PER_BASE + 0x174) | 422 | #define POLO_GPIO_DAT2_REG regptr(MSP_PER_BASE + 0x174) |
423 | /* Polo GPIO[15:9] data reg */ | 423 | /* Polo GPIO[15:9] data reg */ |
424 | #define POLO_GPIO_DAT3_REG regptr(MSP_PER_BASE + 0x178) | 424 | #define POLO_GPIO_DAT3_REG regptr(MSP_PER_BASE + 0x178) |
425 | /* Polo GPIO[23:16] data reg */ | 425 | /* Polo GPIO[23:16] data reg */ |
426 | #define POLO_GPIO_DAT4_REG regptr(MSP_PER_BASE + 0x17C) | 426 | #define POLO_GPIO_DAT4_REG regptr(MSP_PER_BASE + 0x17C) |
427 | /* Polo GPIO[31:24] data reg */ | 427 | /* Polo GPIO[31:24] data reg */ |
428 | #define POLO_GPIO_DAT5_REG regptr(MSP_PER_BASE + 0x180) | 428 | #define POLO_GPIO_DAT5_REG regptr(MSP_PER_BASE + 0x180) |
429 | /* Polo GPIO[39:32] data reg */ | 429 | /* Polo GPIO[39:32] data reg */ |
430 | #define POLO_GPIO_DAT6_REG regptr(MSP_PER_BASE + 0x184) | 430 | #define POLO_GPIO_DAT6_REG regptr(MSP_PER_BASE + 0x184) |
431 | /* Polo GPIO[47:40] data reg */ | 431 | /* Polo GPIO[47:40] data reg */ |
432 | #define POLO_GPIO_DAT7_REG regptr(MSP_PER_BASE + 0x188) | 432 | #define POLO_GPIO_DAT7_REG regptr(MSP_PER_BASE + 0x188) |
433 | /* Polo GPIO[54:48] data reg */ | 433 | /* Polo GPIO[54:48] data reg */ |
434 | #define POLO_GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) | 434 | #define POLO_GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) |
435 | /* Polo GPIO[31:24] config reg */ | 435 | /* Polo GPIO[31:24] config reg */ |
436 | #define POLO_GPIO_CFG5_REG regptr(MSP_PER_BASE + 0x190) | 436 | #define POLO_GPIO_CFG5_REG regptr(MSP_PER_BASE + 0x190) |
437 | /* Polo GPIO[39:32] config reg */ | 437 | /* Polo GPIO[39:32] config reg */ |
438 | #define POLO_GPIO_CFG6_REG regptr(MSP_PER_BASE + 0x194) | 438 | #define POLO_GPIO_CFG6_REG regptr(MSP_PER_BASE + 0x194) |
439 | /* Polo GPIO[47:40] config reg */ | 439 | /* Polo GPIO[47:40] config reg */ |
440 | #define POLO_GPIO_CFG7_REG regptr(MSP_PER_BASE + 0x198) | 440 | #define POLO_GPIO_CFG7_REG regptr(MSP_PER_BASE + 0x198) |
441 | /* Polo GPIO[54:48] config reg */ | 441 | /* Polo GPIO[54:48] config reg */ |
442 | #define POLO_GPIO_OD2_REG regptr(MSP_PER_BASE + 0x19C) | 442 | #define POLO_GPIO_OD2_REG regptr(MSP_PER_BASE + 0x19C) |
443 | /* Polo GPIO[54:32] output drive */ | 443 | /* Polo GPIO[54:32] output drive */ |
444 | 444 | ||
445 | /* Generic GPIO registers */ | 445 | /* Generic GPIO registers */ |
446 | #define GPIO_DATA1_REG regptr(MSP_PER_BASE + 0x170) | 446 | #define GPIO_DATA1_REG regptr(MSP_PER_BASE + 0x170) |
447 | /* GPIO[1:0] data register */ | 447 | /* GPIO[1:0] data register */ |
448 | #define GPIO_DATA2_REG regptr(MSP_PER_BASE + 0x174) | 448 | #define GPIO_DATA2_REG regptr(MSP_PER_BASE + 0x174) |
449 | /* GPIO[5:2] data register */ | 449 | /* GPIO[5:2] data register */ |
450 | #define GPIO_DATA3_REG regptr(MSP_PER_BASE + 0x178) | 450 | #define GPIO_DATA3_REG regptr(MSP_PER_BASE + 0x178) |
451 | /* GPIO[9:6] data register */ | 451 | /* GPIO[9:6] data register */ |
452 | #define GPIO_DATA4_REG regptr(MSP_PER_BASE + 0x17C) | 452 | #define GPIO_DATA4_REG regptr(MSP_PER_BASE + 0x17C) |
453 | /* GPIO[15:10] data register */ | 453 | /* GPIO[15:10] data register */ |
454 | #define GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x180) | 454 | #define GPIO_CFG1_REG regptr(MSP_PER_BASE + 0x180) |
455 | /* GPIO[1:0] config register */ | 455 | /* GPIO[1:0] config register */ |
456 | #define GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x184) | 456 | #define GPIO_CFG2_REG regptr(MSP_PER_BASE + 0x184) |
457 | /* GPIO[5:2] config register */ | 457 | /* GPIO[5:2] config register */ |
458 | #define GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x188) | 458 | #define GPIO_CFG3_REG regptr(MSP_PER_BASE + 0x188) |
459 | /* GPIO[9:6] config register */ | 459 | /* GPIO[9:6] config register */ |
460 | #define GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) | 460 | #define GPIO_CFG4_REG regptr(MSP_PER_BASE + 0x18C) |
461 | /* GPIO[15:10] config register */ | 461 | /* GPIO[15:10] config register */ |
462 | #define GPIO_OD_REG regptr(MSP_PER_BASE + 0x190) | 462 | #define GPIO_OD_REG regptr(MSP_PER_BASE + 0x190) |
463 | /* GPIO[15:0] output drive */ | 463 | /* GPIO[15:0] output drive */ |
464 | 464 | ||
465 | /* | 465 | /* |
466 | *************************************************************************** | 466 | *************************************************************************** |
467 | * CPU Interface register definitions * | 467 | * CPU Interface register definitions * |
468 | *************************************************************************** | 468 | *************************************************************************** |
469 | */ | 469 | */ |
470 | #define PCI_FLUSH_REG regptr(MSP_CPUIF_BASE + 0x00) | 470 | #define PCI_FLUSH_REG regptr(MSP_CPUIF_BASE + 0x00) |
471 | /* PCI-SDRAM queue flush trigger */ | 471 | /* PCI-SDRAM queue flush trigger */ |
472 | #define OCP_ERR1_REG regptr(MSP_CPUIF_BASE + 0x04) | 472 | #define OCP_ERR1_REG regptr(MSP_CPUIF_BASE + 0x04) |
473 | /* OCP Error Attribute 1 */ | 473 | /* OCP Error Attribute 1 */ |
474 | #define OCP_ERR2_REG regptr(MSP_CPUIF_BASE + 0x08) | 474 | #define OCP_ERR2_REG regptr(MSP_CPUIF_BASE + 0x08) |
475 | /* OCP Error Attribute 2 */ | 475 | /* OCP Error Attribute 2 */ |
476 | #define OCP_STS_REG regptr(MSP_CPUIF_BASE + 0x0C) | 476 | #define OCP_STS_REG regptr(MSP_CPUIF_BASE + 0x0C) |
477 | /* OCP Error Status */ | 477 | /* OCP Error Status */ |
478 | #define CPUIF_PM_REG regptr(MSP_CPUIF_BASE + 0x10) | 478 | #define CPUIF_PM_REG regptr(MSP_CPUIF_BASE + 0x10) |
479 | /* CPU policy configuration */ | 479 | /* CPU policy configuration */ |
480 | #define CPUIF_CFG_REG regptr(MSP_CPUIF_BASE + 0x10) | 480 | #define CPUIF_CFG_REG regptr(MSP_CPUIF_BASE + 0x10) |
481 | /* Misc configuration options */ | 481 | /* Misc configuration options */ |
482 | 482 | ||
483 | /* Central Interrupt Controller Registers */ | 483 | /* Central Interrupt Controller Registers */ |
484 | #define MSP_CIC_BASE (MSP_CPUIF_BASE + 0x8000) | 484 | #define MSP_CIC_BASE (MSP_CPUIF_BASE + 0x8000) |
485 | /* Central Interrupt registers */ | 485 | /* Central Interrupt registers */ |
486 | #define CIC_EXT_CFG_REG regptr(MSP_CIC_BASE + 0x00) | 486 | #define CIC_EXT_CFG_REG regptr(MSP_CIC_BASE + 0x00) |
487 | /* External interrupt config */ | 487 | /* External interrupt config */ |
488 | #define CIC_STS_REG regptr(MSP_CIC_BASE + 0x04) | 488 | #define CIC_STS_REG regptr(MSP_CIC_BASE + 0x04) |
489 | /* CIC Interrupt Status */ | 489 | /* CIC Interrupt Status */ |
490 | #define CIC_VPE0_MSK_REG regptr(MSP_CIC_BASE + 0x08) | 490 | #define CIC_VPE0_MSK_REG regptr(MSP_CIC_BASE + 0x08) |
491 | /* VPE0 Interrupt Mask */ | 491 | /* VPE0 Interrupt Mask */ |
492 | #define CIC_VPE1_MSK_REG regptr(MSP_CIC_BASE + 0x0C) | 492 | #define CIC_VPE1_MSK_REG regptr(MSP_CIC_BASE + 0x0C) |
493 | /* VPE1 Interrupt Mask */ | 493 | /* VPE1 Interrupt Mask */ |
494 | #define CIC_TC0_MSK_REG regptr(MSP_CIC_BASE + 0x10) | 494 | #define CIC_TC0_MSK_REG regptr(MSP_CIC_BASE + 0x10) |
495 | /* Thread Context 0 Int Mask */ | 495 | /* Thread Context 0 Int Mask */ |
496 | #define CIC_TC1_MSK_REG regptr(MSP_CIC_BASE + 0x14) | 496 | #define CIC_TC1_MSK_REG regptr(MSP_CIC_BASE + 0x14) |
497 | /* Thread Context 1 Int Mask */ | 497 | /* Thread Context 1 Int Mask */ |
498 | #define CIC_TC2_MSK_REG regptr(MSP_CIC_BASE + 0x18) | 498 | #define CIC_TC2_MSK_REG regptr(MSP_CIC_BASE + 0x18) |
499 | /* Thread Context 2 Int Mask */ | 499 | /* Thread Context 2 Int Mask */ |
500 | #define CIC_TC3_MSK_REG regptr(MSP_CIC_BASE + 0x18) | 500 | #define CIC_TC3_MSK_REG regptr(MSP_CIC_BASE + 0x18) |
501 | /* Thread Context 3 Int Mask */ | 501 | /* Thread Context 3 Int Mask */ |
502 | #define CIC_TC4_MSK_REG regptr(MSP_CIC_BASE + 0x18) | 502 | #define CIC_TC4_MSK_REG regptr(MSP_CIC_BASE + 0x18) |
503 | /* Thread Context 4 Int Mask */ | 503 | /* Thread Context 4 Int Mask */ |
504 | #define CIC_PCIMSI_STS_REG regptr(MSP_CIC_BASE + 0x18) | 504 | #define CIC_PCIMSI_STS_REG regptr(MSP_CIC_BASE + 0x18) |
505 | #define CIC_PCIMSI_MSK_REG regptr(MSP_CIC_BASE + 0x18) | 505 | #define CIC_PCIMSI_MSK_REG regptr(MSP_CIC_BASE + 0x18) |
506 | #define CIC_PCIFLSH_REG regptr(MSP_CIC_BASE + 0x18) | 506 | #define CIC_PCIFLSH_REG regptr(MSP_CIC_BASE + 0x18) |
@@ -509,7 +509,7 @@ | |||
509 | 509 | ||
510 | /* | 510 | /* |
511 | *************************************************************************** | 511 | *************************************************************************** |
512 | * Memory controller registers * | 512 | * Memory controller registers * |
513 | *************************************************************************** | 513 | *************************************************************************** |
514 | */ | 514 | */ |
515 | #define MEM_CFG1_REG regptr(MSP_MEM_CFG_BASE + 0x00) | 515 | #define MEM_CFG1_REG regptr(MSP_MEM_CFG_BASE + 0x00) |
@@ -519,7 +519,7 @@ | |||
519 | 519 | ||
520 | /* | 520 | /* |
521 | *************************************************************************** | 521 | *************************************************************************** |
522 | * PCI controller registers * | 522 | * PCI controller registers * |
523 | *************************************************************************** | 523 | *************************************************************************** |
524 | */ | 524 | */ |
525 | #define PCI_BASE_REG regptr(MSP_PCI_BASE + 0x00) | 525 | #define PCI_BASE_REG regptr(MSP_PCI_BASE + 0x00) |
@@ -528,25 +528,25 @@ | |||
528 | 528 | ||
529 | /* | 529 | /* |
530 | ######################################################################## | 530 | ######################################################################## |
531 | # Register content & macro definitions # | 531 | # Register content & macro definitions # |
532 | ######################################################################## | 532 | ######################################################################## |
533 | */ | 533 | */ |
534 | 534 | ||
535 | /* | 535 | /* |
536 | *************************************************************************** | 536 | *************************************************************************** |
537 | * DEV_ID defines * | 537 | * DEV_ID defines * |
538 | *************************************************************************** | 538 | *************************************************************************** |
539 | */ | 539 | */ |
540 | #define DEV_ID_PCI_DIS (1 << 26) /* Set if PCI disabled */ | 540 | #define DEV_ID_PCI_DIS (1 << 26) /* Set if PCI disabled */ |
541 | #define DEV_ID_PCI_HOST (1 << 20) /* Set if PCI host */ | 541 | #define DEV_ID_PCI_HOST (1 << 20) /* Set if PCI host */ |
542 | #define DEV_ID_SINGLE_PC (1 << 19) /* Set if single PC Card */ | 542 | #define DEV_ID_SINGLE_PC (1 << 19) /* Set if single PC Card */ |
543 | #define DEV_ID_FAMILY (0xff << 8) /* family ID code */ | 543 | #define DEV_ID_FAMILY (0xff << 8) /* family ID code */ |
544 | #define POLO_ZEUS_SUB_FAMILY (0x7 << 16) /* sub family for Polo/Zeus */ | 544 | #define POLO_ZEUS_SUB_FAMILY (0x7 << 16) /* sub family for Polo/Zeus */ |
545 | 545 | ||
546 | #define MSPFPGA_ID (0x00 << 8) /* you are on your own here */ | 546 | #define MSPFPGA_ID (0x00 << 8) /* you are on your own here */ |
547 | #define MSP5000_ID (0x50 << 8) | 547 | #define MSP5000_ID (0x50 << 8) |
548 | #define MSP4F00_ID (0x4f << 8) /* FPGA version of MSP4200 */ | 548 | #define MSP4F00_ID (0x4f << 8) /* FPGA version of MSP4200 */ |
549 | #define MSP4E00_ID (0x4f << 8) /* FPGA version of MSP7120 */ | 549 | #define MSP4E00_ID (0x4f << 8) /* FPGA version of MSP7120 */ |
550 | #define MSP4200_ID (0x42 << 8) | 550 | #define MSP4200_ID (0x42 << 8) |
551 | #define MSP4000_ID (0x40 << 8) | 551 | #define MSP4000_ID (0x40 << 8) |
552 | #define MSP2XXX_ID (0x20 << 8) | 552 | #define MSP2XXX_ID (0x20 << 8) |
@@ -563,27 +563,27 @@ | |||
563 | 563 | ||
564 | /* | 564 | /* |
565 | *************************************************************************** | 565 | *************************************************************************** |
566 | * RESET defines * | 566 | * RESET defines * |
567 | *************************************************************************** | 567 | *************************************************************************** |
568 | */ | 568 | */ |
569 | #define MSP_GR_RST (0x01 << 0) /* Global reset bit */ | 569 | #define MSP_GR_RST (0x01 << 0) /* Global reset bit */ |
570 | #define MSP_MR_RST (0x01 << 1) /* MIPS reset bit */ | 570 | #define MSP_MR_RST (0x01 << 1) /* MIPS reset bit */ |
571 | #define MSP_PD_RST (0x01 << 2) /* PVC DMA reset bit */ | 571 | #define MSP_PD_RST (0x01 << 2) /* PVC DMA reset bit */ |
572 | #define MSP_PP_RST (0x01 << 3) /* PVC reset bit */ | 572 | #define MSP_PP_RST (0x01 << 3) /* PVC reset bit */ |
573 | /* reserved */ | 573 | /* reserved */ |
574 | #define MSP_EA_RST (0x01 << 6) /* Mac A reset bit */ | 574 | #define MSP_EA_RST (0x01 << 6) /* Mac A reset bit */ |
575 | #define MSP_EB_RST (0x01 << 7) /* Mac B reset bit */ | 575 | #define MSP_EB_RST (0x01 << 7) /* Mac B reset bit */ |
576 | #define MSP_SE_RST (0x01 << 8) /* Security Eng reset bit */ | 576 | #define MSP_SE_RST (0x01 << 8) /* Security Eng reset bit */ |
577 | #define MSP_PB_RST (0x01 << 9) /* Per block reset bit */ | 577 | #define MSP_PB_RST (0x01 << 9) /* Per block reset bit */ |
578 | #define MSP_EC_RST (0x01 << 10) /* Mac C reset bit */ | 578 | #define MSP_EC_RST (0x01 << 10) /* Mac C reset bit */ |
579 | #define MSP_TW_RST (0x01 << 11) /* TWI reset bit */ | 579 | #define MSP_TW_RST (0x01 << 11) /* TWI reset bit */ |
580 | #define MSP_SPI_RST (0x01 << 12) /* SPI/MPI reset bit */ | 580 | #define MSP_SPI_RST (0x01 << 12) /* SPI/MPI reset bit */ |
581 | #define MSP_U1_RST (0x01 << 13) /* UART1 reset bit */ | 581 | #define MSP_U1_RST (0x01 << 13) /* UART1 reset bit */ |
582 | #define MSP_U0_RST (0x01 << 14) /* UART0 reset bit */ | 582 | #define MSP_U0_RST (0x01 << 14) /* UART0 reset bit */ |
583 | 583 | ||
584 | /* | 584 | /* |
585 | *************************************************************************** | 585 | *************************************************************************** |
586 | * UART defines * | 586 | * UART defines * |
587 | *************************************************************************** | 587 | *************************************************************************** |
588 | */ | 588 | */ |
589 | #define MSP_BASE_BAUD 25000000 | 589 | #define MSP_BASE_BAUD 25000000 |
@@ -591,15 +591,15 @@ | |||
591 | 591 | ||
592 | /* | 592 | /* |
593 | *************************************************************************** | 593 | *************************************************************************** |
594 | * ELB defines * | 594 | * ELB defines * |
595 | *************************************************************************** | 595 | *************************************************************************** |
596 | */ | 596 | */ |
597 | #define PCCARD_32 0x02 /* Set if is PCCARD 32 (Cardbus) */ | 597 | #define PCCARD_32 0x02 /* Set if is PCCARD 32 (Cardbus) */ |
598 | #define SINGLE_PCCARD 0x01 /* Set to enable single PC card */ | 598 | #define SINGLE_PCCARD 0x01 /* Set to enable single PC card */ |
599 | 599 | ||
600 | /* | 600 | /* |
601 | *************************************************************************** | 601 | *************************************************************************** |
602 | * CIC defines * | 602 | * CIC defines * |
603 | *************************************************************************** | 603 | *************************************************************************** |
604 | */ | 604 | */ |
605 | 605 | ||
@@ -625,7 +625,7 @@ | |||
625 | 625 | ||
626 | /* | 626 | /* |
627 | *************************************************************************** | 627 | *************************************************************************** |
628 | * Memory Controller defines * | 628 | * Memory Controller defines * |
629 | *************************************************************************** | 629 | *************************************************************************** |
630 | */ | 630 | */ |
631 | 631 | ||
@@ -644,17 +644,17 @@ | |||
644 | 644 | ||
645 | /* | 645 | /* |
646 | *************************************************************************** | 646 | *************************************************************************** |
647 | * SPI/MPI Mode * | 647 | * SPI/MPI Mode * |
648 | *************************************************************************** | 648 | *************************************************************************** |
649 | */ | 649 | */ |
650 | #define SPI_MPI_RX_BUSY 0x00008000 /* SPI/MPI Receive Busy */ | 650 | #define SPI_MPI_RX_BUSY 0x00008000 /* SPI/MPI Receive Busy */ |
651 | #define SPI_MPI_FIFO_EMPTY 0x00004000 /* SPI/MPI Fifo Empty */ | 651 | #define SPI_MPI_FIFO_EMPTY 0x00004000 /* SPI/MPI Fifo Empty */ |
652 | #define SPI_MPI_TX_BUSY 0x00002000 /* SPI/MPI Transmit Busy */ | 652 | #define SPI_MPI_TX_BUSY 0x00002000 /* SPI/MPI Transmit Busy */ |
653 | #define SPI_MPI_FIFO_FULL 0x00001000 /* SPI/MPU FIFO full */ | 653 | #define SPI_MPI_FIFO_FULL 0x00001000 /* SPI/MPU FIFO full */ |
654 | 654 | ||
655 | /* | 655 | /* |
656 | *************************************************************************** | 656 | *************************************************************************** |
657 | * SPI/MPI Control Register * | 657 | * SPI/MPI Control Register * |
658 | *************************************************************************** | 658 | *************************************************************************** |
659 | */ | 659 | */ |
660 | #define SPI_MPI_RX_START 0x00000004 /* Start receive command */ | 660 | #define SPI_MPI_RX_START 0x00000004 /* Start receive command */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_slp_int.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_slp_int.h index 96d4c8ce8c83..51a66dcc429d 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_slp_int.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_slp_int.h | |||
@@ -27,9 +27,9 @@ | |||
27 | 27 | ||
28 | /* | 28 | /* |
29 | * The PMC-Sierra SLP interrupts are arranged in a 3 level cascaded | 29 | * The PMC-Sierra SLP interrupts are arranged in a 3 level cascaded |
30 | * hierarchical system. The first level are the direct MIPS interrupts | 30 | * hierarchical system. The first level are the direct MIPS interrupts |
31 | * and are assigned the interrupt range 0-7. The second level is the SLM | 31 | * and are assigned the interrupt range 0-7. The second level is the SLM |
32 | * interrupt controller and is assigned the range 8-39. The third level | 32 | * interrupt controller and is assigned the range 8-39. The third level |
33 | * comprises the Peripherial block, the PCI block, the PCI MSI block and | 33 | * comprises the Peripherial block, the PCI block, the PCI MSI block and |
34 | * the SLP. The PCI interrupts and the SLP errors are handled by the | 34 | * the SLP. The PCI interrupts and the SLP errors are handled by the |
35 | * relevant subsystems so the core interrupt code needs only concern | 35 | * relevant subsystems so the core interrupt code needs only concern |
@@ -41,11 +41,11 @@ | |||
41 | * IRQs directly connected to CPU | 41 | * IRQs directly connected to CPU |
42 | */ | 42 | */ |
43 | #define MSP_MIPS_INTBASE 0 | 43 | #define MSP_MIPS_INTBASE 0 |
44 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ | 44 | #define MSP_INT_SW0 0 /* IRQ for swint0, C_SW0 */ |
45 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ | 45 | #define MSP_INT_SW1 1 /* IRQ for swint1, C_SW1 */ |
46 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ | 46 | #define MSP_INT_MAC0 2 /* IRQ for MAC 0, C_IRQ0 */ |
47 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ | 47 | #define MSP_INT_MAC1 3 /* IRQ for MAC 1, C_IRQ1 */ |
48 | #define MSP_INT_C_IRQ2 4 /* Wired off, C_IRQ2 */ | 48 | #define MSP_INT_C_IRQ2 4 /* Wired off, C_IRQ2 */ |
49 | #define MSP_INT_VE 5 /* IRQ for Voice Engine, C_IRQ3 */ | 49 | #define MSP_INT_VE 5 /* IRQ for Voice Engine, C_IRQ3 */ |
50 | #define MSP_INT_SLP 6 /* IRQ for SLM block, C_IRQ4 */ | 50 | #define MSP_INT_SLP 6 /* IRQ for SLM block, C_IRQ4 */ |
51 | #define MSP_INT_TIMER 7 /* IRQ for the MIPS timer, C_IRQ5 */ | 51 | #define MSP_INT_TIMER 7 /* IRQ for the MIPS timer, C_IRQ5 */ |
@@ -57,85 +57,85 @@ | |||
57 | */ | 57 | */ |
58 | #define MSP_SLP_INTBASE (MSP_MIPS_INTBASE + 8) | 58 | #define MSP_SLP_INTBASE (MSP_MIPS_INTBASE + 8) |
59 | #define MSP_INT_EXT0 (MSP_SLP_INTBASE + 0) | 59 | #define MSP_INT_EXT0 (MSP_SLP_INTBASE + 0) |
60 | /* External interrupt 0 */ | 60 | /* External interrupt 0 */ |
61 | #define MSP_INT_EXT1 (MSP_SLP_INTBASE + 1) | 61 | #define MSP_INT_EXT1 (MSP_SLP_INTBASE + 1) |
62 | /* External interrupt 1 */ | 62 | /* External interrupt 1 */ |
63 | #define MSP_INT_EXT2 (MSP_SLP_INTBASE + 2) | 63 | #define MSP_INT_EXT2 (MSP_SLP_INTBASE + 2) |
64 | /* External interrupt 2 */ | 64 | /* External interrupt 2 */ |
65 | #define MSP_INT_EXT3 (MSP_SLP_INTBASE + 3) | 65 | #define MSP_INT_EXT3 (MSP_SLP_INTBASE + 3) |
66 | /* External interrupt 3 */ | 66 | /* External interrupt 3 */ |
67 | /* Reserved 4-7 */ | 67 | /* Reserved 4-7 */ |
68 | 68 | ||
69 | /* | 69 | /* |
70 | ************************************************************************* | 70 | ************************************************************************* |
71 | * DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER * | 71 | * DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER/DANGER * |
72 | * Some MSP produces have this interrupt labelled as Voice and some are * | 72 | * Some MSP produces have this interrupt labelled as Voice and some are * |
73 | * SEC mbox ... * | 73 | * SEC mbox ... * |
74 | ************************************************************************* | 74 | ************************************************************************* |
75 | */ | 75 | */ |
76 | #define MSP_INT_SLP_VE (MSP_SLP_INTBASE + 8) | 76 | #define MSP_INT_SLP_VE (MSP_SLP_INTBASE + 8) |
77 | /* Cascaded IRQ for Voice Engine*/ | 77 | /* Cascaded IRQ for Voice Engine*/ |
78 | #define MSP_INT_SLP_TDM (MSP_SLP_INTBASE + 9) | 78 | #define MSP_INT_SLP_TDM (MSP_SLP_INTBASE + 9) |
79 | /* TDM interrupt */ | 79 | /* TDM interrupt */ |
80 | #define MSP_INT_SLP_MAC0 (MSP_SLP_INTBASE + 10) | 80 | #define MSP_INT_SLP_MAC0 (MSP_SLP_INTBASE + 10) |
81 | /* Cascaded IRQ for MAC 0 */ | 81 | /* Cascaded IRQ for MAC 0 */ |
82 | #define MSP_INT_SLP_MAC1 (MSP_SLP_INTBASE + 11) | 82 | #define MSP_INT_SLP_MAC1 (MSP_SLP_INTBASE + 11) |
83 | /* Cascaded IRQ for MAC 1 */ | 83 | /* Cascaded IRQ for MAC 1 */ |
84 | #define MSP_INT_SEC (MSP_SLP_INTBASE + 12) | 84 | #define MSP_INT_SEC (MSP_SLP_INTBASE + 12) |
85 | /* IRQ for security engine */ | 85 | /* IRQ for security engine */ |
86 | #define MSP_INT_PER (MSP_SLP_INTBASE + 13) | 86 | #define MSP_INT_PER (MSP_SLP_INTBASE + 13) |
87 | /* Peripheral interrupt */ | 87 | /* Peripheral interrupt */ |
88 | #define MSP_INT_TIMER0 (MSP_SLP_INTBASE + 14) | 88 | #define MSP_INT_TIMER0 (MSP_SLP_INTBASE + 14) |
89 | /* SLP timer 0 */ | 89 | /* SLP timer 0 */ |
90 | #define MSP_INT_TIMER1 (MSP_SLP_INTBASE + 15) | 90 | #define MSP_INT_TIMER1 (MSP_SLP_INTBASE + 15) |
91 | /* SLP timer 1 */ | 91 | /* SLP timer 1 */ |
92 | #define MSP_INT_TIMER2 (MSP_SLP_INTBASE + 16) | 92 | #define MSP_INT_TIMER2 (MSP_SLP_INTBASE + 16) |
93 | /* SLP timer 2 */ | 93 | /* SLP timer 2 */ |
94 | #define MSP_INT_SLP_TIMER (MSP_SLP_INTBASE + 17) | 94 | #define MSP_INT_SLP_TIMER (MSP_SLP_INTBASE + 17) |
95 | /* Cascaded MIPS timer */ | 95 | /* Cascaded MIPS timer */ |
96 | #define MSP_INT_BLKCP (MSP_SLP_INTBASE + 18) | 96 | #define MSP_INT_BLKCP (MSP_SLP_INTBASE + 18) |
97 | /* Block Copy */ | 97 | /* Block Copy */ |
98 | #define MSP_INT_UART0 (MSP_SLP_INTBASE + 19) | 98 | #define MSP_INT_UART0 (MSP_SLP_INTBASE + 19) |
99 | /* UART 0 */ | 99 | /* UART 0 */ |
100 | #define MSP_INT_PCI (MSP_SLP_INTBASE + 20) | 100 | #define MSP_INT_PCI (MSP_SLP_INTBASE + 20) |
101 | /* PCI subsystem */ | 101 | /* PCI subsystem */ |
102 | #define MSP_INT_PCI_DBELL (MSP_SLP_INTBASE + 21) | 102 | #define MSP_INT_PCI_DBELL (MSP_SLP_INTBASE + 21) |
103 | /* PCI doorbell */ | 103 | /* PCI doorbell */ |
104 | #define MSP_INT_PCI_MSI (MSP_SLP_INTBASE + 22) | 104 | #define MSP_INT_PCI_MSI (MSP_SLP_INTBASE + 22) |
105 | /* PCI Message Signal */ | 105 | /* PCI Message Signal */ |
106 | #define MSP_INT_PCI_BC0 (MSP_SLP_INTBASE + 23) | 106 | #define MSP_INT_PCI_BC0 (MSP_SLP_INTBASE + 23) |
107 | /* PCI Block Copy 0 */ | 107 | /* PCI Block Copy 0 */ |
108 | #define MSP_INT_PCI_BC1 (MSP_SLP_INTBASE + 24) | 108 | #define MSP_INT_PCI_BC1 (MSP_SLP_INTBASE + 24) |
109 | /* PCI Block Copy 1 */ | 109 | /* PCI Block Copy 1 */ |
110 | #define MSP_INT_SLP_ERR (MSP_SLP_INTBASE + 25) | 110 | #define MSP_INT_SLP_ERR (MSP_SLP_INTBASE + 25) |
111 | /* SLP error condition */ | 111 | /* SLP error condition */ |
112 | #define MSP_INT_MAC2 (MSP_SLP_INTBASE + 26) | 112 | #define MSP_INT_MAC2 (MSP_SLP_INTBASE + 26) |
113 | /* IRQ for MAC2 */ | 113 | /* IRQ for MAC2 */ |
114 | /* Reserved 26-31 */ | 114 | /* Reserved 26-31 */ |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * IRQs cascaded on SLP PER interrupt (MSP_INT_PER) | 117 | * IRQs cascaded on SLP PER interrupt (MSP_INT_PER) |
118 | */ | 118 | */ |
119 | #define MSP_PER_INTBASE (MSP_SLP_INTBASE + 32) | 119 | #define MSP_PER_INTBASE (MSP_SLP_INTBASE + 32) |
120 | /* Reserved 0-1 */ | 120 | /* Reserved 0-1 */ |
121 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) | 121 | #define MSP_INT_UART1 (MSP_PER_INTBASE + 2) |
122 | /* UART 1 */ | 122 | /* UART 1 */ |
123 | /* Reserved 3-5 */ | 123 | /* Reserved 3-5 */ |
124 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) | 124 | #define MSP_INT_2WIRE (MSP_PER_INTBASE + 6) |
125 | /* 2-wire */ | 125 | /* 2-wire */ |
126 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) | 126 | #define MSP_INT_TM0 (MSP_PER_INTBASE + 7) |
127 | /* Peripheral timer block out 0 */ | 127 | /* Peripheral timer block out 0 */ |
128 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) | 128 | #define MSP_INT_TM1 (MSP_PER_INTBASE + 8) |
129 | /* Peripheral timer block out 1 */ | 129 | /* Peripheral timer block out 1 */ |
130 | /* Reserved 9 */ | 130 | /* Reserved 9 */ |
131 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) | 131 | #define MSP_INT_SPRX (MSP_PER_INTBASE + 10) |
132 | /* SPI RX complete */ | 132 | /* SPI RX complete */ |
133 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) | 133 | #define MSP_INT_SPTX (MSP_PER_INTBASE + 11) |
134 | /* SPI TX complete */ | 134 | /* SPI TX complete */ |
135 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) | 135 | #define MSP_INT_GPIO (MSP_PER_INTBASE + 12) |
136 | /* GPIO */ | 136 | /* GPIO */ |
137 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) | 137 | #define MSP_INT_PER_ERR (MSP_PER_INTBASE + 13) |
138 | /* Peripheral error */ | 138 | /* Peripheral error */ |
139 | /* Reserved 14-31 */ | 139 | /* Reserved 14-31 */ |
140 | 140 | ||
141 | #endif /* !_MSP_SLP_INT_H */ | 141 | #endif /* !_MSP_SLP_INT_H */ |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h index 4c9348df9df2..aa45e6a07126 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/msp_usb.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define MSP_USB0_HS_END (MSP_USB0_BASE + 0x401FF) | 40 | #define MSP_USB0_HS_END (MSP_USB0_BASE + 0x401FF) |
41 | 41 | ||
42 | /* Register spaces for USB host 1 */ | 42 | /* Register spaces for USB host 1 */ |
43 | #define MSP_USB1_MAB_START (MSP_USB1_BASE + 0x0) | 43 | #define MSP_USB1_MAB_START (MSP_USB1_BASE + 0x0) |
44 | #define MSP_USB1_MAB_END (MSP_USB1_BASE + 0x17) | 44 | #define MSP_USB1_MAB_END (MSP_USB1_BASE + 0x17) |
45 | #define MSP_USB1_ID_START (MSP_USB1_BASE + 0x40000) | 45 | #define MSP_USB1_ID_START (MSP_USB1_BASE + 0x40000) |
46 | #define MSP_USB1_ID_END (MSP_USB1_BASE + 0x4008f) | 46 | #define MSP_USB1_ID_END (MSP_USB1_BASE + 0x4008f) |
diff --git a/arch/mips/include/asm/pmc-sierra/msp71xx/war.h b/arch/mips/include/asm/pmc-sierra/msp71xx/war.h index c74eb1657f5f..a60bf9dd14ae 100644 --- a/arch/mips/include/asm/pmc-sierra/msp71xx/war.h +++ b/arch/mips/include/asm/pmc-sierra/msp71xx/war.h | |||
@@ -21,9 +21,9 @@ | |||
21 | #define R10000_LLSC_WAR 0 | 21 | #define R10000_LLSC_WAR 0 |
22 | #if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \ | 22 | #if defined(CONFIG_PMC_MSP7120_EVAL) || defined(CONFIG_PMC_MSP7120_GW) || \ |
23 | defined(CONFIG_PMC_MSP7120_FPGA) | 23 | defined(CONFIG_PMC_MSP7120_FPGA) |
24 | #define MIPS34K_MISSED_ITLB_WAR 1 | 24 | #define MIPS34K_MISSED_ITLB_WAR 1 |
25 | #else | 25 | #else |
26 | #define MIPS34K_MISSED_ITLB_WAR 0 | 26 | #define MIPS34K_MISSED_ITLB_WAR 0 |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #endif /* __ASM_MIPS_PMC_SIERRA_WAR_H */ | 29 | #endif /* __ASM_MIPS_PMC_SIERRA_WAR_H */ |
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index bd98b503f04c..2a5fa7abb346 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
@@ -112,8 +112,8 @@ struct mips_fpu_struct { | |||
112 | typedef __u32 dspreg_t; | 112 | typedef __u32 dspreg_t; |
113 | 113 | ||
114 | struct mips_dsp_state { | 114 | struct mips_dsp_state { |
115 | dspreg_t dspr[NUM_DSP_REGS]; | 115 | dspreg_t dspr[NUM_DSP_REGS]; |
116 | unsigned int dspcontrol; | 116 | unsigned int dspcontrol; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | #define INIT_CPUMASK { \ | 119 | #define INIT_CPUMASK { \ |
@@ -137,46 +137,46 @@ union mips_watch_reg_state { | |||
137 | 137 | ||
138 | struct octeon_cop2_state { | 138 | struct octeon_cop2_state { |
139 | /* DMFC2 rt, 0x0201 */ | 139 | /* DMFC2 rt, 0x0201 */ |
140 | unsigned long cop2_crc_iv; | 140 | unsigned long cop2_crc_iv; |
141 | /* DMFC2 rt, 0x0202 (Set with DMTC2 rt, 0x1202) */ | 141 | /* DMFC2 rt, 0x0202 (Set with DMTC2 rt, 0x1202) */ |
142 | unsigned long cop2_crc_length; | 142 | unsigned long cop2_crc_length; |
143 | /* DMFC2 rt, 0x0200 (set with DMTC2 rt, 0x4200) */ | 143 | /* DMFC2 rt, 0x0200 (set with DMTC2 rt, 0x4200) */ |
144 | unsigned long cop2_crc_poly; | 144 | unsigned long cop2_crc_poly; |
145 | /* DMFC2 rt, 0x0402; DMFC2 rt, 0x040A */ | 145 | /* DMFC2 rt, 0x0402; DMFC2 rt, 0x040A */ |
146 | unsigned long cop2_llm_dat[2]; | 146 | unsigned long cop2_llm_dat[2]; |
147 | /* DMFC2 rt, 0x0084 */ | 147 | /* DMFC2 rt, 0x0084 */ |
148 | unsigned long cop2_3des_iv; | 148 | unsigned long cop2_3des_iv; |
149 | /* DMFC2 rt, 0x0080; DMFC2 rt, 0x0081; DMFC2 rt, 0x0082 */ | 149 | /* DMFC2 rt, 0x0080; DMFC2 rt, 0x0081; DMFC2 rt, 0x0082 */ |
150 | unsigned long cop2_3des_key[3]; | 150 | unsigned long cop2_3des_key[3]; |
151 | /* DMFC2 rt, 0x0088 (Set with DMTC2 rt, 0x0098) */ | 151 | /* DMFC2 rt, 0x0088 (Set with DMTC2 rt, 0x0098) */ |
152 | unsigned long cop2_3des_result; | 152 | unsigned long cop2_3des_result; |
153 | /* DMFC2 rt, 0x0111 (FIXME: Read Pass1 Errata) */ | 153 | /* DMFC2 rt, 0x0111 (FIXME: Read Pass1 Errata) */ |
154 | unsigned long cop2_aes_inp0; | 154 | unsigned long cop2_aes_inp0; |
155 | /* DMFC2 rt, 0x0102; DMFC2 rt, 0x0103 */ | 155 | /* DMFC2 rt, 0x0102; DMFC2 rt, 0x0103 */ |
156 | unsigned long cop2_aes_iv[2]; | 156 | unsigned long cop2_aes_iv[2]; |
157 | /* DMFC2 rt, 0x0104; DMFC2 rt, 0x0105; DMFC2 rt, 0x0106; DMFC2 | 157 | /* DMFC2 rt, 0x0104; DMFC2 rt, 0x0105; DMFC2 rt, 0x0106; DMFC2 |
158 | * rt, 0x0107 */ | 158 | * rt, 0x0107 */ |
159 | unsigned long cop2_aes_key[4]; | 159 | unsigned long cop2_aes_key[4]; |
160 | /* DMFC2 rt, 0x0110 */ | 160 | /* DMFC2 rt, 0x0110 */ |
161 | unsigned long cop2_aes_keylen; | 161 | unsigned long cop2_aes_keylen; |
162 | /* DMFC2 rt, 0x0100; DMFC2 rt, 0x0101 */ | 162 | /* DMFC2 rt, 0x0100; DMFC2 rt, 0x0101 */ |
163 | unsigned long cop2_aes_result[2]; | 163 | unsigned long cop2_aes_result[2]; |
164 | /* DMFC2 rt, 0x0240; DMFC2 rt, 0x0241; DMFC2 rt, 0x0242; DMFC2 | 164 | /* DMFC2 rt, 0x0240; DMFC2 rt, 0x0241; DMFC2 rt, 0x0242; DMFC2 |
165 | * rt, 0x0243; DMFC2 rt, 0x0244; DMFC2 rt, 0x0245; DMFC2 rt, | 165 | * rt, 0x0243; DMFC2 rt, 0x0244; DMFC2 rt, 0x0245; DMFC2 rt, |
166 | * 0x0246; DMFC2 rt, 0x0247; DMFC2 rt, 0x0248; DMFC2 rt, | 166 | * 0x0246; DMFC2 rt, 0x0247; DMFC2 rt, 0x0248; DMFC2 rt, |
167 | * 0x0249; DMFC2 rt, 0x024A; DMFC2 rt, 0x024B; DMFC2 rt, | 167 | * 0x0249; DMFC2 rt, 0x024A; DMFC2 rt, 0x024B; DMFC2 rt, |
168 | * 0x024C; DMFC2 rt, 0x024D; DMFC2 rt, 0x024E - Pass2 */ | 168 | * 0x024C; DMFC2 rt, 0x024D; DMFC2 rt, 0x024E - Pass2 */ |
169 | unsigned long cop2_hsh_datw[15]; | 169 | unsigned long cop2_hsh_datw[15]; |
170 | /* DMFC2 rt, 0x0250; DMFC2 rt, 0x0251; DMFC2 rt, 0x0252; DMFC2 | 170 | /* DMFC2 rt, 0x0250; DMFC2 rt, 0x0251; DMFC2 rt, 0x0252; DMFC2 |
171 | * rt, 0x0253; DMFC2 rt, 0x0254; DMFC2 rt, 0x0255; DMFC2 rt, | 171 | * rt, 0x0253; DMFC2 rt, 0x0254; DMFC2 rt, 0x0255; DMFC2 rt, |
172 | * 0x0256; DMFC2 rt, 0x0257 - Pass2 */ | 172 | * 0x0256; DMFC2 rt, 0x0257 - Pass2 */ |
173 | unsigned long cop2_hsh_ivw[8]; | 173 | unsigned long cop2_hsh_ivw[8]; |
174 | /* DMFC2 rt, 0x0258; DMFC2 rt, 0x0259 - Pass2 */ | 174 | /* DMFC2 rt, 0x0258; DMFC2 rt, 0x0259 - Pass2 */ |
175 | unsigned long cop2_gfm_mult[2]; | 175 | unsigned long cop2_gfm_mult[2]; |
176 | /* DMFC2 rt, 0x025E - Pass2 */ | 176 | /* DMFC2 rt, 0x025E - Pass2 */ |
177 | unsigned long cop2_gfm_poly; | 177 | unsigned long cop2_gfm_poly; |
178 | /* DMFC2 rt, 0x025A; DMFC2 rt, 0x025B - Pass2 */ | 178 | /* DMFC2 rt, 0x025A; DMFC2 rt, 0x025B - Pass2 */ |
179 | unsigned long cop2_gfm_result[2]; | 179 | unsigned long cop2_gfm_result[2]; |
180 | }; | 180 | }; |
181 | #define INIT_OCTEON_COP2 {0,} | 181 | #define INIT_OCTEON_COP2 {0,} |
182 | 182 | ||
@@ -249,9 +249,9 @@ struct thread_struct { | |||
249 | #endif /* CONFIG_CPU_CAVIUM_OCTEON */ | 249 | #endif /* CONFIG_CPU_CAVIUM_OCTEON */ |
250 | 250 | ||
251 | #define INIT_THREAD { \ | 251 | #define INIT_THREAD { \ |
252 | /* \ | 252 | /* \ |
253 | * Saved main processor registers \ | 253 | * Saved main processor registers \ |
254 | */ \ | 254 | */ \ |
255 | .reg16 = 0, \ | 255 | .reg16 = 0, \ |
256 | .reg17 = 0, \ | 256 | .reg17 = 0, \ |
257 | .reg18 = 0, \ | 257 | .reg18 = 0, \ |
@@ -332,7 +332,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
332 | * aborts compilation on some CPUs. It's simply not possible to unwind | 332 | * aborts compilation on some CPUs. It's simply not possible to unwind |
333 | * some CPU's stackframes. | 333 | * some CPU's stackframes. |
334 | * | 334 | * |
335 | * __builtin_return_address works only for non-leaf functions. We avoid the | 335 | * __builtin_return_address works only for non-leaf functions. We avoid the |
336 | * overhead of a function call by forcing the compiler to save the return | 336 | * overhead of a function call by forcing the compiler to save the return |
337 | * address register on the stack. | 337 | * address register on the stack. |
338 | */ | 338 | */ |
diff --git a/arch/mips/include/asm/r4kcache.h b/arch/mips/include/asm/r4kcache.h index 54ea47da59a1..a0b2650516ac 100644 --- a/arch/mips/include/asm/r4kcache.h +++ b/arch/mips/include/asm/r4kcache.h | |||
@@ -22,10 +22,10 @@ | |||
22 | * for indexed cache operations. Two issues here: | 22 | * for indexed cache operations. Two issues here: |
23 | * | 23 | * |
24 | * - The MIPS32 and MIPS64 specs permit an implementation to directly derive | 24 | * - The MIPS32 and MIPS64 specs permit an implementation to directly derive |
25 | * the index bits from the virtual address. This breaks with tradition | 25 | * the index bits from the virtual address. This breaks with tradition |
26 | * set by the R4000. To keep unpleasant surprises from happening we pick | 26 | * set by the R4000. To keep unpleasant surprises from happening we pick |
27 | * an address in KSEG0 / CKSEG0. | 27 | * an address in KSEG0 / CKSEG0. |
28 | * - We need a properly sign extended address for 64-bit code. To get away | 28 | * - We need a properly sign extended address for 64-bit code. To get away |
29 | * without ifdefs we let the compiler do it by a type cast. | 29 | * without ifdefs we let the compiler do it by a type cast. |
30 | */ | 30 | */ |
31 | #define INDEX_BASE CKSEG0 | 31 | #define INDEX_BASE CKSEG0 |
@@ -347,7 +347,7 @@ static inline void blast_##pfx##cache##lsize(void) \ | |||
347 | unsigned long end = start + current_cpu_data.desc.waysize; \ | 347 | unsigned long end = start + current_cpu_data.desc.waysize; \ |
348 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ | 348 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ |
349 | unsigned long ws_end = current_cpu_data.desc.ways << \ | 349 | unsigned long ws_end = current_cpu_data.desc.ways << \ |
350 | current_cpu_data.desc.waybit; \ | 350 | current_cpu_data.desc.waybit; \ |
351 | unsigned long ws, addr; \ | 351 | unsigned long ws, addr; \ |
352 | \ | 352 | \ |
353 | __##pfx##flush_prologue \ | 353 | __##pfx##flush_prologue \ |
@@ -359,7 +359,7 @@ static inline void blast_##pfx##cache##lsize(void) \ | |||
359 | __##pfx##flush_epilogue \ | 359 | __##pfx##flush_epilogue \ |
360 | } \ | 360 | } \ |
361 | \ | 361 | \ |
362 | static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \ | 362 | static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \ |
363 | { \ | 363 | { \ |
364 | unsigned long start = page; \ | 364 | unsigned long start = page; \ |
365 | unsigned long end = page + PAGE_SIZE; \ | 365 | unsigned long end = page + PAGE_SIZE; \ |
@@ -381,7 +381,7 @@ static inline void blast_##pfx##cache##lsize##_page_indexed(unsigned long page) | |||
381 | unsigned long end = start + PAGE_SIZE; \ | 381 | unsigned long end = start + PAGE_SIZE; \ |
382 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ | 382 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ |
383 | unsigned long ws_end = current_cpu_data.desc.ways << \ | 383 | unsigned long ws_end = current_cpu_data.desc.ways << \ |
384 | current_cpu_data.desc.waybit; \ | 384 | current_cpu_data.desc.waybit; \ |
385 | unsigned long ws, addr; \ | 385 | unsigned long ws, addr; \ |
386 | \ | 386 | \ |
387 | __##pfx##flush_prologue \ | 387 | __##pfx##flush_prologue \ |
diff --git a/arch/mips/include/asm/regdef.h b/arch/mips/include/asm/regdef.h index 785a5189b374..3c687df1d515 100644 --- a/arch/mips/include/asm/regdef.h +++ b/arch/mips/include/asm/regdef.h | |||
@@ -19,44 +19,44 @@ | |||
19 | /* | 19 | /* |
20 | * Symbolic register names for 32 bit ABI | 20 | * Symbolic register names for 32 bit ABI |
21 | */ | 21 | */ |
22 | #define zero $0 /* wired zero */ | 22 | #define zero $0 /* wired zero */ |
23 | #define AT $1 /* assembler temp - uppercase because of ".set at" */ | 23 | #define AT $1 /* assembler temp - uppercase because of ".set at" */ |
24 | #define v0 $2 /* return value */ | 24 | #define v0 $2 /* return value */ |
25 | #define v1 $3 | 25 | #define v1 $3 |
26 | #define a0 $4 /* argument registers */ | 26 | #define a0 $4 /* argument registers */ |
27 | #define a1 $5 | 27 | #define a1 $5 |
28 | #define a2 $6 | 28 | #define a2 $6 |
29 | #define a3 $7 | 29 | #define a3 $7 |
30 | #define t0 $8 /* caller saved */ | 30 | #define t0 $8 /* caller saved */ |
31 | #define t1 $9 | 31 | #define t1 $9 |
32 | #define t2 $10 | 32 | #define t2 $10 |
33 | #define t3 $11 | 33 | #define t3 $11 |
34 | #define t4 $12 | 34 | #define t4 $12 |
35 | #define ta0 $12 | 35 | #define ta0 $12 |
36 | #define t5 $13 | 36 | #define t5 $13 |
37 | #define ta1 $13 | 37 | #define ta1 $13 |
38 | #define t6 $14 | 38 | #define t6 $14 |
39 | #define ta2 $14 | 39 | #define ta2 $14 |
40 | #define t7 $15 | 40 | #define t7 $15 |
41 | #define ta3 $15 | 41 | #define ta3 $15 |
42 | #define s0 $16 /* callee saved */ | 42 | #define s0 $16 /* callee saved */ |
43 | #define s1 $17 | 43 | #define s1 $17 |
44 | #define s2 $18 | 44 | #define s2 $18 |
45 | #define s3 $19 | 45 | #define s3 $19 |
46 | #define s4 $20 | 46 | #define s4 $20 |
47 | #define s5 $21 | 47 | #define s5 $21 |
48 | #define s6 $22 | 48 | #define s6 $22 |
49 | #define s7 $23 | 49 | #define s7 $23 |
50 | #define t8 $24 /* caller saved */ | 50 | #define t8 $24 /* caller saved */ |
51 | #define t9 $25 | 51 | #define t9 $25 |
52 | #define jp $25 /* PIC jump register */ | 52 | #define jp $25 /* PIC jump register */ |
53 | #define k0 $26 /* kernel scratch */ | 53 | #define k0 $26 /* kernel scratch */ |
54 | #define k1 $27 | 54 | #define k1 $27 |
55 | #define gp $28 /* global pointer */ | 55 | #define gp $28 /* global pointer */ |
56 | #define sp $29 /* stack pointer */ | 56 | #define sp $29 /* stack pointer */ |
57 | #define fp $30 /* frame pointer */ | 57 | #define fp $30 /* frame pointer */ |
58 | #define s8 $30 /* same like fp! */ | 58 | #define s8 $30 /* same like fp! */ |
59 | #define ra $31 /* return address */ | 59 | #define ra $31 /* return address */ |
60 | 60 | ||
61 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 61 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
62 | 62 | ||
diff --git a/arch/mips/include/asm/rtlx.h b/arch/mips/include/asm/rtlx.h index 4ca3063ed2ce..90985b61dbd9 100644 --- a/arch/mips/include/asm/rtlx.h +++ b/arch/mips/include/asm/rtlx.h | |||
@@ -38,7 +38,7 @@ enum rtlx_state { | |||
38 | #define RTLX_BUFFER_SIZE 2048 | 38 | #define RTLX_BUFFER_SIZE 2048 |
39 | 39 | ||
40 | /* each channel supports read and write. | 40 | /* each channel supports read and write. |
41 | linux (vpe0) reads lx_buffer and writes rt_buffer | 41 | linux (vpe0) reads lx_buffer and writes rt_buffer |
42 | SP (vpe1) reads rt_buffer and writes lx_buffer | 42 | SP (vpe1) reads rt_buffer and writes lx_buffer |
43 | */ | 43 | */ |
44 | struct rtlx_channel { | 44 | struct rtlx_channel { |
diff --git a/arch/mips/include/asm/seccomp.h b/arch/mips/include/asm/seccomp.h index ae6306ebdcad..f29c75cf83c6 100644 --- a/arch/mips/include/asm/seccomp.h +++ b/arch/mips/include/asm/seccomp.h | |||
@@ -10,7 +10,7 @@ | |||
10 | /* | 10 | /* |
11 | * Kludge alert: | 11 | * Kludge alert: |
12 | * | 12 | * |
13 | * The generic seccomp code currently allows only a single compat ABI. Until | 13 | * The generic seccomp code currently allows only a single compat ABI. Until |
14 | * this is fixed we priorize O32 as the compat ABI over N32. | 14 | * this is fixed we priorize O32 as the compat ABI over N32. |
15 | */ | 15 | */ |
16 | #ifdef CONFIG_MIPS32_O32 | 16 | #ifdef CONFIG_MIPS32_O32 |
diff --git a/arch/mips/include/asm/sgi/gio.h b/arch/mips/include/asm/sgi/gio.h index 889cf028c95d..24be2b425be8 100644 --- a/arch/mips/include/asm/sgi/gio.h +++ b/arch/mips/include/asm/sgi/gio.h | |||
@@ -18,18 +18,18 @@ | |||
18 | * three physical connectors, but only two slots, GFX and EXP0. | 18 | * three physical connectors, but only two slots, GFX and EXP0. |
19 | * | 19 | * |
20 | * There is 10MB of GIO address space for GIO64 slot devices | 20 | * There is 10MB of GIO address space for GIO64 slot devices |
21 | * slot# slot type address range size | 21 | * slot# slot type address range size |
22 | * ----- --------- ----------------------- ----- | 22 | * ----- --------- ----------------------- ----- |
23 | * 0 GFX 0x1f000000 - 0x1f3fffff 4MB | 23 | * 0 GFX 0x1f000000 - 0x1f3fffff 4MB |
24 | * 1 EXP0 0x1f400000 - 0x1f5fffff 2MB | 24 | * 1 EXP0 0x1f400000 - 0x1f5fffff 2MB |
25 | * 2 EXP1 0x1f600000 - 0x1f9fffff 4MB | 25 | * 2 EXP1 0x1f600000 - 0x1f9fffff 4MB |
26 | * | 26 | * |
27 | * There are un-slotted devices, HPC, I/O and misc devices, which are grouped | 27 | * There are un-slotted devices, HPC, I/O and misc devices, which are grouped |
28 | * into the HPC address space. | 28 | * into the HPC address space. |
29 | * - MISC 0x1fb00000 - 0x1fbfffff 1MB | 29 | * - MISC 0x1fb00000 - 0x1fbfffff 1MB |
30 | * | 30 | * |
31 | * Following space is reserved and unused | 31 | * Following space is reserved and unused |
32 | * - RESERVED 0x18000000 - 0x1effffff 112MB | 32 | * - RESERVED 0x18000000 - 0x1effffff 112MB |
33 | * | 33 | * |
34 | * GIO bus IDs | 34 | * GIO bus IDs |
35 | * | 35 | * |
@@ -39,10 +39,10 @@ | |||
39 | * the slot undefined. | 39 | * the slot undefined. |
40 | * | 40 | * |
41 | * 32-bit IDs are divided into | 41 | * 32-bit IDs are divided into |
42 | * bits 0:6 the product ID; ranges from 0x00 to 0x7F. | 42 | * bits 0:6 the product ID; ranges from 0x00 to 0x7F. |
43 | * bit 7 0=GIO Product ID is 8 bits wide | 43 | * bit 7 0=GIO Product ID is 8 bits wide |
44 | * 1=GIO Product ID is 32 bits wide. | 44 | * 1=GIO Product ID is 32 bits wide. |
45 | * bits 8:15 manufacturer version for the product. | 45 | * bits 8:15 manufacturer version for the product. |
46 | * bit 16 0=GIO32 and GIO32-bis, 1=GIO64. | 46 | * bit 16 0=GIO32 and GIO32-bis, 1=GIO64. |
47 | * bit 17 0=no ROM present | 47 | * bit 17 0=no ROM present |
48 | * 1=ROM present on this board AND next three words | 48 | * 1=ROM present on this board AND next three words |
diff --git a/arch/mips/include/asm/sgi/hpc3.h b/arch/mips/include/asm/sgi/hpc3.h index c4729f531919..59920b345942 100644 --- a/arch/mips/include/asm/sgi/hpc3.h +++ b/arch/mips/include/asm/sgi/hpc3.h | |||
@@ -65,39 +65,39 @@ struct hpc3_scsiregs { | |||
65 | u32 _unused0[0x1000/4 - 2]; /* padding */ | 65 | u32 _unused0[0x1000/4 - 2]; /* padding */ |
66 | volatile u32 bcd; /* byte count info */ | 66 | volatile u32 bcd; /* byte count info */ |
67 | #define HPC3_SBCD_BCNTMSK 0x00003fff /* bytes to transfer from/to memory */ | 67 | #define HPC3_SBCD_BCNTMSK 0x00003fff /* bytes to transfer from/to memory */ |
68 | #define HPC3_SBCD_XIE 0x00004000 /* Send IRQ when done with cur buf */ | 68 | #define HPC3_SBCD_XIE 0x00004000 /* Send IRQ when done with cur buf */ |
69 | #define HPC3_SBCD_EOX 0x00008000 /* Indicates this is last buf in chain */ | 69 | #define HPC3_SBCD_EOX 0x00008000 /* Indicates this is last buf in chain */ |
70 | 70 | ||
71 | volatile u32 ctrl; /* control register */ | 71 | volatile u32 ctrl; /* control register */ |
72 | #define HPC3_SCTRL_IRQ 0x01 /* IRQ asserted, either dma done or parity */ | 72 | #define HPC3_SCTRL_IRQ 0x01 /* IRQ asserted, either dma done or parity */ |
73 | #define HPC3_SCTRL_ENDIAN 0x02 /* DMA endian mode, 0=big 1=little */ | 73 | #define HPC3_SCTRL_ENDIAN 0x02 /* DMA endian mode, 0=big 1=little */ |
74 | #define HPC3_SCTRL_DIR 0x04 /* DMA direction, 1=dev2mem 0=mem2dev */ | 74 | #define HPC3_SCTRL_DIR 0x04 /* DMA direction, 1=dev2mem 0=mem2dev */ |
75 | #define HPC3_SCTRL_FLUSH 0x08 /* Tells HPC3 to flush scsi fifos */ | 75 | #define HPC3_SCTRL_FLUSH 0x08 /* Tells HPC3 to flush scsi fifos */ |
76 | #define HPC3_SCTRL_ACTIVE 0x10 /* SCSI DMA channel is active */ | 76 | #define HPC3_SCTRL_ACTIVE 0x10 /* SCSI DMA channel is active */ |
77 | #define HPC3_SCTRL_AMASK 0x20 /* DMA active inhibits PIO */ | 77 | #define HPC3_SCTRL_AMASK 0x20 /* DMA active inhibits PIO */ |
78 | #define HPC3_SCTRL_CRESET 0x40 /* Resets dma channel and external controller */ | 78 | #define HPC3_SCTRL_CRESET 0x40 /* Resets dma channel and external controller */ |
79 | #define HPC3_SCTRL_PERR 0x80 /* Bad parity on HPC3 iface to scsi controller */ | 79 | #define HPC3_SCTRL_PERR 0x80 /* Bad parity on HPC3 iface to scsi controller */ |
80 | 80 | ||
81 | volatile u32 gfptr; /* current GIO fifo ptr */ | 81 | volatile u32 gfptr; /* current GIO fifo ptr */ |
82 | volatile u32 dfptr; /* current device fifo ptr */ | 82 | volatile u32 dfptr; /* current device fifo ptr */ |
83 | volatile u32 dconfig; /* DMA configuration register */ | 83 | volatile u32 dconfig; /* DMA configuration register */ |
84 | #define HPC3_SDCFG_HCLK 0x00001 /* Enable DMA half clock mode */ | 84 | #define HPC3_SDCFG_HCLK 0x00001 /* Enable DMA half clock mode */ |
85 | #define HPC3_SDCFG_D1 0x00006 /* Cycles to spend in D1 state */ | 85 | #define HPC3_SDCFG_D1 0x00006 /* Cycles to spend in D1 state */ |
86 | #define HPC3_SDCFG_D2 0x00038 /* Cycles to spend in D2 state */ | 86 | #define HPC3_SDCFG_D2 0x00038 /* Cycles to spend in D2 state */ |
87 | #define HPC3_SDCFG_D3 0x001c0 /* Cycles to spend in D3 state */ | 87 | #define HPC3_SDCFG_D3 0x001c0 /* Cycles to spend in D3 state */ |
88 | #define HPC3_SDCFG_HWAT 0x00e00 /* DMA high water mark */ | 88 | #define HPC3_SDCFG_HWAT 0x00e00 /* DMA high water mark */ |
89 | #define HPC3_SDCFG_HW 0x01000 /* Enable 16-bit halfword DMA accesses to scsi */ | 89 | #define HPC3_SDCFG_HW 0x01000 /* Enable 16-bit halfword DMA accesses to scsi */ |
90 | #define HPC3_SDCFG_SWAP 0x02000 /* Byte swap all DMA accesses */ | 90 | #define HPC3_SDCFG_SWAP 0x02000 /* Byte swap all DMA accesses */ |
91 | #define HPC3_SDCFG_EPAR 0x04000 /* Enable parity checking for DMA */ | 91 | #define HPC3_SDCFG_EPAR 0x04000 /* Enable parity checking for DMA */ |
92 | #define HPC3_SDCFG_POLL 0x08000 /* hd_dreq polarity control */ | 92 | #define HPC3_SDCFG_POLL 0x08000 /* hd_dreq polarity control */ |
93 | #define HPC3_SDCFG_ERLY 0x30000 /* hd_dreq behavior control bits */ | 93 | #define HPC3_SDCFG_ERLY 0x30000 /* hd_dreq behavior control bits */ |
94 | 94 | ||
95 | volatile u32 pconfig; /* PIO configuration register */ | 95 | volatile u32 pconfig; /* PIO configuration register */ |
96 | #define HPC3_SPCFG_P3 0x0003 /* Cycles to spend in P3 state */ | 96 | #define HPC3_SPCFG_P3 0x0003 /* Cycles to spend in P3 state */ |
97 | #define HPC3_SPCFG_P2W 0x001c /* Cycles to spend in P2 state for writes */ | 97 | #define HPC3_SPCFG_P2W 0x001c /* Cycles to spend in P2 state for writes */ |
98 | #define HPC3_SPCFG_P2R 0x01e0 /* Cycles to spend in P2 state for reads */ | 98 | #define HPC3_SPCFG_P2R 0x01e0 /* Cycles to spend in P2 state for reads */ |
99 | #define HPC3_SPCFG_P1 0x0e00 /* Cycles to spend in P1 state */ | 99 | #define HPC3_SPCFG_P1 0x0e00 /* Cycles to spend in P1 state */ |
100 | #define HPC3_SPCFG_HW 0x1000 /* Enable 16-bit halfword PIO accesses to scsi */ | 100 | #define HPC3_SPCFG_HW 0x1000 /* Enable 16-bit halfword PIO accesses to scsi */ |
101 | #define HPC3_SPCFG_SWAP 0x2000 /* Byte swap all PIO accesses */ | 101 | #define HPC3_SPCFG_SWAP 0x2000 /* Byte swap all PIO accesses */ |
102 | #define HPC3_SPCFG_EPAR 0x4000 /* Enable parity checking for PIO */ | 102 | #define HPC3_SPCFG_EPAR 0x4000 /* Enable parity checking for PIO */ |
103 | #define HPC3_SPCFG_FUJI 0x8000 /* Fujitsu scsi controller mode for faster dma/pio */ | 103 | #define HPC3_SPCFG_FUJI 0x8000 /* Fujitsu scsi controller mode for faster dma/pio */ |
@@ -108,13 +108,13 @@ struct hpc3_scsiregs { | |||
108 | /* SEEQ ethernet HPC3 registers, only one seeq per HPC3. */ | 108 | /* SEEQ ethernet HPC3 registers, only one seeq per HPC3. */ |
109 | struct hpc3_ethregs { | 109 | struct hpc3_ethregs { |
110 | /* Receiver registers. */ | 110 | /* Receiver registers. */ |
111 | volatile u32 rx_cbptr; /* current dma buffer ptr, diagnostic use only */ | 111 | volatile u32 rx_cbptr; /* current dma buffer ptr, diagnostic use only */ |
112 | volatile u32 rx_ndptr; /* next dma descriptor ptr */ | 112 | volatile u32 rx_ndptr; /* next dma descriptor ptr */ |
113 | u32 _unused0[0x1000/4 - 2]; /* padding */ | 113 | u32 _unused0[0x1000/4 - 2]; /* padding */ |
114 | volatile u32 rx_bcd; /* byte count info */ | 114 | volatile u32 rx_bcd; /* byte count info */ |
115 | #define HPC3_ERXBCD_BCNTMSK 0x00003fff /* bytes to be sent to memory */ | 115 | #define HPC3_ERXBCD_BCNTMSK 0x00003fff /* bytes to be sent to memory */ |
116 | #define HPC3_ERXBCD_XIE 0x20000000 /* HPC3 interrupts cpu at end of this buf */ | 116 | #define HPC3_ERXBCD_XIE 0x20000000 /* HPC3 interrupts cpu at end of this buf */ |
117 | #define HPC3_ERXBCD_EOX 0x80000000 /* flags this as end of descriptor chain */ | 117 | #define HPC3_ERXBCD_EOX 0x80000000 /* flags this as end of descriptor chain */ |
118 | 118 | ||
119 | volatile u32 rx_ctrl; /* control register */ | 119 | volatile u32 rx_ctrl; /* control register */ |
120 | #define HPC3_ERXCTRL_STAT50 0x0000003f /* Receive status reg bits of Seeq8003 */ | 120 | #define HPC3_ERXCTRL_STAT50 0x0000003f /* Receive status reg bits of Seeq8003 */ |
@@ -131,23 +131,23 @@ struct hpc3_ethregs { | |||
131 | volatile u32 reset; /* reset register */ | 131 | volatile u32 reset; /* reset register */ |
132 | #define HPC3_ERST_CRESET 0x1 /* Reset dma channel and external controller */ | 132 | #define HPC3_ERST_CRESET 0x1 /* Reset dma channel and external controller */ |
133 | #define HPC3_ERST_CLRIRQ 0x2 /* Clear channel interrupt */ | 133 | #define HPC3_ERST_CLRIRQ 0x2 /* Clear channel interrupt */ |
134 | #define HPC3_ERST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */ | 134 | #define HPC3_ERST_LBACK 0x4 /* Enable diagnostic loopback mode of Seeq8003 */ |
135 | 135 | ||
136 | volatile u32 dconfig; /* DMA configuration register */ | 136 | volatile u32 dconfig; /* DMA configuration register */ |
137 | #define HPC3_EDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */ | 137 | #define HPC3_EDCFG_D1 0x0000f /* Cycles to spend in D1 state for PIO */ |
138 | #define HPC3_EDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */ | 138 | #define HPC3_EDCFG_D2 0x000f0 /* Cycles to spend in D2 state for PIO */ |
139 | #define HPC3_EDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */ | 139 | #define HPC3_EDCFG_D3 0x00f00 /* Cycles to spend in D3 state for PIO */ |
140 | #define HPC3_EDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */ | 140 | #define HPC3_EDCFG_WCTRL 0x01000 /* Enable writes of desc into ex ctrl port */ |
141 | #define HPC3_EDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */ | 141 | #define HPC3_EDCFG_FRXDC 0x02000 /* Clear eop stat bits upon rxdc, hw seeq fix */ |
142 | #define HPC3_EDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */ | 142 | #define HPC3_EDCFG_FEOP 0x04000 /* Bad packet marker timeout enable */ |
143 | #define HPC3_EDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */ | 143 | #define HPC3_EDCFG_FIRQ 0x08000 /* Another bad packet timeout enable */ |
144 | #define HPC3_EDCFG_PTO 0x30000 /* Programmed timeout value for above two */ | 144 | #define HPC3_EDCFG_PTO 0x30000 /* Programmed timeout value for above two */ |
145 | 145 | ||
146 | volatile u32 pconfig; /* PIO configuration register */ | 146 | volatile u32 pconfig; /* PIO configuration register */ |
147 | #define HPC3_EPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */ | 147 | #define HPC3_EPCFG_P1 0x000f /* Cycles to spend in P1 state for PIO */ |
148 | #define HPC3_EPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */ | 148 | #define HPC3_EPCFG_P2 0x00f0 /* Cycles to spend in P2 state for PIO */ |
149 | #define HPC3_EPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */ | 149 | #define HPC3_EPCFG_P3 0x0f00 /* Cycles to spend in P3 state for PIO */ |
150 | #define HPC3_EPCFG_TST 0x1000 /* Diagnistic ram test feature bit */ | 150 | #define HPC3_EPCFG_TST 0x1000 /* Diagnistic ram test feature bit */ |
151 | 151 | ||
152 | u32 _unused2[0x1000/4 - 8]; /* padding */ | 152 | u32 _unused2[0x1000/4 - 8]; /* padding */ |
153 | 153 | ||
@@ -158,9 +158,9 @@ struct hpc3_ethregs { | |||
158 | volatile u32 tx_bcd; /* byte count info */ | 158 | volatile u32 tx_bcd; /* byte count info */ |
159 | #define HPC3_ETXBCD_BCNTMSK 0x00003fff /* bytes to be read from memory */ | 159 | #define HPC3_ETXBCD_BCNTMSK 0x00003fff /* bytes to be read from memory */ |
160 | #define HPC3_ETXBCD_ESAMP 0x10000000 /* if set, too late to add descriptor */ | 160 | #define HPC3_ETXBCD_ESAMP 0x10000000 /* if set, too late to add descriptor */ |
161 | #define HPC3_ETXBCD_XIE 0x20000000 /* Interrupt cpu at end of cur desc */ | 161 | #define HPC3_ETXBCD_XIE 0x20000000 /* Interrupt cpu at end of cur desc */ |
162 | #define HPC3_ETXBCD_EOP 0x40000000 /* Last byte of cur buf is end of packet */ | 162 | #define HPC3_ETXBCD_EOP 0x40000000 /* Last byte of cur buf is end of packet */ |
163 | #define HPC3_ETXBCD_EOX 0x80000000 /* This buf is the end of desc chain */ | 163 | #define HPC3_ETXBCD_EOX 0x80000000 /* This buf is the end of desc chain */ |
164 | 164 | ||
165 | volatile u32 tx_ctrl; /* control register */ | 165 | volatile u32 tx_ctrl; /* control register */ |
166 | #define HPC3_ETXCTRL_STAT30 0x0000000f /* Rdonly copy of seeq tx stat reg */ | 166 | #define HPC3_ETXCTRL_STAT30 0x0000000f /* Rdonly copy of seeq tx stat reg */ |
@@ -215,10 +215,10 @@ struct hpc3_regs { | |||
215 | 215 | ||
216 | volatile u32 istat1; /* Irq status, only bits <9:5> reliable. */ | 216 | volatile u32 istat1; /* Irq status, only bits <9:5> reliable. */ |
217 | volatile u32 bestat; /* Bus error interrupt status reg. */ | 217 | volatile u32 bestat; /* Bus error interrupt status reg. */ |
218 | #define HPC3_BESTAT_BLMASK 0x000ff /* Bus lane where bad parity occurred */ | 218 | #define HPC3_BESTAT_BLMASK 0x000ff /* Bus lane where bad parity occurred */ |
219 | #define HPC3_BESTAT_CTYPE 0x00100 /* Bus cycle type, 0=PIO 1=DMA */ | 219 | #define HPC3_BESTAT_CTYPE 0x00100 /* Bus cycle type, 0=PIO 1=DMA */ |
220 | #define HPC3_BESTAT_PIDSHIFT 9 | 220 | #define HPC3_BESTAT_PIDSHIFT 9 |
221 | #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */ | 221 | #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */ |
222 | 222 | ||
223 | u32 _unused1[0x14000/4 - 5]; /* padding */ | 223 | u32 _unused1[0x14000/4 - 5]; /* padding */ |
224 | 224 | ||
@@ -259,7 +259,7 @@ struct hpc3_regs { | |||
259 | #define HPC3_DMACFG_RTIME 0x00200000 | 259 | #define HPC3_DMACFG_RTIME 0x00200000 |
260 | /* 5 bit burst count for DMA device */ | 260 | /* 5 bit burst count for DMA device */ |
261 | #define HPC3_DMACFG_BURST_MASK 0x07c00000 | 261 | #define HPC3_DMACFG_BURST_MASK 0x07c00000 |
262 | #define HPC3_DMACFG_BURST_SHIFT 22 | 262 | #define HPC3_DMACFG_BURST_SHIFT 22 |
263 | /* Use live pbus_dreq unsynchronized signal */ | 263 | /* Use live pbus_dreq unsynchronized signal */ |
264 | #define HPC3_DMACFG_DRQLIVE 0x08000000 | 264 | #define HPC3_DMACFG_DRQLIVE 0x08000000 |
265 | volatile u32 pbus_piocfg[16][64]; | 265 | volatile u32 pbus_piocfg[16][64]; |
@@ -288,20 +288,20 @@ struct hpc3_regs { | |||
288 | 288 | ||
289 | /* PBUS PROM control regs. */ | 289 | /* PBUS PROM control regs. */ |
290 | volatile u32 pbus_promwe; /* PROM write enable register */ | 290 | volatile u32 pbus_promwe; /* PROM write enable register */ |
291 | #define HPC3_PROM_WENAB 0x1 /* Enable writes to the PROM */ | 291 | #define HPC3_PROM_WENAB 0x1 /* Enable writes to the PROM */ |
292 | 292 | ||
293 | u32 _unused5[0x0800/4 - 1]; | 293 | u32 _unused5[0x0800/4 - 1]; |
294 | volatile u32 pbus_promswap; /* Chip select swap reg */ | 294 | volatile u32 pbus_promswap; /* Chip select swap reg */ |
295 | #define HPC3_PROM_SWAP 0x1 /* invert GIO addr bit to select prom0 or prom1 */ | 295 | #define HPC3_PROM_SWAP 0x1 /* invert GIO addr bit to select prom0 or prom1 */ |
296 | 296 | ||
297 | u32 _unused6[0x0800/4 - 1]; | 297 | u32 _unused6[0x0800/4 - 1]; |
298 | volatile u32 pbus_gout; /* PROM general purpose output reg */ | 298 | volatile u32 pbus_gout; /* PROM general purpose output reg */ |
299 | #define HPC3_PROM_STAT 0x1 /* General purpose status bit in gout */ | 299 | #define HPC3_PROM_STAT 0x1 /* General purpose status bit in gout */ |
300 | 300 | ||
301 | u32 _unused7[0x1000/4 - 1]; | 301 | u32 _unused7[0x1000/4 - 1]; |
302 | volatile u32 rtcregs[14]; /* Dallas clock registers */ | 302 | volatile u32 rtcregs[14]; /* Dallas clock registers */ |
303 | u32 _unused8[50]; | 303 | u32 _unused8[50]; |
304 | volatile u32 bbram[8192-50-14]; /* Battery backed ram */ | 304 | volatile u32 bbram[8192-50-14]; /* Battery backed ram */ |
305 | }; | 305 | }; |
306 | 306 | ||
307 | /* | 307 | /* |
diff --git a/arch/mips/include/asm/sgi/ioc.h b/arch/mips/include/asm/sgi/ioc.h index 380347b648e2..53c6b1ca6860 100644 --- a/arch/mips/include/asm/sgi/ioc.h +++ b/arch/mips/include/asm/sgi/ioc.h | |||
@@ -138,7 +138,7 @@ struct sgioc_regs { | |||
138 | u8 _sysid[3]; | 138 | u8 _sysid[3]; |
139 | volatile u8 sysid; | 139 | volatile u8 sysid; |
140 | #define SGIOC_SYSID_FULLHOUSE 0x01 | 140 | #define SGIOC_SYSID_FULLHOUSE 0x01 |
141 | #define SGIOC_SYSID_BOARDREV(x) (((x) & 0x1e) >> 1) | 141 | #define SGIOC_SYSID_BOARDREV(x) (((x) & 0x1e) >> 1) |
142 | #define SGIOC_SYSID_CHIPREV(x) (((x) & 0xe0) >> 5) | 142 | #define SGIOC_SYSID_CHIPREV(x) (((x) & 0xe0) >> 5) |
143 | u32 _unused2; | 143 | u32 _unused2; |
144 | u8 _read[3]; | 144 | u8 _read[3]; |
@@ -150,7 +150,7 @@ struct sgioc_regs { | |||
150 | #define SGIOC_DMASEL_ISDNB 0x01 /* enable isdn B */ | 150 | #define SGIOC_DMASEL_ISDNB 0x01 /* enable isdn B */ |
151 | #define SGIOC_DMASEL_ISDNA 0x02 /* enable isdn A */ | 151 | #define SGIOC_DMASEL_ISDNA 0x02 /* enable isdn A */ |
152 | #define SGIOC_DMASEL_PPORT 0x04 /* use parallel DMA */ | 152 | #define SGIOC_DMASEL_PPORT 0x04 /* use parallel DMA */ |
153 | #define SGIOC_DMASEL_SCLK667MHZ 0x10 /* use 6.67MHZ serial clock */ | 153 | #define SGIOC_DMASEL_SCLK667MHZ 0x10 /* use 6.67MHZ serial clock */ |
154 | #define SGIOC_DMASEL_SCLKEXT 0x20 /* use external serial clock */ | 154 | #define SGIOC_DMASEL_SCLKEXT 0x20 /* use external serial clock */ |
155 | u32 _unused4; | 155 | u32 _unused4; |
156 | u8 _reset[3]; | 156 | u8 _reset[3]; |
diff --git a/arch/mips/include/asm/sgi/ip22.h b/arch/mips/include/asm/sgi/ip22.h index c0501f91719b..8db1a3588cf2 100644 --- a/arch/mips/include/asm/sgi/ip22.h +++ b/arch/mips/include/asm/sgi/ip22.h | |||
@@ -38,8 +38,8 @@ | |||
38 | 38 | ||
39 | #define SGI_SOFT_0_IRQ SGINT_CPU + 0 | 39 | #define SGI_SOFT_0_IRQ SGINT_CPU + 0 |
40 | #define SGI_SOFT_1_IRQ SGINT_CPU + 1 | 40 | #define SGI_SOFT_1_IRQ SGINT_CPU + 1 |
41 | #define SGI_LOCAL_0_IRQ SGINT_CPU + 2 | 41 | #define SGI_LOCAL_0_IRQ SGINT_CPU + 2 |
42 | #define SGI_LOCAL_1_IRQ SGINT_CPU + 3 | 42 | #define SGI_LOCAL_1_IRQ SGINT_CPU + 3 |
43 | #define SGI_8254_0_IRQ SGINT_CPU + 4 | 43 | #define SGI_8254_0_IRQ SGINT_CPU + 4 |
44 | #define SGI_8254_1_IRQ SGINT_CPU + 5 | 44 | #define SGI_8254_1_IRQ SGINT_CPU + 5 |
45 | #define SGI_BUSERR_IRQ SGINT_CPU + 6 | 45 | #define SGI_BUSERR_IRQ SGINT_CPU + 6 |
@@ -51,7 +51,7 @@ | |||
51 | #define SGI_WD93_1_IRQ SGINT_LOCAL0 + 2 /* 2nd onboard WD93 */ | 51 | #define SGI_WD93_1_IRQ SGINT_LOCAL0 + 2 /* 2nd onboard WD93 */ |
52 | #define SGI_ENET_IRQ SGINT_LOCAL0 + 3 /* onboard ethernet */ | 52 | #define SGI_ENET_IRQ SGINT_LOCAL0 + 3 /* onboard ethernet */ |
53 | #define SGI_MCDMA_IRQ SGINT_LOCAL0 + 4 /* MC DMA done */ | 53 | #define SGI_MCDMA_IRQ SGINT_LOCAL0 + 4 /* MC DMA done */ |
54 | #define SGI_PARPORT_IRQ SGINT_LOCAL0 + 5 /* Parallel port */ | 54 | #define SGI_PARPORT_IRQ SGINT_LOCAL0 + 5 /* Parallel port */ |
55 | #define SGI_GIO_1_IRQ SGINT_LOCAL0 + 6 /* GE / GIO-1 / 2nd-HPC */ | 55 | #define SGI_GIO_1_IRQ SGINT_LOCAL0 + 6 /* GE / GIO-1 / 2nd-HPC */ |
56 | #define SGI_MAP_0_IRQ SGINT_LOCAL0 + 7 /* Mappable interrupt 0 */ | 56 | #define SGI_MAP_0_IRQ SGINT_LOCAL0 + 7 /* Mappable interrupt 0 */ |
57 | 57 | ||
diff --git a/arch/mips/include/asm/sgi/mc.h b/arch/mips/include/asm/sgi/mc.h index 1576c2394de8..3a070cec97e7 100644 --- a/arch/mips/include/asm/sgi/mc.h +++ b/arch/mips/include/asm/sgi/mc.h | |||
@@ -29,10 +29,10 @@ struct sgimc_regs { | |||
29 | #define SGIMC_CCTRL0_IENAB 0x00002000 /* Allow interrupts from MC */ | 29 | #define SGIMC_CCTRL0_IENAB 0x00002000 /* Allow interrupts from MC */ |
30 | #define SGIMC_CCTRL0_ESNOOP 0x00004000 /* Snooping I/O enable */ | 30 | #define SGIMC_CCTRL0_ESNOOP 0x00004000 /* Snooping I/O enable */ |
31 | #define SGIMC_CCTRL0_EPROMWR 0x00008000 /* Prom writes from cpu enable */ | 31 | #define SGIMC_CCTRL0_EPROMWR 0x00008000 /* Prom writes from cpu enable */ |
32 | #define SGIMC_CCTRL0_WRESETPMEM 0x00010000 /* Perform warm reset, preserves mem */ | 32 | #define SGIMC_CCTRL0_WRESETPMEM 0x00010000 /* Perform warm reset, preserves mem */ |
33 | #define SGIMC_CCTRL0_LENDIAN 0x00020000 /* Put MC in little-endian mode */ | 33 | #define SGIMC_CCTRL0_LENDIAN 0x00020000 /* Put MC in little-endian mode */ |
34 | #define SGIMC_CCTRL0_WRESETDMEM 0x00040000 /* Warm reset, destroys mem contents */ | 34 | #define SGIMC_CCTRL0_WRESETDMEM 0x00040000 /* Warm reset, destroys mem contents */ |
35 | #define SGIMC_CCTRL0_CMEMBADPAR 0x02000000 /* Generate bad perr from cpu to mem */ | 35 | #define SGIMC_CCTRL0_CMEMBADPAR 0x02000000 /* Generate bad perr from cpu to mem */ |
36 | #define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000 /* Don't chk parity on mem data reads */ | 36 | #define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000 /* Don't chk parity on mem data reads */ |
37 | #define SGIMC_CCTRL0_GIOBTOB 0x08000000 /* Allow GIO back to back writes */ | 37 | #define SGIMC_CCTRL0_GIOBTOB 0x08000000 /* Allow GIO back to back writes */ |
38 | u32 _unused1; | 38 | u32 _unused1; |
@@ -40,13 +40,13 @@ struct sgimc_regs { | |||
40 | #define SGIMC_CCTRL1_EGIOTIMEO 0x00000010 /* GIO bus timeout enable */ | 40 | #define SGIMC_CCTRL1_EGIOTIMEO 0x00000010 /* GIO bus timeout enable */ |
41 | #define SGIMC_CCTRL1_FIXEDEHPC 0x00001000 /* Fixed HPC endianness */ | 41 | #define SGIMC_CCTRL1_FIXEDEHPC 0x00001000 /* Fixed HPC endianness */ |
42 | #define SGIMC_CCTRL1_LITTLEHPC 0x00002000 /* Little endian HPC */ | 42 | #define SGIMC_CCTRL1_LITTLEHPC 0x00002000 /* Little endian HPC */ |
43 | #define SGIMC_CCTRL1_FIXEDEEXP0 0x00004000 /* Fixed EXP0 endianness */ | 43 | #define SGIMC_CCTRL1_FIXEDEEXP0 0x00004000 /* Fixed EXP0 endianness */ |
44 | #define SGIMC_CCTRL1_LITTLEEXP0 0x00008000 /* Little endian EXP0 */ | 44 | #define SGIMC_CCTRL1_LITTLEEXP0 0x00008000 /* Little endian EXP0 */ |
45 | #define SGIMC_CCTRL1_FIXEDEEXP1 0x00010000 /* Fixed EXP1 endianness */ | 45 | #define SGIMC_CCTRL1_FIXEDEEXP1 0x00010000 /* Fixed EXP1 endianness */ |
46 | #define SGIMC_CCTRL1_LITTLEEXP1 0x00020000 /* Little endian EXP1 */ | 46 | #define SGIMC_CCTRL1_LITTLEEXP1 0x00020000 /* Little endian EXP1 */ |
47 | 47 | ||
48 | u32 _unused2; | 48 | u32 _unused2; |
49 | volatile u32 watchdogt; /* Watchdog reg rdonly, write clears */ | 49 | volatile u32 watchdogt; /* Watchdog reg rdonly, write clears */ |
50 | 50 | ||
51 | u32 _unused3; | 51 | u32 _unused3; |
52 | volatile u32 systemid; /* MC system ID register, readonly */ | 52 | volatile u32 systemid; /* MC system ID register, readonly */ |
@@ -81,11 +81,11 @@ struct sgimc_regs { | |||
81 | #define SGIMC_GIOPAR_RTIMEGFX 0x00000040 /* GFX device has realtime attr */ | 81 | #define SGIMC_GIOPAR_RTIMEGFX 0x00000040 /* GFX device has realtime attr */ |
82 | #define SGIMC_GIOPAR_RTIMEEXP0 0x00000080 /* EXP(slot0) has realtime attr */ | 82 | #define SGIMC_GIOPAR_RTIMEEXP0 0x00000080 /* EXP(slot0) has realtime attr */ |
83 | #define SGIMC_GIOPAR_RTIMEEXP1 0x00000100 /* EXP(slot1) has realtime attr */ | 83 | #define SGIMC_GIOPAR_RTIMEEXP1 0x00000100 /* EXP(slot1) has realtime attr */ |
84 | #define SGIMC_GIOPAR_MASTEREISA 0x00000200 /* EISA bus can act as bus master */ | 84 | #define SGIMC_GIOPAR_MASTEREISA 0x00000200 /* EISA bus can act as bus master */ |
85 | #define SGIMC_GIOPAR_ONEBUS 0x00000400 /* Exists one GIO64 pipelined bus */ | 85 | #define SGIMC_GIOPAR_ONEBUS 0x00000400 /* Exists one GIO64 pipelined bus */ |
86 | #define SGIMC_GIOPAR_MASTERGFX 0x00000800 /* GFX can act as a bus master */ | 86 | #define SGIMC_GIOPAR_MASTERGFX 0x00000800 /* GFX can act as a bus master */ |
87 | #define SGIMC_GIOPAR_MASTEREXP0 0x00001000 /* EXP(slot0) can bus master */ | 87 | #define SGIMC_GIOPAR_MASTEREXP0 0x00001000 /* EXP(slot0) can bus master */ |
88 | #define SGIMC_GIOPAR_MASTEREXP1 0x00002000 /* EXP(slot1) can bus master */ | 88 | #define SGIMC_GIOPAR_MASTEREXP1 0x00002000 /* EXP(slot1) can bus master */ |
89 | #define SGIMC_GIOPAR_PLINEEXP0 0x00004000 /* EXP(slot0) has pipeline attr */ | 89 | #define SGIMC_GIOPAR_PLINEEXP0 0x00004000 /* EXP(slot0) has pipeline attr */ |
90 | #define SGIMC_GIOPAR_PLINEEXP1 0x00008000 /* EXP(slot1) has pipeline attr */ | 90 | #define SGIMC_GIOPAR_PLINEEXP1 0x00008000 /* EXP(slot1) has pipeline attr */ |
91 | 91 | ||
@@ -107,9 +107,9 @@ struct sgimc_regs { | |||
107 | #define SGIMC_MCONFIG_SBANKS 0x00004000 /* Number of subbanks */ | 107 | #define SGIMC_MCONFIG_SBANKS 0x00004000 /* Number of subbanks */ |
108 | 108 | ||
109 | u32 _unused13; | 109 | u32 _unused13; |
110 | volatile u32 cmacc; /* Mem access config for CPU */ | 110 | volatile u32 cmacc; /* Mem access config for CPU */ |
111 | u32 _unused14; | 111 | u32 _unused14; |
112 | volatile u32 gmacc; /* Mem access config for GIO */ | 112 | volatile u32 gmacc; /* Mem access config for GIO */ |
113 | 113 | ||
114 | /* This define applies to both cmacc and gmacc registers above. */ | 114 | /* This define applies to both cmacc and gmacc registers above. */ |
115 | #define SGIMC_MACC_ALIASBIG 0x20000000 /* 512MB home for alias */ | 115 | #define SGIMC_MACC_ALIASBIG 0x20000000 /* 512MB home for alias */ |
diff --git a/arch/mips/include/asm/sgi/pi1.h b/arch/mips/include/asm/sgi/pi1.h index c9506915dc5c..96b1a0771ec3 100644 --- a/arch/mips/include/asm/sgi/pi1.h +++ b/arch/mips/include/asm/sgi/pi1.h | |||
@@ -28,16 +28,16 @@ struct pi1_regs { | |||
28 | #define PI1_STAT_BUSY 0x80 | 28 | #define PI1_STAT_BUSY 0x80 |
29 | u8 _dmactrl[3]; | 29 | u8 _dmactrl[3]; |
30 | volatile u8 dmactrl; | 30 | volatile u8 dmactrl; |
31 | #define PI1_DMACTRL_FIFO_EMPTY 0x01 /* fifo empty R/O */ | 31 | #define PI1_DMACTRL_FIFO_EMPTY 0x01 /* fifo empty R/O */ |
32 | #define PI1_DMACTRL_ABORT 0x02 /* reset DMA and internal fifo W/O */ | 32 | #define PI1_DMACTRL_ABORT 0x02 /* reset DMA and internal fifo W/O */ |
33 | #define PI1_DMACTRL_STDMODE 0x00 /* bits 2-3 */ | 33 | #define PI1_DMACTRL_STDMODE 0x00 /* bits 2-3 */ |
34 | #define PI1_DMACTRL_SGIMODE 0x04 /* bits 2-3 */ | 34 | #define PI1_DMACTRL_SGIMODE 0x04 /* bits 2-3 */ |
35 | #define PI1_DMACTRL_RICOHMODE 0x08 /* bits 2-3 */ | 35 | #define PI1_DMACTRL_RICOHMODE 0x08 /* bits 2-3 */ |
36 | #define PI1_DMACTRL_HPMODE 0x0c /* bits 2-3 */ | 36 | #define PI1_DMACTRL_HPMODE 0x0c /* bits 2-3 */ |
37 | #define PI1_DMACTRL_BLKMODE 0x10 /* block mode */ | 37 | #define PI1_DMACTRL_BLKMODE 0x10 /* block mode */ |
38 | #define PI1_DMACTRL_FIFO_CLEAR 0x20 /* clear fifo W/O */ | 38 | #define PI1_DMACTRL_FIFO_CLEAR 0x20 /* clear fifo W/O */ |
39 | #define PI1_DMACTRL_READ 0x40 /* read */ | 39 | #define PI1_DMACTRL_READ 0x40 /* read */ |
40 | #define PI1_DMACTRL_RUN 0x80 /* pedal to the metal */ | 40 | #define PI1_DMACTRL_RUN 0x80 /* pedal to the metal */ |
41 | u8 _intstat[3]; | 41 | u8 _intstat[3]; |
42 | volatile u8 intstat; | 42 | volatile u8 intstat; |
43 | #define PI1_INTSTAT_ACK 0x04 | 43 | #define PI1_INTSTAT_ACK 0x04 |
diff --git a/arch/mips/include/asm/sgialib.h b/arch/mips/include/asm/sgialib.h index f58115769457..753275accd18 100644 --- a/arch/mips/include/asm/sgialib.h +++ b/arch/mips/include/asm/sgialib.h | |||
@@ -37,7 +37,7 @@ extern char prom_getchar(void); | |||
37 | * in chain is CURR is NULL. | 37 | * in chain is CURR is NULL. |
38 | */ | 38 | */ |
39 | extern struct linux_mdesc *prom_getmdesc(struct linux_mdesc *curr); | 39 | extern struct linux_mdesc *prom_getmdesc(struct linux_mdesc *curr); |
40 | #define PROM_NULL_MDESC ((struct linux_mdesc *) 0) | 40 | #define PROM_NULL_MDESC ((struct linux_mdesc *) 0) |
41 | 41 | ||
42 | /* Called by prom_init to setup the physical memory pmemblock | 42 | /* Called by prom_init to setup the physical memory pmemblock |
43 | * array. | 43 | * array. |
diff --git a/arch/mips/include/asm/sgiarcs.h b/arch/mips/include/asm/sgiarcs.h index 3dce7c788b3e..26ddfff28c8e 100644 --- a/arch/mips/include/asm/sgiarcs.h +++ b/arch/mips/include/asm/sgiarcs.h | |||
@@ -16,33 +16,33 @@ | |||
16 | #include <asm/fw/arc/types.h> | 16 | #include <asm/fw/arc/types.h> |
17 | 17 | ||
18 | /* Various ARCS error codes. */ | 18 | /* Various ARCS error codes. */ |
19 | #define PROM_ESUCCESS 0x00 | 19 | #define PROM_ESUCCESS 0x00 |
20 | #define PROM_E2BIG 0x01 | 20 | #define PROM_E2BIG 0x01 |
21 | #define PROM_EACCESS 0x02 | 21 | #define PROM_EACCESS 0x02 |
22 | #define PROM_EAGAIN 0x03 | 22 | #define PROM_EAGAIN 0x03 |
23 | #define PROM_EBADF 0x04 | 23 | #define PROM_EBADF 0x04 |
24 | #define PROM_EBUSY 0x05 | 24 | #define PROM_EBUSY 0x05 |
25 | #define PROM_EFAULT 0x06 | 25 | #define PROM_EFAULT 0x06 |
26 | #define PROM_EINVAL 0x07 | 26 | #define PROM_EINVAL 0x07 |
27 | #define PROM_EIO 0x08 | 27 | #define PROM_EIO 0x08 |
28 | #define PROM_EISDIR 0x09 | 28 | #define PROM_EISDIR 0x09 |
29 | #define PROM_EMFILE 0x0a | 29 | #define PROM_EMFILE 0x0a |
30 | #define PROM_EMLINK 0x0b | 30 | #define PROM_EMLINK 0x0b |
31 | #define PROM_ENAMETOOLONG 0x0c | 31 | #define PROM_ENAMETOOLONG 0x0c |
32 | #define PROM_ENODEV 0x0d | 32 | #define PROM_ENODEV 0x0d |
33 | #define PROM_ENOENT 0x0e | 33 | #define PROM_ENOENT 0x0e |
34 | #define PROM_ENOEXEC 0x0f | 34 | #define PROM_ENOEXEC 0x0f |
35 | #define PROM_ENOMEM 0x10 | 35 | #define PROM_ENOMEM 0x10 |
36 | #define PROM_ENOSPC 0x11 | 36 | #define PROM_ENOSPC 0x11 |
37 | #define PROM_ENOTDIR 0x12 | 37 | #define PROM_ENOTDIR 0x12 |
38 | #define PROM_ENOTTY 0x13 | 38 | #define PROM_ENOTTY 0x13 |
39 | #define PROM_ENXIO 0x14 | 39 | #define PROM_ENXIO 0x14 |
40 | #define PROM_EROFS 0x15 | 40 | #define PROM_EROFS 0x15 |
41 | /* SGI ARCS specific errno's. */ | 41 | /* SGI ARCS specific errno's. */ |
42 | #define PROM_EADDRNOTAVAIL 0x1f | 42 | #define PROM_EADDRNOTAVAIL 0x1f |
43 | #define PROM_ETIMEDOUT 0x20 | 43 | #define PROM_ETIMEDOUT 0x20 |
44 | #define PROM_ECONNABORTED 0x21 | 44 | #define PROM_ECONNABORTED 0x21 |
45 | #define PROM_ENOCONNECT 0x22 | 45 | #define PROM_ENOCONNECT 0x22 |
46 | 46 | ||
47 | /* Device classes, types, and identifiers for prom | 47 | /* Device classes, types, and identifiers for prom |
48 | * device inventory queries. | 48 | * device inventory queries. |
@@ -77,14 +77,14 @@ enum linux_identifier { | |||
77 | 77 | ||
78 | /* A prom device tree component. */ | 78 | /* A prom device tree component. */ |
79 | struct linux_component { | 79 | struct linux_component { |
80 | enum linux_devclass class; /* node class */ | 80 | enum linux_devclass class; /* node class */ |
81 | enum linux_devtypes type; /* node type */ | 81 | enum linux_devtypes type; /* node type */ |
82 | enum linux_identifier iflags; /* node flags */ | 82 | enum linux_identifier iflags; /* node flags */ |
83 | USHORT vers; /* node version */ | 83 | USHORT vers; /* node version */ |
84 | USHORT rev; /* node revision */ | 84 | USHORT rev; /* node revision */ |
85 | ULONG key; /* completely magic */ | 85 | ULONG key; /* completely magic */ |
86 | ULONG amask; /* XXX affinity mask??? */ | 86 | ULONG amask; /* XXX affinity mask??? */ |
87 | ULONG cdsize; /* size of configuration data */ | 87 | ULONG cdsize; /* size of configuration data */ |
88 | ULONG ilen; /* length of string identifier */ | 88 | ULONG ilen; /* length of string identifier */ |
89 | _PULONG iname; /* string identifier */ | 89 | _PULONG iname; /* string identifier */ |
90 | }; | 90 | }; |
@@ -177,13 +177,13 @@ struct linux_finfo { | |||
177 | struct linux_bigint end; | 177 | struct linux_bigint end; |
178 | struct linux_bigint cur; | 178 | struct linux_bigint cur; |
179 | enum linux_devtypes dtype; | 179 | enum linux_devtypes dtype; |
180 | unsigned long namelen; | 180 | unsigned long namelen; |
181 | unsigned char attr; | 181 | unsigned char attr; |
182 | char name[32]; /* XXX imperical, should be define */ | 182 | char name[32]; /* XXX imperical, should be define */ |
183 | }; | 183 | }; |
184 | 184 | ||
185 | /* This describes the vector containing function pointers to the ARC | 185 | /* This describes the vector containing function pointers to the ARC |
186 | firmware functions. */ | 186 | firmware functions. */ |
187 | struct linux_romvec { | 187 | struct linux_romvec { |
188 | LONG load; /* Load an executable image. */ | 188 | LONG load; /* Load an executable image. */ |
189 | LONG invoke; /* Invoke a standalong image. */ | 189 | LONG invoke; /* Invoke a standalong image. */ |
@@ -244,7 +244,7 @@ struct linux_romvec { | |||
244 | */ | 244 | */ |
245 | typedef struct _SYSTEM_PARAMETER_BLOCK { | 245 | typedef struct _SYSTEM_PARAMETER_BLOCK { |
246 | ULONG magic; /* magic cookie */ | 246 | ULONG magic; /* magic cookie */ |
247 | #define PROMBLOCK_MAGIC 0x53435241 | 247 | #define PROMBLOCK_MAGIC 0x53435241 |
248 | 248 | ||
249 | ULONG len; /* length of parm block */ | 249 | ULONG len; /* length of parm block */ |
250 | USHORT ver; /* ARCS firmware version */ | 250 | USHORT ver; /* ARCS firmware version */ |
@@ -294,16 +294,16 @@ struct linux_cdata { | |||
294 | }; | 294 | }; |
295 | 295 | ||
296 | /* Common SGI ARCS firmware file descriptors. */ | 296 | /* Common SGI ARCS firmware file descriptors. */ |
297 | #define SGIPROM_STDIN 0 | 297 | #define SGIPROM_STDIN 0 |
298 | #define SGIPROM_STDOUT 1 | 298 | #define SGIPROM_STDOUT 1 |
299 | 299 | ||
300 | /* Common SGI ARCS firmware file types. */ | 300 | /* Common SGI ARCS firmware file types. */ |
301 | #define SGIPROM_ROFILE 0x01 /* read-only file */ | 301 | #define SGIPROM_ROFILE 0x01 /* read-only file */ |
302 | #define SGIPROM_HFILE 0x02 /* hidden file */ | 302 | #define SGIPROM_HFILE 0x02 /* hidden file */ |
303 | #define SGIPROM_SFILE 0x04 /* System file */ | 303 | #define SGIPROM_SFILE 0x04 /* System file */ |
304 | #define SGIPROM_AFILE 0x08 /* Archive file */ | 304 | #define SGIPROM_AFILE 0x08 /* Archive file */ |
305 | #define SGIPROM_DFILE 0x10 /* Directory file */ | 305 | #define SGIPROM_DFILE 0x10 /* Directory file */ |
306 | #define SGIPROM_DELFILE 0x20 /* Deleted file */ | 306 | #define SGIPROM_DELFILE 0x20 /* Deleted file */ |
307 | 307 | ||
308 | /* SGI ARCS boot record information. */ | 308 | /* SGI ARCS boot record information. */ |
309 | struct sgi_partition { | 309 | struct sgi_partition { |
@@ -318,7 +318,7 @@ struct sgi_partition { | |||
318 | unsigned char tsect0, tsect1, tsect2, tsect3; | 318 | unsigned char tsect0, tsect1, tsect2, tsect3; |
319 | }; | 319 | }; |
320 | 320 | ||
321 | #define SGIBBLOCK_MAGIC 0xaa55 | 321 | #define SGIBBLOCK_MAGIC 0xaa55 |
322 | #define SGIBBLOCK_MAXPART 0x0004 | 322 | #define SGIBBLOCK_MAXPART 0x0004 |
323 | 323 | ||
324 | struct sgi_bootblock { | 324 | struct sgi_bootblock { |
@@ -332,34 +332,34 @@ struct sgi_bparm_block { | |||
332 | unsigned short bytes_sect; /* bytes per sector */ | 332 | unsigned short bytes_sect; /* bytes per sector */ |
333 | unsigned char sect_clust; /* sectors per cluster */ | 333 | unsigned char sect_clust; /* sectors per cluster */ |
334 | unsigned short sect_resv; /* reserved sectors */ | 334 | unsigned short sect_resv; /* reserved sectors */ |
335 | unsigned char nfats; /* # of allocation tables */ | 335 | unsigned char nfats; /* # of allocation tables */ |
336 | unsigned short nroot_dirents; /* # of root directory entries */ | 336 | unsigned short nroot_dirents; /* # of root directory entries */ |
337 | unsigned short sect_volume; /* sectors in volume */ | 337 | unsigned short sect_volume; /* sectors in volume */ |
338 | unsigned char media_type; /* media descriptor */ | 338 | unsigned char media_type; /* media descriptor */ |
339 | unsigned short sect_fat; /* sectors per allocation table */ | 339 | unsigned short sect_fat; /* sectors per allocation table */ |
340 | unsigned short sect_track; /* sectors per track */ | 340 | unsigned short sect_track; /* sectors per track */ |
341 | unsigned short nheads; /* # of heads */ | 341 | unsigned short nheads; /* # of heads */ |
342 | unsigned short nhsects; /* # of hidden sectors */ | 342 | unsigned short nhsects; /* # of hidden sectors */ |
343 | }; | 343 | }; |
344 | 344 | ||
345 | struct sgi_bsector { | 345 | struct sgi_bsector { |
346 | unsigned char jmpinfo[3]; | 346 | unsigned char jmpinfo[3]; |
347 | unsigned char manuf_name[8]; | 347 | unsigned char manuf_name[8]; |
348 | struct sgi_bparm_block info; | 348 | struct sgi_bparm_block info; |
349 | }; | 349 | }; |
350 | 350 | ||
351 | /* Debugging block used with SGI symmon symbolic debugger. */ | 351 | /* Debugging block used with SGI symmon symbolic debugger. */ |
352 | #define SMB_DEBUG_MAGIC 0xfeeddead | 352 | #define SMB_DEBUG_MAGIC 0xfeeddead |
353 | struct linux_smonblock { | 353 | struct linux_smonblock { |
354 | unsigned long magic; | 354 | unsigned long magic; |
355 | void (*handler)(void); /* Breakpoint routine. */ | 355 | void (*handler)(void); /* Breakpoint routine. */ |
356 | unsigned long dtable_base; /* Base addr of dbg table. */ | 356 | unsigned long dtable_base; /* Base addr of dbg table. */ |
357 | int (*printf)(const char *fmt, ...); | 357 | int (*printf)(const char *fmt, ...); |
358 | unsigned long btable_base; /* Breakpoint table. */ | 358 | unsigned long btable_base; /* Breakpoint table. */ |
359 | unsigned long mpflushreqs; /* SMP cache flush request list. */ | 359 | unsigned long mpflushreqs; /* SMP cache flush request list. */ |
360 | unsigned long ntab; /* Name table. */ | 360 | unsigned long ntab; /* Name table. */ |
361 | unsigned long stab; /* Symbol table. */ | 361 | unsigned long stab; /* Symbol table. */ |
362 | int smax; /* Max # of symbols. */ | 362 | int smax; /* Max # of symbols. */ |
363 | }; | 363 | }; |
364 | 364 | ||
365 | /* | 365 | /* |
@@ -369,7 +369,7 @@ struct linux_smonblock { | |||
369 | #if defined(CONFIG_64BIT) && defined(CONFIG_FW_ARC32) | 369 | #if defined(CONFIG_64BIT) && defined(CONFIG_FW_ARC32) |
370 | 370 | ||
371 | #define __arc_clobbers \ | 371 | #define __arc_clobbers \ |
372 | "$2", "$3" /* ... */, "$8", "$9", "$10", "$11", \ | 372 | "$2", "$3" /* ... */, "$8", "$9", "$10", "$11", \ |
373 | "$12", "$13", "$14", "$15", "$16", "$24", "$25", "$31" | 373 | "$12", "$13", "$14", "$15", "$16", "$24", "$25", "$31" |
374 | 374 | ||
375 | #define ARC_CALL0(dest) \ | 375 | #define ARC_CALL0(dest) \ |
@@ -447,7 +447,7 @@ struct linux_smonblock { | |||
447 | "daddu\t$29, 32\n\t" \ | 447 | "daddu\t$29, 32\n\t" \ |
448 | "move\t%0, $2" \ | 448 | "move\t%0, $2" \ |
449 | : "=r" (__res), "=r" (__vec) \ | 449 | : "=r" (__res), "=r" (__vec) \ |
450 | : "1" (__vec), "r" (__a1), "r" (__a2), "r" (__a3), \ | 450 | : "1" (__vec), "r" (__a1), "r" (__a2), "r" (__a3), \ |
451 | "r" (__a4) \ | 451 | "r" (__a4) \ |
452 | : __arc_clobbers); \ | 452 | : __arc_clobbers); \ |
453 | __res; \ | 453 | __res; \ |
@@ -468,8 +468,8 @@ struct linux_smonblock { | |||
468 | "daddu\t$29, 32\n\t" \ | 468 | "daddu\t$29, 32\n\t" \ |
469 | "move\t%0, $2" \ | 469 | "move\t%0, $2" \ |
470 | : "=r" (__res), "=r" (__vec) \ | 470 | : "=r" (__res), "=r" (__vec) \ |
471 | : "1" (__vec), \ | 471 | : "1" (__vec), \ |
472 | "r" (__a1), "r" (__a2), "r" (__a3), "r" (__a4), \ | 472 | "r" (__a1), "r" (__a2), "r" (__a3), "r" (__a4), \ |
473 | "r" (__a5) \ | 473 | "r" (__a5) \ |
474 | : __arc_clobbers); \ | 474 | : __arc_clobbers); \ |
475 | __res; \ | 475 | __res; \ |
@@ -512,7 +512,7 @@ struct linux_smonblock { | |||
512 | long __a1 = (long) (a1); \ | 512 | long __a1 = (long) (a1); \ |
513 | long __a2 = (long) (a2); \ | 513 | long __a2 = (long) (a2); \ |
514 | long __a3 = (long) (a3); \ | 514 | long __a3 = (long) (a3); \ |
515 | long (*__vec)(long, long, long) = (void *) romvec->dest; \ | 515 | long (*__vec)(long, long, long) = (void *) romvec->dest; \ |
516 | \ | 516 | \ |
517 | __res = __vec(__a1, __a2, __a3); \ | 517 | __res = __vec(__a1, __a2, __a3); \ |
518 | __res; \ | 518 | __res; \ |
diff --git a/arch/mips/include/asm/shmparam.h b/arch/mips/include/asm/shmparam.h index 09290720751c..324d04042bdf 100644 --- a/arch/mips/include/asm/shmparam.h +++ b/arch/mips/include/asm/shmparam.h | |||
@@ -8,6 +8,6 @@ | |||
8 | 8 | ||
9 | #define __ARCH_FORCE_SHMLBA 1 | 9 | #define __ARCH_FORCE_SHMLBA 1 |
10 | 10 | ||
11 | #define SHMLBA 0x40000 /* attach addr a multiple of this */ | 11 | #define SHMLBA 0x40000 /* attach addr a multiple of this */ |
12 | 12 | ||
13 | #endif /* _ASM_SHMPARAM_H */ | 13 | #endif /* _ASM_SHMPARAM_H */ |
diff --git a/arch/mips/include/asm/sibyte/bcm1480_int.h b/arch/mips/include/asm/sibyte/bcm1480_int.h index fffb224d2297..6b82ed3c2359 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_int.h +++ b/arch/mips/include/asm/sibyte/bcm1480_int.h | |||
@@ -60,253 +60,253 @@ | |||
60 | * Interrupt sources (Table 22) | 60 | * Interrupt sources (Table 22) |
61 | */ | 61 | */ |
62 | 62 | ||
63 | #define K_BCM1480_INT_SOURCES 128 | 63 | #define K_BCM1480_INT_SOURCES 128 |
64 | 64 | ||
65 | #define _BCM1480_INT_HIGH(k) (k) | 65 | #define _BCM1480_INT_HIGH(k) (k) |
66 | #define _BCM1480_INT_LOW(k) ((k)+64) | 66 | #define _BCM1480_INT_LOW(k) ((k)+64) |
67 | 67 | ||
68 | #define K_BCM1480_INT_ADDR_TRAP _BCM1480_INT_HIGH(1) | 68 | #define K_BCM1480_INT_ADDR_TRAP _BCM1480_INT_HIGH(1) |
69 | #define K_BCM1480_INT_GPIO_0 _BCM1480_INT_HIGH(4) | 69 | #define K_BCM1480_INT_GPIO_0 _BCM1480_INT_HIGH(4) |
70 | #define K_BCM1480_INT_GPIO_1 _BCM1480_INT_HIGH(5) | 70 | #define K_BCM1480_INT_GPIO_1 _BCM1480_INT_HIGH(5) |
71 | #define K_BCM1480_INT_GPIO_2 _BCM1480_INT_HIGH(6) | 71 | #define K_BCM1480_INT_GPIO_2 _BCM1480_INT_HIGH(6) |
72 | #define K_BCM1480_INT_GPIO_3 _BCM1480_INT_HIGH(7) | 72 | #define K_BCM1480_INT_GPIO_3 _BCM1480_INT_HIGH(7) |
73 | #define K_BCM1480_INT_PCI_INTA _BCM1480_INT_HIGH(8) | 73 | #define K_BCM1480_INT_PCI_INTA _BCM1480_INT_HIGH(8) |
74 | #define K_BCM1480_INT_PCI_INTB _BCM1480_INT_HIGH(9) | 74 | #define K_BCM1480_INT_PCI_INTB _BCM1480_INT_HIGH(9) |
75 | #define K_BCM1480_INT_PCI_INTC _BCM1480_INT_HIGH(10) | 75 | #define K_BCM1480_INT_PCI_INTC _BCM1480_INT_HIGH(10) |
76 | #define K_BCM1480_INT_PCI_INTD _BCM1480_INT_HIGH(11) | 76 | #define K_BCM1480_INT_PCI_INTD _BCM1480_INT_HIGH(11) |
77 | #define K_BCM1480_INT_CYCLE_CP0 _BCM1480_INT_HIGH(12) | 77 | #define K_BCM1480_INT_CYCLE_CP0 _BCM1480_INT_HIGH(12) |
78 | #define K_BCM1480_INT_CYCLE_CP1 _BCM1480_INT_HIGH(13) | 78 | #define K_BCM1480_INT_CYCLE_CP1 _BCM1480_INT_HIGH(13) |
79 | #define K_BCM1480_INT_CYCLE_CP2 _BCM1480_INT_HIGH(14) | 79 | #define K_BCM1480_INT_CYCLE_CP2 _BCM1480_INT_HIGH(14) |
80 | #define K_BCM1480_INT_CYCLE_CP3 _BCM1480_INT_HIGH(15) | 80 | #define K_BCM1480_INT_CYCLE_CP3 _BCM1480_INT_HIGH(15) |
81 | #define K_BCM1480_INT_TIMER_0 _BCM1480_INT_HIGH(20) | 81 | #define K_BCM1480_INT_TIMER_0 _BCM1480_INT_HIGH(20) |
82 | #define K_BCM1480_INT_TIMER_1 _BCM1480_INT_HIGH(21) | 82 | #define K_BCM1480_INT_TIMER_1 _BCM1480_INT_HIGH(21) |
83 | #define K_BCM1480_INT_TIMER_2 _BCM1480_INT_HIGH(22) | 83 | #define K_BCM1480_INT_TIMER_2 _BCM1480_INT_HIGH(22) |
84 | #define K_BCM1480_INT_TIMER_3 _BCM1480_INT_HIGH(23) | 84 | #define K_BCM1480_INT_TIMER_3 _BCM1480_INT_HIGH(23) |
85 | #define K_BCM1480_INT_DM_CH_0 _BCM1480_INT_HIGH(28) | 85 | #define K_BCM1480_INT_DM_CH_0 _BCM1480_INT_HIGH(28) |
86 | #define K_BCM1480_INT_DM_CH_1 _BCM1480_INT_HIGH(29) | 86 | #define K_BCM1480_INT_DM_CH_1 _BCM1480_INT_HIGH(29) |
87 | #define K_BCM1480_INT_DM_CH_2 _BCM1480_INT_HIGH(30) | 87 | #define K_BCM1480_INT_DM_CH_2 _BCM1480_INT_HIGH(30) |
88 | #define K_BCM1480_INT_DM_CH_3 _BCM1480_INT_HIGH(31) | 88 | #define K_BCM1480_INT_DM_CH_3 _BCM1480_INT_HIGH(31) |
89 | #define K_BCM1480_INT_MAC_0 _BCM1480_INT_HIGH(36) | 89 | #define K_BCM1480_INT_MAC_0 _BCM1480_INT_HIGH(36) |
90 | #define K_BCM1480_INT_MAC_0_CH1 _BCM1480_INT_HIGH(37) | 90 | #define K_BCM1480_INT_MAC_0_CH1 _BCM1480_INT_HIGH(37) |
91 | #define K_BCM1480_INT_MAC_1 _BCM1480_INT_HIGH(38) | 91 | #define K_BCM1480_INT_MAC_1 _BCM1480_INT_HIGH(38) |
92 | #define K_BCM1480_INT_MAC_1_CH1 _BCM1480_INT_HIGH(39) | 92 | #define K_BCM1480_INT_MAC_1_CH1 _BCM1480_INT_HIGH(39) |
93 | #define K_BCM1480_INT_MAC_2 _BCM1480_INT_HIGH(40) | 93 | #define K_BCM1480_INT_MAC_2 _BCM1480_INT_HIGH(40) |
94 | #define K_BCM1480_INT_MAC_2_CH1 _BCM1480_INT_HIGH(41) | 94 | #define K_BCM1480_INT_MAC_2_CH1 _BCM1480_INT_HIGH(41) |
95 | #define K_BCM1480_INT_MAC_3 _BCM1480_INT_HIGH(42) | 95 | #define K_BCM1480_INT_MAC_3 _BCM1480_INT_HIGH(42) |
96 | #define K_BCM1480_INT_MAC_3_CH1 _BCM1480_INT_HIGH(43) | 96 | #define K_BCM1480_INT_MAC_3_CH1 _BCM1480_INT_HIGH(43) |
97 | #define K_BCM1480_INT_PMI_LOW _BCM1480_INT_HIGH(52) | 97 | #define K_BCM1480_INT_PMI_LOW _BCM1480_INT_HIGH(52) |
98 | #define K_BCM1480_INT_PMI_HIGH _BCM1480_INT_HIGH(53) | 98 | #define K_BCM1480_INT_PMI_HIGH _BCM1480_INT_HIGH(53) |
99 | #define K_BCM1480_INT_PMO_LOW _BCM1480_INT_HIGH(54) | 99 | #define K_BCM1480_INT_PMO_LOW _BCM1480_INT_HIGH(54) |
100 | #define K_BCM1480_INT_PMO_HIGH _BCM1480_INT_HIGH(55) | 100 | #define K_BCM1480_INT_PMO_HIGH _BCM1480_INT_HIGH(55) |
101 | #define K_BCM1480_INT_MBOX_0_0 _BCM1480_INT_HIGH(56) | 101 | #define K_BCM1480_INT_MBOX_0_0 _BCM1480_INT_HIGH(56) |
102 | #define K_BCM1480_INT_MBOX_0_1 _BCM1480_INT_HIGH(57) | 102 | #define K_BCM1480_INT_MBOX_0_1 _BCM1480_INT_HIGH(57) |
103 | #define K_BCM1480_INT_MBOX_0_2 _BCM1480_INT_HIGH(58) | 103 | #define K_BCM1480_INT_MBOX_0_2 _BCM1480_INT_HIGH(58) |
104 | #define K_BCM1480_INT_MBOX_0_3 _BCM1480_INT_HIGH(59) | 104 | #define K_BCM1480_INT_MBOX_0_3 _BCM1480_INT_HIGH(59) |
105 | #define K_BCM1480_INT_MBOX_1_0 _BCM1480_INT_HIGH(60) | 105 | #define K_BCM1480_INT_MBOX_1_0 _BCM1480_INT_HIGH(60) |
106 | #define K_BCM1480_INT_MBOX_1_1 _BCM1480_INT_HIGH(61) | 106 | #define K_BCM1480_INT_MBOX_1_1 _BCM1480_INT_HIGH(61) |
107 | #define K_BCM1480_INT_MBOX_1_2 _BCM1480_INT_HIGH(62) | 107 | #define K_BCM1480_INT_MBOX_1_2 _BCM1480_INT_HIGH(62) |
108 | #define K_BCM1480_INT_MBOX_1_3 _BCM1480_INT_HIGH(63) | 108 | #define K_BCM1480_INT_MBOX_1_3 _BCM1480_INT_HIGH(63) |
109 | 109 | ||
110 | #define K_BCM1480_INT_BAD_ECC _BCM1480_INT_LOW(1) | 110 | #define K_BCM1480_INT_BAD_ECC _BCM1480_INT_LOW(1) |
111 | #define K_BCM1480_INT_COR_ECC _BCM1480_INT_LOW(2) | 111 | #define K_BCM1480_INT_COR_ECC _BCM1480_INT_LOW(2) |
112 | #define K_BCM1480_INT_IO_BUS _BCM1480_INT_LOW(3) | 112 | #define K_BCM1480_INT_IO_BUS _BCM1480_INT_LOW(3) |
113 | #define K_BCM1480_INT_PERF_CNT _BCM1480_INT_LOW(4) | 113 | #define K_BCM1480_INT_PERF_CNT _BCM1480_INT_LOW(4) |
114 | #define K_BCM1480_INT_SW_PERF_CNT _BCM1480_INT_LOW(5) | 114 | #define K_BCM1480_INT_SW_PERF_CNT _BCM1480_INT_LOW(5) |
115 | #define K_BCM1480_INT_TRACE_FREEZE _BCM1480_INT_LOW(6) | 115 | #define K_BCM1480_INT_TRACE_FREEZE _BCM1480_INT_LOW(6) |
116 | #define K_BCM1480_INT_SW_TRACE_FREEZE _BCM1480_INT_LOW(7) | 116 | #define K_BCM1480_INT_SW_TRACE_FREEZE _BCM1480_INT_LOW(7) |
117 | #define K_BCM1480_INT_WATCHDOG_TIMER_0 _BCM1480_INT_LOW(8) | 117 | #define K_BCM1480_INT_WATCHDOG_TIMER_0 _BCM1480_INT_LOW(8) |
118 | #define K_BCM1480_INT_WATCHDOG_TIMER_1 _BCM1480_INT_LOW(9) | 118 | #define K_BCM1480_INT_WATCHDOG_TIMER_1 _BCM1480_INT_LOW(9) |
119 | #define K_BCM1480_INT_WATCHDOG_TIMER_2 _BCM1480_INT_LOW(10) | 119 | #define K_BCM1480_INT_WATCHDOG_TIMER_2 _BCM1480_INT_LOW(10) |
120 | #define K_BCM1480_INT_WATCHDOG_TIMER_3 _BCM1480_INT_LOW(11) | 120 | #define K_BCM1480_INT_WATCHDOG_TIMER_3 _BCM1480_INT_LOW(11) |
121 | #define K_BCM1480_INT_PCI_ERROR _BCM1480_INT_LOW(16) | 121 | #define K_BCM1480_INT_PCI_ERROR _BCM1480_INT_LOW(16) |
122 | #define K_BCM1480_INT_PCI_RESET _BCM1480_INT_LOW(17) | 122 | #define K_BCM1480_INT_PCI_RESET _BCM1480_INT_LOW(17) |
123 | #define K_BCM1480_INT_NODE_CONTROLLER _BCM1480_INT_LOW(18) | 123 | #define K_BCM1480_INT_NODE_CONTROLLER _BCM1480_INT_LOW(18) |
124 | #define K_BCM1480_INT_HOST_BRIDGE _BCM1480_INT_LOW(19) | 124 | #define K_BCM1480_INT_HOST_BRIDGE _BCM1480_INT_LOW(19) |
125 | #define K_BCM1480_INT_PORT_0_FATAL _BCM1480_INT_LOW(20) | 125 | #define K_BCM1480_INT_PORT_0_FATAL _BCM1480_INT_LOW(20) |
126 | #define K_BCM1480_INT_PORT_0_NONFATAL _BCM1480_INT_LOW(21) | 126 | #define K_BCM1480_INT_PORT_0_NONFATAL _BCM1480_INT_LOW(21) |
127 | #define K_BCM1480_INT_PORT_1_FATAL _BCM1480_INT_LOW(22) | 127 | #define K_BCM1480_INT_PORT_1_FATAL _BCM1480_INT_LOW(22) |
128 | #define K_BCM1480_INT_PORT_1_NONFATAL _BCM1480_INT_LOW(23) | 128 | #define K_BCM1480_INT_PORT_1_NONFATAL _BCM1480_INT_LOW(23) |
129 | #define K_BCM1480_INT_PORT_2_FATAL _BCM1480_INT_LOW(24) | 129 | #define K_BCM1480_INT_PORT_2_FATAL _BCM1480_INT_LOW(24) |
130 | #define K_BCM1480_INT_PORT_2_NONFATAL _BCM1480_INT_LOW(25) | 130 | #define K_BCM1480_INT_PORT_2_NONFATAL _BCM1480_INT_LOW(25) |
131 | #define K_BCM1480_INT_LDT_SMI _BCM1480_INT_LOW(32) | 131 | #define K_BCM1480_INT_LDT_SMI _BCM1480_INT_LOW(32) |
132 | #define K_BCM1480_INT_LDT_NMI _BCM1480_INT_LOW(33) | 132 | #define K_BCM1480_INT_LDT_NMI _BCM1480_INT_LOW(33) |
133 | #define K_BCM1480_INT_LDT_INIT _BCM1480_INT_LOW(34) | 133 | #define K_BCM1480_INT_LDT_INIT _BCM1480_INT_LOW(34) |
134 | #define K_BCM1480_INT_LDT_STARTUP _BCM1480_INT_LOW(35) | 134 | #define K_BCM1480_INT_LDT_STARTUP _BCM1480_INT_LOW(35) |
135 | #define K_BCM1480_INT_LDT_EXT _BCM1480_INT_LOW(36) | 135 | #define K_BCM1480_INT_LDT_EXT _BCM1480_INT_LOW(36) |
136 | #define K_BCM1480_INT_SMB_0 _BCM1480_INT_LOW(40) | 136 | #define K_BCM1480_INT_SMB_0 _BCM1480_INT_LOW(40) |
137 | #define K_BCM1480_INT_SMB_1 _BCM1480_INT_LOW(41) | 137 | #define K_BCM1480_INT_SMB_1 _BCM1480_INT_LOW(41) |
138 | #define K_BCM1480_INT_PCMCIA _BCM1480_INT_LOW(42) | 138 | #define K_BCM1480_INT_PCMCIA _BCM1480_INT_LOW(42) |
139 | #define K_BCM1480_INT_UART_0 _BCM1480_INT_LOW(44) | 139 | #define K_BCM1480_INT_UART_0 _BCM1480_INT_LOW(44) |
140 | #define K_BCM1480_INT_UART_1 _BCM1480_INT_LOW(45) | 140 | #define K_BCM1480_INT_UART_1 _BCM1480_INT_LOW(45) |
141 | #define K_BCM1480_INT_UART_2 _BCM1480_INT_LOW(46) | 141 | #define K_BCM1480_INT_UART_2 _BCM1480_INT_LOW(46) |
142 | #define K_BCM1480_INT_UART_3 _BCM1480_INT_LOW(47) | 142 | #define K_BCM1480_INT_UART_3 _BCM1480_INT_LOW(47) |
143 | #define K_BCM1480_INT_GPIO_4 _BCM1480_INT_LOW(52) | 143 | #define K_BCM1480_INT_GPIO_4 _BCM1480_INT_LOW(52) |
144 | #define K_BCM1480_INT_GPIO_5 _BCM1480_INT_LOW(53) | 144 | #define K_BCM1480_INT_GPIO_5 _BCM1480_INT_LOW(53) |
145 | #define K_BCM1480_INT_GPIO_6 _BCM1480_INT_LOW(54) | 145 | #define K_BCM1480_INT_GPIO_6 _BCM1480_INT_LOW(54) |
146 | #define K_BCM1480_INT_GPIO_7 _BCM1480_INT_LOW(55) | 146 | #define K_BCM1480_INT_GPIO_7 _BCM1480_INT_LOW(55) |
147 | #define K_BCM1480_INT_GPIO_8 _BCM1480_INT_LOW(56) | 147 | #define K_BCM1480_INT_GPIO_8 _BCM1480_INT_LOW(56) |
148 | #define K_BCM1480_INT_GPIO_9 _BCM1480_INT_LOW(57) | 148 | #define K_BCM1480_INT_GPIO_9 _BCM1480_INT_LOW(57) |
149 | #define K_BCM1480_INT_GPIO_10 _BCM1480_INT_LOW(58) | 149 | #define K_BCM1480_INT_GPIO_10 _BCM1480_INT_LOW(58) |
150 | #define K_BCM1480_INT_GPIO_11 _BCM1480_INT_LOW(59) | 150 | #define K_BCM1480_INT_GPIO_11 _BCM1480_INT_LOW(59) |
151 | #define K_BCM1480_INT_GPIO_12 _BCM1480_INT_LOW(60) | 151 | #define K_BCM1480_INT_GPIO_12 _BCM1480_INT_LOW(60) |
152 | #define K_BCM1480_INT_GPIO_13 _BCM1480_INT_LOW(61) | 152 | #define K_BCM1480_INT_GPIO_13 _BCM1480_INT_LOW(61) |
153 | #define K_BCM1480_INT_GPIO_14 _BCM1480_INT_LOW(62) | 153 | #define K_BCM1480_INT_GPIO_14 _BCM1480_INT_LOW(62) |
154 | #define K_BCM1480_INT_GPIO_15 _BCM1480_INT_LOW(63) | 154 | #define K_BCM1480_INT_GPIO_15 _BCM1480_INT_LOW(63) |
155 | 155 | ||
156 | /* | 156 | /* |
157 | * Mask values for each interrupt | 157 | * Mask values for each interrupt |
158 | */ | 158 | */ |
159 | 159 | ||
160 | #define _BCM1480_INT_MASK(w, n) _SB_MAKEMASK(w, ((n) & 0x3F)) | 160 | #define _BCM1480_INT_MASK(w, n) _SB_MAKEMASK(w, ((n) & 0x3F)) |
161 | #define _BCM1480_INT_MASK1(n) _SB_MAKEMASK1(((n) & 0x3F)) | 161 | #define _BCM1480_INT_MASK1(n) _SB_MAKEMASK1(((n) & 0x3F)) |
162 | #define _BCM1480_INT_OFFSET(n) (((n) & 0x40) << 6) | 162 | #define _BCM1480_INT_OFFSET(n) (((n) & 0x40) << 6) |
163 | 163 | ||
164 | #define M_BCM1480_INT_CASCADE _BCM1480_INT_MASK1(_BCM1480_INT_HIGH(0)) | 164 | #define M_BCM1480_INT_CASCADE _BCM1480_INT_MASK1(_BCM1480_INT_HIGH(0)) |
165 | 165 | ||
166 | #define M_BCM1480_INT_ADDR_TRAP _BCM1480_INT_MASK1(K_BCM1480_INT_ADDR_TRAP) | 166 | #define M_BCM1480_INT_ADDR_TRAP _BCM1480_INT_MASK1(K_BCM1480_INT_ADDR_TRAP) |
167 | #define M_BCM1480_INT_GPIO_0 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_0) | 167 | #define M_BCM1480_INT_GPIO_0 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_0) |
168 | #define M_BCM1480_INT_GPIO_1 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_1) | 168 | #define M_BCM1480_INT_GPIO_1 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_1) |
169 | #define M_BCM1480_INT_GPIO_2 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_2) | 169 | #define M_BCM1480_INT_GPIO_2 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_2) |
170 | #define M_BCM1480_INT_GPIO_3 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_3) | 170 | #define M_BCM1480_INT_GPIO_3 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_3) |
171 | #define M_BCM1480_INT_PCI_INTA _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTA) | 171 | #define M_BCM1480_INT_PCI_INTA _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTA) |
172 | #define M_BCM1480_INT_PCI_INTB _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTB) | 172 | #define M_BCM1480_INT_PCI_INTB _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTB) |
173 | #define M_BCM1480_INT_PCI_INTC _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTC) | 173 | #define M_BCM1480_INT_PCI_INTC _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTC) |
174 | #define M_BCM1480_INT_PCI_INTD _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTD) | 174 | #define M_BCM1480_INT_PCI_INTD _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_INTD) |
175 | #define M_BCM1480_INT_CYCLE_CP0 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP0) | 175 | #define M_BCM1480_INT_CYCLE_CP0 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP0) |
176 | #define M_BCM1480_INT_CYCLE_CP1 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP1) | 176 | #define M_BCM1480_INT_CYCLE_CP1 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP1) |
177 | #define M_BCM1480_INT_CYCLE_CP2 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP2) | 177 | #define M_BCM1480_INT_CYCLE_CP2 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP2) |
178 | #define M_BCM1480_INT_CYCLE_CP3 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP3) | 178 | #define M_BCM1480_INT_CYCLE_CP3 _BCM1480_INT_MASK1(K_BCM1480_INT_CYCLE_CP3) |
179 | #define M_BCM1480_INT_TIMER_0 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_0) | 179 | #define M_BCM1480_INT_TIMER_0 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_0) |
180 | #define M_BCM1480_INT_TIMER_1 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_1) | 180 | #define M_BCM1480_INT_TIMER_1 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_1) |
181 | #define M_BCM1480_INT_TIMER_2 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_2) | 181 | #define M_BCM1480_INT_TIMER_2 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_2) |
182 | #define M_BCM1480_INT_TIMER_3 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_3) | 182 | #define M_BCM1480_INT_TIMER_3 _BCM1480_INT_MASK1(K_BCM1480_INT_TIMER_3) |
183 | #define M_BCM1480_INT_DM_CH_0 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_0) | 183 | #define M_BCM1480_INT_DM_CH_0 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_0) |
184 | #define M_BCM1480_INT_DM_CH_1 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_1) | 184 | #define M_BCM1480_INT_DM_CH_1 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_1) |
185 | #define M_BCM1480_INT_DM_CH_2 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_2) | 185 | #define M_BCM1480_INT_DM_CH_2 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_2) |
186 | #define M_BCM1480_INT_DM_CH_3 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_3) | 186 | #define M_BCM1480_INT_DM_CH_3 _BCM1480_INT_MASK1(K_BCM1480_INT_DM_CH_3) |
187 | #define M_BCM1480_INT_MAC_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_0) | 187 | #define M_BCM1480_INT_MAC_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_0) |
188 | #define M_BCM1480_INT_MAC_0_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_0_CH1) | 188 | #define M_BCM1480_INT_MAC_0_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_0_CH1) |
189 | #define M_BCM1480_INT_MAC_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_1) | 189 | #define M_BCM1480_INT_MAC_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_1) |
190 | #define M_BCM1480_INT_MAC_1_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_1_CH1) | 190 | #define M_BCM1480_INT_MAC_1_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_1_CH1) |
191 | #define M_BCM1480_INT_MAC_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_2) | 191 | #define M_BCM1480_INT_MAC_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_2) |
192 | #define M_BCM1480_INT_MAC_2_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_2_CH1) | 192 | #define M_BCM1480_INT_MAC_2_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_2_CH1) |
193 | #define M_BCM1480_INT_MAC_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_3) | 193 | #define M_BCM1480_INT_MAC_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_3) |
194 | #define M_BCM1480_INT_MAC_3_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_3_CH1) | 194 | #define M_BCM1480_INT_MAC_3_CH1 _BCM1480_INT_MASK1(K_BCM1480_INT_MAC_3_CH1) |
195 | #define M_BCM1480_INT_PMI_LOW _BCM1480_INT_MASK1(K_BCM1480_INT_PMI_LOW) | 195 | #define M_BCM1480_INT_PMI_LOW _BCM1480_INT_MASK1(K_BCM1480_INT_PMI_LOW) |
196 | #define M_BCM1480_INT_PMI_HIGH _BCM1480_INT_MASK1(K_BCM1480_INT_PMI_HIGH) | 196 | #define M_BCM1480_INT_PMI_HIGH _BCM1480_INT_MASK1(K_BCM1480_INT_PMI_HIGH) |
197 | #define M_BCM1480_INT_PMO_LOW _BCM1480_INT_MASK1(K_BCM1480_INT_PMO_LOW) | 197 | #define M_BCM1480_INT_PMO_LOW _BCM1480_INT_MASK1(K_BCM1480_INT_PMO_LOW) |
198 | #define M_BCM1480_INT_PMO_HIGH _BCM1480_INT_MASK1(K_BCM1480_INT_PMO_HIGH) | 198 | #define M_BCM1480_INT_PMO_HIGH _BCM1480_INT_MASK1(K_BCM1480_INT_PMO_HIGH) |
199 | #define M_BCM1480_INT_MBOX_ALL _BCM1480_INT_MASK(8, K_BCM1480_INT_MBOX_0_0) | 199 | #define M_BCM1480_INT_MBOX_ALL _BCM1480_INT_MASK(8, K_BCM1480_INT_MBOX_0_0) |
200 | #define M_BCM1480_INT_MBOX_0_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_0) | 200 | #define M_BCM1480_INT_MBOX_0_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_0) |
201 | #define M_BCM1480_INT_MBOX_0_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_1) | 201 | #define M_BCM1480_INT_MBOX_0_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_1) |
202 | #define M_BCM1480_INT_MBOX_0_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_2) | 202 | #define M_BCM1480_INT_MBOX_0_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_2) |
203 | #define M_BCM1480_INT_MBOX_0_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_3) | 203 | #define M_BCM1480_INT_MBOX_0_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_0_3) |
204 | #define M_BCM1480_INT_MBOX_1_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_0) | 204 | #define M_BCM1480_INT_MBOX_1_0 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_0) |
205 | #define M_BCM1480_INT_MBOX_1_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_1) | 205 | #define M_BCM1480_INT_MBOX_1_1 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_1) |
206 | #define M_BCM1480_INT_MBOX_1_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_2) | 206 | #define M_BCM1480_INT_MBOX_1_2 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_2) |
207 | #define M_BCM1480_INT_MBOX_1_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_3) | 207 | #define M_BCM1480_INT_MBOX_1_3 _BCM1480_INT_MASK1(K_BCM1480_INT_MBOX_1_3) |
208 | #define M_BCM1480_INT_BAD_ECC _BCM1480_INT_MASK1(K_BCM1480_INT_BAD_ECC) | 208 | #define M_BCM1480_INT_BAD_ECC _BCM1480_INT_MASK1(K_BCM1480_INT_BAD_ECC) |
209 | #define M_BCM1480_INT_COR_ECC _BCM1480_INT_MASK1(K_BCM1480_INT_COR_ECC) | 209 | #define M_BCM1480_INT_COR_ECC _BCM1480_INT_MASK1(K_BCM1480_INT_COR_ECC) |
210 | #define M_BCM1480_INT_IO_BUS _BCM1480_INT_MASK1(K_BCM1480_INT_IO_BUS) | 210 | #define M_BCM1480_INT_IO_BUS _BCM1480_INT_MASK1(K_BCM1480_INT_IO_BUS) |
211 | #define M_BCM1480_INT_PERF_CNT _BCM1480_INT_MASK1(K_BCM1480_INT_PERF_CNT) | 211 | #define M_BCM1480_INT_PERF_CNT _BCM1480_INT_MASK1(K_BCM1480_INT_PERF_CNT) |
212 | #define M_BCM1480_INT_SW_PERF_CNT _BCM1480_INT_MASK1(K_BCM1480_INT_SW_PERF_CNT) | 212 | #define M_BCM1480_INT_SW_PERF_CNT _BCM1480_INT_MASK1(K_BCM1480_INT_SW_PERF_CNT) |
213 | #define M_BCM1480_INT_TRACE_FREEZE _BCM1480_INT_MASK1(K_BCM1480_INT_TRACE_FREEZE) | 213 | #define M_BCM1480_INT_TRACE_FREEZE _BCM1480_INT_MASK1(K_BCM1480_INT_TRACE_FREEZE) |
214 | #define M_BCM1480_INT_SW_TRACE_FREEZE _BCM1480_INT_MASK1(K_BCM1480_INT_SW_TRACE_FREEZE) | 214 | #define M_BCM1480_INT_SW_TRACE_FREEZE _BCM1480_INT_MASK1(K_BCM1480_INT_SW_TRACE_FREEZE) |
215 | #define M_BCM1480_INT_WATCHDOG_TIMER_0 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_0) | 215 | #define M_BCM1480_INT_WATCHDOG_TIMER_0 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_0) |
216 | #define M_BCM1480_INT_WATCHDOG_TIMER_1 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_1) | 216 | #define M_BCM1480_INT_WATCHDOG_TIMER_1 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_1) |
217 | #define M_BCM1480_INT_WATCHDOG_TIMER_2 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_2) | 217 | #define M_BCM1480_INT_WATCHDOG_TIMER_2 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_2) |
218 | #define M_BCM1480_INT_WATCHDOG_TIMER_3 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_3) | 218 | #define M_BCM1480_INT_WATCHDOG_TIMER_3 _BCM1480_INT_MASK1(K_BCM1480_INT_WATCHDOG_TIMER_3) |
219 | #define M_BCM1480_INT_PCI_ERROR _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_ERROR) | 219 | #define M_BCM1480_INT_PCI_ERROR _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_ERROR) |
220 | #define M_BCM1480_INT_PCI_RESET _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_RESET) | 220 | #define M_BCM1480_INT_PCI_RESET _BCM1480_INT_MASK1(K_BCM1480_INT_PCI_RESET) |
221 | #define M_BCM1480_INT_NODE_CONTROLLER _BCM1480_INT_MASK1(K_BCM1480_INT_NODE_CONTROLLER) | 221 | #define M_BCM1480_INT_NODE_CONTROLLER _BCM1480_INT_MASK1(K_BCM1480_INT_NODE_CONTROLLER) |
222 | #define M_BCM1480_INT_HOST_BRIDGE _BCM1480_INT_MASK1(K_BCM1480_INT_HOST_BRIDGE) | 222 | #define M_BCM1480_INT_HOST_BRIDGE _BCM1480_INT_MASK1(K_BCM1480_INT_HOST_BRIDGE) |
223 | #define M_BCM1480_INT_PORT_0_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_0_FATAL) | 223 | #define M_BCM1480_INT_PORT_0_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_0_FATAL) |
224 | #define M_BCM1480_INT_PORT_0_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_0_NONFATAL) | 224 | #define M_BCM1480_INT_PORT_0_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_0_NONFATAL) |
225 | #define M_BCM1480_INT_PORT_1_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_1_FATAL) | 225 | #define M_BCM1480_INT_PORT_1_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_1_FATAL) |
226 | #define M_BCM1480_INT_PORT_1_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_1_NONFATAL) | 226 | #define M_BCM1480_INT_PORT_1_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_1_NONFATAL) |
227 | #define M_BCM1480_INT_PORT_2_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_2_FATAL) | 227 | #define M_BCM1480_INT_PORT_2_FATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_2_FATAL) |
228 | #define M_BCM1480_INT_PORT_2_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_2_NONFATAL) | 228 | #define M_BCM1480_INT_PORT_2_NONFATAL _BCM1480_INT_MASK1(K_BCM1480_INT_PORT_2_NONFATAL) |
229 | #define M_BCM1480_INT_LDT_SMI _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_SMI) | 229 | #define M_BCM1480_INT_LDT_SMI _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_SMI) |
230 | #define M_BCM1480_INT_LDT_NMI _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_NMI) | 230 | #define M_BCM1480_INT_LDT_NMI _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_NMI) |
231 | #define M_BCM1480_INT_LDT_INIT _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_INIT) | 231 | #define M_BCM1480_INT_LDT_INIT _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_INIT) |
232 | #define M_BCM1480_INT_LDT_STARTUP _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_STARTUP) | 232 | #define M_BCM1480_INT_LDT_STARTUP _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_STARTUP) |
233 | #define M_BCM1480_INT_LDT_EXT _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_EXT) | 233 | #define M_BCM1480_INT_LDT_EXT _BCM1480_INT_MASK1(K_BCM1480_INT_LDT_EXT) |
234 | #define M_BCM1480_INT_SMB_0 _BCM1480_INT_MASK1(K_BCM1480_INT_SMB_0) | 234 | #define M_BCM1480_INT_SMB_0 _BCM1480_INT_MASK1(K_BCM1480_INT_SMB_0) |
235 | #define M_BCM1480_INT_SMB_1 _BCM1480_INT_MASK1(K_BCM1480_INT_SMB_1) | 235 | #define M_BCM1480_INT_SMB_1 _BCM1480_INT_MASK1(K_BCM1480_INT_SMB_1) |
236 | #define M_BCM1480_INT_PCMCIA _BCM1480_INT_MASK1(K_BCM1480_INT_PCMCIA) | 236 | #define M_BCM1480_INT_PCMCIA _BCM1480_INT_MASK1(K_BCM1480_INT_PCMCIA) |
237 | #define M_BCM1480_INT_UART_0 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_0) | 237 | #define M_BCM1480_INT_UART_0 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_0) |
238 | #define M_BCM1480_INT_UART_1 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_1) | 238 | #define M_BCM1480_INT_UART_1 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_1) |
239 | #define M_BCM1480_INT_UART_2 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_2) | 239 | #define M_BCM1480_INT_UART_2 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_2) |
240 | #define M_BCM1480_INT_UART_3 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_3) | 240 | #define M_BCM1480_INT_UART_3 _BCM1480_INT_MASK1(K_BCM1480_INT_UART_3) |
241 | #define M_BCM1480_INT_GPIO_4 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_4) | 241 | #define M_BCM1480_INT_GPIO_4 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_4) |
242 | #define M_BCM1480_INT_GPIO_5 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_5) | 242 | #define M_BCM1480_INT_GPIO_5 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_5) |
243 | #define M_BCM1480_INT_GPIO_6 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_6) | 243 | #define M_BCM1480_INT_GPIO_6 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_6) |
244 | #define M_BCM1480_INT_GPIO_7 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_7) | 244 | #define M_BCM1480_INT_GPIO_7 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_7) |
245 | #define M_BCM1480_INT_GPIO_8 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_8) | 245 | #define M_BCM1480_INT_GPIO_8 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_8) |
246 | #define M_BCM1480_INT_GPIO_9 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_9) | 246 | #define M_BCM1480_INT_GPIO_9 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_9) |
247 | #define M_BCM1480_INT_GPIO_10 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_10) | 247 | #define M_BCM1480_INT_GPIO_10 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_10) |
248 | #define M_BCM1480_INT_GPIO_11 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_11) | 248 | #define M_BCM1480_INT_GPIO_11 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_11) |
249 | #define M_BCM1480_INT_GPIO_12 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_12) | 249 | #define M_BCM1480_INT_GPIO_12 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_12) |
250 | #define M_BCM1480_INT_GPIO_13 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_13) | 250 | #define M_BCM1480_INT_GPIO_13 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_13) |
251 | #define M_BCM1480_INT_GPIO_14 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_14) | 251 | #define M_BCM1480_INT_GPIO_14 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_14) |
252 | #define M_BCM1480_INT_GPIO_15 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_15) | 252 | #define M_BCM1480_INT_GPIO_15 _BCM1480_INT_MASK1(K_BCM1480_INT_GPIO_15) |
253 | 253 | ||
254 | /* | 254 | /* |
255 | * Interrupt mappings (Table 18) | 255 | * Interrupt mappings (Table 18) |
256 | */ | 256 | */ |
257 | 257 | ||
258 | #define K_BCM1480_INT_MAP_I0 0 /* interrupt pins on processor */ | 258 | #define K_BCM1480_INT_MAP_I0 0 /* interrupt pins on processor */ |
259 | #define K_BCM1480_INT_MAP_I1 1 | 259 | #define K_BCM1480_INT_MAP_I1 1 |
260 | #define K_BCM1480_INT_MAP_I2 2 | 260 | #define K_BCM1480_INT_MAP_I2 2 |
261 | #define K_BCM1480_INT_MAP_I3 3 | 261 | #define K_BCM1480_INT_MAP_I3 3 |
262 | #define K_BCM1480_INT_MAP_I4 4 | 262 | #define K_BCM1480_INT_MAP_I4 4 |
263 | #define K_BCM1480_INT_MAP_I5 5 | 263 | #define K_BCM1480_INT_MAP_I5 5 |
264 | #define K_BCM1480_INT_MAP_NMI 6 /* nonmaskable */ | 264 | #define K_BCM1480_INT_MAP_NMI 6 /* nonmaskable */ |
265 | #define K_BCM1480_INT_MAP_DINT 7 /* debug interrupt */ | 265 | #define K_BCM1480_INT_MAP_DINT 7 /* debug interrupt */ |
266 | 266 | ||
267 | /* | 267 | /* |
268 | * Interrupt LDT Set Register (Table 19) | 268 | * Interrupt LDT Set Register (Table 19) |
269 | */ | 269 | */ |
270 | 270 | ||
271 | #define S_BCM1480_INT_HT_INTMSG 0 | 271 | #define S_BCM1480_INT_HT_INTMSG 0 |
272 | #define M_BCM1480_INT_HT_INTMSG _SB_MAKEMASK(3, S_BCM1480_INT_HT_INTMSG) | 272 | #define M_BCM1480_INT_HT_INTMSG _SB_MAKEMASK(3, S_BCM1480_INT_HT_INTMSG) |
273 | #define V_BCM1480_INT_HT_INTMSG(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_INTMSG) | 273 | #define V_BCM1480_INT_HT_INTMSG(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_INTMSG) |
274 | #define G_BCM1480_INT_HT_INTMSG(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_INTMSG, M_BCM1480_INT_HT_INTMSG) | 274 | #define G_BCM1480_INT_HT_INTMSG(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_INTMSG, M_BCM1480_INT_HT_INTMSG) |
275 | 275 | ||
276 | #define K_BCM1480_INT_HT_INTMSG_FIXED 0 | 276 | #define K_BCM1480_INT_HT_INTMSG_FIXED 0 |
277 | #define K_BCM1480_INT_HT_INTMSG_ARBITRATED 1 | 277 | #define K_BCM1480_INT_HT_INTMSG_ARBITRATED 1 |
278 | #define K_BCM1480_INT_HT_INTMSG_SMI 2 | 278 | #define K_BCM1480_INT_HT_INTMSG_SMI 2 |
279 | #define K_BCM1480_INT_HT_INTMSG_NMI 3 | 279 | #define K_BCM1480_INT_HT_INTMSG_NMI 3 |
280 | #define K_BCM1480_INT_HT_INTMSG_INIT 4 | 280 | #define K_BCM1480_INT_HT_INTMSG_INIT 4 |
281 | #define K_BCM1480_INT_HT_INTMSG_STARTUP 5 | 281 | #define K_BCM1480_INT_HT_INTMSG_STARTUP 5 |
282 | #define K_BCM1480_INT_HT_INTMSG_EXTINT 6 | 282 | #define K_BCM1480_INT_HT_INTMSG_EXTINT 6 |
283 | #define K_BCM1480_INT_HT_INTMSG_RESERVED 7 | 283 | #define K_BCM1480_INT_HT_INTMSG_RESERVED 7 |
284 | 284 | ||
285 | #define M_BCM1480_INT_HT_TRIGGERMODE _SB_MAKEMASK1(3) | 285 | #define M_BCM1480_INT_HT_TRIGGERMODE _SB_MAKEMASK1(3) |
286 | #define V_BCM1480_INT_HT_EDGETRIGGER 0 | 286 | #define V_BCM1480_INT_HT_EDGETRIGGER 0 |
287 | #define V_BCM1480_INT_HT_LEVELTRIGGER M_BCM1480_INT_HT_TRIGGERMODE | 287 | #define V_BCM1480_INT_HT_LEVELTRIGGER M_BCM1480_INT_HT_TRIGGERMODE |
288 | 288 | ||
289 | #define M_BCM1480_INT_HT_DESTMODE _SB_MAKEMASK1(4) | 289 | #define M_BCM1480_INT_HT_DESTMODE _SB_MAKEMASK1(4) |
290 | #define V_BCM1480_INT_HT_PHYSICALDEST 0 | 290 | #define V_BCM1480_INT_HT_PHYSICALDEST 0 |
291 | #define V_BCM1480_INT_HT_LOGICALDEST M_BCM1480_INT_HT_DESTMODE | 291 | #define V_BCM1480_INT_HT_LOGICALDEST M_BCM1480_INT_HT_DESTMODE |
292 | 292 | ||
293 | #define S_BCM1480_INT_HT_INTDEST 5 | 293 | #define S_BCM1480_INT_HT_INTDEST 5 |
294 | #define M_BCM1480_INT_HT_INTDEST _SB_MAKEMASK(8, S_BCM1480_INT_HT_INTDEST) | 294 | #define M_BCM1480_INT_HT_INTDEST _SB_MAKEMASK(8, S_BCM1480_INT_HT_INTDEST) |
295 | #define V_BCM1480_INT_HT_INTDEST(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_INTDEST) | 295 | #define V_BCM1480_INT_HT_INTDEST(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_INTDEST) |
296 | #define G_BCM1480_INT_HT_INTDEST(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_INTDEST, M_BCM1480_INT_HT_INTDEST) | 296 | #define G_BCM1480_INT_HT_INTDEST(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_INTDEST, M_BCM1480_INT_HT_INTDEST) |
297 | 297 | ||
298 | #define S_BCM1480_INT_HT_VECTOR 13 | 298 | #define S_BCM1480_INT_HT_VECTOR 13 |
299 | #define M_BCM1480_INT_HT_VECTOR _SB_MAKEMASK(8, S_BCM1480_INT_HT_VECTOR) | 299 | #define M_BCM1480_INT_HT_VECTOR _SB_MAKEMASK(8, S_BCM1480_INT_HT_VECTOR) |
300 | #define V_BCM1480_INT_HT_VECTOR(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_VECTOR) | 300 | #define V_BCM1480_INT_HT_VECTOR(x) _SB_MAKEVALUE(x, S_BCM1480_INT_HT_VECTOR) |
301 | #define G_BCM1480_INT_HT_VECTOR(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_VECTOR, M_BCM1480_INT_HT_VECTOR) | 301 | #define G_BCM1480_INT_HT_VECTOR(x) _SB_GETVALUE(x, S_BCM1480_INT_HT_VECTOR, M_BCM1480_INT_HT_VECTOR) |
302 | 302 | ||
303 | /* | 303 | /* |
304 | * Vector prefix (Table 4-7) | 304 | * Vector prefix (Table 4-7) |
305 | */ | 305 | */ |
306 | 306 | ||
307 | #define M_BCM1480_HTVECT_RAISE_INTLDT_HIGH 0x00 | 307 | #define M_BCM1480_HTVECT_RAISE_INTLDT_HIGH 0x00 |
308 | #define M_BCM1480_HTVECT_RAISE_MBOX_0 0x40 | 308 | #define M_BCM1480_HTVECT_RAISE_MBOX_0 0x40 |
309 | #define M_BCM1480_HTVECT_RAISE_INTLDT_LO 0x80 | 309 | #define M_BCM1480_HTVECT_RAISE_INTLDT_LO 0x80 |
310 | #define M_BCM1480_HTVECT_RAISE_MBOX_1 0xC0 | 310 | #define M_BCM1480_HTVECT_RAISE_MBOX_1 0xC0 |
311 | 311 | ||
312 | #endif /* _BCM1480_INT_H */ | 312 | #endif /* _BCM1480_INT_H */ |
diff --git a/arch/mips/include/asm/sibyte/bcm1480_l2c.h b/arch/mips/include/asm/sibyte/bcm1480_l2c.h index 725d38cb9d1c..910e5c7e1b08 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_l2c.h +++ b/arch/mips/include/asm/sibyte/bcm1480_l2c.h | |||
@@ -39,120 +39,120 @@ | |||
39 | * Format of level 2 cache management address (Table 55) | 39 | * Format of level 2 cache management address (Table 55) |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define S_BCM1480_L2C_MGMT_INDEX 5 | 42 | #define S_BCM1480_L2C_MGMT_INDEX 5 |
43 | #define M_BCM1480_L2C_MGMT_INDEX _SB_MAKEMASK(12, S_BCM1480_L2C_MGMT_INDEX) | 43 | #define M_BCM1480_L2C_MGMT_INDEX _SB_MAKEMASK(12, S_BCM1480_L2C_MGMT_INDEX) |
44 | #define V_BCM1480_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_INDEX) | 44 | #define V_BCM1480_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_INDEX) |
45 | #define G_BCM1480_L2C_MGMT_INDEX(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_INDEX, M_BCM1480_L2C_MGMT_INDEX) | 45 | #define G_BCM1480_L2C_MGMT_INDEX(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_INDEX, M_BCM1480_L2C_MGMT_INDEX) |
46 | 46 | ||
47 | #define S_BCM1480_L2C_MGMT_WAY 17 | 47 | #define S_BCM1480_L2C_MGMT_WAY 17 |
48 | #define M_BCM1480_L2C_MGMT_WAY _SB_MAKEMASK(3, S_BCM1480_L2C_MGMT_WAY) | 48 | #define M_BCM1480_L2C_MGMT_WAY _SB_MAKEMASK(3, S_BCM1480_L2C_MGMT_WAY) |
49 | #define V_BCM1480_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_WAY) | 49 | #define V_BCM1480_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_WAY) |
50 | #define G_BCM1480_L2C_MGMT_WAY(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_WAY, M_BCM1480_L2C_MGMT_WAY) | 50 | #define G_BCM1480_L2C_MGMT_WAY(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_WAY, M_BCM1480_L2C_MGMT_WAY) |
51 | 51 | ||
52 | #define M_BCM1480_L2C_MGMT_DIRTY _SB_MAKEMASK1(20) | 52 | #define M_BCM1480_L2C_MGMT_DIRTY _SB_MAKEMASK1(20) |
53 | #define M_BCM1480_L2C_MGMT_VALID _SB_MAKEMASK1(21) | 53 | #define M_BCM1480_L2C_MGMT_VALID _SB_MAKEMASK1(21) |
54 | 54 | ||
55 | #define S_BCM1480_L2C_MGMT_ECC_DIAG 22 | 55 | #define S_BCM1480_L2C_MGMT_ECC_DIAG 22 |
56 | #define M_BCM1480_L2C_MGMT_ECC_DIAG _SB_MAKEMASK(2, S_BCM1480_L2C_MGMT_ECC_DIAG) | 56 | #define M_BCM1480_L2C_MGMT_ECC_DIAG _SB_MAKEMASK(2, S_BCM1480_L2C_MGMT_ECC_DIAG) |
57 | #define V_BCM1480_L2C_MGMT_ECC_DIAG(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_ECC_DIAG) | 57 | #define V_BCM1480_L2C_MGMT_ECC_DIAG(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_MGMT_ECC_DIAG) |
58 | #define G_BCM1480_L2C_MGMT_ECC_DIAG(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_ECC_DIAG, M_BCM1480_L2C_MGMT_ECC_DIAG) | 58 | #define G_BCM1480_L2C_MGMT_ECC_DIAG(x) _SB_GETVALUE(x, S_BCM1480_L2C_MGMT_ECC_DIAG, M_BCM1480_L2C_MGMT_ECC_DIAG) |
59 | 59 | ||
60 | #define A_BCM1480_L2C_MGMT_TAG_BASE 0x00D0000000 | 60 | #define A_BCM1480_L2C_MGMT_TAG_BASE 0x00D0000000 |
61 | 61 | ||
62 | #define BCM1480_L2C_ENTRIES_PER_WAY 4096 | 62 | #define BCM1480_L2C_ENTRIES_PER_WAY 4096 |
63 | #define BCM1480_L2C_NUM_WAYS 8 | 63 | #define BCM1480_L2C_NUM_WAYS 8 |
64 | 64 | ||
65 | 65 | ||
66 | /* | 66 | /* |
67 | * Level 2 Cache Tag register (Table 59) | 67 | * Level 2 Cache Tag register (Table 59) |
68 | */ | 68 | */ |
69 | 69 | ||
70 | #define S_BCM1480_L2C_TAG_MBZ 0 | 70 | #define S_BCM1480_L2C_TAG_MBZ 0 |
71 | #define M_BCM1480_L2C_TAG_MBZ _SB_MAKEMASK(5, S_BCM1480_L2C_TAG_MBZ) | 71 | #define M_BCM1480_L2C_TAG_MBZ _SB_MAKEMASK(5, S_BCM1480_L2C_TAG_MBZ) |
72 | 72 | ||
73 | #define S_BCM1480_L2C_TAG_INDEX 5 | 73 | #define S_BCM1480_L2C_TAG_INDEX 5 |
74 | #define M_BCM1480_L2C_TAG_INDEX _SB_MAKEMASK(12, S_BCM1480_L2C_TAG_INDEX) | 74 | #define M_BCM1480_L2C_TAG_INDEX _SB_MAKEMASK(12, S_BCM1480_L2C_TAG_INDEX) |
75 | #define V_BCM1480_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_INDEX) | 75 | #define V_BCM1480_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_INDEX) |
76 | #define G_BCM1480_L2C_TAG_INDEX(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_INDEX, M_BCM1480_L2C_TAG_INDEX) | 76 | #define G_BCM1480_L2C_TAG_INDEX(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_INDEX, M_BCM1480_L2C_TAG_INDEX) |
77 | 77 | ||
78 | /* Note that index bit 16 is also tag bit 40 */ | 78 | /* Note that index bit 16 is also tag bit 40 */ |
79 | #define S_BCM1480_L2C_TAG_TAG 17 | 79 | #define S_BCM1480_L2C_TAG_TAG 17 |
80 | #define M_BCM1480_L2C_TAG_TAG _SB_MAKEMASK(23, S_BCM1480_L2C_TAG_TAG) | 80 | #define M_BCM1480_L2C_TAG_TAG _SB_MAKEMASK(23, S_BCM1480_L2C_TAG_TAG) |
81 | #define V_BCM1480_L2C_TAG_TAG(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_TAG) | 81 | #define V_BCM1480_L2C_TAG_TAG(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_TAG) |
82 | #define G_BCM1480_L2C_TAG_TAG(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_TAG, M_BCM1480_L2C_TAG_TAG) | 82 | #define G_BCM1480_L2C_TAG_TAG(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_TAG, M_BCM1480_L2C_TAG_TAG) |
83 | 83 | ||
84 | #define S_BCM1480_L2C_TAG_ECC 40 | 84 | #define S_BCM1480_L2C_TAG_ECC 40 |
85 | #define M_BCM1480_L2C_TAG_ECC _SB_MAKEMASK(6, S_BCM1480_L2C_TAG_ECC) | 85 | #define M_BCM1480_L2C_TAG_ECC _SB_MAKEMASK(6, S_BCM1480_L2C_TAG_ECC) |
86 | #define V_BCM1480_L2C_TAG_ECC(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_ECC) | 86 | #define V_BCM1480_L2C_TAG_ECC(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_ECC) |
87 | #define G_BCM1480_L2C_TAG_ECC(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_ECC, M_BCM1480_L2C_TAG_ECC) | 87 | #define G_BCM1480_L2C_TAG_ECC(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_ECC, M_BCM1480_L2C_TAG_ECC) |
88 | 88 | ||
89 | #define S_BCM1480_L2C_TAG_WAY 46 | 89 | #define S_BCM1480_L2C_TAG_WAY 46 |
90 | #define M_BCM1480_L2C_TAG_WAY _SB_MAKEMASK(3, S_BCM1480_L2C_TAG_WAY) | 90 | #define M_BCM1480_L2C_TAG_WAY _SB_MAKEMASK(3, S_BCM1480_L2C_TAG_WAY) |
91 | #define V_BCM1480_L2C_TAG_WAY(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_WAY) | 91 | #define V_BCM1480_L2C_TAG_WAY(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_TAG_WAY) |
92 | #define G_BCM1480_L2C_TAG_WAY(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_WAY, M_BCM1480_L2C_TAG_WAY) | 92 | #define G_BCM1480_L2C_TAG_WAY(x) _SB_GETVALUE(x, S_BCM1480_L2C_TAG_WAY, M_BCM1480_L2C_TAG_WAY) |
93 | 93 | ||
94 | #define M_BCM1480_L2C_TAG_DIRTY _SB_MAKEMASK1(49) | 94 | #define M_BCM1480_L2C_TAG_DIRTY _SB_MAKEMASK1(49) |
95 | #define M_BCM1480_L2C_TAG_VALID _SB_MAKEMASK1(50) | 95 | #define M_BCM1480_L2C_TAG_VALID _SB_MAKEMASK1(50) |
96 | 96 | ||
97 | #define S_BCM1480_L2C_DATA_ECC 51 | 97 | #define S_BCM1480_L2C_DATA_ECC 51 |
98 | #define M_BCM1480_L2C_DATA_ECC _SB_MAKEMASK(10, S_BCM1480_L2C_DATA_ECC) | 98 | #define M_BCM1480_L2C_DATA_ECC _SB_MAKEMASK(10, S_BCM1480_L2C_DATA_ECC) |
99 | #define V_BCM1480_L2C_DATA_ECC(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_DATA_ECC) | 99 | #define V_BCM1480_L2C_DATA_ECC(x) _SB_MAKEVALUE(x, S_BCM1480_L2C_DATA_ECC) |
100 | #define G_BCM1480_L2C_DATA_ECC(x) _SB_GETVALUE(x, S_BCM1480_L2C_DATA_ECC, M_BCM1480_L2C_DATA_ECC) | 100 | #define G_BCM1480_L2C_DATA_ECC(x) _SB_GETVALUE(x, S_BCM1480_L2C_DATA_ECC, M_BCM1480_L2C_DATA_ECC) |
101 | 101 | ||
102 | 102 | ||
103 | /* | 103 | /* |
104 | * L2 Misc0 Value Register (Table 60) | 104 | * L2 Misc0 Value Register (Table 60) |
105 | */ | 105 | */ |
106 | 106 | ||
107 | #define S_BCM1480_L2C_MISC0_WAY_REMOTE 0 | 107 | #define S_BCM1480_L2C_MISC0_WAY_REMOTE 0 |
108 | #define M_BCM1480_L2C_MISC0_WAY_REMOTE _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_REMOTE) | 108 | #define M_BCM1480_L2C_MISC0_WAY_REMOTE _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_REMOTE) |
109 | #define G_BCM1480_L2C_MISC0_WAY_REMOTE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_REMOTE, M_BCM1480_L2C_MISC0_WAY_REMOTE) | 109 | #define G_BCM1480_L2C_MISC0_WAY_REMOTE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_REMOTE, M_BCM1480_L2C_MISC0_WAY_REMOTE) |
110 | 110 | ||
111 | #define S_BCM1480_L2C_MISC0_WAY_LOCAL 8 | 111 | #define S_BCM1480_L2C_MISC0_WAY_LOCAL 8 |
112 | #define M_BCM1480_L2C_MISC0_WAY_LOCAL _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_LOCAL) | 112 | #define M_BCM1480_L2C_MISC0_WAY_LOCAL _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_LOCAL) |
113 | #define G_BCM1480_L2C_MISC0_WAY_LOCAL(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_LOCAL, M_BCM1480_L2C_MISC0_WAY_LOCAL) | 113 | #define G_BCM1480_L2C_MISC0_WAY_LOCAL(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_LOCAL, M_BCM1480_L2C_MISC0_WAY_LOCAL) |
114 | 114 | ||
115 | #define S_BCM1480_L2C_MISC0_WAY_ENABLE 16 | 115 | #define S_BCM1480_L2C_MISC0_WAY_ENABLE 16 |
116 | #define M_BCM1480_L2C_MISC0_WAY_ENABLE _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_ENABLE) | 116 | #define M_BCM1480_L2C_MISC0_WAY_ENABLE _SB_MAKEMASK(8, S_BCM1480_L2C_MISC0_WAY_ENABLE) |
117 | #define G_BCM1480_L2C_MISC0_WAY_ENABLE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_ENABLE, M_BCM1480_L2C_MISC0_WAY_ENABLE) | 117 | #define G_BCM1480_L2C_MISC0_WAY_ENABLE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_WAY_ENABLE, M_BCM1480_L2C_MISC0_WAY_ENABLE) |
118 | 118 | ||
119 | #define S_BCM1480_L2C_MISC0_CACHE_DISABLE 24 | 119 | #define S_BCM1480_L2C_MISC0_CACHE_DISABLE 24 |
120 | #define M_BCM1480_L2C_MISC0_CACHE_DISABLE _SB_MAKEMASK(2, S_BCM1480_L2C_MISC0_CACHE_DISABLE) | 120 | #define M_BCM1480_L2C_MISC0_CACHE_DISABLE _SB_MAKEMASK(2, S_BCM1480_L2C_MISC0_CACHE_DISABLE) |
121 | #define G_BCM1480_L2C_MISC0_CACHE_DISABLE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_CACHE_DISABLE, M_BCM1480_L2C_MISC0_CACHE_DISABLE) | 121 | #define G_BCM1480_L2C_MISC0_CACHE_DISABLE(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_CACHE_DISABLE, M_BCM1480_L2C_MISC0_CACHE_DISABLE) |
122 | 122 | ||
123 | #define S_BCM1480_L2C_MISC0_CACHE_QUAD 26 | 123 | #define S_BCM1480_L2C_MISC0_CACHE_QUAD 26 |
124 | #define M_BCM1480_L2C_MISC0_CACHE_QUAD _SB_MAKEMASK(2, S_BCM1480_L2C_MISC0_CACHE_QUAD) | 124 | #define M_BCM1480_L2C_MISC0_CACHE_QUAD _SB_MAKEMASK(2, S_BCM1480_L2C_MISC0_CACHE_QUAD) |
125 | #define G_BCM1480_L2C_MISC0_CACHE_QUAD(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_CACHE_QUAD, M_BCM1480_L2C_MISC0_CACHE_QUAD) | 125 | #define G_BCM1480_L2C_MISC0_CACHE_QUAD(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC0_CACHE_QUAD, M_BCM1480_L2C_MISC0_CACHE_QUAD) |
126 | 126 | ||
127 | #define S_BCM1480_L2C_MISC0_MC_PRIORITY 30 | 127 | #define S_BCM1480_L2C_MISC0_MC_PRIORITY 30 |
128 | #define M_BCM1480_L2C_MISC0_MC_PRIORITY _SB_MAKEMASK1(S_BCM1480_L2C_MISC0_MC_PRIORITY) | 128 | #define M_BCM1480_L2C_MISC0_MC_PRIORITY _SB_MAKEMASK1(S_BCM1480_L2C_MISC0_MC_PRIORITY) |
129 | 129 | ||
130 | #define S_BCM1480_L2C_MISC0_ECC_CLEANUP 31 | 130 | #define S_BCM1480_L2C_MISC0_ECC_CLEANUP 31 |
131 | #define M_BCM1480_L2C_MISC0_ECC_CLEANUP _SB_MAKEMASK1(S_BCM1480_L2C_MISC0_ECC_CLEANUP) | 131 | #define M_BCM1480_L2C_MISC0_ECC_CLEANUP _SB_MAKEMASK1(S_BCM1480_L2C_MISC0_ECC_CLEANUP) |
132 | 132 | ||
133 | 133 | ||
134 | /* | 134 | /* |
135 | * L2 Misc1 Value Register (Table 60) | 135 | * L2 Misc1 Value Register (Table 60) |
136 | */ | 136 | */ |
137 | 137 | ||
138 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_0 0 | 138 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_0 0 |
139 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_0 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_0) | 139 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_0 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_0) |
140 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_0(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_0, M_BCM1480_L2C_MISC1_WAY_AGENT_0) | 140 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_0(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_0, M_BCM1480_L2C_MISC1_WAY_AGENT_0) |
141 | 141 | ||
142 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_1 8 | 142 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_1 8 |
143 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_1 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_1) | 143 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_1 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_1) |
144 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_1(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_1, M_BCM1480_L2C_MISC1_WAY_AGENT_1) | 144 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_1(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_1, M_BCM1480_L2C_MISC1_WAY_AGENT_1) |
145 | 145 | ||
146 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_2 16 | 146 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_2 16 |
147 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_2 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_2) | 147 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_2 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_2) |
148 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_2(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_2, M_BCM1480_L2C_MISC1_WAY_AGENT_2) | 148 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_2(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_2, M_BCM1480_L2C_MISC1_WAY_AGENT_2) |
149 | 149 | ||
150 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_3 24 | 150 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_3 24 |
151 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_3 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_3) | 151 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_3 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_3) |
152 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_3(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_3, M_BCM1480_L2C_MISC1_WAY_AGENT_3) | 152 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_3(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_3, M_BCM1480_L2C_MISC1_WAY_AGENT_3) |
153 | 153 | ||
154 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_4 32 | 154 | #define S_BCM1480_L2C_MISC1_WAY_AGENT_4 32 |
155 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_4 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_4) | 155 | #define M_BCM1480_L2C_MISC1_WAY_AGENT_4 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC1_WAY_AGENT_4) |
156 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_4(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_4, M_BCM1480_L2C_MISC1_WAY_AGENT_4) | 156 | #define G_BCM1480_L2C_MISC1_WAY_AGENT_4(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC1_WAY_AGENT_4, M_BCM1480_L2C_MISC1_WAY_AGENT_4) |
157 | 157 | ||
158 | 158 | ||
@@ -160,16 +160,16 @@ | |||
160 | * L2 Misc2 Value Register (Table 60) | 160 | * L2 Misc2 Value Register (Table 60) |
161 | */ | 161 | */ |
162 | 162 | ||
163 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_8 0 | 163 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_8 0 |
164 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_8 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_8) | 164 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_8 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_8) |
165 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_8(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_8, M_BCM1480_L2C_MISC2_WAY_AGENT_8) | 165 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_8(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_8, M_BCM1480_L2C_MISC2_WAY_AGENT_8) |
166 | 166 | ||
167 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_9 8 | 167 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_9 8 |
168 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_9 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_9) | 168 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_9 _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_9) |
169 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_9(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_9, M_BCM1480_L2C_MISC2_WAY_AGENT_9) | 169 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_9(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_9, M_BCM1480_L2C_MISC2_WAY_AGENT_9) |
170 | 170 | ||
171 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_A 16 | 171 | #define S_BCM1480_L2C_MISC2_WAY_AGENT_A 16 |
172 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_A _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_A) | 172 | #define M_BCM1480_L2C_MISC2_WAY_AGENT_A _SB_MAKEMASK(8, S_BCM1480_L2C_MISC2_WAY_AGENT_A) |
173 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_A(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_A, M_BCM1480_L2C_MISC2_WAY_AGENT_A) | 173 | #define G_BCM1480_L2C_MISC2_WAY_AGENT_A(x) _SB_GETVALUE(x, S_BCM1480_L2C_MISC2_WAY_AGENT_A, M_BCM1480_L2C_MISC2_WAY_AGENT_A) |
174 | 174 | ||
175 | 175 | ||
diff --git a/arch/mips/include/asm/sibyte/bcm1480_mc.h b/arch/mips/include/asm/sibyte/bcm1480_mc.h index 4307a758e3bf..86908fdb4032 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_mc.h +++ b/arch/mips/include/asm/sibyte/bcm1480_mc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * BCM1280/BCM1480 Board Support Package | 2 | * BCM1280/BCM1480 Board Support Package |
3 | * | 3 | * |
4 | * Memory Controller constants File: bcm1480_mc.h | 4 | * Memory Controller constants File: bcm1480_mc.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * programming the memory controller. | 7 | * programming the memory controller. |
@@ -39,33 +39,33 @@ | |||
39 | * Memory Channel Configuration Register (Table 81) | 39 | * Memory Channel Configuration Register (Table 81) |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define S_BCM1480_MC_INTLV0 0 | 42 | #define S_BCM1480_MC_INTLV0 0 |
43 | #define M_BCM1480_MC_INTLV0 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV0) | 43 | #define M_BCM1480_MC_INTLV0 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV0) |
44 | #define V_BCM1480_MC_INTLV0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV0) | 44 | #define V_BCM1480_MC_INTLV0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV0) |
45 | #define G_BCM1480_MC_INTLV0(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV0, M_BCM1480_MC_INTLV0) | 45 | #define G_BCM1480_MC_INTLV0(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV0, M_BCM1480_MC_INTLV0) |
46 | #define V_BCM1480_MC_INTLV0_DEFAULT V_BCM1480_MC_INTLV0(0) | 46 | #define V_BCM1480_MC_INTLV0_DEFAULT V_BCM1480_MC_INTLV0(0) |
47 | 47 | ||
48 | #define S_BCM1480_MC_INTLV1 8 | 48 | #define S_BCM1480_MC_INTLV1 8 |
49 | #define M_BCM1480_MC_INTLV1 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV1) | 49 | #define M_BCM1480_MC_INTLV1 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV1) |
50 | #define V_BCM1480_MC_INTLV1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV1) | 50 | #define V_BCM1480_MC_INTLV1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV1) |
51 | #define G_BCM1480_MC_INTLV1(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV1, M_BCM1480_MC_INTLV1) | 51 | #define G_BCM1480_MC_INTLV1(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV1, M_BCM1480_MC_INTLV1) |
52 | #define V_BCM1480_MC_INTLV1_DEFAULT V_BCM1480_MC_INTLV1(0) | 52 | #define V_BCM1480_MC_INTLV1_DEFAULT V_BCM1480_MC_INTLV1(0) |
53 | 53 | ||
54 | #define S_BCM1480_MC_INTLV2 16 | 54 | #define S_BCM1480_MC_INTLV2 16 |
55 | #define M_BCM1480_MC_INTLV2 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV2) | 55 | #define M_BCM1480_MC_INTLV2 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV2) |
56 | #define V_BCM1480_MC_INTLV2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV2) | 56 | #define V_BCM1480_MC_INTLV2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV2) |
57 | #define G_BCM1480_MC_INTLV2(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV2, M_BCM1480_MC_INTLV2) | 57 | #define G_BCM1480_MC_INTLV2(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV2, M_BCM1480_MC_INTLV2) |
58 | #define V_BCM1480_MC_INTLV2_DEFAULT V_BCM1480_MC_INTLV2(0) | 58 | #define V_BCM1480_MC_INTLV2_DEFAULT V_BCM1480_MC_INTLV2(0) |
59 | 59 | ||
60 | #define S_BCM1480_MC_CS_MODE 32 | 60 | #define S_BCM1480_MC_CS_MODE 32 |
61 | #define M_BCM1480_MC_CS_MODE _SB_MAKEMASK(8, S_BCM1480_MC_CS_MODE) | 61 | #define M_BCM1480_MC_CS_MODE _SB_MAKEMASK(8, S_BCM1480_MC_CS_MODE) |
62 | #define V_BCM1480_MC_CS_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS_MODE) | 62 | #define V_BCM1480_MC_CS_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS_MODE) |
63 | #define G_BCM1480_MC_CS_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_CS_MODE, M_BCM1480_MC_CS_MODE) | 63 | #define G_BCM1480_MC_CS_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_CS_MODE, M_BCM1480_MC_CS_MODE) |
64 | #define V_BCM1480_MC_CS_MODE_DEFAULT V_BCM1480_MC_CS_MODE(0) | 64 | #define V_BCM1480_MC_CS_MODE_DEFAULT V_BCM1480_MC_CS_MODE(0) |
65 | 65 | ||
66 | #define V_BCM1480_MC_CONFIG_DEFAULT (V_BCM1480_MC_INTLV0_DEFAULT | \ | 66 | #define V_BCM1480_MC_CONFIG_DEFAULT (V_BCM1480_MC_INTLV0_DEFAULT | \ |
67 | V_BCM1480_MC_INTLV1_DEFAULT | \ | 67 | V_BCM1480_MC_INTLV1_DEFAULT | \ |
68 | V_BCM1480_MC_INTLV2_DEFAULT | \ | 68 | V_BCM1480_MC_INTLV2_DEFAULT | \ |
69 | V_BCM1480_MC_CS_MODE_DEFAULT) | 69 | V_BCM1480_MC_CS_MODE_DEFAULT) |
70 | 70 | ||
71 | #define K_BCM1480_MC_CS01_MODE 0x03 | 71 | #define K_BCM1480_MC_CS01_MODE 0x03 |
@@ -80,254 +80,254 @@ | |||
80 | * Chip Select Start Address Register (Table 82) | 80 | * Chip Select Start Address Register (Table 82) |
81 | */ | 81 | */ |
82 | 82 | ||
83 | #define S_BCM1480_MC_CS0_START 0 | 83 | #define S_BCM1480_MC_CS0_START 0 |
84 | #define M_BCM1480_MC_CS0_START _SB_MAKEMASK(12, S_BCM1480_MC_CS0_START) | 84 | #define M_BCM1480_MC_CS0_START _SB_MAKEMASK(12, S_BCM1480_MC_CS0_START) |
85 | #define V_BCM1480_MC_CS0_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0_START) | 85 | #define V_BCM1480_MC_CS0_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0_START) |
86 | #define G_BCM1480_MC_CS0_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0_START, M_BCM1480_MC_CS0_START) | 86 | #define G_BCM1480_MC_CS0_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0_START, M_BCM1480_MC_CS0_START) |
87 | 87 | ||
88 | #define S_BCM1480_MC_CS1_START 16 | 88 | #define S_BCM1480_MC_CS1_START 16 |
89 | #define M_BCM1480_MC_CS1_START _SB_MAKEMASK(12, S_BCM1480_MC_CS1_START) | 89 | #define M_BCM1480_MC_CS1_START _SB_MAKEMASK(12, S_BCM1480_MC_CS1_START) |
90 | #define V_BCM1480_MC_CS1_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS1_START) | 90 | #define V_BCM1480_MC_CS1_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS1_START) |
91 | #define G_BCM1480_MC_CS1_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS1_START, M_BCM1480_MC_CS1_START) | 91 | #define G_BCM1480_MC_CS1_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS1_START, M_BCM1480_MC_CS1_START) |
92 | 92 | ||
93 | #define S_BCM1480_MC_CS2_START 32 | 93 | #define S_BCM1480_MC_CS2_START 32 |
94 | #define M_BCM1480_MC_CS2_START _SB_MAKEMASK(12, S_BCM1480_MC_CS2_START) | 94 | #define M_BCM1480_MC_CS2_START _SB_MAKEMASK(12, S_BCM1480_MC_CS2_START) |
95 | #define V_BCM1480_MC_CS2_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS2_START) | 95 | #define V_BCM1480_MC_CS2_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS2_START) |
96 | #define G_BCM1480_MC_CS2_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS2_START, M_BCM1480_MC_CS2_START) | 96 | #define G_BCM1480_MC_CS2_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS2_START, M_BCM1480_MC_CS2_START) |
97 | 97 | ||
98 | #define S_BCM1480_MC_CS3_START 48 | 98 | #define S_BCM1480_MC_CS3_START 48 |
99 | #define M_BCM1480_MC_CS3_START _SB_MAKEMASK(12, S_BCM1480_MC_CS3_START) | 99 | #define M_BCM1480_MC_CS3_START _SB_MAKEMASK(12, S_BCM1480_MC_CS3_START) |
100 | #define V_BCM1480_MC_CS3_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS3_START) | 100 | #define V_BCM1480_MC_CS3_START(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS3_START) |
101 | #define G_BCM1480_MC_CS3_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS3_START, M_BCM1480_MC_CS3_START) | 101 | #define G_BCM1480_MC_CS3_START(x) _SB_GETVALUE(x, S_BCM1480_MC_CS3_START, M_BCM1480_MC_CS3_START) |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * Chip Select End Address Register (Table 83) | 104 | * Chip Select End Address Register (Table 83) |
105 | */ | 105 | */ |
106 | 106 | ||
107 | #define S_BCM1480_MC_CS0_END 0 | 107 | #define S_BCM1480_MC_CS0_END 0 |
108 | #define M_BCM1480_MC_CS0_END _SB_MAKEMASK(12, S_BCM1480_MC_CS0_END) | 108 | #define M_BCM1480_MC_CS0_END _SB_MAKEMASK(12, S_BCM1480_MC_CS0_END) |
109 | #define V_BCM1480_MC_CS0_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0_END) | 109 | #define V_BCM1480_MC_CS0_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0_END) |
110 | #define G_BCM1480_MC_CS0_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0_END, M_BCM1480_MC_CS0_END) | 110 | #define G_BCM1480_MC_CS0_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0_END, M_BCM1480_MC_CS0_END) |
111 | 111 | ||
112 | #define S_BCM1480_MC_CS1_END 16 | 112 | #define S_BCM1480_MC_CS1_END 16 |
113 | #define M_BCM1480_MC_CS1_END _SB_MAKEMASK(12, S_BCM1480_MC_CS1_END) | 113 | #define M_BCM1480_MC_CS1_END _SB_MAKEMASK(12, S_BCM1480_MC_CS1_END) |
114 | #define V_BCM1480_MC_CS1_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS1_END) | 114 | #define V_BCM1480_MC_CS1_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS1_END) |
115 | #define G_BCM1480_MC_CS1_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS1_END, M_BCM1480_MC_CS1_END) | 115 | #define G_BCM1480_MC_CS1_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS1_END, M_BCM1480_MC_CS1_END) |
116 | 116 | ||
117 | #define S_BCM1480_MC_CS2_END 32 | 117 | #define S_BCM1480_MC_CS2_END 32 |
118 | #define M_BCM1480_MC_CS2_END _SB_MAKEMASK(12, S_BCM1480_MC_CS2_END) | 118 | #define M_BCM1480_MC_CS2_END _SB_MAKEMASK(12, S_BCM1480_MC_CS2_END) |
119 | #define V_BCM1480_MC_CS2_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS2_END) | 119 | #define V_BCM1480_MC_CS2_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS2_END) |
120 | #define G_BCM1480_MC_CS2_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS2_END, M_BCM1480_MC_CS2_END) | 120 | #define G_BCM1480_MC_CS2_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS2_END, M_BCM1480_MC_CS2_END) |
121 | 121 | ||
122 | #define S_BCM1480_MC_CS3_END 48 | 122 | #define S_BCM1480_MC_CS3_END 48 |
123 | #define M_BCM1480_MC_CS3_END _SB_MAKEMASK(12, S_BCM1480_MC_CS3_END) | 123 | #define M_BCM1480_MC_CS3_END _SB_MAKEMASK(12, S_BCM1480_MC_CS3_END) |
124 | #define V_BCM1480_MC_CS3_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS3_END) | 124 | #define V_BCM1480_MC_CS3_END(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS3_END) |
125 | #define G_BCM1480_MC_CS3_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS3_END, M_BCM1480_MC_CS3_END) | 125 | #define G_BCM1480_MC_CS3_END(x) _SB_GETVALUE(x, S_BCM1480_MC_CS3_END, M_BCM1480_MC_CS3_END) |
126 | 126 | ||
127 | /* | 127 | /* |
128 | * Row Address Bit Select Register 0 (Table 84) | 128 | * Row Address Bit Select Register 0 (Table 84) |
129 | */ | 129 | */ |
130 | 130 | ||
131 | #define S_BCM1480_MC_ROW00 0 | 131 | #define S_BCM1480_MC_ROW00 0 |
132 | #define M_BCM1480_MC_ROW00 _SB_MAKEMASK(6, S_BCM1480_MC_ROW00) | 132 | #define M_BCM1480_MC_ROW00 _SB_MAKEMASK(6, S_BCM1480_MC_ROW00) |
133 | #define V_BCM1480_MC_ROW00(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW00) | 133 | #define V_BCM1480_MC_ROW00(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW00) |
134 | #define G_BCM1480_MC_ROW00(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW00, M_BCM1480_MC_ROW00) | 134 | #define G_BCM1480_MC_ROW00(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW00, M_BCM1480_MC_ROW00) |
135 | 135 | ||
136 | #define S_BCM1480_MC_ROW01 8 | 136 | #define S_BCM1480_MC_ROW01 8 |
137 | #define M_BCM1480_MC_ROW01 _SB_MAKEMASK(6, S_BCM1480_MC_ROW01) | 137 | #define M_BCM1480_MC_ROW01 _SB_MAKEMASK(6, S_BCM1480_MC_ROW01) |
138 | #define V_BCM1480_MC_ROW01(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW01) | 138 | #define V_BCM1480_MC_ROW01(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW01) |
139 | #define G_BCM1480_MC_ROW01(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW01, M_BCM1480_MC_ROW01) | 139 | #define G_BCM1480_MC_ROW01(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW01, M_BCM1480_MC_ROW01) |
140 | 140 | ||
141 | #define S_BCM1480_MC_ROW02 16 | 141 | #define S_BCM1480_MC_ROW02 16 |
142 | #define M_BCM1480_MC_ROW02 _SB_MAKEMASK(6, S_BCM1480_MC_ROW02) | 142 | #define M_BCM1480_MC_ROW02 _SB_MAKEMASK(6, S_BCM1480_MC_ROW02) |
143 | #define V_BCM1480_MC_ROW02(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW02) | 143 | #define V_BCM1480_MC_ROW02(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW02) |
144 | #define G_BCM1480_MC_ROW02(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW02, M_BCM1480_MC_ROW02) | 144 | #define G_BCM1480_MC_ROW02(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW02, M_BCM1480_MC_ROW02) |
145 | 145 | ||
146 | #define S_BCM1480_MC_ROW03 24 | 146 | #define S_BCM1480_MC_ROW03 24 |
147 | #define M_BCM1480_MC_ROW03 _SB_MAKEMASK(6, S_BCM1480_MC_ROW03) | 147 | #define M_BCM1480_MC_ROW03 _SB_MAKEMASK(6, S_BCM1480_MC_ROW03) |
148 | #define V_BCM1480_MC_ROW03(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW03) | 148 | #define V_BCM1480_MC_ROW03(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW03) |
149 | #define G_BCM1480_MC_ROW03(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW03, M_BCM1480_MC_ROW03) | 149 | #define G_BCM1480_MC_ROW03(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW03, M_BCM1480_MC_ROW03) |
150 | 150 | ||
151 | #define S_BCM1480_MC_ROW04 32 | 151 | #define S_BCM1480_MC_ROW04 32 |
152 | #define M_BCM1480_MC_ROW04 _SB_MAKEMASK(6, S_BCM1480_MC_ROW04) | 152 | #define M_BCM1480_MC_ROW04 _SB_MAKEMASK(6, S_BCM1480_MC_ROW04) |
153 | #define V_BCM1480_MC_ROW04(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW04) | 153 | #define V_BCM1480_MC_ROW04(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW04) |
154 | #define G_BCM1480_MC_ROW04(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW04, M_BCM1480_MC_ROW04) | 154 | #define G_BCM1480_MC_ROW04(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW04, M_BCM1480_MC_ROW04) |
155 | 155 | ||
156 | #define S_BCM1480_MC_ROW05 40 | 156 | #define S_BCM1480_MC_ROW05 40 |
157 | #define M_BCM1480_MC_ROW05 _SB_MAKEMASK(6, S_BCM1480_MC_ROW05) | 157 | #define M_BCM1480_MC_ROW05 _SB_MAKEMASK(6, S_BCM1480_MC_ROW05) |
158 | #define V_BCM1480_MC_ROW05(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW05) | 158 | #define V_BCM1480_MC_ROW05(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW05) |
159 | #define G_BCM1480_MC_ROW05(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW05, M_BCM1480_MC_ROW05) | 159 | #define G_BCM1480_MC_ROW05(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW05, M_BCM1480_MC_ROW05) |
160 | 160 | ||
161 | #define S_BCM1480_MC_ROW06 48 | 161 | #define S_BCM1480_MC_ROW06 48 |
162 | #define M_BCM1480_MC_ROW06 _SB_MAKEMASK(6, S_BCM1480_MC_ROW06) | 162 | #define M_BCM1480_MC_ROW06 _SB_MAKEMASK(6, S_BCM1480_MC_ROW06) |
163 | #define V_BCM1480_MC_ROW06(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW06) | 163 | #define V_BCM1480_MC_ROW06(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW06) |
164 | #define G_BCM1480_MC_ROW06(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW06, M_BCM1480_MC_ROW06) | 164 | #define G_BCM1480_MC_ROW06(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW06, M_BCM1480_MC_ROW06) |
165 | 165 | ||
166 | #define S_BCM1480_MC_ROW07 56 | 166 | #define S_BCM1480_MC_ROW07 56 |
167 | #define M_BCM1480_MC_ROW07 _SB_MAKEMASK(6, S_BCM1480_MC_ROW07) | 167 | #define M_BCM1480_MC_ROW07 _SB_MAKEMASK(6, S_BCM1480_MC_ROW07) |
168 | #define V_BCM1480_MC_ROW07(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW07) | 168 | #define V_BCM1480_MC_ROW07(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW07) |
169 | #define G_BCM1480_MC_ROW07(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW07, M_BCM1480_MC_ROW07) | 169 | #define G_BCM1480_MC_ROW07(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW07, M_BCM1480_MC_ROW07) |
170 | 170 | ||
171 | /* | 171 | /* |
172 | * Row Address Bit Select Register 1 (Table 85) | 172 | * Row Address Bit Select Register 1 (Table 85) |
173 | */ | 173 | */ |
174 | 174 | ||
175 | #define S_BCM1480_MC_ROW08 0 | 175 | #define S_BCM1480_MC_ROW08 0 |
176 | #define M_BCM1480_MC_ROW08 _SB_MAKEMASK(6, S_BCM1480_MC_ROW08) | 176 | #define M_BCM1480_MC_ROW08 _SB_MAKEMASK(6, S_BCM1480_MC_ROW08) |
177 | #define V_BCM1480_MC_ROW08(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW08) | 177 | #define V_BCM1480_MC_ROW08(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW08) |
178 | #define G_BCM1480_MC_ROW08(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW08, M_BCM1480_MC_ROW08) | 178 | #define G_BCM1480_MC_ROW08(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW08, M_BCM1480_MC_ROW08) |
179 | 179 | ||
180 | #define S_BCM1480_MC_ROW09 8 | 180 | #define S_BCM1480_MC_ROW09 8 |
181 | #define M_BCM1480_MC_ROW09 _SB_MAKEMASK(6, S_BCM1480_MC_ROW09) | 181 | #define M_BCM1480_MC_ROW09 _SB_MAKEMASK(6, S_BCM1480_MC_ROW09) |
182 | #define V_BCM1480_MC_ROW09(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW09) | 182 | #define V_BCM1480_MC_ROW09(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW09) |
183 | #define G_BCM1480_MC_ROW09(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW09, M_BCM1480_MC_ROW09) | 183 | #define G_BCM1480_MC_ROW09(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW09, M_BCM1480_MC_ROW09) |
184 | 184 | ||
185 | #define S_BCM1480_MC_ROW10 16 | 185 | #define S_BCM1480_MC_ROW10 16 |
186 | #define M_BCM1480_MC_ROW10 _SB_MAKEMASK(6, S_BCM1480_MC_ROW10) | 186 | #define M_BCM1480_MC_ROW10 _SB_MAKEMASK(6, S_BCM1480_MC_ROW10) |
187 | #define V_BCM1480_MC_ROW10(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW10) | 187 | #define V_BCM1480_MC_ROW10(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW10) |
188 | #define G_BCM1480_MC_ROW10(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW10, M_BCM1480_MC_ROW10) | 188 | #define G_BCM1480_MC_ROW10(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW10, M_BCM1480_MC_ROW10) |
189 | 189 | ||
190 | #define S_BCM1480_MC_ROW11 24 | 190 | #define S_BCM1480_MC_ROW11 24 |
191 | #define M_BCM1480_MC_ROW11 _SB_MAKEMASK(6, S_BCM1480_MC_ROW11) | 191 | #define M_BCM1480_MC_ROW11 _SB_MAKEMASK(6, S_BCM1480_MC_ROW11) |
192 | #define V_BCM1480_MC_ROW11(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW11) | 192 | #define V_BCM1480_MC_ROW11(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW11) |
193 | #define G_BCM1480_MC_ROW11(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW11, M_BCM1480_MC_ROW11) | 193 | #define G_BCM1480_MC_ROW11(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW11, M_BCM1480_MC_ROW11) |
194 | 194 | ||
195 | #define S_BCM1480_MC_ROW12 32 | 195 | #define S_BCM1480_MC_ROW12 32 |
196 | #define M_BCM1480_MC_ROW12 _SB_MAKEMASK(6, S_BCM1480_MC_ROW12) | 196 | #define M_BCM1480_MC_ROW12 _SB_MAKEMASK(6, S_BCM1480_MC_ROW12) |
197 | #define V_BCM1480_MC_ROW12(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW12) | 197 | #define V_BCM1480_MC_ROW12(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW12) |
198 | #define G_BCM1480_MC_ROW12(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW12, M_BCM1480_MC_ROW12) | 198 | #define G_BCM1480_MC_ROW12(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW12, M_BCM1480_MC_ROW12) |
199 | 199 | ||
200 | #define S_BCM1480_MC_ROW13 40 | 200 | #define S_BCM1480_MC_ROW13 40 |
201 | #define M_BCM1480_MC_ROW13 _SB_MAKEMASK(6, S_BCM1480_MC_ROW13) | 201 | #define M_BCM1480_MC_ROW13 _SB_MAKEMASK(6, S_BCM1480_MC_ROW13) |
202 | #define V_BCM1480_MC_ROW13(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW13) | 202 | #define V_BCM1480_MC_ROW13(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW13) |
203 | #define G_BCM1480_MC_ROW13(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW13, M_BCM1480_MC_ROW13) | 203 | #define G_BCM1480_MC_ROW13(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW13, M_BCM1480_MC_ROW13) |
204 | 204 | ||
205 | #define S_BCM1480_MC_ROW14 48 | 205 | #define S_BCM1480_MC_ROW14 48 |
206 | #define M_BCM1480_MC_ROW14 _SB_MAKEMASK(6, S_BCM1480_MC_ROW14) | 206 | #define M_BCM1480_MC_ROW14 _SB_MAKEMASK(6, S_BCM1480_MC_ROW14) |
207 | #define V_BCM1480_MC_ROW14(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW14) | 207 | #define V_BCM1480_MC_ROW14(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ROW14) |
208 | #define G_BCM1480_MC_ROW14(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW14, M_BCM1480_MC_ROW14) | 208 | #define G_BCM1480_MC_ROW14(x) _SB_GETVALUE(x, S_BCM1480_MC_ROW14, M_BCM1480_MC_ROW14) |
209 | 209 | ||
210 | #define K_BCM1480_MC_ROWX_BIT_SPACING 8 | 210 | #define K_BCM1480_MC_ROWX_BIT_SPACING 8 |
211 | 211 | ||
212 | /* | 212 | /* |
213 | * Column Address Bit Select Register 0 (Table 86) | 213 | * Column Address Bit Select Register 0 (Table 86) |
214 | */ | 214 | */ |
215 | 215 | ||
216 | #define S_BCM1480_MC_COL00 0 | 216 | #define S_BCM1480_MC_COL00 0 |
217 | #define M_BCM1480_MC_COL00 _SB_MAKEMASK(6, S_BCM1480_MC_COL00) | 217 | #define M_BCM1480_MC_COL00 _SB_MAKEMASK(6, S_BCM1480_MC_COL00) |
218 | #define V_BCM1480_MC_COL00(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL00) | 218 | #define V_BCM1480_MC_COL00(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL00) |
219 | #define G_BCM1480_MC_COL00(x) _SB_GETVALUE(x, S_BCM1480_MC_COL00, M_BCM1480_MC_COL00) | 219 | #define G_BCM1480_MC_COL00(x) _SB_GETVALUE(x, S_BCM1480_MC_COL00, M_BCM1480_MC_COL00) |
220 | 220 | ||
221 | #define S_BCM1480_MC_COL01 8 | 221 | #define S_BCM1480_MC_COL01 8 |
222 | #define M_BCM1480_MC_COL01 _SB_MAKEMASK(6, S_BCM1480_MC_COL01) | 222 | #define M_BCM1480_MC_COL01 _SB_MAKEMASK(6, S_BCM1480_MC_COL01) |
223 | #define V_BCM1480_MC_COL01(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL01) | 223 | #define V_BCM1480_MC_COL01(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL01) |
224 | #define G_BCM1480_MC_COL01(x) _SB_GETVALUE(x, S_BCM1480_MC_COL01, M_BCM1480_MC_COL01) | 224 | #define G_BCM1480_MC_COL01(x) _SB_GETVALUE(x, S_BCM1480_MC_COL01, M_BCM1480_MC_COL01) |
225 | 225 | ||
226 | #define S_BCM1480_MC_COL02 16 | 226 | #define S_BCM1480_MC_COL02 16 |
227 | #define M_BCM1480_MC_COL02 _SB_MAKEMASK(6, S_BCM1480_MC_COL02) | 227 | #define M_BCM1480_MC_COL02 _SB_MAKEMASK(6, S_BCM1480_MC_COL02) |
228 | #define V_BCM1480_MC_COL02(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL02) | 228 | #define V_BCM1480_MC_COL02(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL02) |
229 | #define G_BCM1480_MC_COL02(x) _SB_GETVALUE(x, S_BCM1480_MC_COL02, M_BCM1480_MC_COL02) | 229 | #define G_BCM1480_MC_COL02(x) _SB_GETVALUE(x, S_BCM1480_MC_COL02, M_BCM1480_MC_COL02) |
230 | 230 | ||
231 | #define S_BCM1480_MC_COL03 24 | 231 | #define S_BCM1480_MC_COL03 24 |
232 | #define M_BCM1480_MC_COL03 _SB_MAKEMASK(6, S_BCM1480_MC_COL03) | 232 | #define M_BCM1480_MC_COL03 _SB_MAKEMASK(6, S_BCM1480_MC_COL03) |
233 | #define V_BCM1480_MC_COL03(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL03) | 233 | #define V_BCM1480_MC_COL03(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL03) |
234 | #define G_BCM1480_MC_COL03(x) _SB_GETVALUE(x, S_BCM1480_MC_COL03, M_BCM1480_MC_COL03) | 234 | #define G_BCM1480_MC_COL03(x) _SB_GETVALUE(x, S_BCM1480_MC_COL03, M_BCM1480_MC_COL03) |
235 | 235 | ||
236 | #define S_BCM1480_MC_COL04 32 | 236 | #define S_BCM1480_MC_COL04 32 |
237 | #define M_BCM1480_MC_COL04 _SB_MAKEMASK(6, S_BCM1480_MC_COL04) | 237 | #define M_BCM1480_MC_COL04 _SB_MAKEMASK(6, S_BCM1480_MC_COL04) |
238 | #define V_BCM1480_MC_COL04(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL04) | 238 | #define V_BCM1480_MC_COL04(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL04) |
239 | #define G_BCM1480_MC_COL04(x) _SB_GETVALUE(x, S_BCM1480_MC_COL04, M_BCM1480_MC_COL04) | 239 | #define G_BCM1480_MC_COL04(x) _SB_GETVALUE(x, S_BCM1480_MC_COL04, M_BCM1480_MC_COL04) |
240 | 240 | ||
241 | #define S_BCM1480_MC_COL05 40 | 241 | #define S_BCM1480_MC_COL05 40 |
242 | #define M_BCM1480_MC_COL05 _SB_MAKEMASK(6, S_BCM1480_MC_COL05) | 242 | #define M_BCM1480_MC_COL05 _SB_MAKEMASK(6, S_BCM1480_MC_COL05) |
243 | #define V_BCM1480_MC_COL05(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL05) | 243 | #define V_BCM1480_MC_COL05(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL05) |
244 | #define G_BCM1480_MC_COL05(x) _SB_GETVALUE(x, S_BCM1480_MC_COL05, M_BCM1480_MC_COL05) | 244 | #define G_BCM1480_MC_COL05(x) _SB_GETVALUE(x, S_BCM1480_MC_COL05, M_BCM1480_MC_COL05) |
245 | 245 | ||
246 | #define S_BCM1480_MC_COL06 48 | 246 | #define S_BCM1480_MC_COL06 48 |
247 | #define M_BCM1480_MC_COL06 _SB_MAKEMASK(6, S_BCM1480_MC_COL06) | 247 | #define M_BCM1480_MC_COL06 _SB_MAKEMASK(6, S_BCM1480_MC_COL06) |
248 | #define V_BCM1480_MC_COL06(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL06) | 248 | #define V_BCM1480_MC_COL06(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL06) |
249 | #define G_BCM1480_MC_COL06(x) _SB_GETVALUE(x, S_BCM1480_MC_COL06, M_BCM1480_MC_COL06) | 249 | #define G_BCM1480_MC_COL06(x) _SB_GETVALUE(x, S_BCM1480_MC_COL06, M_BCM1480_MC_COL06) |
250 | 250 | ||
251 | #define S_BCM1480_MC_COL07 56 | 251 | #define S_BCM1480_MC_COL07 56 |
252 | #define M_BCM1480_MC_COL07 _SB_MAKEMASK(6, S_BCM1480_MC_COL07) | 252 | #define M_BCM1480_MC_COL07 _SB_MAKEMASK(6, S_BCM1480_MC_COL07) |
253 | #define V_BCM1480_MC_COL07(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL07) | 253 | #define V_BCM1480_MC_COL07(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL07) |
254 | #define G_BCM1480_MC_COL07(x) _SB_GETVALUE(x, S_BCM1480_MC_COL07, M_BCM1480_MC_COL07) | 254 | #define G_BCM1480_MC_COL07(x) _SB_GETVALUE(x, S_BCM1480_MC_COL07, M_BCM1480_MC_COL07) |
255 | 255 | ||
256 | /* | 256 | /* |
257 | * Column Address Bit Select Register 1 (Table 87) | 257 | * Column Address Bit Select Register 1 (Table 87) |
258 | */ | 258 | */ |
259 | 259 | ||
260 | #define S_BCM1480_MC_COL08 0 | 260 | #define S_BCM1480_MC_COL08 0 |
261 | #define M_BCM1480_MC_COL08 _SB_MAKEMASK(6, S_BCM1480_MC_COL08) | 261 | #define M_BCM1480_MC_COL08 _SB_MAKEMASK(6, S_BCM1480_MC_COL08) |
262 | #define V_BCM1480_MC_COL08(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL08) | 262 | #define V_BCM1480_MC_COL08(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL08) |
263 | #define G_BCM1480_MC_COL08(x) _SB_GETVALUE(x, S_BCM1480_MC_COL08, M_BCM1480_MC_COL08) | 263 | #define G_BCM1480_MC_COL08(x) _SB_GETVALUE(x, S_BCM1480_MC_COL08, M_BCM1480_MC_COL08) |
264 | 264 | ||
265 | #define S_BCM1480_MC_COL09 8 | 265 | #define S_BCM1480_MC_COL09 8 |
266 | #define M_BCM1480_MC_COL09 _SB_MAKEMASK(6, S_BCM1480_MC_COL09) | 266 | #define M_BCM1480_MC_COL09 _SB_MAKEMASK(6, S_BCM1480_MC_COL09) |
267 | #define V_BCM1480_MC_COL09(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL09) | 267 | #define V_BCM1480_MC_COL09(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL09) |
268 | #define G_BCM1480_MC_COL09(x) _SB_GETVALUE(x, S_BCM1480_MC_COL09, M_BCM1480_MC_COL09) | 268 | #define G_BCM1480_MC_COL09(x) _SB_GETVALUE(x, S_BCM1480_MC_COL09, M_BCM1480_MC_COL09) |
269 | 269 | ||
270 | #define S_BCM1480_MC_COL10 16 /* not a valid position, must be prog as 0 */ | 270 | #define S_BCM1480_MC_COL10 16 /* not a valid position, must be prog as 0 */ |
271 | 271 | ||
272 | #define S_BCM1480_MC_COL11 24 | 272 | #define S_BCM1480_MC_COL11 24 |
273 | #define M_BCM1480_MC_COL11 _SB_MAKEMASK(6, S_BCM1480_MC_COL11) | 273 | #define M_BCM1480_MC_COL11 _SB_MAKEMASK(6, S_BCM1480_MC_COL11) |
274 | #define V_BCM1480_MC_COL11(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL11) | 274 | #define V_BCM1480_MC_COL11(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL11) |
275 | #define G_BCM1480_MC_COL11(x) _SB_GETVALUE(x, S_BCM1480_MC_COL11, M_BCM1480_MC_COL11) | 275 | #define G_BCM1480_MC_COL11(x) _SB_GETVALUE(x, S_BCM1480_MC_COL11, M_BCM1480_MC_COL11) |
276 | 276 | ||
277 | #define S_BCM1480_MC_COL12 32 | 277 | #define S_BCM1480_MC_COL12 32 |
278 | #define M_BCM1480_MC_COL12 _SB_MAKEMASK(6, S_BCM1480_MC_COL12) | 278 | #define M_BCM1480_MC_COL12 _SB_MAKEMASK(6, S_BCM1480_MC_COL12) |
279 | #define V_BCM1480_MC_COL12(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL12) | 279 | #define V_BCM1480_MC_COL12(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL12) |
280 | #define G_BCM1480_MC_COL12(x) _SB_GETVALUE(x, S_BCM1480_MC_COL12, M_BCM1480_MC_COL12) | 280 | #define G_BCM1480_MC_COL12(x) _SB_GETVALUE(x, S_BCM1480_MC_COL12, M_BCM1480_MC_COL12) |
281 | 281 | ||
282 | #define S_BCM1480_MC_COL13 40 | 282 | #define S_BCM1480_MC_COL13 40 |
283 | #define M_BCM1480_MC_COL13 _SB_MAKEMASK(6, S_BCM1480_MC_COL13) | 283 | #define M_BCM1480_MC_COL13 _SB_MAKEMASK(6, S_BCM1480_MC_COL13) |
284 | #define V_BCM1480_MC_COL13(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL13) | 284 | #define V_BCM1480_MC_COL13(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL13) |
285 | #define G_BCM1480_MC_COL13(x) _SB_GETVALUE(x, S_BCM1480_MC_COL13, M_BCM1480_MC_COL13) | 285 | #define G_BCM1480_MC_COL13(x) _SB_GETVALUE(x, S_BCM1480_MC_COL13, M_BCM1480_MC_COL13) |
286 | 286 | ||
287 | #define S_BCM1480_MC_COL14 48 | 287 | #define S_BCM1480_MC_COL14 48 |
288 | #define M_BCM1480_MC_COL14 _SB_MAKEMASK(6, S_BCM1480_MC_COL14) | 288 | #define M_BCM1480_MC_COL14 _SB_MAKEMASK(6, S_BCM1480_MC_COL14) |
289 | #define V_BCM1480_MC_COL14(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL14) | 289 | #define V_BCM1480_MC_COL14(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COL14) |
290 | #define G_BCM1480_MC_COL14(x) _SB_GETVALUE(x, S_BCM1480_MC_COL14, M_BCM1480_MC_COL14) | 290 | #define G_BCM1480_MC_COL14(x) _SB_GETVALUE(x, S_BCM1480_MC_COL14, M_BCM1480_MC_COL14) |
291 | 291 | ||
292 | #define K_BCM1480_MC_COLX_BIT_SPACING 8 | 292 | #define K_BCM1480_MC_COLX_BIT_SPACING 8 |
293 | 293 | ||
294 | /* | 294 | /* |
295 | * CS0 and CS1 Bank Address Bit Select Register (Table 88) | 295 | * CS0 and CS1 Bank Address Bit Select Register (Table 88) |
296 | */ | 296 | */ |
297 | 297 | ||
298 | #define S_BCM1480_MC_CS01_BANK0 0 | 298 | #define S_BCM1480_MC_CS01_BANK0 0 |
299 | #define M_BCM1480_MC_CS01_BANK0 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK0) | 299 | #define M_BCM1480_MC_CS01_BANK0 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK0) |
300 | #define V_BCM1480_MC_CS01_BANK0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK0) | 300 | #define V_BCM1480_MC_CS01_BANK0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK0) |
301 | #define G_BCM1480_MC_CS01_BANK0(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK0, M_BCM1480_MC_CS01_BANK0) | 301 | #define G_BCM1480_MC_CS01_BANK0(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK0, M_BCM1480_MC_CS01_BANK0) |
302 | 302 | ||
303 | #define S_BCM1480_MC_CS01_BANK1 8 | 303 | #define S_BCM1480_MC_CS01_BANK1 8 |
304 | #define M_BCM1480_MC_CS01_BANK1 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK1) | 304 | #define M_BCM1480_MC_CS01_BANK1 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK1) |
305 | #define V_BCM1480_MC_CS01_BANK1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK1) | 305 | #define V_BCM1480_MC_CS01_BANK1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK1) |
306 | #define G_BCM1480_MC_CS01_BANK1(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK1, M_BCM1480_MC_CS01_BANK1) | 306 | #define G_BCM1480_MC_CS01_BANK1(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK1, M_BCM1480_MC_CS01_BANK1) |
307 | 307 | ||
308 | #define S_BCM1480_MC_CS01_BANK2 16 | 308 | #define S_BCM1480_MC_CS01_BANK2 16 |
309 | #define M_BCM1480_MC_CS01_BANK2 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK2) | 309 | #define M_BCM1480_MC_CS01_BANK2 _SB_MAKEMASK(6, S_BCM1480_MC_CS01_BANK2) |
310 | #define V_BCM1480_MC_CS01_BANK2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK2) | 310 | #define V_BCM1480_MC_CS01_BANK2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS01_BANK2) |
311 | #define G_BCM1480_MC_CS01_BANK2(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK2, M_BCM1480_MC_CS01_BANK2) | 311 | #define G_BCM1480_MC_CS01_BANK2(x) _SB_GETVALUE(x, S_BCM1480_MC_CS01_BANK2, M_BCM1480_MC_CS01_BANK2) |
312 | 312 | ||
313 | /* | 313 | /* |
314 | * CS2 and CS3 Bank Address Bit Select Register (Table 89) | 314 | * CS2 and CS3 Bank Address Bit Select Register (Table 89) |
315 | */ | 315 | */ |
316 | 316 | ||
317 | #define S_BCM1480_MC_CS23_BANK0 0 | 317 | #define S_BCM1480_MC_CS23_BANK0 0 |
318 | #define M_BCM1480_MC_CS23_BANK0 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK0) | 318 | #define M_BCM1480_MC_CS23_BANK0 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK0) |
319 | #define V_BCM1480_MC_CS23_BANK0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK0) | 319 | #define V_BCM1480_MC_CS23_BANK0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK0) |
320 | #define G_BCM1480_MC_CS23_BANK0(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK0, M_BCM1480_MC_CS23_BANK0) | 320 | #define G_BCM1480_MC_CS23_BANK0(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK0, M_BCM1480_MC_CS23_BANK0) |
321 | 321 | ||
322 | #define S_BCM1480_MC_CS23_BANK1 8 | 322 | #define S_BCM1480_MC_CS23_BANK1 8 |
323 | #define M_BCM1480_MC_CS23_BANK1 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK1) | 323 | #define M_BCM1480_MC_CS23_BANK1 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK1) |
324 | #define V_BCM1480_MC_CS23_BANK1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK1) | 324 | #define V_BCM1480_MC_CS23_BANK1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK1) |
325 | #define G_BCM1480_MC_CS23_BANK1(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK1, M_BCM1480_MC_CS23_BANK1) | 325 | #define G_BCM1480_MC_CS23_BANK1(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK1, M_BCM1480_MC_CS23_BANK1) |
326 | 326 | ||
327 | #define S_BCM1480_MC_CS23_BANK2 16 | 327 | #define S_BCM1480_MC_CS23_BANK2 16 |
328 | #define M_BCM1480_MC_CS23_BANK2 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK2) | 328 | #define M_BCM1480_MC_CS23_BANK2 _SB_MAKEMASK(6, S_BCM1480_MC_CS23_BANK2) |
329 | #define V_BCM1480_MC_CS23_BANK2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK2) | 329 | #define V_BCM1480_MC_CS23_BANK2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS23_BANK2) |
330 | #define G_BCM1480_MC_CS23_BANK2(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK2, M_BCM1480_MC_CS23_BANK2) | 330 | #define G_BCM1480_MC_CS23_BANK2(x) _SB_GETVALUE(x, S_BCM1480_MC_CS23_BANK2, M_BCM1480_MC_CS23_BANK2) |
331 | 331 | ||
332 | #define K_BCM1480_MC_CSXX_BANKX_BIT_SPACING 8 | 332 | #define K_BCM1480_MC_CSXX_BANKX_BIT_SPACING 8 |
333 | 333 | ||
@@ -335,19 +335,19 @@ | |||
335 | * DRAM Command Register (Table 90) | 335 | * DRAM Command Register (Table 90) |
336 | */ | 336 | */ |
337 | 337 | ||
338 | #define S_BCM1480_MC_COMMAND 0 | 338 | #define S_BCM1480_MC_COMMAND 0 |
339 | #define M_BCM1480_MC_COMMAND _SB_MAKEMASK(4, S_BCM1480_MC_COMMAND) | 339 | #define M_BCM1480_MC_COMMAND _SB_MAKEMASK(4, S_BCM1480_MC_COMMAND) |
340 | #define V_BCM1480_MC_COMMAND(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COMMAND) | 340 | #define V_BCM1480_MC_COMMAND(x) _SB_MAKEVALUE(x, S_BCM1480_MC_COMMAND) |
341 | #define G_BCM1480_MC_COMMAND(x) _SB_GETVALUE(x, S_BCM1480_MC_COMMAND, M_BCM1480_MC_COMMAND) | 341 | #define G_BCM1480_MC_COMMAND(x) _SB_GETVALUE(x, S_BCM1480_MC_COMMAND, M_BCM1480_MC_COMMAND) |
342 | 342 | ||
343 | #define K_BCM1480_MC_COMMAND_EMRS 0 | 343 | #define K_BCM1480_MC_COMMAND_EMRS 0 |
344 | #define K_BCM1480_MC_COMMAND_MRS 1 | 344 | #define K_BCM1480_MC_COMMAND_MRS 1 |
345 | #define K_BCM1480_MC_COMMAND_PRE 2 | 345 | #define K_BCM1480_MC_COMMAND_PRE 2 |
346 | #define K_BCM1480_MC_COMMAND_AR 3 | 346 | #define K_BCM1480_MC_COMMAND_AR 3 |
347 | #define K_BCM1480_MC_COMMAND_SETRFSH 4 | 347 | #define K_BCM1480_MC_COMMAND_SETRFSH 4 |
348 | #define K_BCM1480_MC_COMMAND_CLRRFSH 5 | 348 | #define K_BCM1480_MC_COMMAND_CLRRFSH 5 |
349 | #define K_BCM1480_MC_COMMAND_SETPWRDN 6 | 349 | #define K_BCM1480_MC_COMMAND_SETPWRDN 6 |
350 | #define K_BCM1480_MC_COMMAND_CLRPWRDN 7 | 350 | #define K_BCM1480_MC_COMMAND_CLRPWRDN 7 |
351 | 351 | ||
352 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 352 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
353 | #define K_BCM1480_MC_COMMAND_EMRS2 8 | 353 | #define K_BCM1480_MC_COMMAND_EMRS2 8 |
@@ -356,61 +356,61 @@ | |||
356 | #define K_BCM1480_MC_COMMAND_DISABLE_MCLK 11 | 356 | #define K_BCM1480_MC_COMMAND_DISABLE_MCLK 11 |
357 | #endif | 357 | #endif |
358 | 358 | ||
359 | #define V_BCM1480_MC_COMMAND_EMRS V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS) | 359 | #define V_BCM1480_MC_COMMAND_EMRS V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS) |
360 | #define V_BCM1480_MC_COMMAND_MRS V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_MRS) | 360 | #define V_BCM1480_MC_COMMAND_MRS V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_MRS) |
361 | #define V_BCM1480_MC_COMMAND_PRE V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_PRE) | 361 | #define V_BCM1480_MC_COMMAND_PRE V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_PRE) |
362 | #define V_BCM1480_MC_COMMAND_AR V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_AR) | 362 | #define V_BCM1480_MC_COMMAND_AR V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_AR) |
363 | #define V_BCM1480_MC_COMMAND_SETRFSH V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_SETRFSH) | 363 | #define V_BCM1480_MC_COMMAND_SETRFSH V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_SETRFSH) |
364 | #define V_BCM1480_MC_COMMAND_CLRRFSH V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_CLRRFSH) | 364 | #define V_BCM1480_MC_COMMAND_CLRRFSH V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_CLRRFSH) |
365 | #define V_BCM1480_MC_COMMAND_SETPWRDN V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_SETPWRDN) | 365 | #define V_BCM1480_MC_COMMAND_SETPWRDN V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_SETPWRDN) |
366 | #define V_BCM1480_MC_COMMAND_CLRPWRDN V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_CLRPWRDN) | 366 | #define V_BCM1480_MC_COMMAND_CLRPWRDN V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_CLRPWRDN) |
367 | 367 | ||
368 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 368 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
369 | #define V_BCM1480_MC_COMMAND_EMRS2 V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS2) | 369 | #define V_BCM1480_MC_COMMAND_EMRS2 V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS2) |
370 | #define V_BCM1480_MC_COMMAND_EMRS3 V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS3) | 370 | #define V_BCM1480_MC_COMMAND_EMRS3 V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_EMRS3) |
371 | #define V_BCM1480_MC_COMMAND_ENABLE_MCLK V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_ENABLE_MCLK) | 371 | #define V_BCM1480_MC_COMMAND_ENABLE_MCLK V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_ENABLE_MCLK) |
372 | #define V_BCM1480_MC_COMMAND_DISABLE_MCLK V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_DISABLE_MCLK) | 372 | #define V_BCM1480_MC_COMMAND_DISABLE_MCLK V_BCM1480_MC_COMMAND(K_BCM1480_MC_COMMAND_DISABLE_MCLK) |
373 | #endif | 373 | #endif |
374 | 374 | ||
375 | #define S_BCM1480_MC_CS0 4 | 375 | #define S_BCM1480_MC_CS0 4 |
376 | #define M_BCM1480_MC_CS0 _SB_MAKEMASK1(4) | 376 | #define M_BCM1480_MC_CS0 _SB_MAKEMASK1(4) |
377 | #define M_BCM1480_MC_CS1 _SB_MAKEMASK1(5) | 377 | #define M_BCM1480_MC_CS1 _SB_MAKEMASK1(5) |
378 | #define M_BCM1480_MC_CS2 _SB_MAKEMASK1(6) | 378 | #define M_BCM1480_MC_CS2 _SB_MAKEMASK1(6) |
379 | #define M_BCM1480_MC_CS3 _SB_MAKEMASK1(7) | 379 | #define M_BCM1480_MC_CS3 _SB_MAKEMASK1(7) |
380 | #define M_BCM1480_MC_CS4 _SB_MAKEMASK1(8) | 380 | #define M_BCM1480_MC_CS4 _SB_MAKEMASK1(8) |
381 | #define M_BCM1480_MC_CS5 _SB_MAKEMASK1(9) | 381 | #define M_BCM1480_MC_CS5 _SB_MAKEMASK1(9) |
382 | #define M_BCM1480_MC_CS6 _SB_MAKEMASK1(10) | 382 | #define M_BCM1480_MC_CS6 _SB_MAKEMASK1(10) |
383 | #define M_BCM1480_MC_CS7 _SB_MAKEMASK1(11) | 383 | #define M_BCM1480_MC_CS7 _SB_MAKEMASK1(11) |
384 | 384 | ||
385 | #define M_BCM1480_MC_CS _SB_MAKEMASK(8, S_BCM1480_MC_CS0) | 385 | #define M_BCM1480_MC_CS _SB_MAKEMASK(8, S_BCM1480_MC_CS0) |
386 | #define V_BCM1480_MC_CS(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0) | 386 | #define V_BCM1480_MC_CS(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CS0) |
387 | #define G_BCM1480_MC_CS(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0, M_BCM1480_MC_CS0) | 387 | #define G_BCM1480_MC_CS(x) _SB_GETVALUE(x, S_BCM1480_MC_CS0, M_BCM1480_MC_CS0) |
388 | 388 | ||
389 | #define M_BCM1480_MC_CMD_ACTIVE _SB_MAKEMASK1(16) | 389 | #define M_BCM1480_MC_CMD_ACTIVE _SB_MAKEMASK1(16) |
390 | 390 | ||
391 | /* | 391 | /* |
392 | * DRAM Mode Register (Table 91) | 392 | * DRAM Mode Register (Table 91) |
393 | */ | 393 | */ |
394 | 394 | ||
395 | #define S_BCM1480_MC_EMODE 0 | 395 | #define S_BCM1480_MC_EMODE 0 |
396 | #define M_BCM1480_MC_EMODE _SB_MAKEMASK(15, S_BCM1480_MC_EMODE) | 396 | #define M_BCM1480_MC_EMODE _SB_MAKEMASK(15, S_BCM1480_MC_EMODE) |
397 | #define V_BCM1480_MC_EMODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_EMODE) | 397 | #define V_BCM1480_MC_EMODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_EMODE) |
398 | #define G_BCM1480_MC_EMODE(x) _SB_GETVALUE(x, S_BCM1480_MC_EMODE, M_BCM1480_MC_EMODE) | 398 | #define G_BCM1480_MC_EMODE(x) _SB_GETVALUE(x, S_BCM1480_MC_EMODE, M_BCM1480_MC_EMODE) |
399 | #define V_BCM1480_MC_EMODE_DEFAULT V_BCM1480_MC_EMODE(0) | 399 | #define V_BCM1480_MC_EMODE_DEFAULT V_BCM1480_MC_EMODE(0) |
400 | 400 | ||
401 | #define S_BCM1480_MC_MODE 16 | 401 | #define S_BCM1480_MC_MODE 16 |
402 | #define M_BCM1480_MC_MODE _SB_MAKEMASK(15, S_BCM1480_MC_MODE) | 402 | #define M_BCM1480_MC_MODE _SB_MAKEMASK(15, S_BCM1480_MC_MODE) |
403 | #define V_BCM1480_MC_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_MODE) | 403 | #define V_BCM1480_MC_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_MODE) |
404 | #define G_BCM1480_MC_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_MODE, M_BCM1480_MC_MODE) | 404 | #define G_BCM1480_MC_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_MODE, M_BCM1480_MC_MODE) |
405 | #define V_BCM1480_MC_MODE_DEFAULT V_BCM1480_MC_MODE(0) | 405 | #define V_BCM1480_MC_MODE_DEFAULT V_BCM1480_MC_MODE(0) |
406 | 406 | ||
407 | #define S_BCM1480_MC_DRAM_TYPE 32 | 407 | #define S_BCM1480_MC_DRAM_TYPE 32 |
408 | #define M_BCM1480_MC_DRAM_TYPE _SB_MAKEMASK(4, S_BCM1480_MC_DRAM_TYPE) | 408 | #define M_BCM1480_MC_DRAM_TYPE _SB_MAKEMASK(4, S_BCM1480_MC_DRAM_TYPE) |
409 | #define V_BCM1480_MC_DRAM_TYPE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DRAM_TYPE) | 409 | #define V_BCM1480_MC_DRAM_TYPE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DRAM_TYPE) |
410 | #define G_BCM1480_MC_DRAM_TYPE(x) _SB_GETVALUE(x, S_BCM1480_MC_DRAM_TYPE, M_BCM1480_MC_DRAM_TYPE) | 410 | #define G_BCM1480_MC_DRAM_TYPE(x) _SB_GETVALUE(x, S_BCM1480_MC_DRAM_TYPE, M_BCM1480_MC_DRAM_TYPE) |
411 | 411 | ||
412 | #define K_BCM1480_MC_DRAM_TYPE_JEDEC 0 | 412 | #define K_BCM1480_MC_DRAM_TYPE_JEDEC 0 |
413 | #define K_BCM1480_MC_DRAM_TYPE_FCRAM 1 | 413 | #define K_BCM1480_MC_DRAM_TYPE_FCRAM 1 |
414 | 414 | ||
415 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 415 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
416 | #define K_BCM1480_MC_DRAM_TYPE_DDR2 2 | 416 | #define K_BCM1480_MC_DRAM_TYPE_DDR2 2 |
@@ -418,27 +418,27 @@ | |||
418 | 418 | ||
419 | #define K_BCM1480_MC_DRAM_TYPE_DDR2_PASS1 0 | 419 | #define K_BCM1480_MC_DRAM_TYPE_DDR2_PASS1 0 |
420 | 420 | ||
421 | #define V_BCM1480_MC_DRAM_TYPE_JEDEC V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_JEDEC) | 421 | #define V_BCM1480_MC_DRAM_TYPE_JEDEC V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_JEDEC) |
422 | #define V_BCM1480_MC_DRAM_TYPE_FCRAM V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_FCRAM) | 422 | #define V_BCM1480_MC_DRAM_TYPE_FCRAM V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_FCRAM) |
423 | 423 | ||
424 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 424 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
425 | #define V_BCM1480_MC_DRAM_TYPE_DDR2 V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_DDR2) | 425 | #define V_BCM1480_MC_DRAM_TYPE_DDR2 V_BCM1480_MC_DRAM_TYPE(K_BCM1480_MC_DRAM_TYPE_DDR2) |
426 | #endif | 426 | #endif |
427 | 427 | ||
428 | #define M_BCM1480_MC_GANGED _SB_MAKEMASK1(36) | 428 | #define M_BCM1480_MC_GANGED _SB_MAKEMASK1(36) |
429 | #define M_BCM1480_MC_BY9_INTF _SB_MAKEMASK1(37) | 429 | #define M_BCM1480_MC_BY9_INTF _SB_MAKEMASK1(37) |
430 | #define M_BCM1480_MC_FORCE_ECC64 _SB_MAKEMASK1(38) | 430 | #define M_BCM1480_MC_FORCE_ECC64 _SB_MAKEMASK1(38) |
431 | #define M_BCM1480_MC_ECC_DISABLE _SB_MAKEMASK1(39) | 431 | #define M_BCM1480_MC_ECC_DISABLE _SB_MAKEMASK1(39) |
432 | 432 | ||
433 | #define S_BCM1480_MC_PG_POLICY 40 | 433 | #define S_BCM1480_MC_PG_POLICY 40 |
434 | #define M_BCM1480_MC_PG_POLICY _SB_MAKEMASK(2, S_BCM1480_MC_PG_POLICY) | 434 | #define M_BCM1480_MC_PG_POLICY _SB_MAKEMASK(2, S_BCM1480_MC_PG_POLICY) |
435 | #define V_BCM1480_MC_PG_POLICY(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PG_POLICY) | 435 | #define V_BCM1480_MC_PG_POLICY(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PG_POLICY) |
436 | #define G_BCM1480_MC_PG_POLICY(x) _SB_GETVALUE(x, S_BCM1480_MC_PG_POLICY, M_BCM1480_MC_PG_POLICY) | 436 | #define G_BCM1480_MC_PG_POLICY(x) _SB_GETVALUE(x, S_BCM1480_MC_PG_POLICY, M_BCM1480_MC_PG_POLICY) |
437 | 437 | ||
438 | #define K_BCM1480_MC_PG_POLICY_CLOSED 0 | 438 | #define K_BCM1480_MC_PG_POLICY_CLOSED 0 |
439 | #define K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK 1 | 439 | #define K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK 1 |
440 | 440 | ||
441 | #define V_BCM1480_MC_PG_POLICY_CLOSED V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CLOSED) | 441 | #define V_BCM1480_MC_PG_POLICY_CLOSED V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CLOSED) |
442 | #define V_BCM1480_MC_PG_POLICY_CAS_TIME_CHK V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK) | 442 | #define V_BCM1480_MC_PG_POLICY_CAS_TIME_CHK V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK) |
443 | 443 | ||
444 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 444 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
@@ -447,32 +447,32 @@ | |||
447 | #endif | 447 | #endif |
448 | 448 | ||
449 | #define V_BCM1480_MC_DRAMMODE_DEFAULT V_BCM1480_MC_EMODE_DEFAULT | V_BCM1480_MC_MODE_DEFAULT | V_BCM1480_MC_DRAM_TYPE_JEDEC | \ | 449 | #define V_BCM1480_MC_DRAMMODE_DEFAULT V_BCM1480_MC_EMODE_DEFAULT | V_BCM1480_MC_MODE_DEFAULT | V_BCM1480_MC_DRAM_TYPE_JEDEC | \ |
450 | V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK) | 450 | V_BCM1480_MC_PG_POLICY(K_BCM1480_MC_PG_POLICY_CAS_TIME_CHK) |
451 | 451 | ||
452 | /* | 452 | /* |
453 | * Memory Clock Configuration Register (Table 92) | 453 | * Memory Clock Configuration Register (Table 92) |
454 | */ | 454 | */ |
455 | 455 | ||
456 | #define S_BCM1480_MC_CLK_RATIO 0 | 456 | #define S_BCM1480_MC_CLK_RATIO 0 |
457 | #define M_BCM1480_MC_CLK_RATIO _SB_MAKEMASK(6, S_BCM1480_MC_CLK_RATIO) | 457 | #define M_BCM1480_MC_CLK_RATIO _SB_MAKEMASK(6, S_BCM1480_MC_CLK_RATIO) |
458 | #define V_BCM1480_MC_CLK_RATIO(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CLK_RATIO) | 458 | #define V_BCM1480_MC_CLK_RATIO(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CLK_RATIO) |
459 | #define G_BCM1480_MC_CLK_RATIO(x) _SB_GETVALUE(x, S_BCM1480_MC_CLK_RATIO, M_BCM1480_MC_CLK_RATIO) | 459 | #define G_BCM1480_MC_CLK_RATIO(x) _SB_GETVALUE(x, S_BCM1480_MC_CLK_RATIO, M_BCM1480_MC_CLK_RATIO) |
460 | 460 | ||
461 | #define V_BCM1480_MC_CLK_RATIO_DEFAULT V_BCM1480_MC_CLK_RATIO(10) | 461 | #define V_BCM1480_MC_CLK_RATIO_DEFAULT V_BCM1480_MC_CLK_RATIO(10) |
462 | 462 | ||
463 | #define S_BCM1480_MC_REF_RATE 8 | 463 | #define S_BCM1480_MC_REF_RATE 8 |
464 | #define M_BCM1480_MC_REF_RATE _SB_MAKEMASK(8, S_BCM1480_MC_REF_RATE) | 464 | #define M_BCM1480_MC_REF_RATE _SB_MAKEMASK(8, S_BCM1480_MC_REF_RATE) |
465 | #define V_BCM1480_MC_REF_RATE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_REF_RATE) | 465 | #define V_BCM1480_MC_REF_RATE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_REF_RATE) |
466 | #define G_BCM1480_MC_REF_RATE(x) _SB_GETVALUE(x, S_BCM1480_MC_REF_RATE, M_BCM1480_MC_REF_RATE) | 466 | #define G_BCM1480_MC_REF_RATE(x) _SB_GETVALUE(x, S_BCM1480_MC_REF_RATE, M_BCM1480_MC_REF_RATE) |
467 | 467 | ||
468 | #define K_BCM1480_MC_REF_RATE_100MHz 0x31 | 468 | #define K_BCM1480_MC_REF_RATE_100MHz 0x31 |
469 | #define K_BCM1480_MC_REF_RATE_200MHz 0x62 | 469 | #define K_BCM1480_MC_REF_RATE_200MHz 0x62 |
470 | #define K_BCM1480_MC_REF_RATE_400MHz 0xC4 | 470 | #define K_BCM1480_MC_REF_RATE_400MHz 0xC4 |
471 | 471 | ||
472 | #define V_BCM1480_MC_REF_RATE_100MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_100MHz) | 472 | #define V_BCM1480_MC_REF_RATE_100MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_100MHz) |
473 | #define V_BCM1480_MC_REF_RATE_200MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_200MHz) | 473 | #define V_BCM1480_MC_REF_RATE_200MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_200MHz) |
474 | #define V_BCM1480_MC_REF_RATE_400MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_400MHz) | 474 | #define V_BCM1480_MC_REF_RATE_400MHz V_BCM1480_MC_REF_RATE(K_BCM1480_MC_REF_RATE_400MHz) |
475 | #define V_BCM1480_MC_REF_RATE_DEFAULT V_BCM1480_MC_REF_RATE_400MHz | 475 | #define V_BCM1480_MC_REF_RATE_DEFAULT V_BCM1480_MC_REF_RATE_400MHz |
476 | 476 | ||
477 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 477 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
478 | #define M_BCM1480_MC_AUTO_REF_DIS _SB_MAKEMASK1(16) | 478 | #define M_BCM1480_MC_AUTO_REF_DIS _SB_MAKEMASK1(16) |
@@ -518,19 +518,19 @@ | |||
518 | 518 | ||
519 | #define M_BCM1480_MC_CS_ODD_ODT_EN _SB_MAKEMASK1(32) | 519 | #define M_BCM1480_MC_CS_ODD_ODT_EN _SB_MAKEMASK1(32) |
520 | 520 | ||
521 | #define S_BCM1480_MC_ODT0 0 | 521 | #define S_BCM1480_MC_ODT0 0 |
522 | #define M_BCM1480_MC_ODT0 _SB_MAKEMASK(8, S_BCM1480_MC_ODT0) | 522 | #define M_BCM1480_MC_ODT0 _SB_MAKEMASK(8, S_BCM1480_MC_ODT0) |
523 | #define V_BCM1480_MC_ODT0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT0) | 523 | #define V_BCM1480_MC_ODT0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT0) |
524 | 524 | ||
525 | #define S_BCM1480_MC_ODT2 8 | 525 | #define S_BCM1480_MC_ODT2 8 |
526 | #define M_BCM1480_MC_ODT2 _SB_MAKEMASK(8, S_BCM1480_MC_ODT2) | 526 | #define M_BCM1480_MC_ODT2 _SB_MAKEMASK(8, S_BCM1480_MC_ODT2) |
527 | #define V_BCM1480_MC_ODT2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT2) | 527 | #define V_BCM1480_MC_ODT2(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT2) |
528 | 528 | ||
529 | #define S_BCM1480_MC_ODT4 16 | 529 | #define S_BCM1480_MC_ODT4 16 |
530 | #define M_BCM1480_MC_ODT4 _SB_MAKEMASK(8, S_BCM1480_MC_ODT4) | 530 | #define M_BCM1480_MC_ODT4 _SB_MAKEMASK(8, S_BCM1480_MC_ODT4) |
531 | #define V_BCM1480_MC_ODT4(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT4) | 531 | #define V_BCM1480_MC_ODT4(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT4) |
532 | 532 | ||
533 | #define S_BCM1480_MC_ODT6 24 | 533 | #define S_BCM1480_MC_ODT6 24 |
534 | #define M_BCM1480_MC_ODT6 _SB_MAKEMASK(8, S_BCM1480_MC_ODT6) | 534 | #define M_BCM1480_MC_ODT6 _SB_MAKEMASK(8, S_BCM1480_MC_ODT6) |
535 | #define V_BCM1480_MC_ODT6(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT6) | 535 | #define V_BCM1480_MC_ODT6(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ODT6) |
536 | #endif | 536 | #endif |
@@ -539,139 +539,139 @@ | |||
539 | * Memory DLL Configuration Register (Table 93) | 539 | * Memory DLL Configuration Register (Table 93) |
540 | */ | 540 | */ |
541 | 541 | ||
542 | #define S_BCM1480_MC_ADDR_COARSE_ADJ 0 | 542 | #define S_BCM1480_MC_ADDR_COARSE_ADJ 0 |
543 | #define M_BCM1480_MC_ADDR_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_ADDR_COARSE_ADJ) | 543 | #define M_BCM1480_MC_ADDR_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_ADDR_COARSE_ADJ) |
544 | #define V_BCM1480_MC_ADDR_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_COARSE_ADJ) | 544 | #define V_BCM1480_MC_ADDR_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_COARSE_ADJ) |
545 | #define G_BCM1480_MC_ADDR_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_COARSE_ADJ, M_BCM1480_MC_ADDR_COARSE_ADJ) | 545 | #define G_BCM1480_MC_ADDR_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_COARSE_ADJ, M_BCM1480_MC_ADDR_COARSE_ADJ) |
546 | #define V_BCM1480_MC_ADDR_COARSE_ADJ_DEFAULT V_BCM1480_MC_ADDR_COARSE_ADJ(0x0) | 546 | #define V_BCM1480_MC_ADDR_COARSE_ADJ_DEFAULT V_BCM1480_MC_ADDR_COARSE_ADJ(0x0) |
547 | 547 | ||
548 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 548 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
549 | #define S_BCM1480_MC_ADDR_FREQ_RANGE 8 | 549 | #define S_BCM1480_MC_ADDR_FREQ_RANGE 8 |
550 | #define M_BCM1480_MC_ADDR_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_ADDR_FREQ_RANGE) | 550 | #define M_BCM1480_MC_ADDR_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_ADDR_FREQ_RANGE) |
551 | #define V_BCM1480_MC_ADDR_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_FREQ_RANGE) | 551 | #define V_BCM1480_MC_ADDR_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_FREQ_RANGE) |
552 | #define G_BCM1480_MC_ADDR_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_FREQ_RANGE, M_BCM1480_MC_ADDR_FREQ_RANGE) | 552 | #define G_BCM1480_MC_ADDR_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_FREQ_RANGE, M_BCM1480_MC_ADDR_FREQ_RANGE) |
553 | #define V_BCM1480_MC_ADDR_FREQ_RANGE_DEFAULT V_BCM1480_MC_ADDR_FREQ_RANGE(0x4) | 553 | #define V_BCM1480_MC_ADDR_FREQ_RANGE_DEFAULT V_BCM1480_MC_ADDR_FREQ_RANGE(0x4) |
554 | #endif | 554 | #endif |
555 | 555 | ||
556 | #define S_BCM1480_MC_ADDR_FINE_ADJ 8 | 556 | #define S_BCM1480_MC_ADDR_FINE_ADJ 8 |
557 | #define M_BCM1480_MC_ADDR_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_ADDR_FINE_ADJ) | 557 | #define M_BCM1480_MC_ADDR_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_ADDR_FINE_ADJ) |
558 | #define V_BCM1480_MC_ADDR_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_FINE_ADJ) | 558 | #define V_BCM1480_MC_ADDR_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ADDR_FINE_ADJ) |
559 | #define G_BCM1480_MC_ADDR_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_FINE_ADJ, M_BCM1480_MC_ADDR_FINE_ADJ) | 559 | #define G_BCM1480_MC_ADDR_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_ADDR_FINE_ADJ, M_BCM1480_MC_ADDR_FINE_ADJ) |
560 | #define V_BCM1480_MC_ADDR_FINE_ADJ_DEFAULT V_BCM1480_MC_ADDR_FINE_ADJ(0x8) | 560 | #define V_BCM1480_MC_ADDR_FINE_ADJ_DEFAULT V_BCM1480_MC_ADDR_FINE_ADJ(0x8) |
561 | 561 | ||
562 | #define S_BCM1480_MC_DQI_COARSE_ADJ 16 | 562 | #define S_BCM1480_MC_DQI_COARSE_ADJ 16 |
563 | #define M_BCM1480_MC_DQI_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_DQI_COARSE_ADJ) | 563 | #define M_BCM1480_MC_DQI_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_DQI_COARSE_ADJ) |
564 | #define V_BCM1480_MC_DQI_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_COARSE_ADJ) | 564 | #define V_BCM1480_MC_DQI_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_COARSE_ADJ) |
565 | #define G_BCM1480_MC_DQI_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_COARSE_ADJ, M_BCM1480_MC_DQI_COARSE_ADJ) | 565 | #define G_BCM1480_MC_DQI_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_COARSE_ADJ, M_BCM1480_MC_DQI_COARSE_ADJ) |
566 | #define V_BCM1480_MC_DQI_COARSE_ADJ_DEFAULT V_BCM1480_MC_DQI_COARSE_ADJ(0x0) | 566 | #define V_BCM1480_MC_DQI_COARSE_ADJ_DEFAULT V_BCM1480_MC_DQI_COARSE_ADJ(0x0) |
567 | 567 | ||
568 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 568 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
569 | #define S_BCM1480_MC_DQI_FREQ_RANGE 24 | 569 | #define S_BCM1480_MC_DQI_FREQ_RANGE 24 |
570 | #define M_BCM1480_MC_DQI_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DQI_FREQ_RANGE) | 570 | #define M_BCM1480_MC_DQI_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DQI_FREQ_RANGE) |
571 | #define V_BCM1480_MC_DQI_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_FREQ_RANGE) | 571 | #define V_BCM1480_MC_DQI_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_FREQ_RANGE) |
572 | #define G_BCM1480_MC_DQI_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_FREQ_RANGE, M_BCM1480_MC_DQI_FREQ_RANGE) | 572 | #define G_BCM1480_MC_DQI_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_FREQ_RANGE, M_BCM1480_MC_DQI_FREQ_RANGE) |
573 | #define V_BCM1480_MC_DQI_FREQ_RANGE_DEFAULT V_BCM1480_MC_DQI_FREQ_RANGE(0x4) | 573 | #define V_BCM1480_MC_DQI_FREQ_RANGE_DEFAULT V_BCM1480_MC_DQI_FREQ_RANGE(0x4) |
574 | #endif | 574 | #endif |
575 | 575 | ||
576 | #define S_BCM1480_MC_DQI_FINE_ADJ 24 | 576 | #define S_BCM1480_MC_DQI_FINE_ADJ 24 |
577 | #define M_BCM1480_MC_DQI_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_DQI_FINE_ADJ) | 577 | #define M_BCM1480_MC_DQI_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_DQI_FINE_ADJ) |
578 | #define V_BCM1480_MC_DQI_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_FINE_ADJ) | 578 | #define V_BCM1480_MC_DQI_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQI_FINE_ADJ) |
579 | #define G_BCM1480_MC_DQI_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_FINE_ADJ, M_BCM1480_MC_DQI_FINE_ADJ) | 579 | #define G_BCM1480_MC_DQI_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQI_FINE_ADJ, M_BCM1480_MC_DQI_FINE_ADJ) |
580 | #define V_BCM1480_MC_DQI_FINE_ADJ_DEFAULT V_BCM1480_MC_DQI_FINE_ADJ(0x8) | 580 | #define V_BCM1480_MC_DQI_FINE_ADJ_DEFAULT V_BCM1480_MC_DQI_FINE_ADJ(0x8) |
581 | 581 | ||
582 | #define S_BCM1480_MC_DQO_COARSE_ADJ 32 | 582 | #define S_BCM1480_MC_DQO_COARSE_ADJ 32 |
583 | #define M_BCM1480_MC_DQO_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_DQO_COARSE_ADJ) | 583 | #define M_BCM1480_MC_DQO_COARSE_ADJ _SB_MAKEMASK(6, S_BCM1480_MC_DQO_COARSE_ADJ) |
584 | #define V_BCM1480_MC_DQO_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_COARSE_ADJ) | 584 | #define V_BCM1480_MC_DQO_COARSE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_COARSE_ADJ) |
585 | #define G_BCM1480_MC_DQO_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_COARSE_ADJ, M_BCM1480_MC_DQO_COARSE_ADJ) | 585 | #define G_BCM1480_MC_DQO_COARSE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_COARSE_ADJ, M_BCM1480_MC_DQO_COARSE_ADJ) |
586 | #define V_BCM1480_MC_DQO_COARSE_ADJ_DEFAULT V_BCM1480_MC_DQO_COARSE_ADJ(0x0) | 586 | #define V_BCM1480_MC_DQO_COARSE_ADJ_DEFAULT V_BCM1480_MC_DQO_COARSE_ADJ(0x0) |
587 | 587 | ||
588 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 588 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
589 | #define S_BCM1480_MC_DQO_FREQ_RANGE 40 | 589 | #define S_BCM1480_MC_DQO_FREQ_RANGE 40 |
590 | #define M_BCM1480_MC_DQO_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DQO_FREQ_RANGE) | 590 | #define M_BCM1480_MC_DQO_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DQO_FREQ_RANGE) |
591 | #define V_BCM1480_MC_DQO_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_FREQ_RANGE) | 591 | #define V_BCM1480_MC_DQO_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_FREQ_RANGE) |
592 | #define G_BCM1480_MC_DQO_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_FREQ_RANGE, M_BCM1480_MC_DQO_FREQ_RANGE) | 592 | #define G_BCM1480_MC_DQO_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_FREQ_RANGE, M_BCM1480_MC_DQO_FREQ_RANGE) |
593 | #define V_BCM1480_MC_DQO_FREQ_RANGE_DEFAULT V_BCM1480_MC_DQO_FREQ_RANGE(0x4) | 593 | #define V_BCM1480_MC_DQO_FREQ_RANGE_DEFAULT V_BCM1480_MC_DQO_FREQ_RANGE(0x4) |
594 | #endif | 594 | #endif |
595 | 595 | ||
596 | #define S_BCM1480_MC_DQO_FINE_ADJ 40 | 596 | #define S_BCM1480_MC_DQO_FINE_ADJ 40 |
597 | #define M_BCM1480_MC_DQO_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_DQO_FINE_ADJ) | 597 | #define M_BCM1480_MC_DQO_FINE_ADJ _SB_MAKEMASK(4, S_BCM1480_MC_DQO_FINE_ADJ) |
598 | #define V_BCM1480_MC_DQO_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_FINE_ADJ) | 598 | #define V_BCM1480_MC_DQO_FINE_ADJ(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DQO_FINE_ADJ) |
599 | #define G_BCM1480_MC_DQO_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_FINE_ADJ, M_BCM1480_MC_DQO_FINE_ADJ) | 599 | #define G_BCM1480_MC_DQO_FINE_ADJ(x) _SB_GETVALUE(x, S_BCM1480_MC_DQO_FINE_ADJ, M_BCM1480_MC_DQO_FINE_ADJ) |
600 | #define V_BCM1480_MC_DQO_FINE_ADJ_DEFAULT V_BCM1480_MC_DQO_FINE_ADJ(0x8) | 600 | #define V_BCM1480_MC_DQO_FINE_ADJ_DEFAULT V_BCM1480_MC_DQO_FINE_ADJ(0x8) |
601 | 601 | ||
602 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 602 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
603 | #define S_BCM1480_MC_DLL_PDSEL 44 | 603 | #define S_BCM1480_MC_DLL_PDSEL 44 |
604 | #define M_BCM1480_MC_DLL_PDSEL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_PDSEL) | 604 | #define M_BCM1480_MC_DLL_PDSEL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_PDSEL) |
605 | #define V_BCM1480_MC_DLL_PDSEL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_PDSEL) | 605 | #define V_BCM1480_MC_DLL_PDSEL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_PDSEL) |
606 | #define G_BCM1480_MC_DLL_PDSEL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_PDSEL, M_BCM1480_MC_DLL_PDSEL) | 606 | #define G_BCM1480_MC_DLL_PDSEL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_PDSEL, M_BCM1480_MC_DLL_PDSEL) |
607 | #define V_BCM1480_MC_DLL_DEFAULT_PDSEL V_BCM1480_MC_DLL_PDSEL(0x0) | 607 | #define V_BCM1480_MC_DLL_DEFAULT_PDSEL V_BCM1480_MC_DLL_PDSEL(0x0) |
608 | 608 | ||
609 | #define M_BCM1480_MC_DLL_REGBYPASS _SB_MAKEMASK1(46) | 609 | #define M_BCM1480_MC_DLL_REGBYPASS _SB_MAKEMASK1(46) |
610 | #define M_BCM1480_MC_DQO_SHIFT _SB_MAKEMASK1(47) | 610 | #define M_BCM1480_MC_DQO_SHIFT _SB_MAKEMASK1(47) |
611 | #endif | 611 | #endif |
612 | 612 | ||
613 | #define S_BCM1480_MC_DLL_DEFAULT 48 | 613 | #define S_BCM1480_MC_DLL_DEFAULT 48 |
614 | #define M_BCM1480_MC_DLL_DEFAULT _SB_MAKEMASK(6, S_BCM1480_MC_DLL_DEFAULT) | 614 | #define M_BCM1480_MC_DLL_DEFAULT _SB_MAKEMASK(6, S_BCM1480_MC_DLL_DEFAULT) |
615 | #define V_BCM1480_MC_DLL_DEFAULT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_DEFAULT) | 615 | #define V_BCM1480_MC_DLL_DEFAULT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_DEFAULT) |
616 | #define G_BCM1480_MC_DLL_DEFAULT(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_DEFAULT, M_BCM1480_MC_DLL_DEFAULT) | 616 | #define G_BCM1480_MC_DLL_DEFAULT(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_DEFAULT, M_BCM1480_MC_DLL_DEFAULT) |
617 | #define V_BCM1480_MC_DLL_DEFAULT_DEFAULT V_BCM1480_MC_DLL_DEFAULT(0x10) | 617 | #define V_BCM1480_MC_DLL_DEFAULT_DEFAULT V_BCM1480_MC_DLL_DEFAULT(0x10) |
618 | 618 | ||
619 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 619 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
620 | #define S_BCM1480_MC_DLL_REGCTRL 54 | 620 | #define S_BCM1480_MC_DLL_REGCTRL 54 |
621 | #define M_BCM1480_MC_DLL_REGCTRL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_REGCTRL) | 621 | #define M_BCM1480_MC_DLL_REGCTRL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_REGCTRL) |
622 | #define V_BCM1480_MC_DLL_REGCTRL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_REGCTRL) | 622 | #define V_BCM1480_MC_DLL_REGCTRL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_REGCTRL) |
623 | #define G_BCM1480_MC_DLL_REGCTRL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_REGCTRL, M_BCM1480_MC_DLL_REGCTRL) | 623 | #define G_BCM1480_MC_DLL_REGCTRL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_REGCTRL, M_BCM1480_MC_DLL_REGCTRL) |
624 | #define V_BCM1480_MC_DLL_DEFAULT_REGCTRL V_BCM1480_MC_DLL_REGCTRL(0x0) | 624 | #define V_BCM1480_MC_DLL_DEFAULT_REGCTRL V_BCM1480_MC_DLL_REGCTRL(0x0) |
625 | #endif | 625 | #endif |
626 | 626 | ||
627 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 627 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
628 | #define S_BCM1480_MC_DLL_FREQ_RANGE 56 | 628 | #define S_BCM1480_MC_DLL_FREQ_RANGE 56 |
629 | #define M_BCM1480_MC_DLL_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DLL_FREQ_RANGE) | 629 | #define M_BCM1480_MC_DLL_FREQ_RANGE _SB_MAKEMASK(4, S_BCM1480_MC_DLL_FREQ_RANGE) |
630 | #define V_BCM1480_MC_DLL_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_FREQ_RANGE) | 630 | #define V_BCM1480_MC_DLL_FREQ_RANGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_FREQ_RANGE) |
631 | #define G_BCM1480_MC_DLL_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_FREQ_RANGE, M_BCM1480_MC_DLL_FREQ_RANGE) | 631 | #define G_BCM1480_MC_DLL_FREQ_RANGE(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_FREQ_RANGE, M_BCM1480_MC_DLL_FREQ_RANGE) |
632 | #define V_BCM1480_MC_DLL_FREQ_RANGE_DEFAULT V_BCM1480_MC_DLL_FREQ_RANGE(0x4) | 632 | #define V_BCM1480_MC_DLL_FREQ_RANGE_DEFAULT V_BCM1480_MC_DLL_FREQ_RANGE(0x4) |
633 | #endif | 633 | #endif |
634 | 634 | ||
635 | #define S_BCM1480_MC_DLL_STEP_SIZE 56 | 635 | #define S_BCM1480_MC_DLL_STEP_SIZE 56 |
636 | #define M_BCM1480_MC_DLL_STEP_SIZE _SB_MAKEMASK(4, S_BCM1480_MC_DLL_STEP_SIZE) | 636 | #define M_BCM1480_MC_DLL_STEP_SIZE _SB_MAKEMASK(4, S_BCM1480_MC_DLL_STEP_SIZE) |
637 | #define V_BCM1480_MC_DLL_STEP_SIZE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_STEP_SIZE) | 637 | #define V_BCM1480_MC_DLL_STEP_SIZE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_STEP_SIZE) |
638 | #define G_BCM1480_MC_DLL_STEP_SIZE(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_STEP_SIZE, M_BCM1480_MC_DLL_STEP_SIZE) | 638 | #define G_BCM1480_MC_DLL_STEP_SIZE(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_STEP_SIZE, M_BCM1480_MC_DLL_STEP_SIZE) |
639 | #define V_BCM1480_MC_DLL_STEP_SIZE_DEFAULT V_BCM1480_MC_DLL_STEP_SIZE(0x8) | 639 | #define V_BCM1480_MC_DLL_STEP_SIZE_DEFAULT V_BCM1480_MC_DLL_STEP_SIZE(0x8) |
640 | 640 | ||
641 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 641 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
642 | #define S_BCM1480_MC_DLL_BGCTRL 60 | 642 | #define S_BCM1480_MC_DLL_BGCTRL 60 |
643 | #define M_BCM1480_MC_DLL_BGCTRL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_BGCTRL) | 643 | #define M_BCM1480_MC_DLL_BGCTRL _SB_MAKEMASK(2, S_BCM1480_MC_DLL_BGCTRL) |
644 | #define V_BCM1480_MC_DLL_BGCTRL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_BGCTRL) | 644 | #define V_BCM1480_MC_DLL_BGCTRL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_DLL_BGCTRL) |
645 | #define G_BCM1480_MC_DLL_BGCTRL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_BGCTRL, M_BCM1480_MC_DLL_BGCTRL) | 645 | #define G_BCM1480_MC_DLL_BGCTRL(x) _SB_GETVALUE(x, S_BCM1480_MC_DLL_BGCTRL, M_BCM1480_MC_DLL_BGCTRL) |
646 | #define V_BCM1480_MC_DLL_DEFAULT_BGCTRL V_BCM1480_MC_DLL_BGCTRL(0x0) | 646 | #define V_BCM1480_MC_DLL_DEFAULT_BGCTRL V_BCM1480_MC_DLL_BGCTRL(0x0) |
647 | #endif | 647 | #endif |
648 | 648 | ||
649 | #define M_BCM1480_MC_DLL_BYPASS _SB_MAKEMASK1(63) | 649 | #define M_BCM1480_MC_DLL_BYPASS _SB_MAKEMASK1(63) |
650 | 650 | ||
651 | /* | 651 | /* |
652 | * Memory Drive Configuration Register (Table 94) | 652 | * Memory Drive Configuration Register (Table 94) |
653 | */ | 653 | */ |
654 | 654 | ||
655 | #define S_BCM1480_MC_RTT_BYP_PULLDOWN 0 | 655 | #define S_BCM1480_MC_RTT_BYP_PULLDOWN 0 |
656 | #define M_BCM1480_MC_RTT_BYP_PULLDOWN _SB_MAKEMASK(3, S_BCM1480_MC_RTT_BYP_PULLDOWN) | 656 | #define M_BCM1480_MC_RTT_BYP_PULLDOWN _SB_MAKEMASK(3, S_BCM1480_MC_RTT_BYP_PULLDOWN) |
657 | #define V_BCM1480_MC_RTT_BYP_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_RTT_BYP_PULLDOWN) | 657 | #define V_BCM1480_MC_RTT_BYP_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_RTT_BYP_PULLDOWN) |
658 | #define G_BCM1480_MC_RTT_BYP_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_RTT_BYP_PULLDOWN, M_BCM1480_MC_RTT_BYP_PULLDOWN) | 658 | #define G_BCM1480_MC_RTT_BYP_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_RTT_BYP_PULLDOWN, M_BCM1480_MC_RTT_BYP_PULLDOWN) |
659 | 659 | ||
660 | #define S_BCM1480_MC_RTT_BYP_PULLUP 6 | 660 | #define S_BCM1480_MC_RTT_BYP_PULLUP 6 |
661 | #define M_BCM1480_MC_RTT_BYP_PULLUP _SB_MAKEMASK(3, S_BCM1480_MC_RTT_BYP_PULLUP) | 661 | #define M_BCM1480_MC_RTT_BYP_PULLUP _SB_MAKEMASK(3, S_BCM1480_MC_RTT_BYP_PULLUP) |
662 | #define V_BCM1480_MC_RTT_BYP_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_RTT_BYP_PULLUP) | 662 | #define V_BCM1480_MC_RTT_BYP_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_RTT_BYP_PULLUP) |
663 | #define G_BCM1480_MC_RTT_BYP_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_RTT_BYP_PULLUP, M_BCM1480_MC_RTT_BYP_PULLUP) | 663 | #define G_BCM1480_MC_RTT_BYP_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_RTT_BYP_PULLUP, M_BCM1480_MC_RTT_BYP_PULLUP) |
664 | 664 | ||
665 | #define M_BCM1480_MC_RTT_BYPASS _SB_MAKEMASK1(8) | 665 | #define M_BCM1480_MC_RTT_BYPASS _SB_MAKEMASK1(8) |
666 | #define M_BCM1480_MC_RTT_COMP_MOV_AVG _SB_MAKEMASK1(9) | 666 | #define M_BCM1480_MC_RTT_COMP_MOV_AVG _SB_MAKEMASK1(9) |
667 | 667 | ||
668 | #define S_BCM1480_MC_PVT_BYP_C1_PULLDOWN 10 | 668 | #define S_BCM1480_MC_PVT_BYP_C1_PULLDOWN 10 |
669 | #define M_BCM1480_MC_PVT_BYP_C1_PULLDOWN _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN) | 669 | #define M_BCM1480_MC_PVT_BYP_C1_PULLDOWN _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN) |
670 | #define V_BCM1480_MC_PVT_BYP_C1_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN) | 670 | #define V_BCM1480_MC_PVT_BYP_C1_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN) |
671 | #define G_BCM1480_MC_PVT_BYP_C1_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN, M_BCM1480_MC_PVT_BYP_C1_PULLDOWN) | 671 | #define G_BCM1480_MC_PVT_BYP_C1_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLDOWN, M_BCM1480_MC_PVT_BYP_C1_PULLDOWN) |
672 | 672 | ||
673 | #define S_BCM1480_MC_PVT_BYP_C1_PULLUP 15 | 673 | #define S_BCM1480_MC_PVT_BYP_C1_PULLUP 15 |
674 | #define M_BCM1480_MC_PVT_BYP_C1_PULLUP _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C1_PULLUP) | 674 | #define M_BCM1480_MC_PVT_BYP_C1_PULLUP _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C1_PULLUP) |
675 | #define V_BCM1480_MC_PVT_BYP_C1_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLUP) | 675 | #define V_BCM1480_MC_PVT_BYP_C1_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLUP) |
676 | #define G_BCM1480_MC_PVT_BYP_C1_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLUP, M_BCM1480_MC_PVT_BYP_C1_PULLUP) | 676 | #define G_BCM1480_MC_PVT_BYP_C1_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C1_PULLUP, M_BCM1480_MC_PVT_BYP_C1_PULLUP) |
677 | 677 | ||
@@ -680,153 +680,153 @@ | |||
680 | #define V_BCM1480_MC_PVT_BYP_C2_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLDOWN) | 680 | #define V_BCM1480_MC_PVT_BYP_C2_PULLDOWN(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLDOWN) |
681 | #define G_BCM1480_MC_PVT_BYP_C2_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLDOWN, M_BCM1480_MC_PVT_BYP_C2_PULLDOWN) | 681 | #define G_BCM1480_MC_PVT_BYP_C2_PULLDOWN(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLDOWN, M_BCM1480_MC_PVT_BYP_C2_PULLDOWN) |
682 | 682 | ||
683 | #define S_BCM1480_MC_PVT_BYP_C2_PULLUP 25 | 683 | #define S_BCM1480_MC_PVT_BYP_C2_PULLUP 25 |
684 | #define M_BCM1480_MC_PVT_BYP_C2_PULLUP _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C2_PULLUP) | 684 | #define M_BCM1480_MC_PVT_BYP_C2_PULLUP _SB_MAKEMASK(4, S_BCM1480_MC_PVT_BYP_C2_PULLUP) |
685 | #define V_BCM1480_MC_PVT_BYP_C2_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLUP) | 685 | #define V_BCM1480_MC_PVT_BYP_C2_PULLUP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLUP) |
686 | #define G_BCM1480_MC_PVT_BYP_C2_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLUP, M_BCM1480_MC_PVT_BYP_C2_PULLUP) | 686 | #define G_BCM1480_MC_PVT_BYP_C2_PULLUP(x) _SB_GETVALUE(x, S_BCM1480_MC_PVT_BYP_C2_PULLUP, M_BCM1480_MC_PVT_BYP_C2_PULLUP) |
687 | 687 | ||
688 | #define M_BCM1480_MC_PVT_BYPASS _SB_MAKEMASK1(30) | 688 | #define M_BCM1480_MC_PVT_BYPASS _SB_MAKEMASK1(30) |
689 | #define M_BCM1480_MC_PVT_COMP_MOV_AVG _SB_MAKEMASK1(31) | 689 | #define M_BCM1480_MC_PVT_COMP_MOV_AVG _SB_MAKEMASK1(31) |
690 | 690 | ||
691 | #define M_BCM1480_MC_CLK_CLASS _SB_MAKEMASK1(34) | 691 | #define M_BCM1480_MC_CLK_CLASS _SB_MAKEMASK1(34) |
692 | #define M_BCM1480_MC_DATA_CLASS _SB_MAKEMASK1(35) | 692 | #define M_BCM1480_MC_DATA_CLASS _SB_MAKEMASK1(35) |
693 | #define M_BCM1480_MC_ADDR_CLASS _SB_MAKEMASK1(36) | 693 | #define M_BCM1480_MC_ADDR_CLASS _SB_MAKEMASK1(36) |
694 | 694 | ||
695 | #define M_BCM1480_MC_DQ_ODT_75 _SB_MAKEMASK1(37) | 695 | #define M_BCM1480_MC_DQ_ODT_75 _SB_MAKEMASK1(37) |
696 | #define M_BCM1480_MC_DQ_ODT_150 _SB_MAKEMASK1(38) | 696 | #define M_BCM1480_MC_DQ_ODT_150 _SB_MAKEMASK1(38) |
697 | #define M_BCM1480_MC_DQS_ODT_75 _SB_MAKEMASK1(39) | 697 | #define M_BCM1480_MC_DQS_ODT_75 _SB_MAKEMASK1(39) |
698 | #define M_BCM1480_MC_DQS_ODT_150 _SB_MAKEMASK1(40) | 698 | #define M_BCM1480_MC_DQS_ODT_150 _SB_MAKEMASK1(40) |
699 | #define M_BCM1480_MC_DQS_DIFF _SB_MAKEMASK1(41) | 699 | #define M_BCM1480_MC_DQS_DIFF _SB_MAKEMASK1(41) |
700 | 700 | ||
701 | /* | 701 | /* |
702 | * ECC Test Data Register (Table 95) | 702 | * ECC Test Data Register (Table 95) |
703 | */ | 703 | */ |
704 | 704 | ||
705 | #define S_BCM1480_MC_DATA_INVERT 0 | 705 | #define S_BCM1480_MC_DATA_INVERT 0 |
706 | #define M_DATA_ECC_INVERT _SB_MAKEMASK(64, S_BCM1480_MC_ECC_INVERT) | 706 | #define M_DATA_ECC_INVERT _SB_MAKEMASK(64, S_BCM1480_MC_ECC_INVERT) |
707 | 707 | ||
708 | /* | 708 | /* |
709 | * ECC Test ECC Register (Table 96) | 709 | * ECC Test ECC Register (Table 96) |
710 | */ | 710 | */ |
711 | 711 | ||
712 | #define S_BCM1480_MC_ECC_INVERT 0 | 712 | #define S_BCM1480_MC_ECC_INVERT 0 |
713 | #define M_BCM1480_MC_ECC_INVERT _SB_MAKEMASK(8, S_BCM1480_MC_ECC_INVERT) | 713 | #define M_BCM1480_MC_ECC_INVERT _SB_MAKEMASK(8, S_BCM1480_MC_ECC_INVERT) |
714 | 714 | ||
715 | /* | 715 | /* |
716 | * SDRAM Timing Register (Table 97) | 716 | * SDRAM Timing Register (Table 97) |
717 | */ | 717 | */ |
718 | 718 | ||
719 | #define S_BCM1480_MC_tRCD 0 | 719 | #define S_BCM1480_MC_tRCD 0 |
720 | #define M_BCM1480_MC_tRCD _SB_MAKEMASK(4, S_BCM1480_MC_tRCD) | 720 | #define M_BCM1480_MC_tRCD _SB_MAKEMASK(4, S_BCM1480_MC_tRCD) |
721 | #define V_BCM1480_MC_tRCD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCD) | 721 | #define V_BCM1480_MC_tRCD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCD) |
722 | #define G_BCM1480_MC_tRCD(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCD, M_BCM1480_MC_tRCD) | 722 | #define G_BCM1480_MC_tRCD(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCD, M_BCM1480_MC_tRCD) |
723 | #define K_BCM1480_MC_tRCD_DEFAULT 3 | 723 | #define K_BCM1480_MC_tRCD_DEFAULT 3 |
724 | #define V_BCM1480_MC_tRCD_DEFAULT V_BCM1480_MC_tRCD(K_BCM1480_MC_tRCD_DEFAULT) | 724 | #define V_BCM1480_MC_tRCD_DEFAULT V_BCM1480_MC_tRCD(K_BCM1480_MC_tRCD_DEFAULT) |
725 | 725 | ||
726 | #define S_BCM1480_MC_tCL 4 | 726 | #define S_BCM1480_MC_tCL 4 |
727 | #define M_BCM1480_MC_tCL _SB_MAKEMASK(4, S_BCM1480_MC_tCL) | 727 | #define M_BCM1480_MC_tCL _SB_MAKEMASK(4, S_BCM1480_MC_tCL) |
728 | #define V_BCM1480_MC_tCL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tCL) | 728 | #define V_BCM1480_MC_tCL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tCL) |
729 | #define G_BCM1480_MC_tCL(x) _SB_GETVALUE(x, S_BCM1480_MC_tCL, M_BCM1480_MC_tCL) | 729 | #define G_BCM1480_MC_tCL(x) _SB_GETVALUE(x, S_BCM1480_MC_tCL, M_BCM1480_MC_tCL) |
730 | #define K_BCM1480_MC_tCL_DEFAULT 2 | 730 | #define K_BCM1480_MC_tCL_DEFAULT 2 |
731 | #define V_BCM1480_MC_tCL_DEFAULT V_BCM1480_MC_tCL(K_BCM1480_MC_tCL_DEFAULT) | 731 | #define V_BCM1480_MC_tCL_DEFAULT V_BCM1480_MC_tCL(K_BCM1480_MC_tCL_DEFAULT) |
732 | 732 | ||
733 | #define M_BCM1480_MC_tCrDh _SB_MAKEMASK1(8) | 733 | #define M_BCM1480_MC_tCrDh _SB_MAKEMASK1(8) |
734 | 734 | ||
735 | #define S_BCM1480_MC_tWR 9 | 735 | #define S_BCM1480_MC_tWR 9 |
736 | #define M_BCM1480_MC_tWR _SB_MAKEMASK(3, S_BCM1480_MC_tWR) | 736 | #define M_BCM1480_MC_tWR _SB_MAKEMASK(3, S_BCM1480_MC_tWR) |
737 | #define V_BCM1480_MC_tWR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tWR) | 737 | #define V_BCM1480_MC_tWR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tWR) |
738 | #define G_BCM1480_MC_tWR(x) _SB_GETVALUE(x, S_BCM1480_MC_tWR, M_BCM1480_MC_tWR) | 738 | #define G_BCM1480_MC_tWR(x) _SB_GETVALUE(x, S_BCM1480_MC_tWR, M_BCM1480_MC_tWR) |
739 | #define K_BCM1480_MC_tWR_DEFAULT 2 | 739 | #define K_BCM1480_MC_tWR_DEFAULT 2 |
740 | #define V_BCM1480_MC_tWR_DEFAULT V_BCM1480_MC_tWR(K_BCM1480_MC_tWR_DEFAULT) | 740 | #define V_BCM1480_MC_tWR_DEFAULT V_BCM1480_MC_tWR(K_BCM1480_MC_tWR_DEFAULT) |
741 | 741 | ||
742 | #define S_BCM1480_MC_tCwD 12 | 742 | #define S_BCM1480_MC_tCwD 12 |
743 | #define M_BCM1480_MC_tCwD _SB_MAKEMASK(4, S_BCM1480_MC_tCwD) | 743 | #define M_BCM1480_MC_tCwD _SB_MAKEMASK(4, S_BCM1480_MC_tCwD) |
744 | #define V_BCM1480_MC_tCwD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tCwD) | 744 | #define V_BCM1480_MC_tCwD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tCwD) |
745 | #define G_BCM1480_MC_tCwD(x) _SB_GETVALUE(x, S_BCM1480_MC_tCwD, M_BCM1480_MC_tCwD) | 745 | #define G_BCM1480_MC_tCwD(x) _SB_GETVALUE(x, S_BCM1480_MC_tCwD, M_BCM1480_MC_tCwD) |
746 | #define K_BCM1480_MC_tCwD_DEFAULT 1 | 746 | #define K_BCM1480_MC_tCwD_DEFAULT 1 |
747 | #define V_BCM1480_MC_tCwD_DEFAULT V_BCM1480_MC_tCwD(K_BCM1480_MC_tCwD_DEFAULT) | 747 | #define V_BCM1480_MC_tCwD_DEFAULT V_BCM1480_MC_tCwD(K_BCM1480_MC_tCwD_DEFAULT) |
748 | 748 | ||
749 | #define S_BCM1480_MC_tRP 16 | 749 | #define S_BCM1480_MC_tRP 16 |
750 | #define M_BCM1480_MC_tRP _SB_MAKEMASK(4, S_BCM1480_MC_tRP) | 750 | #define M_BCM1480_MC_tRP _SB_MAKEMASK(4, S_BCM1480_MC_tRP) |
751 | #define V_BCM1480_MC_tRP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRP) | 751 | #define V_BCM1480_MC_tRP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRP) |
752 | #define G_BCM1480_MC_tRP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRP, M_BCM1480_MC_tRP) | 752 | #define G_BCM1480_MC_tRP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRP, M_BCM1480_MC_tRP) |
753 | #define K_BCM1480_MC_tRP_DEFAULT 4 | 753 | #define K_BCM1480_MC_tRP_DEFAULT 4 |
754 | #define V_BCM1480_MC_tRP_DEFAULT V_BCM1480_MC_tRP(K_BCM1480_MC_tRP_DEFAULT) | 754 | #define V_BCM1480_MC_tRP_DEFAULT V_BCM1480_MC_tRP(K_BCM1480_MC_tRP_DEFAULT) |
755 | 755 | ||
756 | #define S_BCM1480_MC_tRRD 20 | 756 | #define S_BCM1480_MC_tRRD 20 |
757 | #define M_BCM1480_MC_tRRD _SB_MAKEMASK(4, S_BCM1480_MC_tRRD) | 757 | #define M_BCM1480_MC_tRRD _SB_MAKEMASK(4, S_BCM1480_MC_tRRD) |
758 | #define V_BCM1480_MC_tRRD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRRD) | 758 | #define V_BCM1480_MC_tRRD(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRRD) |
759 | #define G_BCM1480_MC_tRRD(x) _SB_GETVALUE(x, S_BCM1480_MC_tRRD, M_BCM1480_MC_tRRD) | 759 | #define G_BCM1480_MC_tRRD(x) _SB_GETVALUE(x, S_BCM1480_MC_tRRD, M_BCM1480_MC_tRRD) |
760 | #define K_BCM1480_MC_tRRD_DEFAULT 2 | 760 | #define K_BCM1480_MC_tRRD_DEFAULT 2 |
761 | #define V_BCM1480_MC_tRRD_DEFAULT V_BCM1480_MC_tRRD(K_BCM1480_MC_tRRD_DEFAULT) | 761 | #define V_BCM1480_MC_tRRD_DEFAULT V_BCM1480_MC_tRRD(K_BCM1480_MC_tRRD_DEFAULT) |
762 | 762 | ||
763 | #define S_BCM1480_MC_tRCw 24 | 763 | #define S_BCM1480_MC_tRCw 24 |
764 | #define M_BCM1480_MC_tRCw _SB_MAKEMASK(5, S_BCM1480_MC_tRCw) | 764 | #define M_BCM1480_MC_tRCw _SB_MAKEMASK(5, S_BCM1480_MC_tRCw) |
765 | #define V_BCM1480_MC_tRCw(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCw) | 765 | #define V_BCM1480_MC_tRCw(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCw) |
766 | #define G_BCM1480_MC_tRCw(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCw, M_BCM1480_MC_tRCw) | 766 | #define G_BCM1480_MC_tRCw(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCw, M_BCM1480_MC_tRCw) |
767 | #define K_BCM1480_MC_tRCw_DEFAULT 10 | 767 | #define K_BCM1480_MC_tRCw_DEFAULT 10 |
768 | #define V_BCM1480_MC_tRCw_DEFAULT V_BCM1480_MC_tRCw(K_BCM1480_MC_tRCw_DEFAULT) | 768 | #define V_BCM1480_MC_tRCw_DEFAULT V_BCM1480_MC_tRCw(K_BCM1480_MC_tRCw_DEFAULT) |
769 | 769 | ||
770 | #define S_BCM1480_MC_tRCr 32 | 770 | #define S_BCM1480_MC_tRCr 32 |
771 | #define M_BCM1480_MC_tRCr _SB_MAKEMASK(5, S_BCM1480_MC_tRCr) | 771 | #define M_BCM1480_MC_tRCr _SB_MAKEMASK(5, S_BCM1480_MC_tRCr) |
772 | #define V_BCM1480_MC_tRCr(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCr) | 772 | #define V_BCM1480_MC_tRCr(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRCr) |
773 | #define G_BCM1480_MC_tRCr(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCr, M_BCM1480_MC_tRCr) | 773 | #define G_BCM1480_MC_tRCr(x) _SB_GETVALUE(x, S_BCM1480_MC_tRCr, M_BCM1480_MC_tRCr) |
774 | #define K_BCM1480_MC_tRCr_DEFAULT 9 | 774 | #define K_BCM1480_MC_tRCr_DEFAULT 9 |
775 | #define V_BCM1480_MC_tRCr_DEFAULT V_BCM1480_MC_tRCr(K_BCM1480_MC_tRCr_DEFAULT) | 775 | #define V_BCM1480_MC_tRCr_DEFAULT V_BCM1480_MC_tRCr(K_BCM1480_MC_tRCr_DEFAULT) |
776 | 776 | ||
777 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 777 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
778 | #define S_BCM1480_MC_tFAW 40 | 778 | #define S_BCM1480_MC_tFAW 40 |
779 | #define M_BCM1480_MC_tFAW _SB_MAKEMASK(6, S_BCM1480_MC_tFAW) | 779 | #define M_BCM1480_MC_tFAW _SB_MAKEMASK(6, S_BCM1480_MC_tFAW) |
780 | #define V_BCM1480_MC_tFAW(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tFAW) | 780 | #define V_BCM1480_MC_tFAW(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tFAW) |
781 | #define G_BCM1480_MC_tFAW(x) _SB_GETVALUE(x, S_BCM1480_MC_tFAW, M_BCM1480_MC_tFAW) | 781 | #define G_BCM1480_MC_tFAW(x) _SB_GETVALUE(x, S_BCM1480_MC_tFAW, M_BCM1480_MC_tFAW) |
782 | #define K_BCM1480_MC_tFAW_DEFAULT 0 | 782 | #define K_BCM1480_MC_tFAW_DEFAULT 0 |
783 | #define V_BCM1480_MC_tFAW_DEFAULT V_BCM1480_MC_tFAW(K_BCM1480_MC_tFAW_DEFAULT) | 783 | #define V_BCM1480_MC_tFAW_DEFAULT V_BCM1480_MC_tFAW(K_BCM1480_MC_tFAW_DEFAULT) |
784 | #endif | 784 | #endif |
785 | 785 | ||
786 | #define S_BCM1480_MC_tRFC 48 | 786 | #define S_BCM1480_MC_tRFC 48 |
787 | #define M_BCM1480_MC_tRFC _SB_MAKEMASK(7, S_BCM1480_MC_tRFC) | 787 | #define M_BCM1480_MC_tRFC _SB_MAKEMASK(7, S_BCM1480_MC_tRFC) |
788 | #define V_BCM1480_MC_tRFC(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRFC) | 788 | #define V_BCM1480_MC_tRFC(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRFC) |
789 | #define G_BCM1480_MC_tRFC(x) _SB_GETVALUE(x, S_BCM1480_MC_tRFC, M_BCM1480_MC_tRFC) | 789 | #define G_BCM1480_MC_tRFC(x) _SB_GETVALUE(x, S_BCM1480_MC_tRFC, M_BCM1480_MC_tRFC) |
790 | #define K_BCM1480_MC_tRFC_DEFAULT 12 | 790 | #define K_BCM1480_MC_tRFC_DEFAULT 12 |
791 | #define V_BCM1480_MC_tRFC_DEFAULT V_BCM1480_MC_tRFC(K_BCM1480_MC_tRFC_DEFAULT) | 791 | #define V_BCM1480_MC_tRFC_DEFAULT V_BCM1480_MC_tRFC(K_BCM1480_MC_tRFC_DEFAULT) |
792 | 792 | ||
793 | #define S_BCM1480_MC_tFIFO 56 | 793 | #define S_BCM1480_MC_tFIFO 56 |
794 | #define M_BCM1480_MC_tFIFO _SB_MAKEMASK(2, S_BCM1480_MC_tFIFO) | 794 | #define M_BCM1480_MC_tFIFO _SB_MAKEMASK(2, S_BCM1480_MC_tFIFO) |
795 | #define V_BCM1480_MC_tFIFO(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tFIFO) | 795 | #define V_BCM1480_MC_tFIFO(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tFIFO) |
796 | #define G_BCM1480_MC_tFIFO(x) _SB_GETVALUE(x, S_BCM1480_MC_tFIFO, M_BCM1480_MC_tFIFO) | 796 | #define G_BCM1480_MC_tFIFO(x) _SB_GETVALUE(x, S_BCM1480_MC_tFIFO, M_BCM1480_MC_tFIFO) |
797 | #define K_BCM1480_MC_tFIFO_DEFAULT 0 | 797 | #define K_BCM1480_MC_tFIFO_DEFAULT 0 |
798 | #define V_BCM1480_MC_tFIFO_DEFAULT V_BCM1480_MC_tFIFO(K_BCM1480_MC_tFIFO_DEFAULT) | 798 | #define V_BCM1480_MC_tFIFO_DEFAULT V_BCM1480_MC_tFIFO(K_BCM1480_MC_tFIFO_DEFAULT) |
799 | 799 | ||
800 | #define S_BCM1480_MC_tW2R 58 | 800 | #define S_BCM1480_MC_tW2R 58 |
801 | #define M_BCM1480_MC_tW2R _SB_MAKEMASK(2, S_BCM1480_MC_tW2R) | 801 | #define M_BCM1480_MC_tW2R _SB_MAKEMASK(2, S_BCM1480_MC_tW2R) |
802 | #define V_BCM1480_MC_tW2R(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tW2R) | 802 | #define V_BCM1480_MC_tW2R(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tW2R) |
803 | #define G_BCM1480_MC_tW2R(x) _SB_GETVALUE(x, S_BCM1480_MC_tW2R, M_BCM1480_MC_tW2R) | 803 | #define G_BCM1480_MC_tW2R(x) _SB_GETVALUE(x, S_BCM1480_MC_tW2R, M_BCM1480_MC_tW2R) |
804 | #define K_BCM1480_MC_tW2R_DEFAULT 1 | 804 | #define K_BCM1480_MC_tW2R_DEFAULT 1 |
805 | #define V_BCM1480_MC_tW2R_DEFAULT V_BCM1480_MC_tW2R(K_BCM1480_MC_tW2R_DEFAULT) | 805 | #define V_BCM1480_MC_tW2R_DEFAULT V_BCM1480_MC_tW2R(K_BCM1480_MC_tW2R_DEFAULT) |
806 | 806 | ||
807 | #define S_BCM1480_MC_tR2W 60 | 807 | #define S_BCM1480_MC_tR2W 60 |
808 | #define M_BCM1480_MC_tR2W _SB_MAKEMASK(2, S_BCM1480_MC_tR2W) | 808 | #define M_BCM1480_MC_tR2W _SB_MAKEMASK(2, S_BCM1480_MC_tR2W) |
809 | #define V_BCM1480_MC_tR2W(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tR2W) | 809 | #define V_BCM1480_MC_tR2W(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tR2W) |
810 | #define G_BCM1480_MC_tR2W(x) _SB_GETVALUE(x, S_BCM1480_MC_tR2W, M_BCM1480_MC_tR2W) | 810 | #define G_BCM1480_MC_tR2W(x) _SB_GETVALUE(x, S_BCM1480_MC_tR2W, M_BCM1480_MC_tR2W) |
811 | #define K_BCM1480_MC_tR2W_DEFAULT 0 | 811 | #define K_BCM1480_MC_tR2W_DEFAULT 0 |
812 | #define V_BCM1480_MC_tR2W_DEFAULT V_BCM1480_MC_tR2W(K_BCM1480_MC_tR2W_DEFAULT) | 812 | #define V_BCM1480_MC_tR2W_DEFAULT V_BCM1480_MC_tR2W(K_BCM1480_MC_tR2W_DEFAULT) |
813 | 813 | ||
814 | #define M_BCM1480_MC_tR2R _SB_MAKEMASK1(62) | 814 | #define M_BCM1480_MC_tR2R _SB_MAKEMASK1(62) |
815 | 815 | ||
816 | #define V_BCM1480_MC_TIMING_DEFAULT (M_BCM1480_MC_tR2R | \ | 816 | #define V_BCM1480_MC_TIMING_DEFAULT (M_BCM1480_MC_tR2R | \ |
817 | V_BCM1480_MC_tFIFO_DEFAULT | \ | 817 | V_BCM1480_MC_tFIFO_DEFAULT | \ |
818 | V_BCM1480_MC_tR2W_DEFAULT | \ | 818 | V_BCM1480_MC_tR2W_DEFAULT | \ |
819 | V_BCM1480_MC_tW2R_DEFAULT | \ | 819 | V_BCM1480_MC_tW2R_DEFAULT | \ |
820 | V_BCM1480_MC_tRFC_DEFAULT | \ | 820 | V_BCM1480_MC_tRFC_DEFAULT | \ |
821 | V_BCM1480_MC_tRCr_DEFAULT | \ | 821 | V_BCM1480_MC_tRCr_DEFAULT | \ |
822 | V_BCM1480_MC_tRCw_DEFAULT | \ | 822 | V_BCM1480_MC_tRCw_DEFAULT | \ |
823 | V_BCM1480_MC_tRRD_DEFAULT | \ | 823 | V_BCM1480_MC_tRRD_DEFAULT | \ |
824 | V_BCM1480_MC_tRP_DEFAULT | \ | 824 | V_BCM1480_MC_tRP_DEFAULT | \ |
825 | V_BCM1480_MC_tCwD_DEFAULT | \ | 825 | V_BCM1480_MC_tCwD_DEFAULT | \ |
826 | V_BCM1480_MC_tWR_DEFAULT | \ | 826 | V_BCM1480_MC_tWR_DEFAULT | \ |
827 | M_BCM1480_MC_tCrDh | \ | 827 | M_BCM1480_MC_tCrDh | \ |
828 | V_BCM1480_MC_tCL_DEFAULT | \ | 828 | V_BCM1480_MC_tCL_DEFAULT | \ |
829 | V_BCM1480_MC_tRCD_DEFAULT) | 829 | V_BCM1480_MC_tRCD_DEFAULT) |
830 | 830 | ||
831 | /* | 831 | /* |
832 | * SDRAM Timing Register 2 | 832 | * SDRAM Timing Register 2 |
@@ -834,33 +834,33 @@ | |||
834 | 834 | ||
835 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 835 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
836 | 836 | ||
837 | #define S_BCM1480_MC_tAL 0 | 837 | #define S_BCM1480_MC_tAL 0 |
838 | #define M_BCM1480_MC_tAL _SB_MAKEMASK(4, S_BCM1480_MC_tAL) | 838 | #define M_BCM1480_MC_tAL _SB_MAKEMASK(4, S_BCM1480_MC_tAL) |
839 | #define V_BCM1480_MC_tAL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tAL) | 839 | #define V_BCM1480_MC_tAL(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tAL) |
840 | #define G_BCM1480_MC_tAL(x) _SB_GETVALUE(x, S_BCM1480_MC_tAL, M_BCM1480_MC_tAL) | 840 | #define G_BCM1480_MC_tAL(x) _SB_GETVALUE(x, S_BCM1480_MC_tAL, M_BCM1480_MC_tAL) |
841 | #define K_BCM1480_MC_tAL_DEFAULT 0 | 841 | #define K_BCM1480_MC_tAL_DEFAULT 0 |
842 | #define V_BCM1480_MC_tAL_DEFAULT V_BCM1480_MC_tAL(K_BCM1480_MC_tAL_DEFAULT) | 842 | #define V_BCM1480_MC_tAL_DEFAULT V_BCM1480_MC_tAL(K_BCM1480_MC_tAL_DEFAULT) |
843 | 843 | ||
844 | #define S_BCM1480_MC_tRTP 4 | 844 | #define S_BCM1480_MC_tRTP 4 |
845 | #define M_BCM1480_MC_tRTP _SB_MAKEMASK(3, S_BCM1480_MC_tRTP) | 845 | #define M_BCM1480_MC_tRTP _SB_MAKEMASK(3, S_BCM1480_MC_tRTP) |
846 | #define V_BCM1480_MC_tRTP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRTP) | 846 | #define V_BCM1480_MC_tRTP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRTP) |
847 | #define G_BCM1480_MC_tRTP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRTP, M_BCM1480_MC_tRTP) | 847 | #define G_BCM1480_MC_tRTP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRTP, M_BCM1480_MC_tRTP) |
848 | #define K_BCM1480_MC_tRTP_DEFAULT 2 | 848 | #define K_BCM1480_MC_tRTP_DEFAULT 2 |
849 | #define V_BCM1480_MC_tRTP_DEFAULT V_BCM1480_MC_tRTP(K_BCM1480_MC_tRTP_DEFAULT) | 849 | #define V_BCM1480_MC_tRTP_DEFAULT V_BCM1480_MC_tRTP(K_BCM1480_MC_tRTP_DEFAULT) |
850 | 850 | ||
851 | #define S_BCM1480_MC_tW2W 8 | 851 | #define S_BCM1480_MC_tW2W 8 |
852 | #define M_BCM1480_MC_tW2W _SB_MAKEMASK(2, S_BCM1480_MC_tW2W) | 852 | #define M_BCM1480_MC_tW2W _SB_MAKEMASK(2, S_BCM1480_MC_tW2W) |
853 | #define V_BCM1480_MC_tW2W(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tW2W) | 853 | #define V_BCM1480_MC_tW2W(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tW2W) |
854 | #define G_BCM1480_MC_tW2W(x) _SB_GETVALUE(x, S_BCM1480_MC_tW2W, M_BCM1480_MC_tW2W) | 854 | #define G_BCM1480_MC_tW2W(x) _SB_GETVALUE(x, S_BCM1480_MC_tW2W, M_BCM1480_MC_tW2W) |
855 | #define K_BCM1480_MC_tW2W_DEFAULT 0 | 855 | #define K_BCM1480_MC_tW2W_DEFAULT 0 |
856 | #define V_BCM1480_MC_tW2W_DEFAULT V_BCM1480_MC_tW2W(K_BCM1480_MC_tW2W_DEFAULT) | 856 | #define V_BCM1480_MC_tW2W_DEFAULT V_BCM1480_MC_tW2W(K_BCM1480_MC_tW2W_DEFAULT) |
857 | 857 | ||
858 | #define S_BCM1480_MC_tRAP 12 | 858 | #define S_BCM1480_MC_tRAP 12 |
859 | #define M_BCM1480_MC_tRAP _SB_MAKEMASK(4, S_BCM1480_MC_tRAP) | 859 | #define M_BCM1480_MC_tRAP _SB_MAKEMASK(4, S_BCM1480_MC_tRAP) |
860 | #define V_BCM1480_MC_tRAP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRAP) | 860 | #define V_BCM1480_MC_tRAP(x) _SB_MAKEVALUE(x, S_BCM1480_MC_tRAP) |
861 | #define G_BCM1480_MC_tRAP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRAP, M_BCM1480_MC_tRAP) | 861 | #define G_BCM1480_MC_tRAP(x) _SB_GETVALUE(x, S_BCM1480_MC_tRAP, M_BCM1480_MC_tRAP) |
862 | #define K_BCM1480_MC_tRAP_DEFAULT 0 | 862 | #define K_BCM1480_MC_tRAP_DEFAULT 0 |
863 | #define V_BCM1480_MC_tRAP_DEFAULT V_BCM1480_MC_tRAP(K_BCM1480_MC_tRAP_DEFAULT) | 863 | #define V_BCM1480_MC_tRAP_DEFAULT V_BCM1480_MC_tRAP(K_BCM1480_MC_tRAP_DEFAULT) |
864 | 864 | ||
865 | #endif | 865 | #endif |
866 | 866 | ||
@@ -874,111 +874,111 @@ | |||
874 | * Global Configuration Register (Table 99) | 874 | * Global Configuration Register (Table 99) |
875 | */ | 875 | */ |
876 | 876 | ||
877 | #define S_BCM1480_MC_BLK_SET_MARK 8 | 877 | #define S_BCM1480_MC_BLK_SET_MARK 8 |
878 | #define M_BCM1480_MC_BLK_SET_MARK _SB_MAKEMASK(4, S_BCM1480_MC_BLK_SET_MARK) | 878 | #define M_BCM1480_MC_BLK_SET_MARK _SB_MAKEMASK(4, S_BCM1480_MC_BLK_SET_MARK) |
879 | #define V_BCM1480_MC_BLK_SET_MARK(x) _SB_MAKEVALUE(x, S_BCM1480_MC_BLK_SET_MARK) | 879 | #define V_BCM1480_MC_BLK_SET_MARK(x) _SB_MAKEVALUE(x, S_BCM1480_MC_BLK_SET_MARK) |
880 | #define G_BCM1480_MC_BLK_SET_MARK(x) _SB_GETVALUE(x, S_BCM1480_MC_BLK_SET_MARK, M_BCM1480_MC_BLK_SET_MARK) | 880 | #define G_BCM1480_MC_BLK_SET_MARK(x) _SB_GETVALUE(x, S_BCM1480_MC_BLK_SET_MARK, M_BCM1480_MC_BLK_SET_MARK) |
881 | 881 | ||
882 | #define S_BCM1480_MC_BLK_CLR_MARK 12 | 882 | #define S_BCM1480_MC_BLK_CLR_MARK 12 |
883 | #define M_BCM1480_MC_BLK_CLR_MARK _SB_MAKEMASK(4, S_BCM1480_MC_BLK_CLR_MARK) | 883 | #define M_BCM1480_MC_BLK_CLR_MARK _SB_MAKEMASK(4, S_BCM1480_MC_BLK_CLR_MARK) |
884 | #define V_BCM1480_MC_BLK_CLR_MARK(x) _SB_MAKEVALUE(x, S_BCM1480_MC_BLK_CLR_MARK) | 884 | #define V_BCM1480_MC_BLK_CLR_MARK(x) _SB_MAKEVALUE(x, S_BCM1480_MC_BLK_CLR_MARK) |
885 | #define G_BCM1480_MC_BLK_CLR_MARK(x) _SB_GETVALUE(x, S_BCM1480_MC_BLK_CLR_MARK, M_BCM1480_MC_BLK_CLR_MARK) | 885 | #define G_BCM1480_MC_BLK_CLR_MARK(x) _SB_GETVALUE(x, S_BCM1480_MC_BLK_CLR_MARK, M_BCM1480_MC_BLK_CLR_MARK) |
886 | 886 | ||
887 | #define M_BCM1480_MC_PKT_PRIORITY _SB_MAKEMASK1(16) | 887 | #define M_BCM1480_MC_PKT_PRIORITY _SB_MAKEMASK1(16) |
888 | 888 | ||
889 | #define S_BCM1480_MC_MAX_AGE 20 | 889 | #define S_BCM1480_MC_MAX_AGE 20 |
890 | #define M_BCM1480_MC_MAX_AGE _SB_MAKEMASK(4, S_BCM1480_MC_MAX_AGE) | 890 | #define M_BCM1480_MC_MAX_AGE _SB_MAKEMASK(4, S_BCM1480_MC_MAX_AGE) |
891 | #define V_BCM1480_MC_MAX_AGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_MAX_AGE) | 891 | #define V_BCM1480_MC_MAX_AGE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_MAX_AGE) |
892 | #define G_BCM1480_MC_MAX_AGE(x) _SB_GETVALUE(x, S_BCM1480_MC_MAX_AGE, M_BCM1480_MC_MAX_AGE) | 892 | #define G_BCM1480_MC_MAX_AGE(x) _SB_GETVALUE(x, S_BCM1480_MC_MAX_AGE, M_BCM1480_MC_MAX_AGE) |
893 | 893 | ||
894 | #define M_BCM1480_MC_BERR_DISABLE _SB_MAKEMASK1(29) | 894 | #define M_BCM1480_MC_BERR_DISABLE _SB_MAKEMASK1(29) |
895 | #define M_BCM1480_MC_FORCE_SEQ _SB_MAKEMASK1(30) | 895 | #define M_BCM1480_MC_FORCE_SEQ _SB_MAKEMASK1(30) |
896 | #define M_BCM1480_MC_VGEN _SB_MAKEMASK1(32) | 896 | #define M_BCM1480_MC_VGEN _SB_MAKEMASK1(32) |
897 | 897 | ||
898 | #define S_BCM1480_MC_SLEW 33 | 898 | #define S_BCM1480_MC_SLEW 33 |
899 | #define M_BCM1480_MC_SLEW _SB_MAKEMASK(2, S_BCM1480_MC_SLEW) | 899 | #define M_BCM1480_MC_SLEW _SB_MAKEMASK(2, S_BCM1480_MC_SLEW) |
900 | #define V_BCM1480_MC_SLEW(x) _SB_MAKEVALUE(x, S_BCM1480_MC_SLEW) | 900 | #define V_BCM1480_MC_SLEW(x) _SB_MAKEVALUE(x, S_BCM1480_MC_SLEW) |
901 | #define G_BCM1480_MC_SLEW(x) _SB_GETVALUE(x, S_BCM1480_MC_SLEW, M_BCM1480_MC_SLEW) | 901 | #define G_BCM1480_MC_SLEW(x) _SB_GETVALUE(x, S_BCM1480_MC_SLEW, M_BCM1480_MC_SLEW) |
902 | 902 | ||
903 | #define M_BCM1480_MC_SSTL_VOLTAGE _SB_MAKEMASK1(35) | 903 | #define M_BCM1480_MC_SSTL_VOLTAGE _SB_MAKEMASK1(35) |
904 | 904 | ||
905 | /* | 905 | /* |
906 | * Global Channel Interleave Register (Table 100) | 906 | * Global Channel Interleave Register (Table 100) |
907 | */ | 907 | */ |
908 | 908 | ||
909 | #define S_BCM1480_MC_INTLV0 0 | 909 | #define S_BCM1480_MC_INTLV0 0 |
910 | #define M_BCM1480_MC_INTLV0 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV0) | 910 | #define M_BCM1480_MC_INTLV0 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV0) |
911 | #define V_BCM1480_MC_INTLV0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV0) | 911 | #define V_BCM1480_MC_INTLV0(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV0) |
912 | #define G_BCM1480_MC_INTLV0(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV0, M_BCM1480_MC_INTLV0) | 912 | #define G_BCM1480_MC_INTLV0(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV0, M_BCM1480_MC_INTLV0) |
913 | 913 | ||
914 | #define S_BCM1480_MC_INTLV1 8 | 914 | #define S_BCM1480_MC_INTLV1 8 |
915 | #define M_BCM1480_MC_INTLV1 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV1) | 915 | #define M_BCM1480_MC_INTLV1 _SB_MAKEMASK(6, S_BCM1480_MC_INTLV1) |
916 | #define V_BCM1480_MC_INTLV1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV1) | 916 | #define V_BCM1480_MC_INTLV1(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV1) |
917 | #define G_BCM1480_MC_INTLV1(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV1, M_BCM1480_MC_INTLV1) | 917 | #define G_BCM1480_MC_INTLV1(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV1, M_BCM1480_MC_INTLV1) |
918 | 918 | ||
919 | #define S_BCM1480_MC_INTLV_MODE 16 | 919 | #define S_BCM1480_MC_INTLV_MODE 16 |
920 | #define M_BCM1480_MC_INTLV_MODE _SB_MAKEMASK(3, S_BCM1480_MC_INTLV_MODE) | 920 | #define M_BCM1480_MC_INTLV_MODE _SB_MAKEMASK(3, S_BCM1480_MC_INTLV_MODE) |
921 | #define V_BCM1480_MC_INTLV_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV_MODE) | 921 | #define V_BCM1480_MC_INTLV_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_MC_INTLV_MODE) |
922 | #define G_BCM1480_MC_INTLV_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV_MODE, M_BCM1480_MC_INTLV_MODE) | 922 | #define G_BCM1480_MC_INTLV_MODE(x) _SB_GETVALUE(x, S_BCM1480_MC_INTLV_MODE, M_BCM1480_MC_INTLV_MODE) |
923 | 923 | ||
924 | #define K_BCM1480_MC_INTLV_MODE_NONE 0x0 | 924 | #define K_BCM1480_MC_INTLV_MODE_NONE 0x0 |
925 | #define K_BCM1480_MC_INTLV_MODE_01 0x1 | 925 | #define K_BCM1480_MC_INTLV_MODE_01 0x1 |
926 | #define K_BCM1480_MC_INTLV_MODE_23 0x2 | 926 | #define K_BCM1480_MC_INTLV_MODE_23 0x2 |
927 | #define K_BCM1480_MC_INTLV_MODE_01_23 0x3 | 927 | #define K_BCM1480_MC_INTLV_MODE_01_23 0x3 |
928 | #define K_BCM1480_MC_INTLV_MODE_0123 0x4 | 928 | #define K_BCM1480_MC_INTLV_MODE_0123 0x4 |
929 | 929 | ||
930 | #define V_BCM1480_MC_INTLV_MODE_NONE V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_NONE) | 930 | #define V_BCM1480_MC_INTLV_MODE_NONE V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_NONE) |
931 | #define V_BCM1480_MC_INTLV_MODE_01 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_01) | 931 | #define V_BCM1480_MC_INTLV_MODE_01 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_01) |
932 | #define V_BCM1480_MC_INTLV_MODE_23 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_23) | 932 | #define V_BCM1480_MC_INTLV_MODE_23 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_23) |
933 | #define V_BCM1480_MC_INTLV_MODE_01_23 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_01_23) | 933 | #define V_BCM1480_MC_INTLV_MODE_01_23 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_01_23) |
934 | #define V_BCM1480_MC_INTLV_MODE_0123 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_0123) | 934 | #define V_BCM1480_MC_INTLV_MODE_0123 V_BCM1480_MC_INTLV_MODE(K_BCM1480_MC_INTLV_MODE_0123) |
935 | 935 | ||
936 | /* | 936 | /* |
937 | * ECC Status Register | 937 | * ECC Status Register |
938 | */ | 938 | */ |
939 | 939 | ||
940 | #define S_BCM1480_MC_ECC_ERR_ADDR 0 | 940 | #define S_BCM1480_MC_ECC_ERR_ADDR 0 |
941 | #define M_BCM1480_MC_ECC_ERR_ADDR _SB_MAKEMASK(37, S_BCM1480_MC_ECC_ERR_ADDR) | 941 | #define M_BCM1480_MC_ECC_ERR_ADDR _SB_MAKEMASK(37, S_BCM1480_MC_ECC_ERR_ADDR) |
942 | #define V_BCM1480_MC_ECC_ERR_ADDR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_ERR_ADDR) | 942 | #define V_BCM1480_MC_ECC_ERR_ADDR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_ERR_ADDR) |
943 | #define G_BCM1480_MC_ECC_ERR_ADDR(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_ERR_ADDR, M_BCM1480_MC_ECC_ERR_ADDR) | 943 | #define G_BCM1480_MC_ECC_ERR_ADDR(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_ERR_ADDR, M_BCM1480_MC_ECC_ERR_ADDR) |
944 | 944 | ||
945 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 945 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
946 | #define M_BCM1480_MC_ECC_ERR_RMW _SB_MAKEMASK1(60) | 946 | #define M_BCM1480_MC_ECC_ERR_RMW _SB_MAKEMASK1(60) |
947 | #endif | 947 | #endif |
948 | 948 | ||
949 | #define M_BCM1480_MC_ECC_MULT_ERR_DET _SB_MAKEMASK1(61) | 949 | #define M_BCM1480_MC_ECC_MULT_ERR_DET _SB_MAKEMASK1(61) |
950 | #define M_BCM1480_MC_ECC_UERR_DET _SB_MAKEMASK1(62) | 950 | #define M_BCM1480_MC_ECC_UERR_DET _SB_MAKEMASK1(62) |
951 | #define M_BCM1480_MC_ECC_CERR_DET _SB_MAKEMASK1(63) | 951 | #define M_BCM1480_MC_ECC_CERR_DET _SB_MAKEMASK1(63) |
952 | 952 | ||
953 | /* | 953 | /* |
954 | * Global ECC Address Register (Table 102) | 954 | * Global ECC Address Register (Table 102) |
955 | */ | 955 | */ |
956 | 956 | ||
957 | #define S_BCM1480_MC_ECC_CORR_ADDR 0 | 957 | #define S_BCM1480_MC_ECC_CORR_ADDR 0 |
958 | #define M_BCM1480_MC_ECC_CORR_ADDR _SB_MAKEMASK(37, S_BCM1480_MC_ECC_CORR_ADDR) | 958 | #define M_BCM1480_MC_ECC_CORR_ADDR _SB_MAKEMASK(37, S_BCM1480_MC_ECC_CORR_ADDR) |
959 | #define V_BCM1480_MC_ECC_CORR_ADDR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_CORR_ADDR) | 959 | #define V_BCM1480_MC_ECC_CORR_ADDR(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_CORR_ADDR) |
960 | #define G_BCM1480_MC_ECC_CORR_ADDR(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_CORR_ADDR, M_BCM1480_MC_ECC_CORR_ADDR) | 960 | #define G_BCM1480_MC_ECC_CORR_ADDR(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_CORR_ADDR, M_BCM1480_MC_ECC_CORR_ADDR) |
961 | 961 | ||
962 | /* | 962 | /* |
963 | * Global ECC Correction Register (Table 103) | 963 | * Global ECC Correction Register (Table 103) |
964 | */ | 964 | */ |
965 | 965 | ||
966 | #define S_BCM1480_MC_ECC_CORRECT 0 | 966 | #define S_BCM1480_MC_ECC_CORRECT 0 |
967 | #define M_BCM1480_MC_ECC_CORRECT _SB_MAKEMASK(64, S_BCM1480_MC_ECC_CORRECT) | 967 | #define M_BCM1480_MC_ECC_CORRECT _SB_MAKEMASK(64, S_BCM1480_MC_ECC_CORRECT) |
968 | #define V_BCM1480_MC_ECC_CORRECT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_CORRECT) | 968 | #define V_BCM1480_MC_ECC_CORRECT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_ECC_CORRECT) |
969 | #define G_BCM1480_MC_ECC_CORRECT(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_CORRECT, M_BCM1480_MC_ECC_CORRECT) | 969 | #define G_BCM1480_MC_ECC_CORRECT(x) _SB_GETVALUE(x, S_BCM1480_MC_ECC_CORRECT, M_BCM1480_MC_ECC_CORRECT) |
970 | 970 | ||
971 | /* | 971 | /* |
972 | * Global ECC Performance Counters Control Register (Table 104) | 972 | * Global ECC Performance Counters Control Register (Table 104) |
973 | */ | 973 | */ |
974 | 974 | ||
975 | #define S_BCM1480_MC_CHANNEL_SELECT 0 | 975 | #define S_BCM1480_MC_CHANNEL_SELECT 0 |
976 | #define M_BCM1480_MC_CHANNEL_SELECT _SB_MAKEMASK(4, S_BCM1480_MC_CHANNEL_SELECT) | 976 | #define M_BCM1480_MC_CHANNEL_SELECT _SB_MAKEMASK(4, S_BCM1480_MC_CHANNEL_SELECT) |
977 | #define V_BCM1480_MC_CHANNEL_SELECT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CHANNEL_SELECT) | 977 | #define V_BCM1480_MC_CHANNEL_SELECT(x) _SB_MAKEVALUE(x, S_BCM1480_MC_CHANNEL_SELECT) |
978 | #define G_BCM1480_MC_CHANNEL_SELECT(x) _SB_GETVALUE(x, S_BCM1480_MC_CHANNEL_SELECT, M_BCM1480_MC_CHANNEL_SELECT) | 978 | #define G_BCM1480_MC_CHANNEL_SELECT(x) _SB_GETVALUE(x, S_BCM1480_MC_CHANNEL_SELECT, M_BCM1480_MC_CHANNEL_SELECT) |
979 | #define K_BCM1480_MC_CHANNEL_SELECT_0 0x1 | 979 | #define K_BCM1480_MC_CHANNEL_SELECT_0 0x1 |
980 | #define K_BCM1480_MC_CHANNEL_SELECT_1 0x2 | 980 | #define K_BCM1480_MC_CHANNEL_SELECT_1 0x2 |
981 | #define K_BCM1480_MC_CHANNEL_SELECT_2 0x4 | 981 | #define K_BCM1480_MC_CHANNEL_SELECT_2 0x4 |
982 | #define K_BCM1480_MC_CHANNEL_SELECT_3 0x8 | 982 | #define K_BCM1480_MC_CHANNEL_SELECT_3 0x8 |
983 | 983 | ||
984 | #endif /* _BCM1480_MC_H */ | 984 | #endif /* _BCM1480_MC_H */ |
diff --git a/arch/mips/include/asm/sibyte/bcm1480_regs.h b/arch/mips/include/asm/sibyte/bcm1480_regs.h index 84d168ddfebb..ec0dacf6f0cb 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_regs.h +++ b/arch/mips/include/asm/sibyte/bcm1480_regs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * BCM1255/BCM1280/BCM1455/BCM1480 Board Support Package | 2 | * BCM1255/BCM1280/BCM1455/BCM1480 Board Support Package |
3 | * | 3 | * |
4 | * Register Definitions File: bcm1480_regs.h | 4 | * Register Definitions File: bcm1480_regs.h |
5 | * | 5 | * |
6 | * This module contains the addresses of the on-chip peripherals | 6 | * This module contains the addresses of the on-chip peripherals |
7 | * on the BCM1280 and BCM1480. | 7 | * on the BCM1280 and BCM1480. |
@@ -80,48 +80,48 @@ | |||
80 | * Memory Controller Registers (Section 6) | 80 | * Memory Controller Registers (Section 6) |
81 | ********************************************************************* */ | 81 | ********************************************************************* */ |
82 | 82 | ||
83 | #define A_BCM1480_MC_BASE_0 0x0010050000 | 83 | #define A_BCM1480_MC_BASE_0 0x0010050000 |
84 | #define A_BCM1480_MC_BASE_1 0x0010051000 | 84 | #define A_BCM1480_MC_BASE_1 0x0010051000 |
85 | #define A_BCM1480_MC_BASE_2 0x0010052000 | 85 | #define A_BCM1480_MC_BASE_2 0x0010052000 |
86 | #define A_BCM1480_MC_BASE_3 0x0010053000 | 86 | #define A_BCM1480_MC_BASE_3 0x0010053000 |
87 | #define BCM1480_MC_REGISTER_SPACING 0x1000 | 87 | #define BCM1480_MC_REGISTER_SPACING 0x1000 |
88 | 88 | ||
89 | #define A_BCM1480_MC_BASE(ctlid) (A_BCM1480_MC_BASE_0+(ctlid)*BCM1480_MC_REGISTER_SPACING) | 89 | #define A_BCM1480_MC_BASE(ctlid) (A_BCM1480_MC_BASE_0+(ctlid)*BCM1480_MC_REGISTER_SPACING) |
90 | #define A_BCM1480_MC_REGISTER(ctlid, reg) (A_BCM1480_MC_BASE(ctlid)+(reg)) | 90 | #define A_BCM1480_MC_REGISTER(ctlid, reg) (A_BCM1480_MC_BASE(ctlid)+(reg)) |
91 | 91 | ||
92 | #define R_BCM1480_MC_CONFIG 0x0000000100 | 92 | #define R_BCM1480_MC_CONFIG 0x0000000100 |
93 | #define R_BCM1480_MC_CS_START 0x0000000120 | 93 | #define R_BCM1480_MC_CS_START 0x0000000120 |
94 | #define R_BCM1480_MC_CS_END 0x0000000140 | 94 | #define R_BCM1480_MC_CS_END 0x0000000140 |
95 | #define S_BCM1480_MC_CS_STARTEND 24 | 95 | #define S_BCM1480_MC_CS_STARTEND 24 |
96 | 96 | ||
97 | #define R_BCM1480_MC_CS01_ROW0 0x0000000180 | 97 | #define R_BCM1480_MC_CS01_ROW0 0x0000000180 |
98 | #define R_BCM1480_MC_CS01_ROW1 0x00000001A0 | 98 | #define R_BCM1480_MC_CS01_ROW1 0x00000001A0 |
99 | #define R_BCM1480_MC_CS23_ROW0 0x0000000200 | 99 | #define R_BCM1480_MC_CS23_ROW0 0x0000000200 |
100 | #define R_BCM1480_MC_CS23_ROW1 0x0000000220 | 100 | #define R_BCM1480_MC_CS23_ROW1 0x0000000220 |
101 | #define R_BCM1480_MC_CS01_COL0 0x0000000280 | 101 | #define R_BCM1480_MC_CS01_COL0 0x0000000280 |
102 | #define R_BCM1480_MC_CS01_COL1 0x00000002A0 | 102 | #define R_BCM1480_MC_CS01_COL1 0x00000002A0 |
103 | #define R_BCM1480_MC_CS23_COL0 0x0000000300 | 103 | #define R_BCM1480_MC_CS23_COL0 0x0000000300 |
104 | #define R_BCM1480_MC_CS23_COL1 0x0000000320 | 104 | #define R_BCM1480_MC_CS23_COL1 0x0000000320 |
105 | 105 | ||
106 | #define R_BCM1480_MC_CSX_BASE 0x0000000180 | 106 | #define R_BCM1480_MC_CSX_BASE 0x0000000180 |
107 | #define R_BCM1480_MC_CSX_ROW0 0x0000000000 /* relative to CSX_BASE */ | 107 | #define R_BCM1480_MC_CSX_ROW0 0x0000000000 /* relative to CSX_BASE */ |
108 | #define R_BCM1480_MC_CSX_ROW1 0x0000000020 /* relative to CSX_BASE */ | 108 | #define R_BCM1480_MC_CSX_ROW1 0x0000000020 /* relative to CSX_BASE */ |
109 | #define R_BCM1480_MC_CSX_COL0 0x0000000100 /* relative to CSX_BASE */ | 109 | #define R_BCM1480_MC_CSX_COL0 0x0000000100 /* relative to CSX_BASE */ |
110 | #define R_BCM1480_MC_CSX_COL1 0x0000000120 /* relative to CSX_BASE */ | 110 | #define R_BCM1480_MC_CSX_COL1 0x0000000120 /* relative to CSX_BASE */ |
111 | #define BCM1480_MC_CSX_SPACING 0x0000000080 /* CS23 relative to CS01 */ | 111 | #define BCM1480_MC_CSX_SPACING 0x0000000080 /* CS23 relative to CS01 */ |
112 | 112 | ||
113 | #define R_BCM1480_MC_CS01_BA 0x0000000380 | 113 | #define R_BCM1480_MC_CS01_BA 0x0000000380 |
114 | #define R_BCM1480_MC_CS23_BA 0x00000003A0 | 114 | #define R_BCM1480_MC_CS23_BA 0x00000003A0 |
115 | #define R_BCM1480_MC_DRAMCMD 0x0000000400 | 115 | #define R_BCM1480_MC_DRAMCMD 0x0000000400 |
116 | #define R_BCM1480_MC_DRAMMODE 0x0000000420 | 116 | #define R_BCM1480_MC_DRAMMODE 0x0000000420 |
117 | #define R_BCM1480_MC_CLOCK_CFG 0x0000000440 | 117 | #define R_BCM1480_MC_CLOCK_CFG 0x0000000440 |
118 | #define R_BCM1480_MC_MCLK_CFG R_BCM1480_MC_CLOCK_CFG | 118 | #define R_BCM1480_MC_MCLK_CFG R_BCM1480_MC_CLOCK_CFG |
119 | #define R_BCM1480_MC_TEST_DATA 0x0000000480 | 119 | #define R_BCM1480_MC_TEST_DATA 0x0000000480 |
120 | #define R_BCM1480_MC_TEST_ECC 0x00000004A0 | 120 | #define R_BCM1480_MC_TEST_ECC 0x00000004A0 |
121 | #define R_BCM1480_MC_TIMING1 0x00000004C0 | 121 | #define R_BCM1480_MC_TIMING1 0x00000004C0 |
122 | #define R_BCM1480_MC_TIMING2 0x00000004E0 | 122 | #define R_BCM1480_MC_TIMING2 0x00000004E0 |
123 | #define R_BCM1480_MC_DLL_CFG 0x0000000500 | 123 | #define R_BCM1480_MC_DLL_CFG 0x0000000500 |
124 | #define R_BCM1480_MC_DRIVE_CFG 0x0000000520 | 124 | #define R_BCM1480_MC_DRIVE_CFG 0x0000000520 |
125 | 125 | ||
126 | #if SIBYTE_HDR_FEATURE(1480, PASS2) | 126 | #if SIBYTE_HDR_FEATURE(1480, PASS2) |
127 | #define R_BCM1480_MC_ODT 0x0000000460 | 127 | #define R_BCM1480_MC_ODT 0x0000000460 |
@@ -129,55 +129,55 @@ | |||
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | /* Global registers (single instance) */ | 131 | /* Global registers (single instance) */ |
132 | #define A_BCM1480_MC_GLB_CONFIG 0x0010054100 | 132 | #define A_BCM1480_MC_GLB_CONFIG 0x0010054100 |
133 | #define A_BCM1480_MC_GLB_INTLV 0x0010054120 | 133 | #define A_BCM1480_MC_GLB_INTLV 0x0010054120 |
134 | #define A_BCM1480_MC_GLB_ECC_STATUS 0x0010054140 | 134 | #define A_BCM1480_MC_GLB_ECC_STATUS 0x0010054140 |
135 | #define A_BCM1480_MC_GLB_ECC_ADDR 0x0010054160 | 135 | #define A_BCM1480_MC_GLB_ECC_ADDR 0x0010054160 |
136 | #define A_BCM1480_MC_GLB_ECC_CORRECT 0x0010054180 | 136 | #define A_BCM1480_MC_GLB_ECC_CORRECT 0x0010054180 |
137 | #define A_BCM1480_MC_GLB_PERF_CNT_CONTROL 0x00100541A0 | 137 | #define A_BCM1480_MC_GLB_PERF_CNT_CONTROL 0x00100541A0 |
138 | 138 | ||
139 | /* ********************************************************************* | 139 | /* ********************************************************************* |
140 | * L2 Cache Control Registers (Section 5) | 140 | * L2 Cache Control Registers (Section 5) |
141 | ********************************************************************* */ | 141 | ********************************************************************* */ |
142 | 142 | ||
143 | #define A_BCM1480_L2_BASE 0x0010040000 | 143 | #define A_BCM1480_L2_BASE 0x0010040000 |
144 | 144 | ||
145 | #define A_BCM1480_L2_READ_TAG 0x0010040018 | 145 | #define A_BCM1480_L2_READ_TAG 0x0010040018 |
146 | #define A_BCM1480_L2_ECC_TAG 0x0010040038 | 146 | #define A_BCM1480_L2_ECC_TAG 0x0010040038 |
147 | #define A_BCM1480_L2_MISC0_VALUE 0x0010040058 | 147 | #define A_BCM1480_L2_MISC0_VALUE 0x0010040058 |
148 | #define A_BCM1480_L2_MISC1_VALUE 0x0010040078 | 148 | #define A_BCM1480_L2_MISC1_VALUE 0x0010040078 |
149 | #define A_BCM1480_L2_MISC2_VALUE 0x0010040098 | 149 | #define A_BCM1480_L2_MISC2_VALUE 0x0010040098 |
150 | #define A_BCM1480_L2_MISC_CONFIG 0x0010040040 /* x040 */ | 150 | #define A_BCM1480_L2_MISC_CONFIG 0x0010040040 /* x040 */ |
151 | #define A_BCM1480_L2_CACHE_DISABLE 0x0010040060 /* x060 */ | 151 | #define A_BCM1480_L2_CACHE_DISABLE 0x0010040060 /* x060 */ |
152 | #define A_BCM1480_L2_MAKECACHEDISABLE(x) (A_BCM1480_L2_CACHE_DISABLE | (((x)&0xF) << 12)) | 152 | #define A_BCM1480_L2_MAKECACHEDISABLE(x) (A_BCM1480_L2_CACHE_DISABLE | (((x)&0xF) << 12)) |
153 | #define A_BCM1480_L2_WAY_ENABLE_3_0 0x0010040080 /* x080 */ | 153 | #define A_BCM1480_L2_WAY_ENABLE_3_0 0x0010040080 /* x080 */ |
154 | #define A_BCM1480_L2_WAY_ENABLE_7_4 0x00100400A0 /* x0A0 */ | 154 | #define A_BCM1480_L2_WAY_ENABLE_7_4 0x00100400A0 /* x0A0 */ |
155 | #define A_BCM1480_L2_MAKE_WAY_ENABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((x)&0xF) << 12)) | 155 | #define A_BCM1480_L2_MAKE_WAY_ENABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((x)&0xF) << 12)) |
156 | #define A_BCM1480_L2_MAKE_WAY_ENABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((x)&0xF) << 12)) | 156 | #define A_BCM1480_L2_MAKE_WAY_ENABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((x)&0xF) << 12)) |
157 | #define A_BCM1480_L2_MAKE_WAY_DISABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((~x)&0xF) << 12)) | 157 | #define A_BCM1480_L2_MAKE_WAY_DISABLE_LO(x) (A_BCM1480_L2_WAY_ENABLE_3_0 | (((~x)&0xF) << 12)) |
158 | #define A_BCM1480_L2_MAKE_WAY_DISABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((~x)&0xF) << 12)) | 158 | #define A_BCM1480_L2_MAKE_WAY_DISABLE_HI(x) (A_BCM1480_L2_WAY_ENABLE_7_4 | (((~x)&0xF) << 12)) |
159 | #define A_BCM1480_L2_WAY_LOCAL_3_0 0x0010040100 /* x100 */ | 159 | #define A_BCM1480_L2_WAY_LOCAL_3_0 0x0010040100 /* x100 */ |
160 | #define A_BCM1480_L2_WAY_LOCAL_7_4 0x0010040120 /* x120 */ | 160 | #define A_BCM1480_L2_WAY_LOCAL_7_4 0x0010040120 /* x120 */ |
161 | #define A_BCM1480_L2_WAY_REMOTE_3_0 0x0010040140 /* x140 */ | 161 | #define A_BCM1480_L2_WAY_REMOTE_3_0 0x0010040140 /* x140 */ |
162 | #define A_BCM1480_L2_WAY_REMOTE_7_4 0x0010040160 /* x160 */ | 162 | #define A_BCM1480_L2_WAY_REMOTE_7_4 0x0010040160 /* x160 */ |
163 | #define A_BCM1480_L2_WAY_AGENT_3_0 0x00100400C0 /* xxC0 */ | 163 | #define A_BCM1480_L2_WAY_AGENT_3_0 0x00100400C0 /* xxC0 */ |
164 | #define A_BCM1480_L2_WAY_AGENT_7_4 0x00100400E0 /* xxE0 */ | 164 | #define A_BCM1480_L2_WAY_AGENT_7_4 0x00100400E0 /* xxE0 */ |
165 | #define A_BCM1480_L2_WAY_ENABLE(A, banks) (A | (((~(banks))&0x0F) << 8)) | 165 | #define A_BCM1480_L2_WAY_ENABLE(A, banks) (A | (((~(banks))&0x0F) << 8)) |
166 | #define A_BCM1480_L2_BANK_BASE 0x00D0300000 | 166 | #define A_BCM1480_L2_BANK_BASE 0x00D0300000 |
167 | #define A_BCM1480_L2_BANK_ADDRESS(b) (A_BCM1480_L2_BANK_BASE | (((b)&0x7)<<17)) | 167 | #define A_BCM1480_L2_BANK_ADDRESS(b) (A_BCM1480_L2_BANK_BASE | (((b)&0x7)<<17)) |
168 | #define A_BCM1480_L2_MGMT_TAG_BASE 0x00D0000000 | 168 | #define A_BCM1480_L2_MGMT_TAG_BASE 0x00D0000000 |
169 | 169 | ||
170 | 170 | ||
171 | /* ********************************************************************* | 171 | /* ********************************************************************* |
172 | * PCI-X Interface Registers (Section 7) | 172 | * PCI-X Interface Registers (Section 7) |
173 | ********************************************************************* */ | 173 | ********************************************************************* */ |
174 | 174 | ||
175 | #define A_BCM1480_PCI_BASE 0x0010061400 | 175 | #define A_BCM1480_PCI_BASE 0x0010061400 |
176 | 176 | ||
177 | #define A_BCM1480_PCI_RESET 0x0010061400 | 177 | #define A_BCM1480_PCI_RESET 0x0010061400 |
178 | #define A_BCM1480_PCI_DLL 0x0010061500 | 178 | #define A_BCM1480_PCI_DLL 0x0010061500 |
179 | 179 | ||
180 | #define A_BCM1480_PCI_TYPE00_HEADER 0x002E000000 | 180 | #define A_BCM1480_PCI_TYPE00_HEADER 0x002E000000 |
181 | 181 | ||
182 | /* ********************************************************************* | 182 | /* ********************************************************************* |
183 | * Ethernet MAC Registers (Section 11) and DMA Registers (Section 10.6) | 183 | * Ethernet MAC Registers (Section 11) and DMA Registers (Section 10.6) |
@@ -185,19 +185,19 @@ | |||
185 | 185 | ||
186 | /* No register changes with Rev.C BCM1250, but one additional MAC */ | 186 | /* No register changes with Rev.C BCM1250, but one additional MAC */ |
187 | 187 | ||
188 | #define A_BCM1480_MAC_BASE_2 0x0010066000 | 188 | #define A_BCM1480_MAC_BASE_2 0x0010066000 |
189 | 189 | ||
190 | #ifndef A_MAC_BASE_2 | 190 | #ifndef A_MAC_BASE_2 |
191 | #define A_MAC_BASE_2 A_BCM1480_MAC_BASE_2 | 191 | #define A_MAC_BASE_2 A_BCM1480_MAC_BASE_2 |
192 | #endif | 192 | #endif |
193 | 193 | ||
194 | #define A_BCM1480_MAC_BASE_3 0x0010067000 | 194 | #define A_BCM1480_MAC_BASE_3 0x0010067000 |
195 | #define A_MAC_BASE_3 A_BCM1480_MAC_BASE_3 | 195 | #define A_MAC_BASE_3 A_BCM1480_MAC_BASE_3 |
196 | 196 | ||
197 | #define R_BCM1480_MAC_DMA_OODPKTLOST 0x00000038 | 197 | #define R_BCM1480_MAC_DMA_OODPKTLOST 0x00000038 |
198 | 198 | ||
199 | #ifndef R_MAC_DMA_OODPKTLOST | 199 | #ifndef R_MAC_DMA_OODPKTLOST |
200 | #define R_MAC_DMA_OODPKTLOST R_BCM1480_MAC_DMA_OODPKTLOST | 200 | #define R_MAC_DMA_OODPKTLOST R_BCM1480_MAC_DMA_OODPKTLOST |
201 | #endif | 201 | #endif |
202 | 202 | ||
203 | 203 | ||
@@ -208,18 +208,18 @@ | |||
208 | /* No significant differences from BCM1250, two DUARTs */ | 208 | /* No significant differences from BCM1250, two DUARTs */ |
209 | 209 | ||
210 | /* Conventions, per user manual: | 210 | /* Conventions, per user manual: |
211 | * DUART generic, channels A,B,C,D | 211 | * DUART generic, channels A,B,C,D |
212 | * DUART0 implementing channels A,B | 212 | * DUART0 implementing channels A,B |
213 | * DUART1 inplementing channels C,D | 213 | * DUART1 inplementing channels C,D |
214 | */ | 214 | */ |
215 | 215 | ||
216 | #define BCM1480_DUART_NUM_PORTS 4 | 216 | #define BCM1480_DUART_NUM_PORTS 4 |
217 | 217 | ||
218 | #define A_BCM1480_DUART0 0x0010060000 | 218 | #define A_BCM1480_DUART0 0x0010060000 |
219 | #define A_BCM1480_DUART1 0x0010060400 | 219 | #define A_BCM1480_DUART1 0x0010060400 |
220 | #define A_BCM1480_DUART(chan) ((((chan)&2) == 0)? A_BCM1480_DUART0 : A_BCM1480_DUART1) | 220 | #define A_BCM1480_DUART(chan) ((((chan)&2) == 0)? A_BCM1480_DUART0 : A_BCM1480_DUART1) |
221 | 221 | ||
222 | #define BCM1480_DUART_CHANREG_SPACING 0x100 | 222 | #define BCM1480_DUART_CHANREG_SPACING 0x100 |
223 | #define A_BCM1480_DUART_CHANREG(chan, reg) \ | 223 | #define A_BCM1480_DUART_CHANREG(chan, reg) \ |
224 | (A_BCM1480_DUART(chan) + \ | 224 | (A_BCM1480_DUART(chan) + \ |
225 | BCM1480_DUART_CHANREG_SPACING * (((chan) & 1) + 1) + (reg)) | 225 | BCM1480_DUART_CHANREG_SPACING * (((chan) & 1) + 1) + (reg)) |
@@ -249,43 +249,43 @@ | |||
249 | * These constants are the absolute addresses. | 249 | * These constants are the absolute addresses. |
250 | */ | 250 | */ |
251 | 251 | ||
252 | #define A_BCM1480_DUART_MODE_REG_1_C 0x0010060400 | 252 | #define A_BCM1480_DUART_MODE_REG_1_C 0x0010060400 |
253 | #define A_BCM1480_DUART_MODE_REG_2_C 0x0010060410 | 253 | #define A_BCM1480_DUART_MODE_REG_2_C 0x0010060410 |
254 | #define A_BCM1480_DUART_STATUS_C 0x0010060420 | 254 | #define A_BCM1480_DUART_STATUS_C 0x0010060420 |
255 | #define A_BCM1480_DUART_CLK_SEL_C 0x0010060430 | 255 | #define A_BCM1480_DUART_CLK_SEL_C 0x0010060430 |
256 | #define A_BCM1480_DUART_FULL_CTL_C 0x0010060440 | 256 | #define A_BCM1480_DUART_FULL_CTL_C 0x0010060440 |
257 | #define A_BCM1480_DUART_CMD_C 0x0010060450 | 257 | #define A_BCM1480_DUART_CMD_C 0x0010060450 |
258 | #define A_BCM1480_DUART_RX_HOLD_C 0x0010060460 | 258 | #define A_BCM1480_DUART_RX_HOLD_C 0x0010060460 |
259 | #define A_BCM1480_DUART_TX_HOLD_C 0x0010060470 | 259 | #define A_BCM1480_DUART_TX_HOLD_C 0x0010060470 |
260 | #define A_BCM1480_DUART_OPCR_C 0x0010060480 | 260 | #define A_BCM1480_DUART_OPCR_C 0x0010060480 |
261 | #define A_BCM1480_DUART_AUX_CTRL_C 0x0010060490 | 261 | #define A_BCM1480_DUART_AUX_CTRL_C 0x0010060490 |
262 | 262 | ||
263 | #define A_BCM1480_DUART_MODE_REG_1_D 0x0010060500 | 263 | #define A_BCM1480_DUART_MODE_REG_1_D 0x0010060500 |
264 | #define A_BCM1480_DUART_MODE_REG_2_D 0x0010060510 | 264 | #define A_BCM1480_DUART_MODE_REG_2_D 0x0010060510 |
265 | #define A_BCM1480_DUART_STATUS_D 0x0010060520 | 265 | #define A_BCM1480_DUART_STATUS_D 0x0010060520 |
266 | #define A_BCM1480_DUART_CLK_SEL_D 0x0010060530 | 266 | #define A_BCM1480_DUART_CLK_SEL_D 0x0010060530 |
267 | #define A_BCM1480_DUART_FULL_CTL_D 0x0010060540 | 267 | #define A_BCM1480_DUART_FULL_CTL_D 0x0010060540 |
268 | #define A_BCM1480_DUART_CMD_D 0x0010060550 | 268 | #define A_BCM1480_DUART_CMD_D 0x0010060550 |
269 | #define A_BCM1480_DUART_RX_HOLD_D 0x0010060560 | 269 | #define A_BCM1480_DUART_RX_HOLD_D 0x0010060560 |
270 | #define A_BCM1480_DUART_TX_HOLD_D 0x0010060570 | 270 | #define A_BCM1480_DUART_TX_HOLD_D 0x0010060570 |
271 | #define A_BCM1480_DUART_OPCR_D 0x0010060580 | 271 | #define A_BCM1480_DUART_OPCR_D 0x0010060580 |
272 | #define A_BCM1480_DUART_AUX_CTRL_D 0x0010060590 | 272 | #define A_BCM1480_DUART_AUX_CTRL_D 0x0010060590 |
273 | 273 | ||
274 | #define A_BCM1480_DUART_INPORT_CHNG_CD 0x0010060600 | 274 | #define A_BCM1480_DUART_INPORT_CHNG_CD 0x0010060600 |
275 | #define A_BCM1480_DUART_AUX_CTRL_CD 0x0010060610 | 275 | #define A_BCM1480_DUART_AUX_CTRL_CD 0x0010060610 |
276 | #define A_BCM1480_DUART_ISR_C 0x0010060620 | 276 | #define A_BCM1480_DUART_ISR_C 0x0010060620 |
277 | #define A_BCM1480_DUART_IMR_C 0x0010060630 | 277 | #define A_BCM1480_DUART_IMR_C 0x0010060630 |
278 | #define A_BCM1480_DUART_ISR_D 0x0010060640 | 278 | #define A_BCM1480_DUART_ISR_D 0x0010060640 |
279 | #define A_BCM1480_DUART_IMR_D 0x0010060650 | 279 | #define A_BCM1480_DUART_IMR_D 0x0010060650 |
280 | #define A_BCM1480_DUART_OUT_PORT_CD 0x0010060660 | 280 | #define A_BCM1480_DUART_OUT_PORT_CD 0x0010060660 |
281 | #define A_BCM1480_DUART_OPCR_CD 0x0010060670 | 281 | #define A_BCM1480_DUART_OPCR_CD 0x0010060670 |
282 | #define A_BCM1480_DUART_IN_PORT_CD 0x0010060680 | 282 | #define A_BCM1480_DUART_IN_PORT_CD 0x0010060680 |
283 | #define A_BCM1480_DUART_ISR_CD 0x0010060690 | 283 | #define A_BCM1480_DUART_ISR_CD 0x0010060690 |
284 | #define A_BCM1480_DUART_IMR_CD 0x00100606A0 | 284 | #define A_BCM1480_DUART_IMR_CD 0x00100606A0 |
285 | #define A_BCM1480_DUART_SET_OPR_CD 0x00100606B0 | 285 | #define A_BCM1480_DUART_SET_OPR_CD 0x00100606B0 |
286 | #define A_BCM1480_DUART_CLEAR_OPR_CD 0x00100606C0 | 286 | #define A_BCM1480_DUART_CLEAR_OPR_CD 0x00100606C0 |
287 | #define A_BCM1480_DUART_INPORT_CHNG_C 0x00100606D0 | 287 | #define A_BCM1480_DUART_INPORT_CHNG_C 0x00100606D0 |
288 | #define A_BCM1480_DUART_INPORT_CHNG_D 0x00100606E0 | 288 | #define A_BCM1480_DUART_INPORT_CHNG_D 0x00100606E0 |
289 | 289 | ||
290 | 290 | ||
291 | /* ********************************************************************* | 291 | /* ********************************************************************* |
@@ -301,8 +301,8 @@ | |||
301 | 301 | ||
302 | /* One additional GPIO register, placed _before_ the BCM1250's GPIO block base */ | 302 | /* One additional GPIO register, placed _before_ the BCM1250's GPIO block base */ |
303 | 303 | ||
304 | #define A_BCM1480_GPIO_INT_ADD_TYPE 0x0010061A78 | 304 | #define A_BCM1480_GPIO_INT_ADD_TYPE 0x0010061A78 |
305 | #define R_BCM1480_GPIO_INT_ADD_TYPE (-8) | 305 | #define R_BCM1480_GPIO_INT_ADD_TYPE (-8) |
306 | 306 | ||
307 | #define A_GPIO_INT_ADD_TYPE A_BCM1480_GPIO_INT_ADD_TYPE | 307 | #define A_GPIO_INT_ADD_TYPE A_BCM1480_GPIO_INT_ADD_TYPE |
308 | #define R_GPIO_INT_ADD_TYPE R_BCM1480_GPIO_INT_ADD_TYPE | 308 | #define R_GPIO_INT_ADD_TYPE R_BCM1480_GPIO_INT_ADD_TYPE |
@@ -321,30 +321,30 @@ | |||
321 | 321 | ||
322 | /* Watchdog timers */ | 322 | /* Watchdog timers */ |
323 | 323 | ||
324 | #define A_BCM1480_SCD_WDOG_2 0x0010022050 | 324 | #define A_BCM1480_SCD_WDOG_2 0x0010022050 |
325 | #define A_BCM1480_SCD_WDOG_3 0x0010022150 | 325 | #define A_BCM1480_SCD_WDOG_3 0x0010022150 |
326 | 326 | ||
327 | #define BCM1480_SCD_NUM_WDOGS 4 | 327 | #define BCM1480_SCD_NUM_WDOGS 4 |
328 | 328 | ||
329 | #define A_BCM1480_SCD_WDOG_BASE(w) (A_BCM1480_SCD_WDOG_0+((w)&2)*0x1000 + ((w)&1)*0x100) | 329 | #define A_BCM1480_SCD_WDOG_BASE(w) (A_BCM1480_SCD_WDOG_0+((w)&2)*0x1000 + ((w)&1)*0x100) |
330 | #define A_BCM1480_SCD_WDOG_REGISTER(w, r) (A_BCM1480_SCD_WDOG_BASE(w) + (r)) | 330 | #define A_BCM1480_SCD_WDOG_REGISTER(w, r) (A_BCM1480_SCD_WDOG_BASE(w) + (r)) |
331 | 331 | ||
332 | #define A_BCM1480_SCD_WDOG_INIT_2 0x0010022050 | 332 | #define A_BCM1480_SCD_WDOG_INIT_2 0x0010022050 |
333 | #define A_BCM1480_SCD_WDOG_CNT_2 0x0010022058 | 333 | #define A_BCM1480_SCD_WDOG_CNT_2 0x0010022058 |
334 | #define A_BCM1480_SCD_WDOG_CFG_2 0x0010022060 | 334 | #define A_BCM1480_SCD_WDOG_CFG_2 0x0010022060 |
335 | 335 | ||
336 | #define A_BCM1480_SCD_WDOG_INIT_3 0x0010022150 | 336 | #define A_BCM1480_SCD_WDOG_INIT_3 0x0010022150 |
337 | #define A_BCM1480_SCD_WDOG_CNT_3 0x0010022158 | 337 | #define A_BCM1480_SCD_WDOG_CNT_3 0x0010022158 |
338 | #define A_BCM1480_SCD_WDOG_CFG_3 0x0010022160 | 338 | #define A_BCM1480_SCD_WDOG_CFG_3 0x0010022160 |
339 | 339 | ||
340 | /* BCM1480 has two additional compare registers */ | 340 | /* BCM1480 has two additional compare registers */ |
341 | 341 | ||
342 | #define A_BCM1480_SCD_ZBBUS_CYCLE_COUNT A_SCD_ZBBUS_CYCLE_COUNT | 342 | #define A_BCM1480_SCD_ZBBUS_CYCLE_COUNT A_SCD_ZBBUS_CYCLE_COUNT |
343 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP_BASE 0x0010020C00 | 343 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP_BASE 0x0010020C00 |
344 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP0 A_SCD_ZBBUS_CYCLE_CP0 | 344 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP0 A_SCD_ZBBUS_CYCLE_CP0 |
345 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP1 A_SCD_ZBBUS_CYCLE_CP1 | 345 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP1 A_SCD_ZBBUS_CYCLE_CP1 |
346 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP2 0x0010020C10 | 346 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP2 0x0010020C10 |
347 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP3 0x0010020C18 | 347 | #define A_BCM1480_SCD_ZBBUS_CYCLE_CP3 0x0010020C18 |
348 | 348 | ||
349 | /* ********************************************************************* | 349 | /* ********************************************************************* |
350 | * System Control Registers (Section 4.2) | 350 | * System Control Registers (Section 4.2) |
@@ -352,7 +352,7 @@ | |||
352 | 352 | ||
353 | /* Scratch register in different place */ | 353 | /* Scratch register in different place */ |
354 | 354 | ||
355 | #define A_BCM1480_SCD_SCRATCH 0x100200A0 | 355 | #define A_BCM1480_SCD_SCRATCH 0x100200A0 |
356 | 356 | ||
357 | /* ********************************************************************* | 357 | /* ********************************************************************* |
358 | * System Address Trap Registers (Section 4.9) | 358 | * System Address Trap Registers (Section 4.9) |
@@ -364,68 +364,68 @@ | |||
364 | * System Interrupt Mapper Registers (Sections 4.3-4.5) | 364 | * System Interrupt Mapper Registers (Sections 4.3-4.5) |
365 | ********************************************************************* */ | 365 | ********************************************************************* */ |
366 | 366 | ||
367 | #define A_BCM1480_IMR_CPU0_BASE 0x0010020000 | 367 | #define A_BCM1480_IMR_CPU0_BASE 0x0010020000 |
368 | #define A_BCM1480_IMR_CPU1_BASE 0x0010022000 | 368 | #define A_BCM1480_IMR_CPU1_BASE 0x0010022000 |
369 | #define A_BCM1480_IMR_CPU2_BASE 0x0010024000 | 369 | #define A_BCM1480_IMR_CPU2_BASE 0x0010024000 |
370 | #define A_BCM1480_IMR_CPU3_BASE 0x0010026000 | 370 | #define A_BCM1480_IMR_CPU3_BASE 0x0010026000 |
371 | #define BCM1480_IMR_REGISTER_SPACING 0x2000 | 371 | #define BCM1480_IMR_REGISTER_SPACING 0x2000 |
372 | #define BCM1480_IMR_REGISTER_SPACING_SHIFT 13 | 372 | #define BCM1480_IMR_REGISTER_SPACING_SHIFT 13 |
373 | 373 | ||
374 | #define A_BCM1480_IMR_MAPPER(cpu) (A_BCM1480_IMR_CPU0_BASE+(cpu)*BCM1480_IMR_REGISTER_SPACING) | 374 | #define A_BCM1480_IMR_MAPPER(cpu) (A_BCM1480_IMR_CPU0_BASE+(cpu)*BCM1480_IMR_REGISTER_SPACING) |
375 | #define A_BCM1480_IMR_REGISTER(cpu, reg) (A_BCM1480_IMR_MAPPER(cpu)+(reg)) | 375 | #define A_BCM1480_IMR_REGISTER(cpu, reg) (A_BCM1480_IMR_MAPPER(cpu)+(reg)) |
376 | 376 | ||
377 | /* Most IMR registers are 128 bits, implemented as non-contiguous | 377 | /* Most IMR registers are 128 bits, implemented as non-contiguous |
378 | 64-bit registers high (_H) and low (_L) */ | 378 | 64-bit registers high (_H) and low (_L) */ |
379 | #define BCM1480_IMR_HL_SPACING 0x1000 | 379 | #define BCM1480_IMR_HL_SPACING 0x1000 |
380 | 380 | ||
381 | #define R_BCM1480_IMR_INTERRUPT_DIAG_H 0x0010 | 381 | #define R_BCM1480_IMR_INTERRUPT_DIAG_H 0x0010 |
382 | #define R_BCM1480_IMR_LDT_INTERRUPT_H 0x0018 | 382 | #define R_BCM1480_IMR_LDT_INTERRUPT_H 0x0018 |
383 | #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_H 0x0020 | 383 | #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_H 0x0020 |
384 | #define R_BCM1480_IMR_INTERRUPT_MASK_H 0x0028 | 384 | #define R_BCM1480_IMR_INTERRUPT_MASK_H 0x0028 |
385 | #define R_BCM1480_IMR_INTERRUPT_TRACE_H 0x0038 | 385 | #define R_BCM1480_IMR_INTERRUPT_TRACE_H 0x0038 |
386 | #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_H 0x0040 | 386 | #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_H 0x0040 |
387 | #define R_BCM1480_IMR_LDT_INTERRUPT_SET 0x0048 | 387 | #define R_BCM1480_IMR_LDT_INTERRUPT_SET 0x0048 |
388 | #define R_BCM1480_IMR_MAILBOX_0_CPU 0x00C0 | 388 | #define R_BCM1480_IMR_MAILBOX_0_CPU 0x00C0 |
389 | #define R_BCM1480_IMR_MAILBOX_0_SET_CPU 0x00C8 | 389 | #define R_BCM1480_IMR_MAILBOX_0_SET_CPU 0x00C8 |
390 | #define R_BCM1480_IMR_MAILBOX_0_CLR_CPU 0x00D0 | 390 | #define R_BCM1480_IMR_MAILBOX_0_CLR_CPU 0x00D0 |
391 | #define R_BCM1480_IMR_MAILBOX_1_CPU 0x00E0 | 391 | #define R_BCM1480_IMR_MAILBOX_1_CPU 0x00E0 |
392 | #define R_BCM1480_IMR_MAILBOX_1_SET_CPU 0x00E8 | 392 | #define R_BCM1480_IMR_MAILBOX_1_SET_CPU 0x00E8 |
393 | #define R_BCM1480_IMR_MAILBOX_1_CLR_CPU 0x00F0 | 393 | #define R_BCM1480_IMR_MAILBOX_1_CLR_CPU 0x00F0 |
394 | #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_H 0x0100 | 394 | #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_H 0x0100 |
395 | #define BCM1480_IMR_INTERRUPT_STATUS_COUNT 8 | 395 | #define BCM1480_IMR_INTERRUPT_STATUS_COUNT 8 |
396 | #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_H 0x0200 | 396 | #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_H 0x0200 |
397 | #define BCM1480_IMR_INTERRUPT_MAP_COUNT 64 | 397 | #define BCM1480_IMR_INTERRUPT_MAP_COUNT 64 |
398 | 398 | ||
399 | #define R_BCM1480_IMR_INTERRUPT_DIAG_L 0x1010 | 399 | #define R_BCM1480_IMR_INTERRUPT_DIAG_L 0x1010 |
400 | #define R_BCM1480_IMR_LDT_INTERRUPT_L 0x1018 | 400 | #define R_BCM1480_IMR_LDT_INTERRUPT_L 0x1018 |
401 | #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_L 0x1020 | 401 | #define R_BCM1480_IMR_LDT_INTERRUPT_CLR_L 0x1020 |
402 | #define R_BCM1480_IMR_INTERRUPT_MASK_L 0x1028 | 402 | #define R_BCM1480_IMR_INTERRUPT_MASK_L 0x1028 |
403 | #define R_BCM1480_IMR_INTERRUPT_TRACE_L 0x1038 | 403 | #define R_BCM1480_IMR_INTERRUPT_TRACE_L 0x1038 |
404 | #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_L 0x1040 | 404 | #define R_BCM1480_IMR_INTERRUPT_SOURCE_STATUS_L 0x1040 |
405 | #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_L 0x1100 | 405 | #define R_BCM1480_IMR_INTERRUPT_STATUS_BASE_L 0x1100 |
406 | #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_L 0x1200 | 406 | #define R_BCM1480_IMR_INTERRUPT_MAP_BASE_L 0x1200 |
407 | 407 | ||
408 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE 0x0010028000 | 408 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE 0x0010028000 |
409 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU1_BASE 0x0010028100 | 409 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU1_BASE 0x0010028100 |
410 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU2_BASE 0x0010028200 | 410 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU2_BASE 0x0010028200 |
411 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU3_BASE 0x0010028300 | 411 | #define A_BCM1480_IMR_ALIAS_MAILBOX_CPU3_BASE 0x0010028300 |
412 | #define BCM1480_IMR_ALIAS_MAILBOX_SPACING 0100 | 412 | #define BCM1480_IMR_ALIAS_MAILBOX_SPACING 0100 |
413 | 413 | ||
414 | #define A_BCM1480_IMR_ALIAS_MAILBOX(cpu) (A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE + \ | 414 | #define A_BCM1480_IMR_ALIAS_MAILBOX(cpu) (A_BCM1480_IMR_ALIAS_MAILBOX_CPU0_BASE + \ |
415 | (cpu)*BCM1480_IMR_ALIAS_MAILBOX_SPACING) | 415 | (cpu)*BCM1480_IMR_ALIAS_MAILBOX_SPACING) |
416 | #define A_BCM1480_IMR_ALIAS_MAILBOX_REGISTER(cpu, reg) (A_BCM1480_IMR_ALIAS_MAILBOX(cpu)+(reg)) | 416 | #define A_BCM1480_IMR_ALIAS_MAILBOX_REGISTER(cpu, reg) (A_BCM1480_IMR_ALIAS_MAILBOX(cpu)+(reg)) |
417 | 417 | ||
418 | #define R_BCM1480_IMR_ALIAS_MAILBOX_0 0x0000 /* 0x0x0 */ | 418 | #define R_BCM1480_IMR_ALIAS_MAILBOX_0 0x0000 /* 0x0x0 */ |
419 | #define R_BCM1480_IMR_ALIAS_MAILBOX_0_SET 0x0008 /* 0x0x8 */ | 419 | #define R_BCM1480_IMR_ALIAS_MAILBOX_0_SET 0x0008 /* 0x0x8 */ |
420 | 420 | ||
421 | /* | 421 | /* |
422 | * these macros work together to build the address of a mailbox | 422 | * these macros work together to build the address of a mailbox |
423 | * register, e.g., A_BCM1480_MAILBOX_REGISTER(0,R_BCM1480_IMR_MAILBOX_SET,2) | 423 | * register, e.g., A_BCM1480_MAILBOX_REGISTER(0,R_BCM1480_IMR_MAILBOX_SET,2) |
424 | * for mbox_0_set_cpu2 returns 0x00100240C8 | 424 | * for mbox_0_set_cpu2 returns 0x00100240C8 |
425 | */ | 425 | */ |
426 | #define R_BCM1480_IMR_MAILBOX_CPU 0x00 | 426 | #define R_BCM1480_IMR_MAILBOX_CPU 0x00 |
427 | #define R_BCM1480_IMR_MAILBOX_SET 0x08 | 427 | #define R_BCM1480_IMR_MAILBOX_SET 0x08 |
428 | #define R_BCM1480_IMR_MAILBOX_CLR 0x10 | 428 | #define R_BCM1480_IMR_MAILBOX_CLR 0x10 |
429 | #define R_BCM1480_IMR_MAILBOX_NUM_SPACING 0x20 | 429 | #define R_BCM1480_IMR_MAILBOX_NUM_SPACING 0x20 |
430 | #define A_BCM1480_MAILBOX_REGISTER(num, reg, cpu) \ | 430 | #define A_BCM1480_MAILBOX_REGISTER(num, reg, cpu) \ |
431 | (A_BCM1480_IMR_CPU0_BASE + \ | 431 | (A_BCM1480_IMR_CPU0_BASE + \ |
@@ -440,22 +440,22 @@ | |||
440 | /* BCM1480 has four more performance counter registers, and two control | 440 | /* BCM1480 has four more performance counter registers, and two control |
441 | registers. */ | 441 | registers. */ |
442 | 442 | ||
443 | #define A_BCM1480_SCD_PERF_CNT_BASE 0x00100204C0 | 443 | #define A_BCM1480_SCD_PERF_CNT_BASE 0x00100204C0 |
444 | 444 | ||
445 | #define A_BCM1480_SCD_PERF_CNT_CFG0 0x00100204C0 | 445 | #define A_BCM1480_SCD_PERF_CNT_CFG0 0x00100204C0 |
446 | #define A_BCM1480_SCD_PERF_CNT_CFG_0 A_BCM1480_SCD_PERF_CNT_CFG0 | 446 | #define A_BCM1480_SCD_PERF_CNT_CFG_0 A_BCM1480_SCD_PERF_CNT_CFG0 |
447 | #define A_BCM1480_SCD_PERF_CNT_CFG1 0x00100204C8 | 447 | #define A_BCM1480_SCD_PERF_CNT_CFG1 0x00100204C8 |
448 | #define A_BCM1480_SCD_PERF_CNT_CFG_1 A_BCM1480_SCD_PERF_CNT_CFG1 | 448 | #define A_BCM1480_SCD_PERF_CNT_CFG_1 A_BCM1480_SCD_PERF_CNT_CFG1 |
449 | 449 | ||
450 | #define A_BCM1480_SCD_PERF_CNT_0 A_SCD_PERF_CNT_0 | 450 | #define A_BCM1480_SCD_PERF_CNT_0 A_SCD_PERF_CNT_0 |
451 | #define A_BCM1480_SCD_PERF_CNT_1 A_SCD_PERF_CNT_1 | 451 | #define A_BCM1480_SCD_PERF_CNT_1 A_SCD_PERF_CNT_1 |
452 | #define A_BCM1480_SCD_PERF_CNT_2 A_SCD_PERF_CNT_2 | 452 | #define A_BCM1480_SCD_PERF_CNT_2 A_SCD_PERF_CNT_2 |
453 | #define A_BCM1480_SCD_PERF_CNT_3 A_SCD_PERF_CNT_3 | 453 | #define A_BCM1480_SCD_PERF_CNT_3 A_SCD_PERF_CNT_3 |
454 | 454 | ||
455 | #define A_BCM1480_SCD_PERF_CNT_4 0x00100204F0 | 455 | #define A_BCM1480_SCD_PERF_CNT_4 0x00100204F0 |
456 | #define A_BCM1480_SCD_PERF_CNT_5 0x00100204F8 | 456 | #define A_BCM1480_SCD_PERF_CNT_5 0x00100204F8 |
457 | #define A_BCM1480_SCD_PERF_CNT_6 0x0010020500 | 457 | #define A_BCM1480_SCD_PERF_CNT_6 0x0010020500 |
458 | #define A_BCM1480_SCD_PERF_CNT_7 0x0010020508 | 458 | #define A_BCM1480_SCD_PERF_CNT_7 0x0010020508 |
459 | 459 | ||
460 | #define BCM1480_SCD_NUM_PERF_CNT 8 | 460 | #define BCM1480_SCD_NUM_PERF_CNT 8 |
461 | #define BCM1480_SCD_PERF_CNT_SPACING 8 | 461 | #define BCM1480_SCD_PERF_CNT_SPACING 8 |
@@ -468,7 +468,7 @@ | |||
468 | 468 | ||
469 | /* Same as 1250 except BUS_ERR_STATUS_DEBUG is in a different place. */ | 469 | /* Same as 1250 except BUS_ERR_STATUS_DEBUG is in a different place. */ |
470 | 470 | ||
471 | #define A_BCM1480_BUS_ERR_STATUS_DEBUG 0x00100208D8 | 471 | #define A_BCM1480_BUS_ERR_STATUS_DEBUG 0x00100208D8 |
472 | 472 | ||
473 | /* ********************************************************************* | 473 | /* ********************************************************************* |
474 | * System Debug Controller Registers (Section 19) | 474 | * System Debug Controller Registers (Section 19) |
@@ -497,46 +497,46 @@ | |||
497 | #define BCM1480_HT_PORT_SPACING 0x800 | 497 | #define BCM1480_HT_PORT_SPACING 0x800 |
498 | #define A_BCM1480_HT_PORT_HEADER(x) (A_BCM1480_HT_PORT0_HEADER + ((x)*BCM1480_HT_PORT_SPACING)) | 498 | #define A_BCM1480_HT_PORT_HEADER(x) (A_BCM1480_HT_PORT0_HEADER + ((x)*BCM1480_HT_PORT_SPACING)) |
499 | 499 | ||
500 | #define A_BCM1480_HT_PORT0_HEADER 0x00FE000000 | 500 | #define A_BCM1480_HT_PORT0_HEADER 0x00FE000000 |
501 | #define A_BCM1480_HT_PORT1_HEADER 0x00FE000800 | 501 | #define A_BCM1480_HT_PORT1_HEADER 0x00FE000800 |
502 | #define A_BCM1480_HT_PORT2_HEADER 0x00FE001000 | 502 | #define A_BCM1480_HT_PORT2_HEADER 0x00FE001000 |
503 | #define A_BCM1480_HT_TYPE00_HEADER 0x00FE002000 | 503 | #define A_BCM1480_HT_TYPE00_HEADER 0x00FE002000 |
504 | 504 | ||
505 | 505 | ||
506 | /* ********************************************************************* | 506 | /* ********************************************************************* |
507 | * Node Controller Registers (Section 9) | 507 | * Node Controller Registers (Section 9) |
508 | ********************************************************************* */ | 508 | ********************************************************************* */ |
509 | 509 | ||
510 | #define A_BCM1480_NC_BASE 0x00DFBD0000 | 510 | #define A_BCM1480_NC_BASE 0x00DFBD0000 |
511 | 511 | ||
512 | #define A_BCM1480_NC_RLD_FIELD 0x00DFBD0000 | 512 | #define A_BCM1480_NC_RLD_FIELD 0x00DFBD0000 |
513 | #define A_BCM1480_NC_RLD_TRIGGER 0x00DFBD0020 | 513 | #define A_BCM1480_NC_RLD_TRIGGER 0x00DFBD0020 |
514 | #define A_BCM1480_NC_RLD_BAD_ERROR 0x00DFBD0040 | 514 | #define A_BCM1480_NC_RLD_BAD_ERROR 0x00DFBD0040 |
515 | #define A_BCM1480_NC_RLD_COR_ERROR 0x00DFBD0060 | 515 | #define A_BCM1480_NC_RLD_COR_ERROR 0x00DFBD0060 |
516 | #define A_BCM1480_NC_RLD_ECC_STATUS 0x00DFBD0080 | 516 | #define A_BCM1480_NC_RLD_ECC_STATUS 0x00DFBD0080 |
517 | #define A_BCM1480_NC_RLD_WAY_ENABLE 0x00DFBD00A0 | 517 | #define A_BCM1480_NC_RLD_WAY_ENABLE 0x00DFBD00A0 |
518 | #define A_BCM1480_NC_RLD_RANDOM_LFSR 0x00DFBD00C0 | 518 | #define A_BCM1480_NC_RLD_RANDOM_LFSR 0x00DFBD00C0 |
519 | 519 | ||
520 | #define A_BCM1480_NC_INTERRUPT_STATUS 0x00DFBD00E0 | 520 | #define A_BCM1480_NC_INTERRUPT_STATUS 0x00DFBD00E0 |
521 | #define A_BCM1480_NC_INTERRUPT_ENABLE 0x00DFBD0100 | 521 | #define A_BCM1480_NC_INTERRUPT_ENABLE 0x00DFBD0100 |
522 | #define A_BCM1480_NC_TIMEOUT_COUNTER 0x00DFBD0120 | 522 | #define A_BCM1480_NC_TIMEOUT_COUNTER 0x00DFBD0120 |
523 | #define A_BCM1480_NC_TIMEOUT_COUNTER_SEL 0x00DFBD0140 | 523 | #define A_BCM1480_NC_TIMEOUT_COUNTER_SEL 0x00DFBD0140 |
524 | 524 | ||
525 | #define A_BCM1480_NC_CREDIT_STATUS_REG0 0x00DFBD0200 | 525 | #define A_BCM1480_NC_CREDIT_STATUS_REG0 0x00DFBD0200 |
526 | #define A_BCM1480_NC_CREDIT_STATUS_REG1 0x00DFBD0220 | 526 | #define A_BCM1480_NC_CREDIT_STATUS_REG1 0x00DFBD0220 |
527 | #define A_BCM1480_NC_CREDIT_STATUS_REG2 0x00DFBD0240 | 527 | #define A_BCM1480_NC_CREDIT_STATUS_REG2 0x00DFBD0240 |
528 | #define A_BCM1480_NC_CREDIT_STATUS_REG3 0x00DFBD0260 | 528 | #define A_BCM1480_NC_CREDIT_STATUS_REG3 0x00DFBD0260 |
529 | #define A_BCM1480_NC_CREDIT_STATUS_REG4 0x00DFBD0280 | 529 | #define A_BCM1480_NC_CREDIT_STATUS_REG4 0x00DFBD0280 |
530 | #define A_BCM1480_NC_CREDIT_STATUS_REG5 0x00DFBD02A0 | 530 | #define A_BCM1480_NC_CREDIT_STATUS_REG5 0x00DFBD02A0 |
531 | #define A_BCM1480_NC_CREDIT_STATUS_REG6 0x00DFBD02C0 | 531 | #define A_BCM1480_NC_CREDIT_STATUS_REG6 0x00DFBD02C0 |
532 | #define A_BCM1480_NC_CREDIT_STATUS_REG7 0x00DFBD02E0 | 532 | #define A_BCM1480_NC_CREDIT_STATUS_REG7 0x00DFBD02E0 |
533 | #define A_BCM1480_NC_CREDIT_STATUS_REG8 0x00DFBD0300 | 533 | #define A_BCM1480_NC_CREDIT_STATUS_REG8 0x00DFBD0300 |
534 | #define A_BCM1480_NC_CREDIT_STATUS_REG9 0x00DFBD0320 | 534 | #define A_BCM1480_NC_CREDIT_STATUS_REG9 0x00DFBD0320 |
535 | #define A_BCM1480_NC_CREDIT_STATUS_REG10 0x00DFBE0000 | 535 | #define A_BCM1480_NC_CREDIT_STATUS_REG10 0x00DFBE0000 |
536 | #define A_BCM1480_NC_CREDIT_STATUS_REG11 0x00DFBE0020 | 536 | #define A_BCM1480_NC_CREDIT_STATUS_REG11 0x00DFBE0020 |
537 | #define A_BCM1480_NC_CREDIT_STATUS_REG12 0x00DFBE0040 | 537 | #define A_BCM1480_NC_CREDIT_STATUS_REG12 0x00DFBE0040 |
538 | 538 | ||
539 | #define A_BCM1480_NC_SR_TIMEOUT_COUNTER 0x00DFBE0060 | 539 | #define A_BCM1480_NC_SR_TIMEOUT_COUNTER 0x00DFBE0060 |
540 | #define A_BCM1480_NC_SR_TIMEOUT_COUNTER_SEL 0x00DFBE0080 | 540 | #define A_BCM1480_NC_SR_TIMEOUT_COUNTER_SEL 0x00DFBE0080 |
541 | 541 | ||
542 | 542 | ||
@@ -544,43 +544,43 @@ | |||
544 | * H&R Block Configuration Registers (Section 12.4) | 544 | * H&R Block Configuration Registers (Section 12.4) |
545 | ********************************************************************* */ | 545 | ********************************************************************* */ |
546 | 546 | ||
547 | #define A_BCM1480_HR_BASE_0 0x00DF820000 | 547 | #define A_BCM1480_HR_BASE_0 0x00DF820000 |
548 | #define A_BCM1480_HR_BASE_1 0x00DF8A0000 | 548 | #define A_BCM1480_HR_BASE_1 0x00DF8A0000 |
549 | #define A_BCM1480_HR_BASE_2 0x00DF920000 | 549 | #define A_BCM1480_HR_BASE_2 0x00DF920000 |
550 | #define BCM1480_HR_REGISTER_SPACING 0x80000 | 550 | #define BCM1480_HR_REGISTER_SPACING 0x80000 |
551 | 551 | ||
552 | #define A_BCM1480_HR_BASE(idx) (A_BCM1480_HR_BASE_0 + ((idx)*BCM1480_HR_REGISTER_SPACING)) | 552 | #define A_BCM1480_HR_BASE(idx) (A_BCM1480_HR_BASE_0 + ((idx)*BCM1480_HR_REGISTER_SPACING)) |
553 | #define A_BCM1480_HR_REGISTER(idx, reg) (A_BCM1480_HR_BASE(idx) + (reg)) | 553 | #define A_BCM1480_HR_REGISTER(idx, reg) (A_BCM1480_HR_BASE(idx) + (reg)) |
554 | 554 | ||
555 | #define R_BCM1480_HR_CFG 0x0000000000 | 555 | #define R_BCM1480_HR_CFG 0x0000000000 |
556 | 556 | ||
557 | #define R_BCM1480_HR_MAPPING 0x0000010010 | 557 | #define R_BCM1480_HR_MAPPING 0x0000010010 |
558 | 558 | ||
559 | #define BCM1480_HR_RULE_SPACING 0x0000000010 | 559 | #define BCM1480_HR_RULE_SPACING 0x0000000010 |
560 | #define BCM1480_HR_NUM_RULES 16 | 560 | #define BCM1480_HR_NUM_RULES 16 |
561 | #define BCM1480_HR_OP_OFFSET 0x0000000100 | 561 | #define BCM1480_HR_OP_OFFSET 0x0000000100 |
562 | #define BCM1480_HR_TYPE_OFFSET 0x0000000108 | 562 | #define BCM1480_HR_TYPE_OFFSET 0x0000000108 |
563 | #define R_BCM1480_HR_RULE_OP(idx) (BCM1480_HR_OP_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING)) | 563 | #define R_BCM1480_HR_RULE_OP(idx) (BCM1480_HR_OP_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING)) |
564 | #define R_BCM1480_HR_RULE_TYPE(idx) (BCM1480_HR_TYPE_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING)) | 564 | #define R_BCM1480_HR_RULE_TYPE(idx) (BCM1480_HR_TYPE_OFFSET + ((idx)*BCM1480_HR_RULE_SPACING)) |
565 | 565 | ||
566 | #define BCM1480_HR_LEAF_SPACING 0x0000000010 | 566 | #define BCM1480_HR_LEAF_SPACING 0x0000000010 |
567 | #define BCM1480_HR_NUM_LEAVES 10 | 567 | #define BCM1480_HR_NUM_LEAVES 10 |
568 | #define BCM1480_HR_LEAF_OFFSET 0x0000000300 | 568 | #define BCM1480_HR_LEAF_OFFSET 0x0000000300 |
569 | #define R_BCM1480_HR_HA_LEAF0(idx) (BCM1480_HR_LEAF_OFFSET + ((idx)*BCM1480_HR_LEAF_SPACING)) | 569 | #define R_BCM1480_HR_HA_LEAF0(idx) (BCM1480_HR_LEAF_OFFSET + ((idx)*BCM1480_HR_LEAF_SPACING)) |
570 | 570 | ||
571 | #define R_BCM1480_HR_EX_LEAF0 0x00000003A0 | 571 | #define R_BCM1480_HR_EX_LEAF0 0x00000003A0 |
572 | 572 | ||
573 | #define BCM1480_HR_PATH_SPACING 0x0000000010 | 573 | #define BCM1480_HR_PATH_SPACING 0x0000000010 |
574 | #define BCM1480_HR_NUM_PATHS 16 | 574 | #define BCM1480_HR_NUM_PATHS 16 |
575 | #define BCM1480_HR_PATH_OFFSET 0x0000000600 | 575 | #define BCM1480_HR_PATH_OFFSET 0x0000000600 |
576 | #define R_BCM1480_HR_PATH(idx) (BCM1480_HR_PATH_OFFSET + ((idx)*BCM1480_HR_PATH_SPACING)) | 576 | #define R_BCM1480_HR_PATH(idx) (BCM1480_HR_PATH_OFFSET + ((idx)*BCM1480_HR_PATH_SPACING)) |
577 | 577 | ||
578 | #define R_BCM1480_HR_PATH_DEFAULT 0x0000000700 | 578 | #define R_BCM1480_HR_PATH_DEFAULT 0x0000000700 |
579 | 579 | ||
580 | #define BCM1480_HR_ROUTE_SPACING 8 | 580 | #define BCM1480_HR_ROUTE_SPACING 8 |
581 | #define BCM1480_HR_NUM_ROUTES 512 | 581 | #define BCM1480_HR_NUM_ROUTES 512 |
582 | #define BCM1480_HR_ROUTE_OFFSET 0x0000001000 | 582 | #define BCM1480_HR_ROUTE_OFFSET 0x0000001000 |
583 | #define R_BCM1480_HR_RT_WORD(idx) (BCM1480_HR_ROUTE_OFFSET + ((idx)*BCM1480_HR_ROUTE_SPACING)) | 583 | #define R_BCM1480_HR_RT_WORD(idx) (BCM1480_HR_ROUTE_OFFSET + ((idx)*BCM1480_HR_ROUTE_SPACING)) |
584 | 584 | ||
585 | 585 | ||
586 | /* checked to here - ehs */ | 586 | /* checked to here - ehs */ |
@@ -588,55 +588,55 @@ | |||
588 | * Packet Manager DMA Registers (Section 12.5) | 588 | * Packet Manager DMA Registers (Section 12.5) |
589 | ********************************************************************* */ | 589 | ********************************************************************* */ |
590 | 590 | ||
591 | #define A_BCM1480_PM_BASE 0x0010056000 | 591 | #define A_BCM1480_PM_BASE 0x0010056000 |
592 | 592 | ||
593 | #define A_BCM1480_PMI_LCL_0 0x0010058000 | 593 | #define A_BCM1480_PMI_LCL_0 0x0010058000 |
594 | #define A_BCM1480_PMO_LCL_0 0x001005C000 | 594 | #define A_BCM1480_PMO_LCL_0 0x001005C000 |
595 | #define A_BCM1480_PMI_OFFSET_0 (A_BCM1480_PMI_LCL_0 - A_BCM1480_PM_BASE) | 595 | #define A_BCM1480_PMI_OFFSET_0 (A_BCM1480_PMI_LCL_0 - A_BCM1480_PM_BASE) |
596 | #define A_BCM1480_PMO_OFFSET_0 (A_BCM1480_PMO_LCL_0 - A_BCM1480_PM_BASE) | 596 | #define A_BCM1480_PMO_OFFSET_0 (A_BCM1480_PMO_LCL_0 - A_BCM1480_PM_BASE) |
597 | 597 | ||
598 | #define BCM1480_PM_LCL_REGISTER_SPACING 0x100 | 598 | #define BCM1480_PM_LCL_REGISTER_SPACING 0x100 |
599 | #define BCM1480_PM_NUM_CHANNELS 32 | 599 | #define BCM1480_PM_NUM_CHANNELS 32 |
600 | 600 | ||
601 | #define A_BCM1480_PMI_LCL_BASE(idx) (A_BCM1480_PMI_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING)) | 601 | #define A_BCM1480_PMI_LCL_BASE(idx) (A_BCM1480_PMI_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING)) |
602 | #define A_BCM1480_PMI_LCL_REGISTER(idx, reg) (A_BCM1480_PMI_LCL_BASE(idx) + (reg)) | 602 | #define A_BCM1480_PMI_LCL_REGISTER(idx, reg) (A_BCM1480_PMI_LCL_BASE(idx) + (reg)) |
603 | #define A_BCM1480_PMO_LCL_BASE(idx) (A_BCM1480_PMO_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING)) | 603 | #define A_BCM1480_PMO_LCL_BASE(idx) (A_BCM1480_PMO_LCL_0 + ((idx)*BCM1480_PM_LCL_REGISTER_SPACING)) |
604 | #define A_BCM1480_PMO_LCL_REGISTER(idx, reg) (A_BCM1480_PMO_LCL_BASE(idx) + (reg)) | 604 | #define A_BCM1480_PMO_LCL_REGISTER(idx, reg) (A_BCM1480_PMO_LCL_BASE(idx) + (reg)) |
605 | 605 | ||
606 | #define BCM1480_PM_INT_PACKING 8 | 606 | #define BCM1480_PM_INT_PACKING 8 |
607 | #define BCM1480_PM_INT_FUNCTION_SPACING 0x40 | 607 | #define BCM1480_PM_INT_FUNCTION_SPACING 0x40 |
608 | #define BCM1480_PM_INT_NUM_FUNCTIONS 3 | 608 | #define BCM1480_PM_INT_NUM_FUNCTIONS 3 |
609 | 609 | ||
610 | /* | 610 | /* |
611 | * DMA channel registers relative to A_BCM1480_PMI_LCL_BASE(n) and A_BCM1480_PMO_LCL_BASE(n) | 611 | * DMA channel registers relative to A_BCM1480_PMI_LCL_BASE(n) and A_BCM1480_PMO_LCL_BASE(n) |
612 | */ | 612 | */ |
613 | 613 | ||
614 | #define R_BCM1480_PM_BASE_SIZE 0x0000000000 | 614 | #define R_BCM1480_PM_BASE_SIZE 0x0000000000 |
615 | #define R_BCM1480_PM_CNT 0x0000000008 | 615 | #define R_BCM1480_PM_CNT 0x0000000008 |
616 | #define R_BCM1480_PM_PFCNT 0x0000000010 | 616 | #define R_BCM1480_PM_PFCNT 0x0000000010 |
617 | #define R_BCM1480_PM_LAST 0x0000000018 | 617 | #define R_BCM1480_PM_LAST 0x0000000018 |
618 | #define R_BCM1480_PM_PFINDX 0x0000000020 | 618 | #define R_BCM1480_PM_PFINDX 0x0000000020 |
619 | #define R_BCM1480_PM_INT_WMK 0x0000000028 | 619 | #define R_BCM1480_PM_INT_WMK 0x0000000028 |
620 | #define R_BCM1480_PM_CONFIG0 0x0000000030 | 620 | #define R_BCM1480_PM_CONFIG0 0x0000000030 |
621 | #define R_BCM1480_PM_LOCALDEBUG 0x0000000078 | 621 | #define R_BCM1480_PM_LOCALDEBUG 0x0000000078 |
622 | #define R_BCM1480_PM_CACHEABILITY 0x0000000080 /* PMI only */ | 622 | #define R_BCM1480_PM_CACHEABILITY 0x0000000080 /* PMI only */ |
623 | #define R_BCM1480_PM_INT_CNFG 0x0000000088 | 623 | #define R_BCM1480_PM_INT_CNFG 0x0000000088 |
624 | #define R_BCM1480_PM_DESC_MERGE_TIMER 0x0000000090 | 624 | #define R_BCM1480_PM_DESC_MERGE_TIMER 0x0000000090 |
625 | #define R_BCM1480_PM_LOCALDEBUG_PIB 0x00000000F8 /* PMI only */ | 625 | #define R_BCM1480_PM_LOCALDEBUG_PIB 0x00000000F8 /* PMI only */ |
626 | #define R_BCM1480_PM_LOCALDEBUG_POB 0x00000000F8 /* PMO only */ | 626 | #define R_BCM1480_PM_LOCALDEBUG_POB 0x00000000F8 /* PMO only */ |
627 | 627 | ||
628 | /* | 628 | /* |
629 | * Global Registers (Not Channelized) | 629 | * Global Registers (Not Channelized) |
630 | */ | 630 | */ |
631 | 631 | ||
632 | #define A_BCM1480_PMI_GLB_0 0x0010056000 | 632 | #define A_BCM1480_PMI_GLB_0 0x0010056000 |
633 | #define A_BCM1480_PMO_GLB_0 0x0010057000 | 633 | #define A_BCM1480_PMO_GLB_0 0x0010057000 |
634 | 634 | ||
635 | /* | 635 | /* |
636 | * PM to TX Mapping Register relative to A_BCM1480_PMI_GLB_0 and A_BCM1480_PMO_GLB_0 | 636 | * PM to TX Mapping Register relative to A_BCM1480_PMI_GLB_0 and A_BCM1480_PMO_GLB_0 |
637 | */ | 637 | */ |
638 | 638 | ||
639 | #define R_BCM1480_PM_PMO_MAPPING 0x00000008C8 /* PMO only */ | 639 | #define R_BCM1480_PM_PMO_MAPPING 0x00000008C8 /* PMO only */ |
640 | 640 | ||
641 | #define A_BCM1480_PM_PMO_MAPPING (A_BCM1480_PMO_GLB_0 + R_BCM1480_PM_PMO_MAPPING) | 641 | #define A_BCM1480_PM_PMO_MAPPING (A_BCM1480_PMO_GLB_0 + R_BCM1480_PM_PMO_MAPPING) |
642 | 642 | ||
@@ -645,32 +645,32 @@ | |||
645 | */ | 645 | */ |
646 | 646 | ||
647 | 647 | ||
648 | #define A_BCM1480_PMI_INT_0 0x0010056800 | 648 | #define A_BCM1480_PMI_INT_0 0x0010056800 |
649 | #define A_BCM1480_PMI_INT(q) (A_BCM1480_PMI_INT_0 + ((q>>8)<<8)) | 649 | #define A_BCM1480_PMI_INT(q) (A_BCM1480_PMI_INT_0 + ((q>>8)<<8)) |
650 | #define A_BCM1480_PMI_INT_OFFSET_0 (A_BCM1480_PMI_INT_0 - A_BCM1480_PM_BASE) | 650 | #define A_BCM1480_PMI_INT_OFFSET_0 (A_BCM1480_PMI_INT_0 - A_BCM1480_PM_BASE) |
651 | #define A_BCM1480_PMO_INT_0 0x0010057800 | 651 | #define A_BCM1480_PMO_INT_0 0x0010057800 |
652 | #define A_BCM1480_PMO_INT(q) (A_BCM1480_PMO_INT_0 + ((q>>8)<<8)) | 652 | #define A_BCM1480_PMO_INT(q) (A_BCM1480_PMO_INT_0 + ((q>>8)<<8)) |
653 | #define A_BCM1480_PMO_INT_OFFSET_0 (A_BCM1480_PMO_INT_0 - A_BCM1480_PM_BASE) | 653 | #define A_BCM1480_PMO_INT_OFFSET_0 (A_BCM1480_PMO_INT_0 - A_BCM1480_PM_BASE) |
654 | 654 | ||
655 | /* | 655 | /* |
656 | * Interrupt registers relative to A_BCM1480_PMI_INT_0 and A_BCM1480_PMO_INT_0 | 656 | * Interrupt registers relative to A_BCM1480_PMI_INT_0 and A_BCM1480_PMO_INT_0 |
657 | */ | 657 | */ |
658 | 658 | ||
659 | #define R_BCM1480_PM_INT_ST 0x0000000000 | 659 | #define R_BCM1480_PM_INT_ST 0x0000000000 |
660 | #define R_BCM1480_PM_INT_MSK 0x0000000040 | 660 | #define R_BCM1480_PM_INT_MSK 0x0000000040 |
661 | #define R_BCM1480_PM_INT_CLR 0x0000000080 | 661 | #define R_BCM1480_PM_INT_CLR 0x0000000080 |
662 | #define R_BCM1480_PM_MRGD_INT 0x00000000C0 | 662 | #define R_BCM1480_PM_MRGD_INT 0x00000000C0 |
663 | 663 | ||
664 | /* | 664 | /* |
665 | * Debug registers (global) | 665 | * Debug registers (global) |
666 | */ | 666 | */ |
667 | 667 | ||
668 | #define A_BCM1480_PM_GLOBALDEBUGMODE_PMI 0x0010056000 | 668 | #define A_BCM1480_PM_GLOBALDEBUGMODE_PMI 0x0010056000 |
669 | #define A_BCM1480_PM_GLOBALDEBUG_PID 0x00100567F8 | 669 | #define A_BCM1480_PM_GLOBALDEBUG_PID 0x00100567F8 |
670 | #define A_BCM1480_PM_GLOBALDEBUG_PIB 0x0010056FF8 | 670 | #define A_BCM1480_PM_GLOBALDEBUG_PIB 0x0010056FF8 |
671 | #define A_BCM1480_PM_GLOBALDEBUGMODE_PMO 0x0010057000 | 671 | #define A_BCM1480_PM_GLOBALDEBUGMODE_PMO 0x0010057000 |
672 | #define A_BCM1480_PM_GLOBALDEBUG_POD 0x00100577F8 | 672 | #define A_BCM1480_PM_GLOBALDEBUG_POD 0x00100577F8 |
673 | #define A_BCM1480_PM_GLOBALDEBUG_POB 0x0010057FF8 | 673 | #define A_BCM1480_PM_GLOBALDEBUG_POB 0x0010057FF8 |
674 | 674 | ||
675 | /* ********************************************************************* | 675 | /* ********************************************************************* |
676 | * Switch performance counters | 676 | * Switch performance counters |
@@ -715,16 +715,16 @@ | |||
715 | * High-Speed Port Registers (Section 13) | 715 | * High-Speed Port Registers (Section 13) |
716 | ********************************************************************* */ | 716 | ********************************************************************* */ |
717 | 717 | ||
718 | #define A_BCM1480_HSP_BASE_0 0x00DF810000 | 718 | #define A_BCM1480_HSP_BASE_0 0x00DF810000 |
719 | #define A_BCM1480_HSP_BASE_1 0x00DF890000 | 719 | #define A_BCM1480_HSP_BASE_1 0x00DF890000 |
720 | #define A_BCM1480_HSP_BASE_2 0x00DF910000 | 720 | #define A_BCM1480_HSP_BASE_2 0x00DF910000 |
721 | #define BCM1480_HSP_REGISTER_SPACING 0x80000 | 721 | #define BCM1480_HSP_REGISTER_SPACING 0x80000 |
722 | 722 | ||
723 | #define A_BCM1480_HSP_BASE(idx) (A_BCM1480_HSP_BASE_0 + ((idx)*BCM1480_HSP_REGISTER_SPACING)) | 723 | #define A_BCM1480_HSP_BASE(idx) (A_BCM1480_HSP_BASE_0 + ((idx)*BCM1480_HSP_REGISTER_SPACING)) |
724 | #define A_BCM1480_HSP_REGISTER(idx, reg) (A_BCM1480_HSP_BASE(idx) + (reg)) | 724 | #define A_BCM1480_HSP_REGISTER(idx, reg) (A_BCM1480_HSP_BASE(idx) + (reg)) |
725 | 725 | ||
726 | #define R_BCM1480_HSP_RX_SPI4_CFG_0 0x0000000000 | 726 | #define R_BCM1480_HSP_RX_SPI4_CFG_0 0x0000000000 |
727 | #define R_BCM1480_HSP_RX_SPI4_CFG_1 0x0000000008 | 727 | #define R_BCM1480_HSP_RX_SPI4_CFG_1 0x0000000008 |
728 | #define R_BCM1480_HSP_RX_SPI4_DESKEW_OVERRIDE 0x0000000010 | 728 | #define R_BCM1480_HSP_RX_SPI4_DESKEW_OVERRIDE 0x0000000010 |
729 | #define R_BCM1480_HSP_RX_SPI4_DESKEW_DATAPATH 0x0000000018 | 729 | #define R_BCM1480_HSP_RX_SPI4_DESKEW_DATAPATH 0x0000000018 |
730 | #define R_BCM1480_HSP_RX_SPI4_PORT_INT_EN 0x0000000020 | 730 | #define R_BCM1480_HSP_RX_SPI4_PORT_INT_EN 0x0000000020 |
@@ -733,34 +733,34 @@ | |||
733 | #define R_BCM1480_HSP_RX_SPI4_CALENDAR_0 0x0000000200 | 733 | #define R_BCM1480_HSP_RX_SPI4_CALENDAR_0 0x0000000200 |
734 | #define R_BCM1480_HSP_RX_SPI4_CALENDAR_1 0x0000000208 | 734 | #define R_BCM1480_HSP_RX_SPI4_CALENDAR_1 0x0000000208 |
735 | 735 | ||
736 | #define R_BCM1480_HSP_RX_PLL_CNFG 0x0000000800 | 736 | #define R_BCM1480_HSP_RX_PLL_CNFG 0x0000000800 |
737 | #define R_BCM1480_HSP_RX_CALIBRATION 0x0000000808 | 737 | #define R_BCM1480_HSP_RX_CALIBRATION 0x0000000808 |
738 | #define R_BCM1480_HSP_RX_TEST 0x0000000810 | 738 | #define R_BCM1480_HSP_RX_TEST 0x0000000810 |
739 | #define R_BCM1480_HSP_RX_DIAG_DETAILS 0x0000000818 | 739 | #define R_BCM1480_HSP_RX_DIAG_DETAILS 0x0000000818 |
740 | #define R_BCM1480_HSP_RX_DIAG_CRC_0 0x0000000820 | 740 | #define R_BCM1480_HSP_RX_DIAG_CRC_0 0x0000000820 |
741 | #define R_BCM1480_HSP_RX_DIAG_CRC_1 0x0000000828 | 741 | #define R_BCM1480_HSP_RX_DIAG_CRC_1 0x0000000828 |
742 | #define R_BCM1480_HSP_RX_DIAG_HTCMD 0x0000000830 | 742 | #define R_BCM1480_HSP_RX_DIAG_HTCMD 0x0000000830 |
743 | #define R_BCM1480_HSP_RX_DIAG_PKTCTL 0x0000000838 | 743 | #define R_BCM1480_HSP_RX_DIAG_PKTCTL 0x0000000838 |
744 | 744 | ||
745 | #define R_BCM1480_HSP_RX_VIS_FLCTRL_COUNTER 0x0000000870 | 745 | #define R_BCM1480_HSP_RX_VIS_FLCTRL_COUNTER 0x0000000870 |
746 | 746 | ||
747 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_0 0x0000020020 | 747 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_0 0x0000020020 |
748 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_1 0x0000020028 | 748 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_1 0x0000020028 |
749 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_2 0x0000020030 | 749 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_2 0x0000020030 |
750 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_3 0x0000020038 | 750 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_3 0x0000020038 |
751 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_4 0x0000020040 | 751 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_4 0x0000020040 |
752 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_5 0x0000020048 | 752 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_5 0x0000020048 |
753 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_6 0x0000020050 | 753 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_6 0x0000020050 |
754 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_7 0x0000020058 | 754 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC_7 0x0000020058 |
755 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_RX_PKT_RAMALLOC_0 + 8*(idx)) | 755 | #define R_BCM1480_HSP_RX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_RX_PKT_RAMALLOC_0 + 8*(idx)) |
756 | 756 | ||
757 | /* XXX Following registers were shuffled. Renamed/renumbered per errata. */ | 757 | /* XXX Following registers were shuffled. Renamed/renumbered per errata. */ |
758 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_0 0x0000020078 | 758 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_0 0x0000020078 |
759 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_1 0x0000020080 | 759 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_1 0x0000020080 |
760 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_2 0x0000020088 | 760 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_2 0x0000020088 |
761 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_3 0x0000020090 | 761 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_3 0x0000020090 |
762 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_4 0x0000020098 | 762 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_4 0x0000020098 |
763 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_5 0x00000200A0 | 763 | #define R_BCM1480_HSP_RX_HT_RAMALLOC_5 0x00000200A0 |
764 | 764 | ||
765 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_0 0x00000200B0 | 765 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_0 0x00000200B0 |
766 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_1 0x00000200B8 | 766 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_1 0x00000200B8 |
@@ -772,30 +772,30 @@ | |||
772 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_7 0x00000200E8 | 772 | #define R_BCM1480_HSP_RX_SPI_WATERMARK_7 0x00000200E8 |
773 | #define R_BCM1480_HSP_RX_SPI_WATERMARK(idx) (R_BCM1480_HSP_RX_SPI_WATERMARK_0 + 8*(idx)) | 773 | #define R_BCM1480_HSP_RX_SPI_WATERMARK(idx) (R_BCM1480_HSP_RX_SPI_WATERMARK_0 + 8*(idx)) |
774 | 774 | ||
775 | #define R_BCM1480_HSP_RX_VIS_CMDQ_0 0x00000200F0 | 775 | #define R_BCM1480_HSP_RX_VIS_CMDQ_0 0x00000200F0 |
776 | #define R_BCM1480_HSP_RX_VIS_CMDQ_1 0x00000200F8 | 776 | #define R_BCM1480_HSP_RX_VIS_CMDQ_1 0x00000200F8 |
777 | #define R_BCM1480_HSP_RX_VIS_CMDQ_2 0x0000020100 | 777 | #define R_BCM1480_HSP_RX_VIS_CMDQ_2 0x0000020100 |
778 | #define R_BCM1480_HSP_RX_RAM_READCTL 0x0000020108 | 778 | #define R_BCM1480_HSP_RX_RAM_READCTL 0x0000020108 |
779 | #define R_BCM1480_HSP_RX_RAM_READWINDOW 0x0000020110 | 779 | #define R_BCM1480_HSP_RX_RAM_READWINDOW 0x0000020110 |
780 | #define R_BCM1480_HSP_RX_RF_READCTL 0x0000020118 | 780 | #define R_BCM1480_HSP_RX_RF_READCTL 0x0000020118 |
781 | #define R_BCM1480_HSP_RX_RF_READWINDOW 0x0000020120 | 781 | #define R_BCM1480_HSP_RX_RF_READWINDOW 0x0000020120 |
782 | 782 | ||
783 | #define R_BCM1480_HSP_TX_SPI4_CFG_0 0x0000040000 | 783 | #define R_BCM1480_HSP_TX_SPI4_CFG_0 0x0000040000 |
784 | #define R_BCM1480_HSP_TX_SPI4_CFG_1 0x0000040008 | 784 | #define R_BCM1480_HSP_TX_SPI4_CFG_1 0x0000040008 |
785 | #define R_BCM1480_HSP_TX_SPI4_TRAINING_FMT 0x0000040010 | 785 | #define R_BCM1480_HSP_TX_SPI4_TRAINING_FMT 0x0000040010 |
786 | 786 | ||
787 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_0 0x0000040020 | 787 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_0 0x0000040020 |
788 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_1 0x0000040028 | 788 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_1 0x0000040028 |
789 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_2 0x0000040030 | 789 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_2 0x0000040030 |
790 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_3 0x0000040038 | 790 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_3 0x0000040038 |
791 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_4 0x0000040040 | 791 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_4 0x0000040040 |
792 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_5 0x0000040048 | 792 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_5 0x0000040048 |
793 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_6 0x0000040050 | 793 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_6 0x0000040050 |
794 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_7 0x0000040058 | 794 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC_7 0x0000040058 |
795 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_TX_PKT_RAMALLOC_0 + 8*(idx)) | 795 | #define R_BCM1480_HSP_TX_PKT_RAMALLOC(idx) (R_BCM1480_HSP_TX_PKT_RAMALLOC_0 + 8*(idx)) |
796 | #define R_BCM1480_HSP_TX_NPC_RAMALLOC 0x0000040078 | 796 | #define R_BCM1480_HSP_TX_NPC_RAMALLOC 0x0000040078 |
797 | #define R_BCM1480_HSP_TX_RSP_RAMALLOC 0x0000040080 | 797 | #define R_BCM1480_HSP_TX_RSP_RAMALLOC 0x0000040080 |
798 | #define R_BCM1480_HSP_TX_PC_RAMALLOC 0x0000040088 | 798 | #define R_BCM1480_HSP_TX_PC_RAMALLOC 0x0000040088 |
799 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_0 0x0000040090 | 799 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_0 0x0000040090 |
800 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_1 0x0000040098 | 800 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_1 0x0000040098 |
801 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_2 0x00000400A0 | 801 | #define R_BCM1480_HSP_TX_HTCC_RAMALLOC_2 0x00000400A0 |
@@ -805,37 +805,37 @@ | |||
805 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_2 0x00000400C0 | 805 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_2 0x00000400C0 |
806 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_3 0x00000400C8 | 806 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT_3 0x00000400C8 |
807 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_RXPHITCNT_0 + 8*(idx)) | 807 | #define R_BCM1480_HSP_TX_PKT_RXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_RXPHITCNT_0 + 8*(idx)) |
808 | #define R_BCM1480_HSP_TX_HTIO_RXPHITCNT 0x00000400D0 | 808 | #define R_BCM1480_HSP_TX_HTIO_RXPHITCNT 0x00000400D0 |
809 | #define R_BCM1480_HSP_TX_HTCC_RXPHITCNT 0x00000400D8 | 809 | #define R_BCM1480_HSP_TX_HTCC_RXPHITCNT 0x00000400D8 |
810 | 810 | ||
811 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 0x00000400E0 | 811 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 0x00000400E0 |
812 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_1 0x00000400E8 | 812 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_1 0x00000400E8 |
813 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_2 0x00000400F0 | 813 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_2 0x00000400F0 |
814 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_3 0x00000400F8 | 814 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT_3 0x00000400F8 |
815 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 + 8*(idx)) | 815 | #define R_BCM1480_HSP_TX_PKT_TXPHITCNT(idx) (R_BCM1480_HSP_TX_PKT_TXPHITCNT_0 + 8*(idx)) |
816 | #define R_BCM1480_HSP_TX_HTIO_TXPHITCNT 0x0000040100 | 816 | #define R_BCM1480_HSP_TX_HTIO_TXPHITCNT 0x0000040100 |
817 | #define R_BCM1480_HSP_TX_HTCC_TXPHITCNT 0x0000040108 | 817 | #define R_BCM1480_HSP_TX_HTCC_TXPHITCNT 0x0000040108 |
818 | 818 | ||
819 | #define R_BCM1480_HSP_TX_SPI4_CALENDAR_0 0x0000040200 | 819 | #define R_BCM1480_HSP_TX_SPI4_CALENDAR_0 0x0000040200 |
820 | #define R_BCM1480_HSP_TX_SPI4_CALENDAR_1 0x0000040208 | 820 | #define R_BCM1480_HSP_TX_SPI4_CALENDAR_1 0x0000040208 |
821 | 821 | ||
822 | #define R_BCM1480_HSP_TX_PLL_CNFG 0x0000040800 | 822 | #define R_BCM1480_HSP_TX_PLL_CNFG 0x0000040800 |
823 | #define R_BCM1480_HSP_TX_CALIBRATION 0x0000040808 | 823 | #define R_BCM1480_HSP_TX_CALIBRATION 0x0000040808 |
824 | #define R_BCM1480_HSP_TX_TEST 0x0000040810 | 824 | #define R_BCM1480_HSP_TX_TEST 0x0000040810 |
825 | 825 | ||
826 | #define R_BCM1480_HSP_TX_VIS_CMDQ_0 0x0000040840 | 826 | #define R_BCM1480_HSP_TX_VIS_CMDQ_0 0x0000040840 |
827 | #define R_BCM1480_HSP_TX_VIS_CMDQ_1 0x0000040848 | 827 | #define R_BCM1480_HSP_TX_VIS_CMDQ_1 0x0000040848 |
828 | #define R_BCM1480_HSP_TX_VIS_CMDQ_2 0x0000040850 | 828 | #define R_BCM1480_HSP_TX_VIS_CMDQ_2 0x0000040850 |
829 | #define R_BCM1480_HSP_TX_RAM_READCTL 0x0000040860 | 829 | #define R_BCM1480_HSP_TX_RAM_READCTL 0x0000040860 |
830 | #define R_BCM1480_HSP_TX_RAM_READWINDOW 0x0000040868 | 830 | #define R_BCM1480_HSP_TX_RAM_READWINDOW 0x0000040868 |
831 | #define R_BCM1480_HSP_TX_RF_READCTL 0x0000040870 | 831 | #define R_BCM1480_HSP_TX_RF_READCTL 0x0000040870 |
832 | #define R_BCM1480_HSP_TX_RF_READWINDOW 0x0000040878 | 832 | #define R_BCM1480_HSP_TX_RF_READWINDOW 0x0000040878 |
833 | 833 | ||
834 | #define R_BCM1480_HSP_TX_SPI4_PORT_INT_STATUS 0x0000040880 | 834 | #define R_BCM1480_HSP_TX_SPI4_PORT_INT_STATUS 0x0000040880 |
835 | #define R_BCM1480_HSP_TX_SPI4_PORT_INT_EN 0x0000040888 | 835 | #define R_BCM1480_HSP_TX_SPI4_PORT_INT_EN 0x0000040888 |
836 | 836 | ||
837 | #define R_BCM1480_HSP_TX_NEXT_ADDR_BASE 0x000040400 | 837 | #define R_BCM1480_HSP_TX_NEXT_ADDR_BASE 0x000040400 |
838 | #define R_BCM1480_HSP_TX_NEXT_ADDR_REGISTER(x) (R_BCM1480_HSP_TX_NEXT_ADDR_BASE+ 8*(x)) | 838 | #define R_BCM1480_HSP_TX_NEXT_ADDR_REGISTER(x) (R_BCM1480_HSP_TX_NEXT_ADDR_BASE+ 8*(x)) |
839 | 839 | ||
840 | 840 | ||
841 | 841 | ||
@@ -843,60 +843,60 @@ | |||
843 | * Physical Address Map (Table 10 and Figure 7) | 843 | * Physical Address Map (Table 10 and Figure 7) |
844 | ********************************************************************* */ | 844 | ********************************************************************* */ |
845 | 845 | ||
846 | #define A_BCM1480_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) | 846 | #define A_BCM1480_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) |
847 | #define A_BCM1480_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) | 847 | #define A_BCM1480_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) |
848 | #define A_BCM1480_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) | 848 | #define A_BCM1480_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) |
849 | #define A_BCM1480_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) | 849 | #define A_BCM1480_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) |
850 | #define A_BCM1480_PHYS_GENBUS _SB_MAKE64(0x0010090000) | 850 | #define A_BCM1480_PHYS_GENBUS _SB_MAKE64(0x0010090000) |
851 | #define A_BCM1480_PHYS_GENBUS_END _SB_MAKE64(0x0028000000) | 851 | #define A_BCM1480_PHYS_GENBUS_END _SB_MAKE64(0x0028000000) |
852 | #define A_BCM1480_PHYS_PCI_MISC_MATCH_BYTES _SB_MAKE64(0x0028000000) | 852 | #define A_BCM1480_PHYS_PCI_MISC_MATCH_BYTES _SB_MAKE64(0x0028000000) |
853 | #define A_BCM1480_PHYS_PCI_IACK_MATCH_BYTES _SB_MAKE64(0x0029000000) | 853 | #define A_BCM1480_PHYS_PCI_IACK_MATCH_BYTES _SB_MAKE64(0x0029000000) |
854 | #define A_BCM1480_PHYS_PCI_IO_MATCH_BYTES _SB_MAKE64(0x002C000000) | 854 | #define A_BCM1480_PHYS_PCI_IO_MATCH_BYTES _SB_MAKE64(0x002C000000) |
855 | #define A_BCM1480_PHYS_PCI_CFG_MATCH_BYTES _SB_MAKE64(0x002E000000) | 855 | #define A_BCM1480_PHYS_PCI_CFG_MATCH_BYTES _SB_MAKE64(0x002E000000) |
856 | #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BYTES _SB_MAKE64(0x002F000000) | 856 | #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BYTES _SB_MAKE64(0x002F000000) |
857 | #define A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES _SB_MAKE64(0x0030000000) | 857 | #define A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES _SB_MAKE64(0x0030000000) |
858 | #define A_BCM1480_PHYS_HT_MEM_MATCH_BYTES _SB_MAKE64(0x0040000000) | 858 | #define A_BCM1480_PHYS_HT_MEM_MATCH_BYTES _SB_MAKE64(0x0040000000) |
859 | #define A_BCM1480_PHYS_HT_MEM_MATCH_BITS _SB_MAKE64(0x0060000000) | 859 | #define A_BCM1480_PHYS_HT_MEM_MATCH_BITS _SB_MAKE64(0x0060000000) |
860 | #define A_BCM1480_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) | 860 | #define A_BCM1480_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) |
861 | #define A_BCM1480_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) | 861 | #define A_BCM1480_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) |
862 | #define A_BCM1480_PHYS_PCI_MISC_MATCH_BITS _SB_MAKE64(0x00A8000000) | 862 | #define A_BCM1480_PHYS_PCI_MISC_MATCH_BITS _SB_MAKE64(0x00A8000000) |
863 | #define A_BCM1480_PHYS_PCI_IACK_MATCH_BITS _SB_MAKE64(0x00A9000000) | 863 | #define A_BCM1480_PHYS_PCI_IACK_MATCH_BITS _SB_MAKE64(0x00A9000000) |
864 | #define A_BCM1480_PHYS_PCI_IO_MATCH_BITS _SB_MAKE64(0x00AC000000) | 864 | #define A_BCM1480_PHYS_PCI_IO_MATCH_BITS _SB_MAKE64(0x00AC000000) |
865 | #define A_BCM1480_PHYS_PCI_CFG_MATCH_BITS _SB_MAKE64(0x00AE000000) | 865 | #define A_BCM1480_PHYS_PCI_CFG_MATCH_BITS _SB_MAKE64(0x00AE000000) |
866 | #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BITS _SB_MAKE64(0x00AF000000) | 866 | #define A_BCM1480_PHYS_PCI_OMAP_MATCH_BITS _SB_MAKE64(0x00AF000000) |
867 | #define A_BCM1480_PHYS_PCI_MEM_MATCH_BITS _SB_MAKE64(0x00B0000000) | 867 | #define A_BCM1480_PHYS_PCI_MEM_MATCH_BITS _SB_MAKE64(0x00B0000000) |
868 | #define A_BCM1480_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) | 868 | #define A_BCM1480_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) |
869 | #define A_BCM1480_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) | 869 | #define A_BCM1480_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) |
870 | #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) | 870 | #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) |
871 | #define A_BCM1480_PHYS_HT_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) | 871 | #define A_BCM1480_PHYS_HT_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) |
872 | #define A_BCM1480_PHYS_HT_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) | 872 | #define A_BCM1480_PHYS_HT_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) |
873 | #define A_BCM1480_PHYS_HS_SUBSYS _SB_MAKE64(0x00DF000000) | 873 | #define A_BCM1480_PHYS_HS_SUBSYS _SB_MAKE64(0x00DF000000) |
874 | #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) | 874 | #define A_BCM1480_PHYS_HT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) |
875 | #define A_BCM1480_PHYS_HT_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) | 875 | #define A_BCM1480_PHYS_HT_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) |
876 | #define A_BCM1480_PHYS_HT_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) | 876 | #define A_BCM1480_PHYS_HT_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) |
877 | #define A_BCM1480_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) | 877 | #define A_BCM1480_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) |
878 | #define A_BCM1480_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) | 878 | #define A_BCM1480_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) |
879 | #define A_BCM1480_PHYS_PCI_UPPER _SB_MAKE64(0x1000000000) | 879 | #define A_BCM1480_PHYS_PCI_UPPER _SB_MAKE64(0x1000000000) |
880 | #define A_BCM1480_PHYS_HT_UPPER_MATCH_BYTES _SB_MAKE64(0x2000000000) | 880 | #define A_BCM1480_PHYS_HT_UPPER_MATCH_BYTES _SB_MAKE64(0x2000000000) |
881 | #define A_BCM1480_PHYS_HT_UPPER_MATCH_BITS _SB_MAKE64(0x3000000000) | 881 | #define A_BCM1480_PHYS_HT_UPPER_MATCH_BITS _SB_MAKE64(0x3000000000) |
882 | #define A_BCM1480_PHYS_HT_NODE_ALIAS _SB_MAKE64(0x4000000000) | 882 | #define A_BCM1480_PHYS_HT_NODE_ALIAS _SB_MAKE64(0x4000000000) |
883 | #define A_BCM1480_PHYS_HT_FULLACCESS _SB_MAKE64(0xF000000000) | 883 | #define A_BCM1480_PHYS_HT_FULLACCESS _SB_MAKE64(0xF000000000) |
884 | 884 | ||
885 | 885 | ||
886 | /* ********************************************************************* | 886 | /* ********************************************************************* |
887 | * L2 Cache as RAM (Table 54) | 887 | * L2 Cache as RAM (Table 54) |
888 | ********************************************************************* */ | 888 | ********************************************************************* */ |
889 | 889 | ||
890 | #define A_BCM1480_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) | 890 | #define A_BCM1480_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) |
891 | #define BCM1480_PHYS_L2CACHE_NUM_WAYS 8 | 891 | #define BCM1480_PHYS_L2CACHE_NUM_WAYS 8 |
892 | #define A_BCM1480_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000100000) | 892 | #define A_BCM1480_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000100000) |
893 | #define A_BCM1480_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0300000) | 893 | #define A_BCM1480_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0300000) |
894 | #define A_BCM1480_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D0320000) | 894 | #define A_BCM1480_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D0320000) |
895 | #define A_BCM1480_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D0340000) | 895 | #define A_BCM1480_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D0340000) |
896 | #define A_BCM1480_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D0360000) | 896 | #define A_BCM1480_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D0360000) |
897 | #define A_BCM1480_PHYS_L2CACHE_WAY4 _SB_MAKE64(0x00D0380000) | 897 | #define A_BCM1480_PHYS_L2CACHE_WAY4 _SB_MAKE64(0x00D0380000) |
898 | #define A_BCM1480_PHYS_L2CACHE_WAY5 _SB_MAKE64(0x00D03A0000) | 898 | #define A_BCM1480_PHYS_L2CACHE_WAY5 _SB_MAKE64(0x00D03A0000) |
899 | #define A_BCM1480_PHYS_L2CACHE_WAY6 _SB_MAKE64(0x00D03C0000) | 899 | #define A_BCM1480_PHYS_L2CACHE_WAY6 _SB_MAKE64(0x00D03C0000) |
900 | #define A_BCM1480_PHYS_L2CACHE_WAY7 _SB_MAKE64(0x00D03E0000) | 900 | #define A_BCM1480_PHYS_L2CACHE_WAY7 _SB_MAKE64(0x00D03E0000) |
901 | 901 | ||
902 | #endif /* _BCM1480_REGS_H */ | 902 | #endif /* _BCM1480_REGS_H */ |
diff --git a/arch/mips/include/asm/sibyte/bcm1480_scd.h b/arch/mips/include/asm/sibyte/bcm1480_scd.h index 2af3706b9648..8a1e2b05a626 100644 --- a/arch/mips/include/asm/sibyte/bcm1480_scd.h +++ b/arch/mips/include/asm/sibyte/bcm1480_scd.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * BCM1280/BCM1400 Board Support Package | 2 | * BCM1280/BCM1400 Board Support Package |
3 | * | 3 | * |
4 | * SCD Constants and Macros File: bcm1480_scd.h | 4 | * SCD Constants and Macros File: bcm1480_scd.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the System Control and Debug module. | 7 | * manipulating the System Control and Debug module. |
@@ -74,11 +74,11 @@ | |||
74 | * New part definitions | 74 | * New part definitions |
75 | */ | 75 | */ |
76 | 76 | ||
77 | #define K_SYS_PART_BCM1480 0x1406 | 77 | #define K_SYS_PART_BCM1480 0x1406 |
78 | #define K_SYS_PART_BCM1280 0x1206 | 78 | #define K_SYS_PART_BCM1280 0x1206 |
79 | #define K_SYS_PART_BCM1455 0x1407 | 79 | #define K_SYS_PART_BCM1455 0x1407 |
80 | #define K_SYS_PART_BCM1255 0x1257 | 80 | #define K_SYS_PART_BCM1255 0x1257 |
81 | #define K_SYS_PART_BCM1158 0x1156 | 81 | #define K_SYS_PART_BCM1158 0x1156 |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Manufacturing Information Register (Table 14) | 84 | * Manufacturing Information Register (Table 14) |
@@ -91,73 +91,73 @@ | |||
91 | * Entire register is different from 1250, all new constants below | 91 | * Entire register is different from 1250, all new constants below |
92 | */ | 92 | */ |
93 | 93 | ||
94 | #define M_BCM1480_SYS_RESERVED0 _SB_MAKEMASK1(0) | 94 | #define M_BCM1480_SYS_RESERVED0 _SB_MAKEMASK1(0) |
95 | #define M_BCM1480_SYS_HT_MINRSTCNT _SB_MAKEMASK1(1) | 95 | #define M_BCM1480_SYS_HT_MINRSTCNT _SB_MAKEMASK1(1) |
96 | #define M_BCM1480_SYS_RESERVED2 _SB_MAKEMASK1(2) | 96 | #define M_BCM1480_SYS_RESERVED2 _SB_MAKEMASK1(2) |
97 | #define M_BCM1480_SYS_RESERVED3 _SB_MAKEMASK1(3) | 97 | #define M_BCM1480_SYS_RESERVED3 _SB_MAKEMASK1(3) |
98 | #define M_BCM1480_SYS_RESERVED4 _SB_MAKEMASK1(4) | 98 | #define M_BCM1480_SYS_RESERVED4 _SB_MAKEMASK1(4) |
99 | #define M_BCM1480_SYS_IOB_DIV _SB_MAKEMASK1(5) | 99 | #define M_BCM1480_SYS_IOB_DIV _SB_MAKEMASK1(5) |
100 | 100 | ||
101 | #define S_BCM1480_SYS_PLL_DIV _SB_MAKE64(6) | 101 | #define S_BCM1480_SYS_PLL_DIV _SB_MAKE64(6) |
102 | #define M_BCM1480_SYS_PLL_DIV _SB_MAKEMASK(5, S_BCM1480_SYS_PLL_DIV) | 102 | #define M_BCM1480_SYS_PLL_DIV _SB_MAKEMASK(5, S_BCM1480_SYS_PLL_DIV) |
103 | #define V_BCM1480_SYS_PLL_DIV(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_PLL_DIV) | 103 | #define V_BCM1480_SYS_PLL_DIV(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_PLL_DIV) |
104 | #define G_BCM1480_SYS_PLL_DIV(x) _SB_GETVALUE(x, S_BCM1480_SYS_PLL_DIV, M_BCM1480_SYS_PLL_DIV) | 104 | #define G_BCM1480_SYS_PLL_DIV(x) _SB_GETVALUE(x, S_BCM1480_SYS_PLL_DIV, M_BCM1480_SYS_PLL_DIV) |
105 | 105 | ||
106 | #define S_BCM1480_SYS_SW_DIV _SB_MAKE64(11) | 106 | #define S_BCM1480_SYS_SW_DIV _SB_MAKE64(11) |
107 | #define M_BCM1480_SYS_SW_DIV _SB_MAKEMASK(5, S_BCM1480_SYS_SW_DIV) | 107 | #define M_BCM1480_SYS_SW_DIV _SB_MAKEMASK(5, S_BCM1480_SYS_SW_DIV) |
108 | #define V_BCM1480_SYS_SW_DIV(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_SW_DIV) | 108 | #define V_BCM1480_SYS_SW_DIV(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_SW_DIV) |
109 | #define G_BCM1480_SYS_SW_DIV(x) _SB_GETVALUE(x, S_BCM1480_SYS_SW_DIV, M_BCM1480_SYS_SW_DIV) | 109 | #define G_BCM1480_SYS_SW_DIV(x) _SB_GETVALUE(x, S_BCM1480_SYS_SW_DIV, M_BCM1480_SYS_SW_DIV) |
110 | 110 | ||
111 | #define M_BCM1480_SYS_PCMCIA_ENABLE _SB_MAKEMASK1(16) | 111 | #define M_BCM1480_SYS_PCMCIA_ENABLE _SB_MAKEMASK1(16) |
112 | #define M_BCM1480_SYS_DUART1_ENABLE _SB_MAKEMASK1(17) | 112 | #define M_BCM1480_SYS_DUART1_ENABLE _SB_MAKEMASK1(17) |
113 | 113 | ||
114 | #define S_BCM1480_SYS_BOOT_MODE _SB_MAKE64(18) | 114 | #define S_BCM1480_SYS_BOOT_MODE _SB_MAKE64(18) |
115 | #define M_BCM1480_SYS_BOOT_MODE _SB_MAKEMASK(2, S_BCM1480_SYS_BOOT_MODE) | 115 | #define M_BCM1480_SYS_BOOT_MODE _SB_MAKEMASK(2, S_BCM1480_SYS_BOOT_MODE) |
116 | #define V_BCM1480_SYS_BOOT_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_BOOT_MODE) | 116 | #define V_BCM1480_SYS_BOOT_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_BOOT_MODE) |
117 | #define G_BCM1480_SYS_BOOT_MODE(x) _SB_GETVALUE(x, S_BCM1480_SYS_BOOT_MODE, M_BCM1480_SYS_BOOT_MODE) | 117 | #define G_BCM1480_SYS_BOOT_MODE(x) _SB_GETVALUE(x, S_BCM1480_SYS_BOOT_MODE, M_BCM1480_SYS_BOOT_MODE) |
118 | #define K_BCM1480_SYS_BOOT_MODE_ROM32 0 | 118 | #define K_BCM1480_SYS_BOOT_MODE_ROM32 0 |
119 | #define K_BCM1480_SYS_BOOT_MODE_ROM8 1 | 119 | #define K_BCM1480_SYS_BOOT_MODE_ROM8 1 |
120 | #define K_BCM1480_SYS_BOOT_MODE_SMBUS_SMALL 2 | 120 | #define K_BCM1480_SYS_BOOT_MODE_SMBUS_SMALL 2 |
121 | #define K_BCM1480_SYS_BOOT_MODE_SMBUS_BIG 3 | 121 | #define K_BCM1480_SYS_BOOT_MODE_SMBUS_BIG 3 |
122 | #define M_BCM1480_SYS_BOOT_MODE_SMBUS _SB_MAKEMASK1(19) | 122 | #define M_BCM1480_SYS_BOOT_MODE_SMBUS _SB_MAKEMASK1(19) |
123 | 123 | ||
124 | #define M_BCM1480_SYS_PCI_HOST _SB_MAKEMASK1(20) | 124 | #define M_BCM1480_SYS_PCI_HOST _SB_MAKEMASK1(20) |
125 | #define M_BCM1480_SYS_PCI_ARBITER _SB_MAKEMASK1(21) | 125 | #define M_BCM1480_SYS_PCI_ARBITER _SB_MAKEMASK1(21) |
126 | #define M_BCM1480_SYS_BIG_ENDIAN _SB_MAKEMASK1(22) | 126 | #define M_BCM1480_SYS_BIG_ENDIAN _SB_MAKEMASK1(22) |
127 | #define M_BCM1480_SYS_GENCLK_EN _SB_MAKEMASK1(23) | 127 | #define M_BCM1480_SYS_GENCLK_EN _SB_MAKEMASK1(23) |
128 | #define M_BCM1480_SYS_GEN_PARITY_EN _SB_MAKEMASK1(24) | 128 | #define M_BCM1480_SYS_GEN_PARITY_EN _SB_MAKEMASK1(24) |
129 | #define M_BCM1480_SYS_RESERVED25 _SB_MAKEMASK1(25) | 129 | #define M_BCM1480_SYS_RESERVED25 _SB_MAKEMASK1(25) |
130 | 130 | ||
131 | #define S_BCM1480_SYS_CONFIG 26 | 131 | #define S_BCM1480_SYS_CONFIG 26 |
132 | #define M_BCM1480_SYS_CONFIG _SB_MAKEMASK(6, S_BCM1480_SYS_CONFIG) | 132 | #define M_BCM1480_SYS_CONFIG _SB_MAKEMASK(6, S_BCM1480_SYS_CONFIG) |
133 | #define V_BCM1480_SYS_CONFIG(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_CONFIG) | 133 | #define V_BCM1480_SYS_CONFIG(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_CONFIG) |
134 | #define G_BCM1480_SYS_CONFIG(x) _SB_GETVALUE(x, S_BCM1480_SYS_CONFIG, M_BCM1480_SYS_CONFIG) | 134 | #define G_BCM1480_SYS_CONFIG(x) _SB_GETVALUE(x, S_BCM1480_SYS_CONFIG, M_BCM1480_SYS_CONFIG) |
135 | 135 | ||
136 | #define M_BCM1480_SYS_RESERVED32 _SB_MAKEMASK(32, 15) | 136 | #define M_BCM1480_SYS_RESERVED32 _SB_MAKEMASK(32, 15) |
137 | 137 | ||
138 | #define S_BCM1480_SYS_NODEID 47 | 138 | #define S_BCM1480_SYS_NODEID 47 |
139 | #define M_BCM1480_SYS_NODEID _SB_MAKEMASK(4, S_BCM1480_SYS_NODEID) | 139 | #define M_BCM1480_SYS_NODEID _SB_MAKEMASK(4, S_BCM1480_SYS_NODEID) |
140 | #define V_BCM1480_SYS_NODEID(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_NODEID) | 140 | #define V_BCM1480_SYS_NODEID(x) _SB_MAKEVALUE(x, S_BCM1480_SYS_NODEID) |
141 | #define G_BCM1480_SYS_NODEID(x) _SB_GETVALUE(x, S_BCM1480_SYS_NODEID, M_BCM1480_SYS_NODEID) | 141 | #define G_BCM1480_SYS_NODEID(x) _SB_GETVALUE(x, S_BCM1480_SYS_NODEID, M_BCM1480_SYS_NODEID) |
142 | 142 | ||
143 | #define M_BCM1480_SYS_CCNUMA_EN _SB_MAKEMASK1(51) | 143 | #define M_BCM1480_SYS_CCNUMA_EN _SB_MAKEMASK1(51) |
144 | #define M_BCM1480_SYS_CPU_RESET_0 _SB_MAKEMASK1(52) | 144 | #define M_BCM1480_SYS_CPU_RESET_0 _SB_MAKEMASK1(52) |
145 | #define M_BCM1480_SYS_CPU_RESET_1 _SB_MAKEMASK1(53) | 145 | #define M_BCM1480_SYS_CPU_RESET_1 _SB_MAKEMASK1(53) |
146 | #define M_BCM1480_SYS_CPU_RESET_2 _SB_MAKEMASK1(54) | 146 | #define M_BCM1480_SYS_CPU_RESET_2 _SB_MAKEMASK1(54) |
147 | #define M_BCM1480_SYS_CPU_RESET_3 _SB_MAKEMASK1(55) | 147 | #define M_BCM1480_SYS_CPU_RESET_3 _SB_MAKEMASK1(55) |
148 | #define S_BCM1480_SYS_DISABLECPU0 56 | 148 | #define S_BCM1480_SYS_DISABLECPU0 56 |
149 | #define M_BCM1480_SYS_DISABLECPU0 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU0) | 149 | #define M_BCM1480_SYS_DISABLECPU0 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU0) |
150 | #define S_BCM1480_SYS_DISABLECPU1 57 | 150 | #define S_BCM1480_SYS_DISABLECPU1 57 |
151 | #define M_BCM1480_SYS_DISABLECPU1 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU1) | 151 | #define M_BCM1480_SYS_DISABLECPU1 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU1) |
152 | #define S_BCM1480_SYS_DISABLECPU2 58 | 152 | #define S_BCM1480_SYS_DISABLECPU2 58 |
153 | #define M_BCM1480_SYS_DISABLECPU2 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU2) | 153 | #define M_BCM1480_SYS_DISABLECPU2 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU2) |
154 | #define S_BCM1480_SYS_DISABLECPU3 59 | 154 | #define S_BCM1480_SYS_DISABLECPU3 59 |
155 | #define M_BCM1480_SYS_DISABLECPU3 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU3) | 155 | #define M_BCM1480_SYS_DISABLECPU3 _SB_MAKEMASK1(S_BCM1480_SYS_DISABLECPU3) |
156 | 156 | ||
157 | #define M_BCM1480_SYS_SB_SOFTRES _SB_MAKEMASK1(60) | 157 | #define M_BCM1480_SYS_SB_SOFTRES _SB_MAKEMASK1(60) |
158 | #define M_BCM1480_SYS_EXT_RESET _SB_MAKEMASK1(61) | 158 | #define M_BCM1480_SYS_EXT_RESET _SB_MAKEMASK1(61) |
159 | #define M_BCM1480_SYS_SYSTEM_RESET _SB_MAKEMASK1(62) | 159 | #define M_BCM1480_SYS_SYSTEM_RESET _SB_MAKEMASK1(62) |
160 | #define M_BCM1480_SYS_SW_FLAG _SB_MAKEMASK1(63) | 160 | #define M_BCM1480_SYS_SW_FLAG _SB_MAKEMASK1(63) |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * Scratch Register (Table 16) | 163 | * Scratch Register (Table 16) |
@@ -193,23 +193,23 @@ | |||
193 | * Registers: SCD_WDOG_CFG_x | 193 | * Registers: SCD_WDOG_CFG_x |
194 | */ | 194 | */ |
195 | 195 | ||
196 | #define M_BCM1480_SCD_WDOG_ENABLE _SB_MAKEMASK1(0) | 196 | #define M_BCM1480_SCD_WDOG_ENABLE _SB_MAKEMASK1(0) |
197 | 197 | ||
198 | #define S_BCM1480_SCD_WDOG_RESET_TYPE 2 | 198 | #define S_BCM1480_SCD_WDOG_RESET_TYPE 2 |
199 | #define M_BCM1480_SCD_WDOG_RESET_TYPE _SB_MAKEMASK(5, S_BCM1480_SCD_WDOG_RESET_TYPE) | 199 | #define M_BCM1480_SCD_WDOG_RESET_TYPE _SB_MAKEMASK(5, S_BCM1480_SCD_WDOG_RESET_TYPE) |
200 | #define V_BCM1480_SCD_WDOG_RESET_TYPE(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_WDOG_RESET_TYPE) | 200 | #define V_BCM1480_SCD_WDOG_RESET_TYPE(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_WDOG_RESET_TYPE) |
201 | #define G_BCM1480_SCD_WDOG_RESET_TYPE(x) _SB_GETVALUE(x, S_BCM1480_SCD_WDOG_RESET_TYPE, M_BCM1480_SCD_WDOG_RESET_TYPE) | 201 | #define G_BCM1480_SCD_WDOG_RESET_TYPE(x) _SB_GETVALUE(x, S_BCM1480_SCD_WDOG_RESET_TYPE, M_BCM1480_SCD_WDOG_RESET_TYPE) |
202 | 202 | ||
203 | #define K_BCM1480_SCD_WDOG_RESET_FULL 0 /* actually, (x & 1) == 0 */ | 203 | #define K_BCM1480_SCD_WDOG_RESET_FULL 0 /* actually, (x & 1) == 0 */ |
204 | #define K_BCM1480_SCD_WDOG_RESET_SOFT 1 | 204 | #define K_BCM1480_SCD_WDOG_RESET_SOFT 1 |
205 | #define K_BCM1480_SCD_WDOG_RESET_CPU0 3 | 205 | #define K_BCM1480_SCD_WDOG_RESET_CPU0 3 |
206 | #define K_BCM1480_SCD_WDOG_RESET_CPU1 5 | 206 | #define K_BCM1480_SCD_WDOG_RESET_CPU1 5 |
207 | #define K_BCM1480_SCD_WDOG_RESET_CPU2 9 | 207 | #define K_BCM1480_SCD_WDOG_RESET_CPU2 9 |
208 | #define K_BCM1480_SCD_WDOG_RESET_CPU3 17 | 208 | #define K_BCM1480_SCD_WDOG_RESET_CPU3 17 |
209 | #define K_BCM1480_SCD_WDOG_RESET_ALL_CPUS 31 | 209 | #define K_BCM1480_SCD_WDOG_RESET_ALL_CPUS 31 |
210 | 210 | ||
211 | 211 | ||
212 | #define M_BCM1480_SCD_WDOG_HAS_RESET _SB_MAKEMASK1(8) | 212 | #define M_BCM1480_SCD_WDOG_HAS_RESET _SB_MAKEMASK1(8) |
213 | 213 | ||
214 | /* | 214 | /* |
215 | * General Timer Initial Count Registers (Table 26) | 215 | * General Timer Initial Count Registers (Table 26) |
@@ -243,32 +243,32 @@ | |||
243 | * The clear/enable bits are in different locations on the 1250 and 1480. | 243 | * The clear/enable bits are in different locations on the 1250 and 1480. |
244 | */ | 244 | */ |
245 | 245 | ||
246 | #define S_SPC_CFG_SRC4 32 | 246 | #define S_SPC_CFG_SRC4 32 |
247 | #define M_SPC_CFG_SRC4 _SB_MAKEMASK(8, S_SPC_CFG_SRC4) | 247 | #define M_SPC_CFG_SRC4 _SB_MAKEMASK(8, S_SPC_CFG_SRC4) |
248 | #define V_SPC_CFG_SRC4(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC4) | 248 | #define V_SPC_CFG_SRC4(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC4) |
249 | #define G_SPC_CFG_SRC4(x) _SB_GETVALUE(x, S_SPC_CFG_SRC4, M_SPC_CFG_SRC4) | 249 | #define G_SPC_CFG_SRC4(x) _SB_GETVALUE(x, S_SPC_CFG_SRC4, M_SPC_CFG_SRC4) |
250 | 250 | ||
251 | #define S_SPC_CFG_SRC5 40 | 251 | #define S_SPC_CFG_SRC5 40 |
252 | #define M_SPC_CFG_SRC5 _SB_MAKEMASK(8, S_SPC_CFG_SRC5) | 252 | #define M_SPC_CFG_SRC5 _SB_MAKEMASK(8, S_SPC_CFG_SRC5) |
253 | #define V_SPC_CFG_SRC5(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC5) | 253 | #define V_SPC_CFG_SRC5(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC5) |
254 | #define G_SPC_CFG_SRC5(x) _SB_GETVALUE(x, S_SPC_CFG_SRC5, M_SPC_CFG_SRC5) | 254 | #define G_SPC_CFG_SRC5(x) _SB_GETVALUE(x, S_SPC_CFG_SRC5, M_SPC_CFG_SRC5) |
255 | 255 | ||
256 | #define S_SPC_CFG_SRC6 48 | 256 | #define S_SPC_CFG_SRC6 48 |
257 | #define M_SPC_CFG_SRC6 _SB_MAKEMASK(8, S_SPC_CFG_SRC6) | 257 | #define M_SPC_CFG_SRC6 _SB_MAKEMASK(8, S_SPC_CFG_SRC6) |
258 | #define V_SPC_CFG_SRC6(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC6) | 258 | #define V_SPC_CFG_SRC6(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC6) |
259 | #define G_SPC_CFG_SRC6(x) _SB_GETVALUE(x, S_SPC_CFG_SRC6, M_SPC_CFG_SRC6) | 259 | #define G_SPC_CFG_SRC6(x) _SB_GETVALUE(x, S_SPC_CFG_SRC6, M_SPC_CFG_SRC6) |
260 | 260 | ||
261 | #define S_SPC_CFG_SRC7 56 | 261 | #define S_SPC_CFG_SRC7 56 |
262 | #define M_SPC_CFG_SRC7 _SB_MAKEMASK(8, S_SPC_CFG_SRC7) | 262 | #define M_SPC_CFG_SRC7 _SB_MAKEMASK(8, S_SPC_CFG_SRC7) |
263 | #define V_SPC_CFG_SRC7(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC7) | 263 | #define V_SPC_CFG_SRC7(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC7) |
264 | #define G_SPC_CFG_SRC7(x) _SB_GETVALUE(x, S_SPC_CFG_SRC7, M_SPC_CFG_SRC7) | 264 | #define G_SPC_CFG_SRC7(x) _SB_GETVALUE(x, S_SPC_CFG_SRC7, M_SPC_CFG_SRC7) |
265 | 265 | ||
266 | /* | 266 | /* |
267 | * System Performance Counter Control Register (Table 32) | 267 | * System Performance Counter Control Register (Table 32) |
268 | * Register: PERF_CNT_CFG_1 | 268 | * Register: PERF_CNT_CFG_1 |
269 | * BCM1480 specific | 269 | * BCM1480 specific |
270 | */ | 270 | */ |
271 | #define M_BCM1480_SPC_CFG_CLEAR _SB_MAKEMASK1(0) | 271 | #define M_BCM1480_SPC_CFG_CLEAR _SB_MAKEMASK1(0) |
272 | #define M_BCM1480_SPC_CFG_ENABLE _SB_MAKEMASK1(1) | 272 | #define M_BCM1480_SPC_CFG_ENABLE _SB_MAKEMASK1(1) |
273 | #if SIBYTE_HDR_FEATURE_CHIP(1480) | 273 | #if SIBYTE_HDR_FEATURE_CHIP(1480) |
274 | #define M_SPC_CFG_CLEAR M_BCM1480_SPC_CFG_CLEAR | 274 | #define M_SPC_CFG_CLEAR M_BCM1480_SPC_CFG_CLEAR |
@@ -280,12 +280,12 @@ | |||
280 | * Registers: PERF_CNT_x | 280 | * Registers: PERF_CNT_x |
281 | */ | 281 | */ |
282 | 282 | ||
283 | #define S_BCM1480_SPC_CNT_COUNT 0 | 283 | #define S_BCM1480_SPC_CNT_COUNT 0 |
284 | #define M_BCM1480_SPC_CNT_COUNT _SB_MAKEMASK(40, S_BCM1480_SPC_CNT_COUNT) | 284 | #define M_BCM1480_SPC_CNT_COUNT _SB_MAKEMASK(40, S_BCM1480_SPC_CNT_COUNT) |
285 | #define V_BCM1480_SPC_CNT_COUNT(x) _SB_MAKEVALUE(x, S_BCM1480_SPC_CNT_COUNT) | 285 | #define V_BCM1480_SPC_CNT_COUNT(x) _SB_MAKEVALUE(x, S_BCM1480_SPC_CNT_COUNT) |
286 | #define G_BCM1480_SPC_CNT_COUNT(x) _SB_GETVALUE(x, S_BCM1480_SPC_CNT_COUNT, M_BCM1480_SPC_CNT_COUNT) | 286 | #define G_BCM1480_SPC_CNT_COUNT(x) _SB_GETVALUE(x, S_BCM1480_SPC_CNT_COUNT, M_BCM1480_SPC_CNT_COUNT) |
287 | 287 | ||
288 | #define M_BCM1480_SPC_CNT_OFLOW _SB_MAKEMASK1(40) | 288 | #define M_BCM1480_SPC_CNT_OFLOW _SB_MAKEMASK1(40) |
289 | 289 | ||
290 | 290 | ||
291 | /* | 291 | /* |
@@ -325,45 +325,45 @@ | |||
325 | #define M_BCM1480_ATRAP_INDEX _SB_MAKEMASK(4, 0) | 325 | #define M_BCM1480_ATRAP_INDEX _SB_MAKEMASK(4, 0) |
326 | #define M_BCM1480_ATRAP_ADDRESS _SB_MAKEMASK(40, 0) | 326 | #define M_BCM1480_ATRAP_ADDRESS _SB_MAKEMASK(40, 0) |
327 | 327 | ||
328 | #define S_BCM1480_ATRAP_CFG_CNT 0 | 328 | #define S_BCM1480_ATRAP_CFG_CNT 0 |
329 | #define M_BCM1480_ATRAP_CFG_CNT _SB_MAKEMASK(3, S_BCM1480_ATRAP_CFG_CNT) | 329 | #define M_BCM1480_ATRAP_CFG_CNT _SB_MAKEMASK(3, S_BCM1480_ATRAP_CFG_CNT) |
330 | #define V_BCM1480_ATRAP_CFG_CNT(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_CNT) | 330 | #define V_BCM1480_ATRAP_CFG_CNT(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_CNT) |
331 | #define G_BCM1480_ATRAP_CFG_CNT(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_CNT, M_BCM1480_ATRAP_CFG_CNT) | 331 | #define G_BCM1480_ATRAP_CFG_CNT(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_CNT, M_BCM1480_ATRAP_CFG_CNT) |
332 | 332 | ||
333 | #define M_BCM1480_ATRAP_CFG_WRITE _SB_MAKEMASK1(3) | 333 | #define M_BCM1480_ATRAP_CFG_WRITE _SB_MAKEMASK1(3) |
334 | #define M_BCM1480_ATRAP_CFG_ALL _SB_MAKEMASK1(4) | 334 | #define M_BCM1480_ATRAP_CFG_ALL _SB_MAKEMASK1(4) |
335 | #define M_BCM1480_ATRAP_CFG_INV _SB_MAKEMASK1(5) | 335 | #define M_BCM1480_ATRAP_CFG_INV _SB_MAKEMASK1(5) |
336 | #define M_BCM1480_ATRAP_CFG_USESRC _SB_MAKEMASK1(6) | 336 | #define M_BCM1480_ATRAP_CFG_USESRC _SB_MAKEMASK1(6) |
337 | #define M_BCM1480_ATRAP_CFG_SRCINV _SB_MAKEMASK1(7) | 337 | #define M_BCM1480_ATRAP_CFG_SRCINV _SB_MAKEMASK1(7) |
338 | 338 | ||
339 | #define S_BCM1480_ATRAP_CFG_AGENTID 8 | 339 | #define S_BCM1480_ATRAP_CFG_AGENTID 8 |
340 | #define M_BCM1480_ATRAP_CFG_AGENTID _SB_MAKEMASK(4, S_BCM1480_ATRAP_CFG_AGENTID) | 340 | #define M_BCM1480_ATRAP_CFG_AGENTID _SB_MAKEMASK(4, S_BCM1480_ATRAP_CFG_AGENTID) |
341 | #define V_BCM1480_ATRAP_CFG_AGENTID(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_AGENTID) | 341 | #define V_BCM1480_ATRAP_CFG_AGENTID(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_AGENTID) |
342 | #define G_BCM1480_ATRAP_CFG_AGENTID(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_AGENTID, M_BCM1480_ATRAP_CFG_AGENTID) | 342 | #define G_BCM1480_ATRAP_CFG_AGENTID(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_AGENTID, M_BCM1480_ATRAP_CFG_AGENTID) |
343 | 343 | ||
344 | 344 | ||
345 | #define K_BCM1480_BUS_AGENT_CPU0 0 | 345 | #define K_BCM1480_BUS_AGENT_CPU0 0 |
346 | #define K_BCM1480_BUS_AGENT_CPU1 1 | 346 | #define K_BCM1480_BUS_AGENT_CPU1 1 |
347 | #define K_BCM1480_BUS_AGENT_NC 2 | 347 | #define K_BCM1480_BUS_AGENT_NC 2 |
348 | #define K_BCM1480_BUS_AGENT_IOB 3 | 348 | #define K_BCM1480_BUS_AGENT_IOB 3 |
349 | #define K_BCM1480_BUS_AGENT_SCD 4 | 349 | #define K_BCM1480_BUS_AGENT_SCD 4 |
350 | #define K_BCM1480_BUS_AGENT_L2C 6 | 350 | #define K_BCM1480_BUS_AGENT_L2C 6 |
351 | #define K_BCM1480_BUS_AGENT_MC 7 | 351 | #define K_BCM1480_BUS_AGENT_MC 7 |
352 | #define K_BCM1480_BUS_AGENT_CPU2 8 | 352 | #define K_BCM1480_BUS_AGENT_CPU2 8 |
353 | #define K_BCM1480_BUS_AGENT_CPU3 9 | 353 | #define K_BCM1480_BUS_AGENT_CPU3 9 |
354 | #define K_BCM1480_BUS_AGENT_PM 10 | 354 | #define K_BCM1480_BUS_AGENT_PM 10 |
355 | 355 | ||
356 | #define S_BCM1480_ATRAP_CFG_CATTR 12 | 356 | #define S_BCM1480_ATRAP_CFG_CATTR 12 |
357 | #define M_BCM1480_ATRAP_CFG_CATTR _SB_MAKEMASK(2, S_BCM1480_ATRAP_CFG_CATTR) | 357 | #define M_BCM1480_ATRAP_CFG_CATTR _SB_MAKEMASK(2, S_BCM1480_ATRAP_CFG_CATTR) |
358 | #define V_BCM1480_ATRAP_CFG_CATTR(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_CATTR) | 358 | #define V_BCM1480_ATRAP_CFG_CATTR(x) _SB_MAKEVALUE(x, S_BCM1480_ATRAP_CFG_CATTR) |
359 | #define G_BCM1480_ATRAP_CFG_CATTR(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_CATTR, M_BCM1480_ATRAP_CFG_CATTR) | 359 | #define G_BCM1480_ATRAP_CFG_CATTR(x) _SB_GETVALUE(x, S_BCM1480_ATRAP_CFG_CATTR, M_BCM1480_ATRAP_CFG_CATTR) |
360 | 360 | ||
361 | #define K_BCM1480_ATRAP_CFG_CATTR_IGNORE 0 | 361 | #define K_BCM1480_ATRAP_CFG_CATTR_IGNORE 0 |
362 | #define K_BCM1480_ATRAP_CFG_CATTR_UNC 1 | 362 | #define K_BCM1480_ATRAP_CFG_CATTR_UNC 1 |
363 | #define K_BCM1480_ATRAP_CFG_CATTR_NONCOH 2 | 363 | #define K_BCM1480_ATRAP_CFG_CATTR_NONCOH 2 |
364 | #define K_BCM1480_ATRAP_CFG_CATTR_COHERENT 3 | 364 | #define K_BCM1480_ATRAP_CFG_CATTR_COHERENT 3 |
365 | 365 | ||
366 | #define M_BCM1480_ATRAP_CFG_CATTRINV _SB_MAKEMASK1(14) | 366 | #define M_BCM1480_ATRAP_CFG_CATTRINV _SB_MAKEMASK1(14) |
367 | 367 | ||
368 | 368 | ||
369 | /* | 369 | /* |
@@ -381,10 +381,10 @@ | |||
381 | 381 | ||
382 | #define M_BCM1480_SCD_TRSEQ_TID_MATCH_EN _SB_MAKEMASK1(25) | 382 | #define M_BCM1480_SCD_TRSEQ_TID_MATCH_EN _SB_MAKEMASK1(25) |
383 | 383 | ||
384 | #define S_BCM1480_SCD_TRSEQ_SWFUNC 26 | 384 | #define S_BCM1480_SCD_TRSEQ_SWFUNC 26 |
385 | #define M_BCM1480_SCD_TRSEQ_SWFUNC _SB_MAKEMASK(2, S_BCM1480_SCD_TRSEQ_SWFUNC) | 385 | #define M_BCM1480_SCD_TRSEQ_SWFUNC _SB_MAKEMASK(2, S_BCM1480_SCD_TRSEQ_SWFUNC) |
386 | #define V_BCM1480_SCD_TRSEQ_SWFUNC(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_TRSEQ_SWFUNC) | 386 | #define V_BCM1480_SCD_TRSEQ_SWFUNC(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_TRSEQ_SWFUNC) |
387 | #define G_BCM1480_SCD_TRSEQ_SWFUNC(x) _SB_GETVALUE(x, S_BCM1480_SCD_TRSEQ_SWFUNC, M_BCM1480_SCD_TRSEQ_SWFUNC) | 387 | #define G_BCM1480_SCD_TRSEQ_SWFUNC(x) _SB_GETVALUE(x, S_BCM1480_SCD_TRSEQ_SWFUNC, M_BCM1480_SCD_TRSEQ_SWFUNC) |
388 | 388 | ||
389 | /* | 389 | /* |
390 | * Trace Control Register (Table 49) | 390 | * Trace Control Register (Table 49) |
@@ -394,13 +394,13 @@ | |||
394 | * are defined below. | 394 | * are defined below. |
395 | */ | 395 | */ |
396 | 396 | ||
397 | #define S_BCM1480_SCD_TRACE_CFG_MODE 16 | 397 | #define S_BCM1480_SCD_TRACE_CFG_MODE 16 |
398 | #define M_BCM1480_SCD_TRACE_CFG_MODE _SB_MAKEMASK(2, S_BCM1480_SCD_TRACE_CFG_MODE) | 398 | #define M_BCM1480_SCD_TRACE_CFG_MODE _SB_MAKEMASK(2, S_BCM1480_SCD_TRACE_CFG_MODE) |
399 | #define V_BCM1480_SCD_TRACE_CFG_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_TRACE_CFG_MODE) | 399 | #define V_BCM1480_SCD_TRACE_CFG_MODE(x) _SB_MAKEVALUE(x, S_BCM1480_SCD_TRACE_CFG_MODE) |
400 | #define G_BCM1480_SCD_TRACE_CFG_MODE(x) _SB_GETVALUE(x, S_BCM1480_SCD_TRACE_CFG_MODE, M_BCM1480_SCD_TRACE_CFG_MODE) | 400 | #define G_BCM1480_SCD_TRACE_CFG_MODE(x) _SB_GETVALUE(x, S_BCM1480_SCD_TRACE_CFG_MODE, M_BCM1480_SCD_TRACE_CFG_MODE) |
401 | 401 | ||
402 | #define K_BCM1480_SCD_TRACE_CFG_MODE_BLOCKERS 0 | 402 | #define K_BCM1480_SCD_TRACE_CFG_MODE_BLOCKERS 0 |
403 | #define K_BCM1480_SCD_TRACE_CFG_MODE_BYTEEN_INT 1 | 403 | #define K_BCM1480_SCD_TRACE_CFG_MODE_BYTEEN_INT 1 |
404 | #define K_BCM1480_SCD_TRACE_CFG_MODE_FLOW_ID 2 | 404 | #define K_BCM1480_SCD_TRACE_CFG_MODE_FLOW_ID 2 |
405 | 405 | ||
406 | #endif /* _BCM1480_SCD_H */ | 406 | #endif /* _BCM1480_SCD_H */ |
diff --git a/arch/mips/include/asm/sibyte/bigsur.h b/arch/mips/include/asm/sibyte/bigsur.h index 2d1a26d3436a..ae29dae41554 100644 --- a/arch/mips/include/asm/sibyte/bigsur.h +++ b/arch/mips/include/asm/sibyte/bigsur.h | |||
@@ -24,25 +24,25 @@ | |||
24 | #ifdef CONFIG_SIBYTE_BIGSUR | 24 | #ifdef CONFIG_SIBYTE_BIGSUR |
25 | #define SIBYTE_BOARD_NAME "BCM91x80A/B (BigSur)" | 25 | #define SIBYTE_BOARD_NAME "BCM91x80A/B (BigSur)" |
26 | #define SIBYTE_HAVE_PCMCIA 1 | 26 | #define SIBYTE_HAVE_PCMCIA 1 |
27 | #define SIBYTE_HAVE_IDE 1 | 27 | #define SIBYTE_HAVE_IDE 1 |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | /* Generic bus chip selects */ | 30 | /* Generic bus chip selects */ |
31 | #define LEDS_CS 3 | 31 | #define LEDS_CS 3 |
32 | #define LEDS_PHYS 0x100a0000 | 32 | #define LEDS_PHYS 0x100a0000 |
33 | 33 | ||
34 | #ifdef SIBYTE_HAVE_IDE | 34 | #ifdef SIBYTE_HAVE_IDE |
35 | #define IDE_CS 4 | 35 | #define IDE_CS 4 |
36 | #define IDE_PHYS 0x100b0000 | 36 | #define IDE_PHYS 0x100b0000 |
37 | #define K_GPIO_GB_IDE 4 | 37 | #define K_GPIO_GB_IDE 4 |
38 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) | 38 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #ifdef SIBYTE_HAVE_PCMCIA | 41 | #ifdef SIBYTE_HAVE_PCMCIA |
42 | #define PCMCIA_CS 6 | 42 | #define PCMCIA_CS 6 |
43 | #define PCMCIA_PHYS 0x11000000 | 43 | #define PCMCIA_PHYS 0x11000000 |
44 | #define K_GPIO_PC_READY 9 | 44 | #define K_GPIO_PC_READY 9 |
45 | #define K_INT_PC_READY (K_INT_GPIO_0 + K_GPIO_PC_READY) | 45 | #define K_INT_PC_READY (K_INT_GPIO_0 + K_GPIO_PC_READY) |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #endif /* __ASM_SIBYTE_BIGSUR_H */ | 48 | #endif /* __ASM_SIBYTE_BIGSUR_H */ |
diff --git a/arch/mips/include/asm/sibyte/carmel.h b/arch/mips/include/asm/sibyte/carmel.h index 11cad71323e8..793edba73aa4 100644 --- a/arch/mips/include/asm/sibyte/carmel.h +++ b/arch/mips/include/asm/sibyte/carmel.h | |||
@@ -23,35 +23,35 @@ | |||
23 | 23 | ||
24 | #define SIBYTE_BOARD_NAME "Carmel" | 24 | #define SIBYTE_BOARD_NAME "Carmel" |
25 | 25 | ||
26 | #define GPIO_PHY_INTERRUPT 2 | 26 | #define GPIO_PHY_INTERRUPT 2 |
27 | #define GPIO_NONMASKABLE_INT 3 | 27 | #define GPIO_NONMASKABLE_INT 3 |
28 | #define GPIO_CF_INSERTED 6 | 28 | #define GPIO_CF_INSERTED 6 |
29 | #define GPIO_MONTEREY_RESET 7 | 29 | #define GPIO_MONTEREY_RESET 7 |
30 | #define GPIO_QUADUART_INT 8 | 30 | #define GPIO_QUADUART_INT 8 |
31 | #define GPIO_CF_INT 9 | 31 | #define GPIO_CF_INT 9 |
32 | #define GPIO_FPGA_CCLK 10 | 32 | #define GPIO_FPGA_CCLK 10 |
33 | #define GPIO_FPGA_DOUT 11 | 33 | #define GPIO_FPGA_DOUT 11 |
34 | #define GPIO_FPGA_DIN 12 | 34 | #define GPIO_FPGA_DIN 12 |
35 | #define GPIO_FPGA_PGM 13 | 35 | #define GPIO_FPGA_PGM 13 |
36 | #define GPIO_FPGA_DONE 14 | 36 | #define GPIO_FPGA_DONE 14 |
37 | #define GPIO_FPGA_INIT 15 | 37 | #define GPIO_FPGA_INIT 15 |
38 | 38 | ||
39 | #define LEDS_CS 2 | 39 | #define LEDS_CS 2 |
40 | #define LEDS_PHYS 0x100C0000 | 40 | #define LEDS_PHYS 0x100C0000 |
41 | #define MLEDS_CS 3 | 41 | #define MLEDS_CS 3 |
42 | #define MLEDS_PHYS 0x100A0000 | 42 | #define MLEDS_PHYS 0x100A0000 |
43 | #define UART_CS 4 | 43 | #define UART_CS 4 |
44 | #define UART_PHYS 0x100D0000 | 44 | #define UART_PHYS 0x100D0000 |
45 | #define ARAVALI_CS 5 | 45 | #define ARAVALI_CS 5 |
46 | #define ARAVALI_PHYS 0x11000000 | 46 | #define ARAVALI_PHYS 0x11000000 |
47 | #define IDE_CS 6 | 47 | #define IDE_CS 6 |
48 | #define IDE_PHYS 0x100B0000 | 48 | #define IDE_PHYS 0x100B0000 |
49 | #define ARAVALI2_CS 7 | 49 | #define ARAVALI2_CS 7 |
50 | #define ARAVALI2_PHYS 0x100E0000 | 50 | #define ARAVALI2_PHYS 0x100E0000 |
51 | 51 | ||
52 | #if defined(CONFIG_SIBYTE_CARMEL) | 52 | #if defined(CONFIG_SIBYTE_CARMEL) |
53 | #define K_GPIO_GB_IDE 9 | 53 | #define K_GPIO_GB_IDE 9 |
54 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) | 54 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | 57 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250.h b/arch/mips/include/asm/sibyte/sb1250.h index 80c1a052662a..d45dff9753d3 100644 --- a/arch/mips/include/asm/sibyte/sb1250.h +++ b/arch/mips/include/asm/sibyte/sb1250.h | |||
@@ -27,8 +27,8 @@ | |||
27 | 27 | ||
28 | #define SB1250_NR_IRQS 64 | 28 | #define SB1250_NR_IRQS 64 |
29 | 29 | ||
30 | #define BCM1480_NR_IRQS 128 | 30 | #define BCM1480_NR_IRQS 128 |
31 | #define BCM1480_NR_IRQS_HALF 64 | 31 | #define BCM1480_NR_IRQS_HALF 64 |
32 | 32 | ||
33 | #define SB1250_DUART_MINOR_BASE 64 | 33 | #define SB1250_DUART_MINOR_BASE 64 |
34 | 34 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_defs.h b/arch/mips/include/asm/sibyte/sb1250_defs.h index 09365f9111fa..4364eb8d22ab 100644 --- a/arch/mips/include/asm/sibyte/sb1250_defs.h +++ b/arch/mips/include/asm/sibyte/sb1250_defs.h | |||
@@ -51,15 +51,15 @@ | |||
51 | * | 51 | * |
52 | * Use like: | 52 | * Use like: |
53 | * | 53 | * |
54 | * #define SIBYTE_HDR_FEATURES SIBYTE_HDR_FMASK_112x_PASS1 | 54 | * #define SIBYTE_HDR_FEATURES SIBYTE_HDR_FMASK_112x_PASS1 |
55 | * | 55 | * |
56 | * Generate defines only for that revision of chip. | 56 | * Generate defines only for that revision of chip. |
57 | * | 57 | * |
58 | * #if SIBYTE_HDR_FEATURE(chip,pass) | 58 | * #if SIBYTE_HDR_FEATURE(chip,pass) |
59 | * | 59 | * |
60 | * True if header features for that revision or later of | 60 | * True if header features for that revision or later of |
61 | * that particular chip type are enabled in SIBYTE_HDR_FEATURES. | 61 | * that particular chip type are enabled in SIBYTE_HDR_FEATURES. |
62 | * (Use this to bracket #defines for features present in a given | 62 | * (Use this to bracket #defines for features present in a given |
63 | * revision and later.) | 63 | * revision and later.) |
64 | * | 64 | * |
65 | * Note that there is no implied ordering between chip types. | 65 | * Note that there is no implied ordering between chip types. |
@@ -69,12 +69,12 @@ | |||
69 | * SIBYTE_HDR_FEATURE(112x, PASS1) is OK, but | 69 | * SIBYTE_HDR_FEATURE(112x, PASS1) is OK, but |
70 | * SIBYTE_HDR_FEATURE(1120, pass1) is not (for two reasons). | 70 | * SIBYTE_HDR_FEATURE(1120, pass1) is not (for two reasons). |
71 | * | 71 | * |
72 | * #if SIBYTE_HDR_FEATURE_UP_TO(chip,pass) | 72 | * #if SIBYTE_HDR_FEATURE_UP_TO(chip,pass) |
73 | * | 73 | * |
74 | * Same as SIBYTE_HDR_FEATURE, but true for the named revision | 74 | * Same as SIBYTE_HDR_FEATURE, but true for the named revision |
75 | * and earlier revisions of the named chip type. | 75 | * and earlier revisions of the named chip type. |
76 | * | 76 | * |
77 | * #if SIBYTE_HDR_FEATURE_EXACT(chip,pass) | 77 | * #if SIBYTE_HDR_FEATURE_EXACT(chip,pass) |
78 | * | 78 | * |
79 | * Same as SIBYTE_HDR_FEATURE, but only true for the named | 79 | * Same as SIBYTE_HDR_FEATURE, but only true for the named |
80 | * revision of the named chip type. (Note that this CANNOT | 80 | * revision of the named chip type. (Note that this CANNOT |
@@ -82,7 +82,7 @@ | |||
82 | * particular chip/revision. It will be true any time this | 82 | * particular chip/revision. It will be true any time this |
83 | * chip/revision is included in SIBYTE_HDR_FEATURES.) | 83 | * chip/revision is included in SIBYTE_HDR_FEATURES.) |
84 | * | 84 | * |
85 | * #if SIBYTE_HDR_FEATURE_CHIP(chip) | 85 | * #if SIBYTE_HDR_FEATURE_CHIP(chip) |
86 | * | 86 | * |
87 | * True if header features for (any revision of) that chip type | 87 | * True if header features for (any revision of) that chip type |
88 | * are enabled in SIBYTE_HDR_FEATURES. (Use this to bracket | 88 | * are enabled in SIBYTE_HDR_FEATURES. (Use this to bracket |
@@ -95,47 +95,47 @@ | |||
95 | * ordering, so be careful when adding support for new minor revs. | 95 | * ordering, so be careful when adding support for new minor revs. |
96 | ********************************************************************* */ | 96 | ********************************************************************* */ |
97 | 97 | ||
98 | #define SIBYTE_HDR_FMASK_1250_ALL 0x000000ff | 98 | #define SIBYTE_HDR_FMASK_1250_ALL 0x000000ff |
99 | #define SIBYTE_HDR_FMASK_1250_PASS1 0x00000001 | 99 | #define SIBYTE_HDR_FMASK_1250_PASS1 0x00000001 |
100 | #define SIBYTE_HDR_FMASK_1250_PASS2 0x00000002 | 100 | #define SIBYTE_HDR_FMASK_1250_PASS2 0x00000002 |
101 | #define SIBYTE_HDR_FMASK_1250_PASS3 0x00000004 | 101 | #define SIBYTE_HDR_FMASK_1250_PASS3 0x00000004 |
102 | 102 | ||
103 | #define SIBYTE_HDR_FMASK_112x_ALL 0x00000f00 | 103 | #define SIBYTE_HDR_FMASK_112x_ALL 0x00000f00 |
104 | #define SIBYTE_HDR_FMASK_112x_PASS1 0x00000100 | 104 | #define SIBYTE_HDR_FMASK_112x_PASS1 0x00000100 |
105 | 105 | ||
106 | #define SIBYTE_HDR_FMASK_1480_ALL 0x0000f000 | 106 | #define SIBYTE_HDR_FMASK_1480_ALL 0x0000f000 |
107 | #define SIBYTE_HDR_FMASK_1480_PASS1 0x00001000 | 107 | #define SIBYTE_HDR_FMASK_1480_PASS1 0x00001000 |
108 | #define SIBYTE_HDR_FMASK_1480_PASS2 0x00002000 | 108 | #define SIBYTE_HDR_FMASK_1480_PASS2 0x00002000 |
109 | 109 | ||
110 | /* Bit mask for chip/revision. (use _ALL for all revisions of a chip). */ | 110 | /* Bit mask for chip/revision. (use _ALL for all revisions of a chip). */ |
111 | #define SIBYTE_HDR_FMASK(chip, pass) \ | 111 | #define SIBYTE_HDR_FMASK(chip, pass) \ |
112 | (SIBYTE_HDR_FMASK_ ## chip ## _ ## pass) | 112 | (SIBYTE_HDR_FMASK_ ## chip ## _ ## pass) |
113 | #define SIBYTE_HDR_FMASK_ALLREVS(chip) \ | 113 | #define SIBYTE_HDR_FMASK_ALLREVS(chip) \ |
114 | (SIBYTE_HDR_FMASK_ ## chip ## _ALL) | 114 | (SIBYTE_HDR_FMASK_ ## chip ## _ALL) |
115 | 115 | ||
116 | /* Default constant value for all chips, all revisions */ | 116 | /* Default constant value for all chips, all revisions */ |
117 | #define SIBYTE_HDR_FMASK_ALL \ | 117 | #define SIBYTE_HDR_FMASK_ALL \ |
118 | (SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL \ | 118 | (SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL \ |
119 | | SIBYTE_HDR_FMASK_1480_ALL) | 119 | | SIBYTE_HDR_FMASK_1480_ALL) |
120 | 120 | ||
121 | /* This one is used for the "original" BCM1250/BCM112x chips. We use this | 121 | /* This one is used for the "original" BCM1250/BCM112x chips. We use this |
122 | to weed out constants and macros that do not exist on later chips like | 122 | to weed out constants and macros that do not exist on later chips like |
123 | the BCM1480 */ | 123 | the BCM1480 */ |
124 | #define SIBYTE_HDR_FMASK_1250_112x_ALL \ | 124 | #define SIBYTE_HDR_FMASK_1250_112x_ALL \ |
125 | (SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL) | 125 | (SIBYTE_HDR_FMASK_1250_ALL | SIBYTE_HDR_FMASK_112x_ALL) |
126 | #define SIBYTE_HDR_FMASK_1250_112x SIBYTE_HDR_FMASK_1250_112x_ALL | 126 | #define SIBYTE_HDR_FMASK_1250_112x SIBYTE_HDR_FMASK_1250_112x_ALL |
127 | 127 | ||
128 | #ifndef SIBYTE_HDR_FEATURES | 128 | #ifndef SIBYTE_HDR_FEATURES |
129 | #define SIBYTE_HDR_FEATURES SIBYTE_HDR_FMASK_ALL | 129 | #define SIBYTE_HDR_FEATURES SIBYTE_HDR_FMASK_ALL |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | 132 | ||
133 | /* Bit mask for revisions of chip exclusively before the named revision. */ | 133 | /* Bit mask for revisions of chip exclusively before the named revision. */ |
134 | #define SIBYTE_HDR_FMASK_BEFORE(chip, pass) \ | 134 | #define SIBYTE_HDR_FMASK_BEFORE(chip, pass) \ |
135 | ((SIBYTE_HDR_FMASK(chip, pass) - 1) & SIBYTE_HDR_FMASK_ALLREVS(chip)) | 135 | ((SIBYTE_HDR_FMASK(chip, pass) - 1) & SIBYTE_HDR_FMASK_ALLREVS(chip)) |
136 | 136 | ||
137 | /* Bit mask for revisions of chip exclusively after the named revision. */ | 137 | /* Bit mask for revisions of chip exclusively after the named revision. */ |
138 | #define SIBYTE_HDR_FMASK_AFTER(chip, pass) \ | 138 | #define SIBYTE_HDR_FMASK_AFTER(chip, pass) \ |
139 | (~(SIBYTE_HDR_FMASK(chip, pass) \ | 139 | (~(SIBYTE_HDR_FMASK(chip, pass) \ |
140 | | (SIBYTE_HDR_FMASK(chip, pass) - 1)) & SIBYTE_HDR_FMASK_ALLREVS(chip)) | 140 | | (SIBYTE_HDR_FMASK(chip, pass) - 1)) & SIBYTE_HDR_FMASK_ALLREVS(chip)) |
141 | 141 | ||
@@ -168,38 +168,38 @@ | |||
168 | /* ********************************************************************* | 168 | /* ********************************************************************* |
169 | * Naming schemes for constants in these files: | 169 | * Naming schemes for constants in these files: |
170 | * | 170 | * |
171 | * M_xxx MASK constant (identifies bits in a register). | 171 | * M_xxx MASK constant (identifies bits in a register). |
172 | * For multi-bit fields, all bits in the field will | 172 | * For multi-bit fields, all bits in the field will |
173 | * be set. | 173 | * be set. |
174 | * | 174 | * |
175 | * K_xxx "Code" constant (value for data in a multi-bit | 175 | * K_xxx "Code" constant (value for data in a multi-bit |
176 | * field). The value is right justified. | 176 | * field). The value is right justified. |
177 | * | 177 | * |
178 | * V_xxx "Value" constant. This is the same as the | 178 | * V_xxx "Value" constant. This is the same as the |
179 | * corresponding "K_xxx" constant, except it is | 179 | * corresponding "K_xxx" constant, except it is |
180 | * shifted to the correct position in the register. | 180 | * shifted to the correct position in the register. |
181 | * | 181 | * |
182 | * S_xxx SHIFT constant. This is the number of bits that | 182 | * S_xxx SHIFT constant. This is the number of bits that |
183 | * a field value (code) needs to be shifted | 183 | * a field value (code) needs to be shifted |
184 | * (towards the left) to put the value in the right | 184 | * (towards the left) to put the value in the right |
185 | * position for the register. | 185 | * position for the register. |
186 | * | 186 | * |
187 | * A_xxx ADDRESS constant. This will be a physical | 187 | * A_xxx ADDRESS constant. This will be a physical |
188 | * address. Use the PHYS_TO_K1 macro to generate | 188 | * address. Use the PHYS_TO_K1 macro to generate |
189 | * a K1SEG address. | 189 | * a K1SEG address. |
190 | * | 190 | * |
191 | * R_xxx RELATIVE offset constant. This is an offset from | 191 | * R_xxx RELATIVE offset constant. This is an offset from |
192 | * an A_xxx constant (usually the first register in | 192 | * an A_xxx constant (usually the first register in |
193 | * a group). | 193 | * a group). |
194 | * | 194 | * |
195 | * G_xxx(X) GET value. This macro obtains a multi-bit field | 195 | * G_xxx(X) GET value. This macro obtains a multi-bit field |
196 | * from a register, masks it, and shifts it to | 196 | * from a register, masks it, and shifts it to |
197 | * the bottom of the register (retrieving a K_xxx | 197 | * the bottom of the register (retrieving a K_xxx |
198 | * value, for example). | 198 | * value, for example). |
199 | * | 199 | * |
200 | * V_xxx(X) VALUE. This macro computes the value of a | 200 | * V_xxx(X) VALUE. This macro computes the value of a |
201 | * K_xxx constant shifted to the correct position | 201 | * K_xxx constant shifted to the correct position |
202 | * in the register. | 202 | * in the register. |
203 | ********************************************************************* */ | 203 | ********************************************************************* */ |
204 | 204 | ||
205 | 205 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_dma.h b/arch/mips/include/asm/sibyte/sb1250_dma.h index 6c44dfb52878..ea81713b78d6 100644 --- a/arch/mips/include/asm/sibyte/sb1250_dma.h +++ b/arch/mips/include/asm/sibyte/sb1250_dma.h | |||
@@ -51,15 +51,15 @@ | |||
51 | */ | 51 | */ |
52 | 52 | ||
53 | 53 | ||
54 | #define M_DMA_DROP _SB_MAKEMASK1(0) | 54 | #define M_DMA_DROP _SB_MAKEMASK1(0) |
55 | 55 | ||
56 | #define M_DMA_CHAIN_SEL _SB_MAKEMASK1(1) | 56 | #define M_DMA_CHAIN_SEL _SB_MAKEMASK1(1) |
57 | #define M_DMA_RESERVED1 _SB_MAKEMASK1(2) | 57 | #define M_DMA_RESERVED1 _SB_MAKEMASK1(2) |
58 | 58 | ||
59 | #define S_DMA_DESC_TYPE _SB_MAKE64(1) | 59 | #define S_DMA_DESC_TYPE _SB_MAKE64(1) |
60 | #define M_DMA_DESC_TYPE _SB_MAKEMASK(2, S_DMA_DESC_TYPE) | 60 | #define M_DMA_DESC_TYPE _SB_MAKEMASK(2, S_DMA_DESC_TYPE) |
61 | #define V_DMA_DESC_TYPE(x) _SB_MAKEVALUE(x, S_DMA_DESC_TYPE) | 61 | #define V_DMA_DESC_TYPE(x) _SB_MAKEVALUE(x, S_DMA_DESC_TYPE) |
62 | #define G_DMA_DESC_TYPE(x) _SB_GETVALUE(x, S_DMA_DESC_TYPE, M_DMA_DESC_TYPE) | 62 | #define G_DMA_DESC_TYPE(x) _SB_GETVALUE(x, S_DMA_DESC_TYPE, M_DMA_DESC_TYPE) |
63 | 63 | ||
64 | #define K_DMA_DESC_TYPE_RING_AL 0 | 64 | #define K_DMA_DESC_TYPE_RING_AL 0 |
65 | #define K_DMA_DESC_TYPE_CHAIN_AL 1 | 65 | #define K_DMA_DESC_TYPE_CHAIN_AL 1 |
@@ -69,31 +69,31 @@ | |||
69 | #define K_DMA_DESC_TYPE_RING_UAL_RMW 3 | 69 | #define K_DMA_DESC_TYPE_RING_UAL_RMW 3 |
70 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 70 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
71 | 71 | ||
72 | #define M_DMA_EOP_INT_EN _SB_MAKEMASK1(3) | 72 | #define M_DMA_EOP_INT_EN _SB_MAKEMASK1(3) |
73 | #define M_DMA_HWM_INT_EN _SB_MAKEMASK1(4) | 73 | #define M_DMA_HWM_INT_EN _SB_MAKEMASK1(4) |
74 | #define M_DMA_LWM_INT_EN _SB_MAKEMASK1(5) | 74 | #define M_DMA_LWM_INT_EN _SB_MAKEMASK1(5) |
75 | #define M_DMA_TBX_EN _SB_MAKEMASK1(6) | 75 | #define M_DMA_TBX_EN _SB_MAKEMASK1(6) |
76 | #define M_DMA_TDX_EN _SB_MAKEMASK1(7) | 76 | #define M_DMA_TDX_EN _SB_MAKEMASK1(7) |
77 | 77 | ||
78 | #define S_DMA_INT_PKTCNT _SB_MAKE64(8) | 78 | #define S_DMA_INT_PKTCNT _SB_MAKE64(8) |
79 | #define M_DMA_INT_PKTCNT _SB_MAKEMASK(8, S_DMA_INT_PKTCNT) | 79 | #define M_DMA_INT_PKTCNT _SB_MAKEMASK(8, S_DMA_INT_PKTCNT) |
80 | #define V_DMA_INT_PKTCNT(x) _SB_MAKEVALUE(x, S_DMA_INT_PKTCNT) | 80 | #define V_DMA_INT_PKTCNT(x) _SB_MAKEVALUE(x, S_DMA_INT_PKTCNT) |
81 | #define G_DMA_INT_PKTCNT(x) _SB_GETVALUE(x, S_DMA_INT_PKTCNT, M_DMA_INT_PKTCNT) | 81 | #define G_DMA_INT_PKTCNT(x) _SB_GETVALUE(x, S_DMA_INT_PKTCNT, M_DMA_INT_PKTCNT) |
82 | 82 | ||
83 | #define S_DMA_RINGSZ _SB_MAKE64(16) | 83 | #define S_DMA_RINGSZ _SB_MAKE64(16) |
84 | #define M_DMA_RINGSZ _SB_MAKEMASK(16, S_DMA_RINGSZ) | 84 | #define M_DMA_RINGSZ _SB_MAKEMASK(16, S_DMA_RINGSZ) |
85 | #define V_DMA_RINGSZ(x) _SB_MAKEVALUE(x, S_DMA_RINGSZ) | 85 | #define V_DMA_RINGSZ(x) _SB_MAKEVALUE(x, S_DMA_RINGSZ) |
86 | #define G_DMA_RINGSZ(x) _SB_GETVALUE(x, S_DMA_RINGSZ, M_DMA_RINGSZ) | 86 | #define G_DMA_RINGSZ(x) _SB_GETVALUE(x, S_DMA_RINGSZ, M_DMA_RINGSZ) |
87 | 87 | ||
88 | #define S_DMA_HIGH_WATERMARK _SB_MAKE64(32) | 88 | #define S_DMA_HIGH_WATERMARK _SB_MAKE64(32) |
89 | #define M_DMA_HIGH_WATERMARK _SB_MAKEMASK(16, S_DMA_HIGH_WATERMARK) | 89 | #define M_DMA_HIGH_WATERMARK _SB_MAKEMASK(16, S_DMA_HIGH_WATERMARK) |
90 | #define V_DMA_HIGH_WATERMARK(x) _SB_MAKEVALUE(x, S_DMA_HIGH_WATERMARK) | 90 | #define V_DMA_HIGH_WATERMARK(x) _SB_MAKEVALUE(x, S_DMA_HIGH_WATERMARK) |
91 | #define G_DMA_HIGH_WATERMARK(x) _SB_GETVALUE(x, S_DMA_HIGH_WATERMARK, M_DMA_HIGH_WATERMARK) | 91 | #define G_DMA_HIGH_WATERMARK(x) _SB_GETVALUE(x, S_DMA_HIGH_WATERMARK, M_DMA_HIGH_WATERMARK) |
92 | 92 | ||
93 | #define S_DMA_LOW_WATERMARK _SB_MAKE64(48) | 93 | #define S_DMA_LOW_WATERMARK _SB_MAKE64(48) |
94 | #define M_DMA_LOW_WATERMARK _SB_MAKEMASK(16, S_DMA_LOW_WATERMARK) | 94 | #define M_DMA_LOW_WATERMARK _SB_MAKEMASK(16, S_DMA_LOW_WATERMARK) |
95 | #define V_DMA_LOW_WATERMARK(x) _SB_MAKEVALUE(x, S_DMA_LOW_WATERMARK) | 95 | #define V_DMA_LOW_WATERMARK(x) _SB_MAKEVALUE(x, S_DMA_LOW_WATERMARK) |
96 | #define G_DMA_LOW_WATERMARK(x) _SB_GETVALUE(x, S_DMA_LOW_WATERMARK, M_DMA_LOW_WATERMARK) | 96 | #define G_DMA_LOW_WATERMARK(x) _SB_GETVALUE(x, S_DMA_LOW_WATERMARK, M_DMA_LOW_WATERMARK) |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * Ethernet and Serial DMA Configuration Register 1 (Table 7-5) | 99 | * Ethernet and Serial DMA Configuration Register 1 (Table 7-5) |
@@ -103,11 +103,11 @@ | |||
103 | * Registers: DMA_CONFIG1_SER_x_TX | 103 | * Registers: DMA_CONFIG1_SER_x_TX |
104 | */ | 104 | */ |
105 | 105 | ||
106 | #define M_DMA_HDR_CF_EN _SB_MAKEMASK1(0) | 106 | #define M_DMA_HDR_CF_EN _SB_MAKEMASK1(0) |
107 | #define M_DMA_ASIC_XFR_EN _SB_MAKEMASK1(1) | 107 | #define M_DMA_ASIC_XFR_EN _SB_MAKEMASK1(1) |
108 | #define M_DMA_PRE_ADDR_EN _SB_MAKEMASK1(2) | 108 | #define M_DMA_PRE_ADDR_EN _SB_MAKEMASK1(2) |
109 | #define M_DMA_FLOW_CTL_EN _SB_MAKEMASK1(3) | 109 | #define M_DMA_FLOW_CTL_EN _SB_MAKEMASK1(3) |
110 | #define M_DMA_NO_DSCR_UPDT _SB_MAKEMASK1(4) | 110 | #define M_DMA_NO_DSCR_UPDT _SB_MAKEMASK1(4) |
111 | #define M_DMA_L2CA _SB_MAKEMASK1(5) | 111 | #define M_DMA_L2CA _SB_MAKEMASK1(5) |
112 | 112 | ||
113 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 113 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
@@ -116,37 +116,37 @@ | |||
116 | #define M_DMA_TX_FC_PAUSE_EN _SB_MAKEMASK1(7) | 116 | #define M_DMA_TX_FC_PAUSE_EN _SB_MAKEMASK1(7) |
117 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 117 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
118 | 118 | ||
119 | #define M_DMA_MBZ1 _SB_MAKEMASK(6, 15) | 119 | #define M_DMA_MBZ1 _SB_MAKEMASK(6, 15) |
120 | 120 | ||
121 | #define S_DMA_HDR_SIZE _SB_MAKE64(21) | 121 | #define S_DMA_HDR_SIZE _SB_MAKE64(21) |
122 | #define M_DMA_HDR_SIZE _SB_MAKEMASK(9, S_DMA_HDR_SIZE) | 122 | #define M_DMA_HDR_SIZE _SB_MAKEMASK(9, S_DMA_HDR_SIZE) |
123 | #define V_DMA_HDR_SIZE(x) _SB_MAKEVALUE(x, S_DMA_HDR_SIZE) | 123 | #define V_DMA_HDR_SIZE(x) _SB_MAKEVALUE(x, S_DMA_HDR_SIZE) |
124 | #define G_DMA_HDR_SIZE(x) _SB_GETVALUE(x, S_DMA_HDR_SIZE, M_DMA_HDR_SIZE) | 124 | #define G_DMA_HDR_SIZE(x) _SB_GETVALUE(x, S_DMA_HDR_SIZE, M_DMA_HDR_SIZE) |
125 | 125 | ||
126 | #define M_DMA_MBZ2 _SB_MAKEMASK(5, 32) | 126 | #define M_DMA_MBZ2 _SB_MAKEMASK(5, 32) |
127 | 127 | ||
128 | #define S_DMA_ASICXFR_SIZE _SB_MAKE64(37) | 128 | #define S_DMA_ASICXFR_SIZE _SB_MAKE64(37) |
129 | #define M_DMA_ASICXFR_SIZE _SB_MAKEMASK(9, S_DMA_ASICXFR_SIZE) | 129 | #define M_DMA_ASICXFR_SIZE _SB_MAKEMASK(9, S_DMA_ASICXFR_SIZE) |
130 | #define V_DMA_ASICXFR_SIZE(x) _SB_MAKEVALUE(x, S_DMA_ASICXFR_SIZE) | 130 | #define V_DMA_ASICXFR_SIZE(x) _SB_MAKEVALUE(x, S_DMA_ASICXFR_SIZE) |
131 | #define G_DMA_ASICXFR_SIZE(x) _SB_GETVALUE(x, S_DMA_ASICXFR_SIZE, M_DMA_ASICXFR_SIZE) | 131 | #define G_DMA_ASICXFR_SIZE(x) _SB_GETVALUE(x, S_DMA_ASICXFR_SIZE, M_DMA_ASICXFR_SIZE) |
132 | 132 | ||
133 | #define S_DMA_INT_TIMEOUT _SB_MAKE64(48) | 133 | #define S_DMA_INT_TIMEOUT _SB_MAKE64(48) |
134 | #define M_DMA_INT_TIMEOUT _SB_MAKEMASK(16, S_DMA_INT_TIMEOUT) | 134 | #define M_DMA_INT_TIMEOUT _SB_MAKEMASK(16, S_DMA_INT_TIMEOUT) |
135 | #define V_DMA_INT_TIMEOUT(x) _SB_MAKEVALUE(x, S_DMA_INT_TIMEOUT) | 135 | #define V_DMA_INT_TIMEOUT(x) _SB_MAKEVALUE(x, S_DMA_INT_TIMEOUT) |
136 | #define G_DMA_INT_TIMEOUT(x) _SB_GETVALUE(x, S_DMA_INT_TIMEOUT, M_DMA_INT_TIMEOUT) | 136 | #define G_DMA_INT_TIMEOUT(x) _SB_GETVALUE(x, S_DMA_INT_TIMEOUT, M_DMA_INT_TIMEOUT) |
137 | 137 | ||
138 | /* | 138 | /* |
139 | * Ethernet and Serial DMA Descriptor base address (Table 7-6) | 139 | * Ethernet and Serial DMA Descriptor base address (Table 7-6) |
140 | */ | 140 | */ |
141 | 141 | ||
142 | #define M_DMA_DSCRBASE_MBZ _SB_MAKEMASK(4, 0) | 142 | #define M_DMA_DSCRBASE_MBZ _SB_MAKEMASK(4, 0) |
143 | 143 | ||
144 | 144 | ||
145 | /* | 145 | /* |
146 | * ASIC Mode Base Address (Table 7-7) | 146 | * ASIC Mode Base Address (Table 7-7) |
147 | */ | 147 | */ |
148 | 148 | ||
149 | #define M_DMA_ASIC_BASE_MBZ _SB_MAKEMASK(20, 0) | 149 | #define M_DMA_ASIC_BASE_MBZ _SB_MAKEMASK(20, 0) |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * DMA Descriptor Count Registers (Table 7-8) | 152 | * DMA Descriptor Count Registers (Table 7-8) |
@@ -159,10 +159,10 @@ | |||
159 | * Current Descriptor Address Register (Table 7-11) | 159 | * Current Descriptor Address Register (Table 7-11) |
160 | */ | 160 | */ |
161 | 161 | ||
162 | #define S_DMA_CURDSCR_ADDR _SB_MAKE64(0) | 162 | #define S_DMA_CURDSCR_ADDR _SB_MAKE64(0) |
163 | #define M_DMA_CURDSCR_ADDR _SB_MAKEMASK(40, S_DMA_CURDSCR_ADDR) | 163 | #define M_DMA_CURDSCR_ADDR _SB_MAKEMASK(40, S_DMA_CURDSCR_ADDR) |
164 | #define S_DMA_CURDSCR_COUNT _SB_MAKE64(40) | 164 | #define S_DMA_CURDSCR_COUNT _SB_MAKE64(40) |
165 | #define M_DMA_CURDSCR_COUNT _SB_MAKEMASK(16, S_DMA_CURDSCR_COUNT) | 165 | #define M_DMA_CURDSCR_COUNT _SB_MAKEMASK(16, S_DMA_CURDSCR_COUNT) |
166 | 166 | ||
167 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 167 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
168 | #define M_DMA_TX_CH_PAUSE_ON _SB_MAKEMASK1(56) | 168 | #define M_DMA_TX_CH_PAUSE_ON _SB_MAKEMASK1(56) |
@@ -172,13 +172,13 @@ | |||
172 | * Receive Packet Drop Registers | 172 | * Receive Packet Drop Registers |
173 | */ | 173 | */ |
174 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 174 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
175 | #define S_DMA_OODLOST_RX _SB_MAKE64(0) | 175 | #define S_DMA_OODLOST_RX _SB_MAKE64(0) |
176 | #define M_DMA_OODLOST_RX _SB_MAKEMASK(16, S_DMA_OODLOST_RX) | 176 | #define M_DMA_OODLOST_RX _SB_MAKEMASK(16, S_DMA_OODLOST_RX) |
177 | #define G_DMA_OODLOST_RX(x) _SB_GETVALUE(x, S_DMA_OODLOST_RX, M_DMA_OODLOST_RX) | 177 | #define G_DMA_OODLOST_RX(x) _SB_GETVALUE(x, S_DMA_OODLOST_RX, M_DMA_OODLOST_RX) |
178 | 178 | ||
179 | #define S_DMA_EOP_COUNT_RX _SB_MAKE64(16) | 179 | #define S_DMA_EOP_COUNT_RX _SB_MAKE64(16) |
180 | #define M_DMA_EOP_COUNT_RX _SB_MAKEMASK(8, S_DMA_EOP_COUNT_RX) | 180 | #define M_DMA_EOP_COUNT_RX _SB_MAKEMASK(8, S_DMA_EOP_COUNT_RX) |
181 | #define G_DMA_EOP_COUNT_RX(x) _SB_GETVALUE(x, S_DMA_EOP_COUNT_RX, M_DMA_EOP_COUNT_RX) | 181 | #define G_DMA_EOP_COUNT_RX(x) _SB_GETVALUE(x, S_DMA_EOP_COUNT_RX, M_DMA_EOP_COUNT_RX) |
182 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 182 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
183 | 183 | ||
184 | /* ********************************************************************* | 184 | /* ********************************************************************* |
@@ -189,26 +189,26 @@ | |||
189 | * Descriptor doubleword "A" (Table 7-12) | 189 | * Descriptor doubleword "A" (Table 7-12) |
190 | */ | 190 | */ |
191 | 191 | ||
192 | #define S_DMA_DSCRA_OFFSET _SB_MAKE64(0) | 192 | #define S_DMA_DSCRA_OFFSET _SB_MAKE64(0) |
193 | #define M_DMA_DSCRA_OFFSET _SB_MAKEMASK(5, S_DMA_DSCRA_OFFSET) | 193 | #define M_DMA_DSCRA_OFFSET _SB_MAKEMASK(5, S_DMA_DSCRA_OFFSET) |
194 | #define V_DMA_DSCRA_OFFSET(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_OFFSET) | 194 | #define V_DMA_DSCRA_OFFSET(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_OFFSET) |
195 | #define G_DMA_DSCRA_OFFSET(x) _SB_GETVALUE(x, S_DMA_DSCRA_OFFSET, M_DMA_DSCRA_OFFSET) | 195 | #define G_DMA_DSCRA_OFFSET(x) _SB_GETVALUE(x, S_DMA_DSCRA_OFFSET, M_DMA_DSCRA_OFFSET) |
196 | 196 | ||
197 | /* Note: Don't shift the address over, just mask it with the mask below */ | 197 | /* Note: Don't shift the address over, just mask it with the mask below */ |
198 | #define S_DMA_DSCRA_A_ADDR _SB_MAKE64(5) | 198 | #define S_DMA_DSCRA_A_ADDR _SB_MAKE64(5) |
199 | #define M_DMA_DSCRA_A_ADDR _SB_MAKEMASK(35, S_DMA_DSCRA_A_ADDR) | 199 | #define M_DMA_DSCRA_A_ADDR _SB_MAKEMASK(35, S_DMA_DSCRA_A_ADDR) |
200 | 200 | ||
201 | #define M_DMA_DSCRA_A_ADDR_OFFSET (M_DMA_DSCRA_OFFSET | M_DMA_DSCRA_A_ADDR) | 201 | #define M_DMA_DSCRA_A_ADDR_OFFSET (M_DMA_DSCRA_OFFSET | M_DMA_DSCRA_A_ADDR) |
202 | 202 | ||
203 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 203 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
204 | #define S_DMA_DSCRA_A_ADDR_UA _SB_MAKE64(0) | 204 | #define S_DMA_DSCRA_A_ADDR_UA _SB_MAKE64(0) |
205 | #define M_DMA_DSCRA_A_ADDR_UA _SB_MAKEMASK(40, S_DMA_DSCRA_A_ADDR_UA) | 205 | #define M_DMA_DSCRA_A_ADDR_UA _SB_MAKEMASK(40, S_DMA_DSCRA_A_ADDR_UA) |
206 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 206 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
207 | 207 | ||
208 | #define S_DMA_DSCRA_A_SIZE _SB_MAKE64(40) | 208 | #define S_DMA_DSCRA_A_SIZE _SB_MAKE64(40) |
209 | #define M_DMA_DSCRA_A_SIZE _SB_MAKEMASK(9, S_DMA_DSCRA_A_SIZE) | 209 | #define M_DMA_DSCRA_A_SIZE _SB_MAKEMASK(9, S_DMA_DSCRA_A_SIZE) |
210 | #define V_DMA_DSCRA_A_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_A_SIZE) | 210 | #define V_DMA_DSCRA_A_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_A_SIZE) |
211 | #define G_DMA_DSCRA_A_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRA_A_SIZE, M_DMA_DSCRA_A_SIZE) | 211 | #define G_DMA_DSCRA_A_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRA_A_SIZE, M_DMA_DSCRA_A_SIZE) |
212 | 212 | ||
213 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 213 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
214 | #define S_DMA_DSCRA_DSCR_CNT _SB_MAKE64(40) | 214 | #define S_DMA_DSCRA_DSCR_CNT _SB_MAKE64(40) |
@@ -216,43 +216,43 @@ | |||
216 | #define G_DMA_DSCRA_DSCR_CNT(x) _SB_GETVALUE(x, S_DMA_DSCRA_DSCR_CNT, M_DMA_DSCRA_DSCR_CNT) | 216 | #define G_DMA_DSCRA_DSCR_CNT(x) _SB_GETVALUE(x, S_DMA_DSCRA_DSCR_CNT, M_DMA_DSCRA_DSCR_CNT) |
217 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 217 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
218 | 218 | ||
219 | #define M_DMA_DSCRA_INTERRUPT _SB_MAKEMASK1(49) | 219 | #define M_DMA_DSCRA_INTERRUPT _SB_MAKEMASK1(49) |
220 | #define M_DMA_DSCRA_OFFSETB _SB_MAKEMASK1(50) | 220 | #define M_DMA_DSCRA_OFFSETB _SB_MAKEMASK1(50) |
221 | 221 | ||
222 | #define S_DMA_DSCRA_STATUS _SB_MAKE64(51) | 222 | #define S_DMA_DSCRA_STATUS _SB_MAKE64(51) |
223 | #define M_DMA_DSCRA_STATUS _SB_MAKEMASK(13, S_DMA_DSCRA_STATUS) | 223 | #define M_DMA_DSCRA_STATUS _SB_MAKEMASK(13, S_DMA_DSCRA_STATUS) |
224 | #define V_DMA_DSCRA_STATUS(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_STATUS) | 224 | #define V_DMA_DSCRA_STATUS(x) _SB_MAKEVALUE(x, S_DMA_DSCRA_STATUS) |
225 | #define G_DMA_DSCRA_STATUS(x) _SB_GETVALUE(x, S_DMA_DSCRA_STATUS, M_DMA_DSCRA_STATUS) | 225 | #define G_DMA_DSCRA_STATUS(x) _SB_GETVALUE(x, S_DMA_DSCRA_STATUS, M_DMA_DSCRA_STATUS) |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Descriptor doubleword "B" (Table 7-13) | 228 | * Descriptor doubleword "B" (Table 7-13) |
229 | */ | 229 | */ |
230 | 230 | ||
231 | 231 | ||
232 | #define S_DMA_DSCRB_OPTIONS _SB_MAKE64(0) | 232 | #define S_DMA_DSCRB_OPTIONS _SB_MAKE64(0) |
233 | #define M_DMA_DSCRB_OPTIONS _SB_MAKEMASK(4, S_DMA_DSCRB_OPTIONS) | 233 | #define M_DMA_DSCRB_OPTIONS _SB_MAKEMASK(4, S_DMA_DSCRB_OPTIONS) |
234 | #define V_DMA_DSCRB_OPTIONS(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_OPTIONS) | 234 | #define V_DMA_DSCRB_OPTIONS(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_OPTIONS) |
235 | #define G_DMA_DSCRB_OPTIONS(x) _SB_GETVALUE(x, S_DMA_DSCRB_OPTIONS, M_DMA_DSCRB_OPTIONS) | 235 | #define G_DMA_DSCRB_OPTIONS(x) _SB_GETVALUE(x, S_DMA_DSCRB_OPTIONS, M_DMA_DSCRB_OPTIONS) |
236 | 236 | ||
237 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 237 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
238 | #define S_DMA_DSCRB_A_SIZE _SB_MAKE64(8) | 238 | #define S_DMA_DSCRB_A_SIZE _SB_MAKE64(8) |
239 | #define M_DMA_DSCRB_A_SIZE _SB_MAKEMASK(14, S_DMA_DSCRB_A_SIZE) | 239 | #define M_DMA_DSCRB_A_SIZE _SB_MAKEMASK(14, S_DMA_DSCRB_A_SIZE) |
240 | #define V_DMA_DSCRB_A_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_A_SIZE) | 240 | #define V_DMA_DSCRB_A_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_A_SIZE) |
241 | #define G_DMA_DSCRB_A_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_A_SIZE, M_DMA_DSCRB_A_SIZE) | 241 | #define G_DMA_DSCRB_A_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_A_SIZE, M_DMA_DSCRB_A_SIZE) |
242 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 242 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
243 | 243 | ||
244 | #define R_DMA_DSCRB_ADDR _SB_MAKE64(0x10) | 244 | #define R_DMA_DSCRB_ADDR _SB_MAKE64(0x10) |
245 | 245 | ||
246 | /* Note: Don't shift the address over, just mask it with the mask below */ | 246 | /* Note: Don't shift the address over, just mask it with the mask below */ |
247 | #define S_DMA_DSCRB_B_ADDR _SB_MAKE64(5) | 247 | #define S_DMA_DSCRB_B_ADDR _SB_MAKE64(5) |
248 | #define M_DMA_DSCRB_B_ADDR _SB_MAKEMASK(35, S_DMA_DSCRB_B_ADDR) | 248 | #define M_DMA_DSCRB_B_ADDR _SB_MAKEMASK(35, S_DMA_DSCRB_B_ADDR) |
249 | 249 | ||
250 | #define S_DMA_DSCRB_B_SIZE _SB_MAKE64(40) | 250 | #define S_DMA_DSCRB_B_SIZE _SB_MAKE64(40) |
251 | #define M_DMA_DSCRB_B_SIZE _SB_MAKEMASK(9, S_DMA_DSCRB_B_SIZE) | 251 | #define M_DMA_DSCRB_B_SIZE _SB_MAKEMASK(9, S_DMA_DSCRB_B_SIZE) |
252 | #define V_DMA_DSCRB_B_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_B_SIZE) | 252 | #define V_DMA_DSCRB_B_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_B_SIZE) |
253 | #define G_DMA_DSCRB_B_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_B_SIZE, M_DMA_DSCRB_B_SIZE) | 253 | #define G_DMA_DSCRB_B_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_B_SIZE, M_DMA_DSCRB_B_SIZE) |
254 | 254 | ||
255 | #define M_DMA_DSCRB_B_VALID _SB_MAKEMASK1(49) | 255 | #define M_DMA_DSCRB_B_VALID _SB_MAKEMASK1(49) |
256 | 256 | ||
257 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 257 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
258 | #define S_DMA_DSCRB_PKT_SIZE_MSB _SB_MAKE64(48) | 258 | #define S_DMA_DSCRB_PKT_SIZE_MSB _SB_MAKE64(48) |
@@ -261,24 +261,24 @@ | |||
261 | #define G_DMA_DSCRB_PKT_SIZE_MSB(x) _SB_GETVALUE(x, S_DMA_DSCRB_PKT_SIZE_MSB, M_DMA_DSCRB_PKT_SIZE_MSB) | 261 | #define G_DMA_DSCRB_PKT_SIZE_MSB(x) _SB_GETVALUE(x, S_DMA_DSCRB_PKT_SIZE_MSB, M_DMA_DSCRB_PKT_SIZE_MSB) |
262 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 262 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
263 | 263 | ||
264 | #define S_DMA_DSCRB_PKT_SIZE _SB_MAKE64(50) | 264 | #define S_DMA_DSCRB_PKT_SIZE _SB_MAKE64(50) |
265 | #define M_DMA_DSCRB_PKT_SIZE _SB_MAKEMASK(14, S_DMA_DSCRB_PKT_SIZE) | 265 | #define M_DMA_DSCRB_PKT_SIZE _SB_MAKEMASK(14, S_DMA_DSCRB_PKT_SIZE) |
266 | #define V_DMA_DSCRB_PKT_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_PKT_SIZE) | 266 | #define V_DMA_DSCRB_PKT_SIZE(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_PKT_SIZE) |
267 | #define G_DMA_DSCRB_PKT_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_PKT_SIZE, M_DMA_DSCRB_PKT_SIZE) | 267 | #define G_DMA_DSCRB_PKT_SIZE(x) _SB_GETVALUE(x, S_DMA_DSCRB_PKT_SIZE, M_DMA_DSCRB_PKT_SIZE) |
268 | 268 | ||
269 | /* | 269 | /* |
270 | * from pass2 some bits in dscr_b are also used for rx status | 270 | * from pass2 some bits in dscr_b are also used for rx status |
271 | */ | 271 | */ |
272 | #define S_DMA_DSCRB_STATUS _SB_MAKE64(0) | 272 | #define S_DMA_DSCRB_STATUS _SB_MAKE64(0) |
273 | #define M_DMA_DSCRB_STATUS _SB_MAKEMASK(1, S_DMA_DSCRB_STATUS) | 273 | #define M_DMA_DSCRB_STATUS _SB_MAKEMASK(1, S_DMA_DSCRB_STATUS) |
274 | #define V_DMA_DSCRB_STATUS(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_STATUS) | 274 | #define V_DMA_DSCRB_STATUS(x) _SB_MAKEVALUE(x, S_DMA_DSCRB_STATUS) |
275 | #define G_DMA_DSCRB_STATUS(x) _SB_GETVALUE(x, S_DMA_DSCRB_STATUS, M_DMA_DSCRB_STATUS) | 275 | #define G_DMA_DSCRB_STATUS(x) _SB_GETVALUE(x, S_DMA_DSCRB_STATUS, M_DMA_DSCRB_STATUS) |
276 | 276 | ||
277 | /* | 277 | /* |
278 | * Ethernet Descriptor Status Bits (Table 7-15) | 278 | * Ethernet Descriptor Status Bits (Table 7-15) |
279 | */ | 279 | */ |
280 | 280 | ||
281 | #define M_DMA_ETHRX_BADIP4CS _SB_MAKEMASK1(51) | 281 | #define M_DMA_ETHRX_BADIP4CS _SB_MAKEMASK1(51) |
282 | #define M_DMA_ETHRX_DSCRERR _SB_MAKEMASK1(52) | 282 | #define M_DMA_ETHRX_DSCRERR _SB_MAKEMASK1(52) |
283 | 283 | ||
284 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 284 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
@@ -292,70 +292,70 @@ | |||
292 | #define M_DMA_ETH_CRC_FLAG _SB_MAKEMASK1(2) | 292 | #define M_DMA_ETH_CRC_FLAG _SB_MAKEMASK1(2) |
293 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 293 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
294 | 294 | ||
295 | #define S_DMA_ETHRX_RXCH 53 | 295 | #define S_DMA_ETHRX_RXCH 53 |
296 | #define M_DMA_ETHRX_RXCH _SB_MAKEMASK(2, S_DMA_ETHRX_RXCH) | 296 | #define M_DMA_ETHRX_RXCH _SB_MAKEMASK(2, S_DMA_ETHRX_RXCH) |
297 | #define V_DMA_ETHRX_RXCH(x) _SB_MAKEVALUE(x, S_DMA_ETHRX_RXCH) | 297 | #define V_DMA_ETHRX_RXCH(x) _SB_MAKEVALUE(x, S_DMA_ETHRX_RXCH) |
298 | #define G_DMA_ETHRX_RXCH(x) _SB_GETVALUE(x, S_DMA_ETHRX_RXCH, M_DMA_ETHRX_RXCH) | 298 | #define G_DMA_ETHRX_RXCH(x) _SB_GETVALUE(x, S_DMA_ETHRX_RXCH, M_DMA_ETHRX_RXCH) |
299 | 299 | ||
300 | #define S_DMA_ETHRX_PKTTYPE 55 | 300 | #define S_DMA_ETHRX_PKTTYPE 55 |
301 | #define M_DMA_ETHRX_PKTTYPE _SB_MAKEMASK(3, S_DMA_ETHRX_PKTTYPE) | 301 | #define M_DMA_ETHRX_PKTTYPE _SB_MAKEMASK(3, S_DMA_ETHRX_PKTTYPE) |
302 | #define V_DMA_ETHRX_PKTTYPE(x) _SB_MAKEVALUE(x, S_DMA_ETHRX_PKTTYPE) | 302 | #define V_DMA_ETHRX_PKTTYPE(x) _SB_MAKEVALUE(x, S_DMA_ETHRX_PKTTYPE) |
303 | #define G_DMA_ETHRX_PKTTYPE(x) _SB_GETVALUE(x, S_DMA_ETHRX_PKTTYPE, M_DMA_ETHRX_PKTTYPE) | 303 | #define G_DMA_ETHRX_PKTTYPE(x) _SB_GETVALUE(x, S_DMA_ETHRX_PKTTYPE, M_DMA_ETHRX_PKTTYPE) |
304 | 304 | ||
305 | #define K_DMA_ETHRX_PKTTYPE_IPV4 0 | 305 | #define K_DMA_ETHRX_PKTTYPE_IPV4 0 |
306 | #define K_DMA_ETHRX_PKTTYPE_ARPV4 1 | 306 | #define K_DMA_ETHRX_PKTTYPE_ARPV4 1 |
307 | #define K_DMA_ETHRX_PKTTYPE_802 2 | 307 | #define K_DMA_ETHRX_PKTTYPE_802 2 |
308 | #define K_DMA_ETHRX_PKTTYPE_OTHER 3 | 308 | #define K_DMA_ETHRX_PKTTYPE_OTHER 3 |
309 | #define K_DMA_ETHRX_PKTTYPE_USER0 4 | 309 | #define K_DMA_ETHRX_PKTTYPE_USER0 4 |
310 | #define K_DMA_ETHRX_PKTTYPE_USER1 5 | 310 | #define K_DMA_ETHRX_PKTTYPE_USER1 5 |
311 | #define K_DMA_ETHRX_PKTTYPE_USER2 6 | 311 | #define K_DMA_ETHRX_PKTTYPE_USER2 6 |
312 | #define K_DMA_ETHRX_PKTTYPE_USER3 7 | 312 | #define K_DMA_ETHRX_PKTTYPE_USER3 7 |
313 | 313 | ||
314 | #define M_DMA_ETHRX_MATCH_HASH _SB_MAKEMASK1(58) | 314 | #define M_DMA_ETHRX_MATCH_HASH _SB_MAKEMASK1(58) |
315 | #define M_DMA_ETHRX_MATCH_EXACT _SB_MAKEMASK1(59) | 315 | #define M_DMA_ETHRX_MATCH_EXACT _SB_MAKEMASK1(59) |
316 | #define M_DMA_ETHRX_BCAST _SB_MAKEMASK1(60) | 316 | #define M_DMA_ETHRX_BCAST _SB_MAKEMASK1(60) |
317 | #define M_DMA_ETHRX_MCAST _SB_MAKEMASK1(61) | 317 | #define M_DMA_ETHRX_MCAST _SB_MAKEMASK1(61) |
318 | #define M_DMA_ETHRX_BAD _SB_MAKEMASK1(62) | 318 | #define M_DMA_ETHRX_BAD _SB_MAKEMASK1(62) |
319 | #define M_DMA_ETHRX_SOP _SB_MAKEMASK1(63) | 319 | #define M_DMA_ETHRX_SOP _SB_MAKEMASK1(63) |
320 | 320 | ||
321 | /* | 321 | /* |
322 | * Ethernet Transmit Status Bits (Table 7-16) | 322 | * Ethernet Transmit Status Bits (Table 7-16) |
323 | */ | 323 | */ |
324 | 324 | ||
325 | #define M_DMA_ETHTX_SOP _SB_MAKEMASK1(63) | 325 | #define M_DMA_ETHTX_SOP _SB_MAKEMASK1(63) |
326 | 326 | ||
327 | /* | 327 | /* |
328 | * Ethernet Transmit Options (Table 7-17) | 328 | * Ethernet Transmit Options (Table 7-17) |
329 | */ | 329 | */ |
330 | 330 | ||
331 | #define K_DMA_ETHTX_NOTSOP _SB_MAKE64(0x00) | 331 | #define K_DMA_ETHTX_NOTSOP _SB_MAKE64(0x00) |
332 | #define K_DMA_ETHTX_APPENDCRC _SB_MAKE64(0x01) | 332 | #define K_DMA_ETHTX_APPENDCRC _SB_MAKE64(0x01) |
333 | #define K_DMA_ETHTX_REPLACECRC _SB_MAKE64(0x02) | 333 | #define K_DMA_ETHTX_REPLACECRC _SB_MAKE64(0x02) |
334 | #define K_DMA_ETHTX_APPENDCRC_APPENDPAD _SB_MAKE64(0x03) | 334 | #define K_DMA_ETHTX_APPENDCRC_APPENDPAD _SB_MAKE64(0x03) |
335 | #define K_DMA_ETHTX_APPENDVLAN_REPLACECRC _SB_MAKE64(0x04) | 335 | #define K_DMA_ETHTX_APPENDVLAN_REPLACECRC _SB_MAKE64(0x04) |
336 | #define K_DMA_ETHTX_REMOVEVLAN_REPLACECRC _SB_MAKE64(0x05) | 336 | #define K_DMA_ETHTX_REMOVEVLAN_REPLACECRC _SB_MAKE64(0x05) |
337 | #define K_DMA_ETHTX_REPLACEVLAN_REPLACECRC _SB_MAKE64(0x6) | 337 | #define K_DMA_ETHTX_REPLACEVLAN_REPLACECRC _SB_MAKE64(0x6) |
338 | #define K_DMA_ETHTX_NOMODS _SB_MAKE64(0x07) | 338 | #define K_DMA_ETHTX_NOMODS _SB_MAKE64(0x07) |
339 | #define K_DMA_ETHTX_RESERVED1 _SB_MAKE64(0x08) | 339 | #define K_DMA_ETHTX_RESERVED1 _SB_MAKE64(0x08) |
340 | #define K_DMA_ETHTX_REPLACESADDR_APPENDCRC _SB_MAKE64(0x09) | 340 | #define K_DMA_ETHTX_REPLACESADDR_APPENDCRC _SB_MAKE64(0x09) |
341 | #define K_DMA_ETHTX_REPLACESADDR_REPLACECRC _SB_MAKE64(0x0A) | 341 | #define K_DMA_ETHTX_REPLACESADDR_REPLACECRC _SB_MAKE64(0x0A) |
342 | #define K_DMA_ETHTX_REPLACESADDR_APPENDCRC_APPENDPAD _SB_MAKE64(0x0B) | 342 | #define K_DMA_ETHTX_REPLACESADDR_APPENDCRC_APPENDPAD _SB_MAKE64(0x0B) |
343 | #define K_DMA_ETHTX_REPLACESADDR_APPENDVLAN_REPLACECRC _SB_MAKE64(0x0C) | 343 | #define K_DMA_ETHTX_REPLACESADDR_APPENDVLAN_REPLACECRC _SB_MAKE64(0x0C) |
344 | #define K_DMA_ETHTX_REPLACESADDR_REMOVEVLAN_REPLACECRC _SB_MAKE64(0x0D) | 344 | #define K_DMA_ETHTX_REPLACESADDR_REMOVEVLAN_REPLACECRC _SB_MAKE64(0x0D) |
345 | #define K_DMA_ETHTX_REPLACESADDR_REPLACEVLAN_REPLACECRC _SB_MAKE64(0x0E) | 345 | #define K_DMA_ETHTX_REPLACESADDR_REPLACEVLAN_REPLACECRC _SB_MAKE64(0x0E) |
346 | #define K_DMA_ETHTX_RESERVED2 _SB_MAKE64(0x0F) | 346 | #define K_DMA_ETHTX_RESERVED2 _SB_MAKE64(0x0F) |
347 | 347 | ||
348 | /* | 348 | /* |
349 | * Serial Receive Options (Table 7-18) | 349 | * Serial Receive Options (Table 7-18) |
350 | */ | 350 | */ |
351 | #define M_DMA_SERRX_CRC_ERROR _SB_MAKEMASK1(56) | 351 | #define M_DMA_SERRX_CRC_ERROR _SB_MAKEMASK1(56) |
352 | #define M_DMA_SERRX_ABORT _SB_MAKEMASK1(57) | 352 | #define M_DMA_SERRX_ABORT _SB_MAKEMASK1(57) |
353 | #define M_DMA_SERRX_OCTET_ERROR _SB_MAKEMASK1(58) | 353 | #define M_DMA_SERRX_OCTET_ERROR _SB_MAKEMASK1(58) |
354 | #define M_DMA_SERRX_LONGFRAME_ERROR _SB_MAKEMASK1(59) | 354 | #define M_DMA_SERRX_LONGFRAME_ERROR _SB_MAKEMASK1(59) |
355 | #define M_DMA_SERRX_SHORTFRAME_ERROR _SB_MAKEMASK1(60) | 355 | #define M_DMA_SERRX_SHORTFRAME_ERROR _SB_MAKEMASK1(60) |
356 | #define M_DMA_SERRX_OVERRUN_ERROR _SB_MAKEMASK1(61) | 356 | #define M_DMA_SERRX_OVERRUN_ERROR _SB_MAKEMASK1(61) |
357 | #define M_DMA_SERRX_GOOD _SB_MAKEMASK1(62) | 357 | #define M_DMA_SERRX_GOOD _SB_MAKEMASK1(62) |
358 | #define M_DMA_SERRX_SOP _SB_MAKEMASK1(63) | 358 | #define M_DMA_SERRX_SOP _SB_MAKEMASK1(63) |
359 | 359 | ||
360 | /* | 360 | /* |
361 | * Serial Transmit Status Bits (Table 7-20) | 361 | * Serial Transmit Status Bits (Table 7-20) |
@@ -367,10 +367,10 @@ | |||
367 | * Serial Transmit Options (Table 7-21) | 367 | * Serial Transmit Options (Table 7-21) |
368 | */ | 368 | */ |
369 | 369 | ||
370 | #define K_DMA_SERTX_RESERVED _SB_MAKEMASK1(0) | 370 | #define K_DMA_SERTX_RESERVED _SB_MAKEMASK1(0) |
371 | #define K_DMA_SERTX_APPENDCRC _SB_MAKEMASK1(1) | 371 | #define K_DMA_SERTX_APPENDCRC _SB_MAKEMASK1(1) |
372 | #define K_DMA_SERTX_APPENDPAD _SB_MAKEMASK1(2) | 372 | #define K_DMA_SERTX_APPENDPAD _SB_MAKEMASK1(2) |
373 | #define K_DMA_SERTX_ABORT _SB_MAKEMASK1(3) | 373 | #define K_DMA_SERTX_ABORT _SB_MAKEMASK1(3) |
374 | 374 | ||
375 | 375 | ||
376 | /* ********************************************************************* | 376 | /* ********************************************************************* |
@@ -385,19 +385,19 @@ | |||
385 | * Register: DM_DSCR_BASE_3 | 385 | * Register: DM_DSCR_BASE_3 |
386 | */ | 386 | */ |
387 | 387 | ||
388 | #define M_DM_DSCR_BASE_MBZ _SB_MAKEMASK(4, 0) | 388 | #define M_DM_DSCR_BASE_MBZ _SB_MAKEMASK(4, 0) |
389 | 389 | ||
390 | /* Note: Just mask the base address and then OR it in. */ | 390 | /* Note: Just mask the base address and then OR it in. */ |
391 | #define S_DM_DSCR_BASE_ADDR _SB_MAKE64(4) | 391 | #define S_DM_DSCR_BASE_ADDR _SB_MAKE64(4) |
392 | #define M_DM_DSCR_BASE_ADDR _SB_MAKEMASK(36, S_DM_DSCR_BASE_ADDR) | 392 | #define M_DM_DSCR_BASE_ADDR _SB_MAKEMASK(36, S_DM_DSCR_BASE_ADDR) |
393 | 393 | ||
394 | #define S_DM_DSCR_BASE_RINGSZ _SB_MAKE64(40) | 394 | #define S_DM_DSCR_BASE_RINGSZ _SB_MAKE64(40) |
395 | #define M_DM_DSCR_BASE_RINGSZ _SB_MAKEMASK(16, S_DM_DSCR_BASE_RINGSZ) | 395 | #define M_DM_DSCR_BASE_RINGSZ _SB_MAKEMASK(16, S_DM_DSCR_BASE_RINGSZ) |
396 | #define V_DM_DSCR_BASE_RINGSZ(x) _SB_MAKEVALUE(x, S_DM_DSCR_BASE_RINGSZ) | 396 | #define V_DM_DSCR_BASE_RINGSZ(x) _SB_MAKEVALUE(x, S_DM_DSCR_BASE_RINGSZ) |
397 | #define G_DM_DSCR_BASE_RINGSZ(x) _SB_GETVALUE(x, S_DM_DSCR_BASE_RINGSZ, M_DM_DSCR_BASE_RINGSZ) | 397 | #define G_DM_DSCR_BASE_RINGSZ(x) _SB_GETVALUE(x, S_DM_DSCR_BASE_RINGSZ, M_DM_DSCR_BASE_RINGSZ) |
398 | 398 | ||
399 | #define S_DM_DSCR_BASE_PRIORITY _SB_MAKE64(56) | 399 | #define S_DM_DSCR_BASE_PRIORITY _SB_MAKE64(56) |
400 | #define M_DM_DSCR_BASE_PRIORITY _SB_MAKEMASK(3, S_DM_DSCR_BASE_PRIORITY) | 400 | #define M_DM_DSCR_BASE_PRIORITY _SB_MAKEMASK(3, S_DM_DSCR_BASE_PRIORITY) |
401 | #define V_DM_DSCR_BASE_PRIORITY(x) _SB_MAKEVALUE(x, S_DM_DSCR_BASE_PRIORITY) | 401 | #define V_DM_DSCR_BASE_PRIORITY(x) _SB_MAKEVALUE(x, S_DM_DSCR_BASE_PRIORITY) |
402 | #define G_DM_DSCR_BASE_PRIORITY(x) _SB_GETVALUE(x, S_DM_DSCR_BASE_PRIORITY, M_DM_DSCR_BASE_PRIORITY) | 402 | #define G_DM_DSCR_BASE_PRIORITY(x) _SB_GETVALUE(x, S_DM_DSCR_BASE_PRIORITY, M_DM_DSCR_BASE_PRIORITY) |
403 | 403 | ||
@@ -407,12 +407,12 @@ | |||
407 | #define K_DM_DSCR_BASE_PRIORITY_8 3 | 407 | #define K_DM_DSCR_BASE_PRIORITY_8 3 |
408 | #define K_DM_DSCR_BASE_PRIORITY_16 4 | 408 | #define K_DM_DSCR_BASE_PRIORITY_16 4 |
409 | 409 | ||
410 | #define M_DM_DSCR_BASE_ACTIVE _SB_MAKEMASK1(59) | 410 | #define M_DM_DSCR_BASE_ACTIVE _SB_MAKEMASK1(59) |
411 | #define M_DM_DSCR_BASE_INTERRUPT _SB_MAKEMASK1(60) | 411 | #define M_DM_DSCR_BASE_INTERRUPT _SB_MAKEMASK1(60) |
412 | #define M_DM_DSCR_BASE_RESET _SB_MAKEMASK1(61) /* write register */ | 412 | #define M_DM_DSCR_BASE_RESET _SB_MAKEMASK1(61) /* write register */ |
413 | #define M_DM_DSCR_BASE_ERROR _SB_MAKEMASK1(61) /* read register */ | 413 | #define M_DM_DSCR_BASE_ERROR _SB_MAKEMASK1(61) /* read register */ |
414 | #define M_DM_DSCR_BASE_ABORT _SB_MAKEMASK1(62) | 414 | #define M_DM_DSCR_BASE_ABORT _SB_MAKEMASK1(62) |
415 | #define M_DM_DSCR_BASE_ENABL _SB_MAKEMASK1(63) | 415 | #define M_DM_DSCR_BASE_ENABL _SB_MAKEMASK1(63) |
416 | 416 | ||
417 | /* | 417 | /* |
418 | * Data Mover Descriptor Count Register (Table 7-25) | 418 | * Data Mover Descriptor Count Register (Table 7-25) |
@@ -428,14 +428,14 @@ | |||
428 | * Register: DM_CUR_DSCR_ADDR_3 | 428 | * Register: DM_CUR_DSCR_ADDR_3 |
429 | */ | 429 | */ |
430 | 430 | ||
431 | #define S_DM_CUR_DSCR_DSCR_ADDR _SB_MAKE64(0) | 431 | #define S_DM_CUR_DSCR_DSCR_ADDR _SB_MAKE64(0) |
432 | #define M_DM_CUR_DSCR_DSCR_ADDR _SB_MAKEMASK(40, S_DM_CUR_DSCR_DSCR_ADDR) | 432 | #define M_DM_CUR_DSCR_DSCR_ADDR _SB_MAKEMASK(40, S_DM_CUR_DSCR_DSCR_ADDR) |
433 | 433 | ||
434 | #define S_DM_CUR_DSCR_DSCR_COUNT _SB_MAKE64(48) | 434 | #define S_DM_CUR_DSCR_DSCR_COUNT _SB_MAKE64(48) |
435 | #define M_DM_CUR_DSCR_DSCR_COUNT _SB_MAKEMASK(16, S_DM_CUR_DSCR_DSCR_COUNT) | 435 | #define M_DM_CUR_DSCR_DSCR_COUNT _SB_MAKEMASK(16, S_DM_CUR_DSCR_DSCR_COUNT) |
436 | #define V_DM_CUR_DSCR_DSCR_COUNT(r) _SB_MAKEVALUE(r, S_DM_CUR_DSCR_DSCR_COUNT) | 436 | #define V_DM_CUR_DSCR_DSCR_COUNT(r) _SB_MAKEVALUE(r, S_DM_CUR_DSCR_DSCR_COUNT) |
437 | #define G_DM_CUR_DSCR_DSCR_COUNT(r) _SB_GETVALUE(r, S_DM_CUR_DSCR_DSCR_COUNT,\ | 437 | #define G_DM_CUR_DSCR_DSCR_COUNT(r) _SB_GETVALUE(r, S_DM_CUR_DSCR_DSCR_COUNT,\ |
438 | M_DM_CUR_DSCR_DSCR_COUNT) | 438 | M_DM_CUR_DSCR_DSCR_COUNT) |
439 | 439 | ||
440 | 440 | ||
441 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 441 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
@@ -450,15 +450,15 @@ | |||
450 | #define M_DM_PARTIAL_CRC_PARTIAL _SB_MAKEMASK(32, S_DM_PARTIAL_CRC_PARTIAL) | 450 | #define M_DM_PARTIAL_CRC_PARTIAL _SB_MAKEMASK(32, S_DM_PARTIAL_CRC_PARTIAL) |
451 | #define V_DM_PARTIAL_CRC_PARTIAL(r) _SB_MAKEVALUE(r, S_DM_PARTIAL_CRC_PARTIAL) | 451 | #define V_DM_PARTIAL_CRC_PARTIAL(r) _SB_MAKEVALUE(r, S_DM_PARTIAL_CRC_PARTIAL) |
452 | #define G_DM_PARTIAL_CRC_PARTIAL(r) _SB_GETVALUE(r, S_DM_PARTIAL_CRC_PARTIAL,\ | 452 | #define G_DM_PARTIAL_CRC_PARTIAL(r) _SB_GETVALUE(r, S_DM_PARTIAL_CRC_PARTIAL,\ |
453 | M_DM_PARTIAL_CRC_PARTIAL) | 453 | M_DM_PARTIAL_CRC_PARTIAL) |
454 | 454 | ||
455 | #define S_DM_PARTIAL_TCPCS_PARTIAL _SB_MAKE64(32) | 455 | #define S_DM_PARTIAL_TCPCS_PARTIAL _SB_MAKE64(32) |
456 | #define M_DM_PARTIAL_TCPCS_PARTIAL _SB_MAKEMASK(16, S_DM_PARTIAL_TCPCS_PARTIAL) | 456 | #define M_DM_PARTIAL_TCPCS_PARTIAL _SB_MAKEMASK(16, S_DM_PARTIAL_TCPCS_PARTIAL) |
457 | #define V_DM_PARTIAL_TCPCS_PARTIAL(r) _SB_MAKEVALUE(r, S_DM_PARTIAL_TCPCS_PARTIAL) | 457 | #define V_DM_PARTIAL_TCPCS_PARTIAL(r) _SB_MAKEVALUE(r, S_DM_PARTIAL_TCPCS_PARTIAL) |
458 | #define G_DM_PARTIAL_TCPCS_PARTIAL(r) _SB_GETVALUE(r, S_DM_PARTIAL_TCPCS_PARTIAL,\ | 458 | #define G_DM_PARTIAL_TCPCS_PARTIAL(r) _SB_GETVALUE(r, S_DM_PARTIAL_TCPCS_PARTIAL,\ |
459 | M_DM_PARTIAL_TCPCS_PARTIAL) | 459 | M_DM_PARTIAL_TCPCS_PARTIAL) |
460 | 460 | ||
461 | #define M_DM_PARTIAL_ODD_BYTE _SB_MAKEMASK1(48) | 461 | #define M_DM_PARTIAL_ODD_BYTE _SB_MAKEMASK1(48) |
462 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 462 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
463 | 463 | ||
464 | 464 | ||
@@ -468,17 +468,17 @@ | |||
468 | * Register: CRC_DEF_0 | 468 | * Register: CRC_DEF_0 |
469 | * Register: CRC_DEF_1 | 469 | * Register: CRC_DEF_1 |
470 | */ | 470 | */ |
471 | #define S_CRC_DEF_CRC_INIT _SB_MAKE64(0) | 471 | #define S_CRC_DEF_CRC_INIT _SB_MAKE64(0) |
472 | #define M_CRC_DEF_CRC_INIT _SB_MAKEMASK(32, S_CRC_DEF_CRC_INIT) | 472 | #define M_CRC_DEF_CRC_INIT _SB_MAKEMASK(32, S_CRC_DEF_CRC_INIT) |
473 | #define V_CRC_DEF_CRC_INIT(r) _SB_MAKEVALUE(r, S_CRC_DEF_CRC_INIT) | 473 | #define V_CRC_DEF_CRC_INIT(r) _SB_MAKEVALUE(r, S_CRC_DEF_CRC_INIT) |
474 | #define G_CRC_DEF_CRC_INIT(r) _SB_GETVALUE(r, S_CRC_DEF_CRC_INIT,\ | 474 | #define G_CRC_DEF_CRC_INIT(r) _SB_GETVALUE(r, S_CRC_DEF_CRC_INIT,\ |
475 | M_CRC_DEF_CRC_INIT) | 475 | M_CRC_DEF_CRC_INIT) |
476 | 476 | ||
477 | #define S_CRC_DEF_CRC_POLY _SB_MAKE64(32) | 477 | #define S_CRC_DEF_CRC_POLY _SB_MAKE64(32) |
478 | #define M_CRC_DEF_CRC_POLY _SB_MAKEMASK(32, S_CRC_DEF_CRC_POLY) | 478 | #define M_CRC_DEF_CRC_POLY _SB_MAKEMASK(32, S_CRC_DEF_CRC_POLY) |
479 | #define V_CRC_DEF_CRC_POLY(r) _SB_MAKEVALUE(r, S_CRC_DEF_CRC_POLY) | 479 | #define V_CRC_DEF_CRC_POLY(r) _SB_MAKEVALUE(r, S_CRC_DEF_CRC_POLY) |
480 | #define G_CRC_DEF_CRC_POLY(r) _SB_GETVALUE(r, S_CRC_DEF_CRC_POLY,\ | 480 | #define G_CRC_DEF_CRC_POLY(r) _SB_GETVALUE(r, S_CRC_DEF_CRC_POLY,\ |
481 | M_CRC_DEF_CRC_POLY) | 481 | M_CRC_DEF_CRC_POLY) |
482 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 482 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
483 | 483 | ||
484 | 484 | ||
@@ -488,50 +488,50 @@ | |||
488 | * Register: CTCP_DEF_0 | 488 | * Register: CTCP_DEF_0 |
489 | * Register: CTCP_DEF_1 | 489 | * Register: CTCP_DEF_1 |
490 | */ | 490 | */ |
491 | #define S_CTCP_DEF_CRC_TXOR _SB_MAKE64(0) | 491 | #define S_CTCP_DEF_CRC_TXOR _SB_MAKE64(0) |
492 | #define M_CTCP_DEF_CRC_TXOR _SB_MAKEMASK(32, S_CTCP_DEF_CRC_TXOR) | 492 | #define M_CTCP_DEF_CRC_TXOR _SB_MAKEMASK(32, S_CTCP_DEF_CRC_TXOR) |
493 | #define V_CTCP_DEF_CRC_TXOR(r) _SB_MAKEVALUE(r, S_CTCP_DEF_CRC_TXOR) | 493 | #define V_CTCP_DEF_CRC_TXOR(r) _SB_MAKEVALUE(r, S_CTCP_DEF_CRC_TXOR) |
494 | #define G_CTCP_DEF_CRC_TXOR(r) _SB_GETVALUE(r, S_CTCP_DEF_CRC_TXOR,\ | 494 | #define G_CTCP_DEF_CRC_TXOR(r) _SB_GETVALUE(r, S_CTCP_DEF_CRC_TXOR,\ |
495 | M_CTCP_DEF_CRC_TXOR) | 495 | M_CTCP_DEF_CRC_TXOR) |
496 | 496 | ||
497 | #define S_CTCP_DEF_TCPCS_INIT _SB_MAKE64(32) | 497 | #define S_CTCP_DEF_TCPCS_INIT _SB_MAKE64(32) |
498 | #define M_CTCP_DEF_TCPCS_INIT _SB_MAKEMASK(16, S_CTCP_DEF_TCPCS_INIT) | 498 | #define M_CTCP_DEF_TCPCS_INIT _SB_MAKEMASK(16, S_CTCP_DEF_TCPCS_INIT) |
499 | #define V_CTCP_DEF_TCPCS_INIT(r) _SB_MAKEVALUE(r, S_CTCP_DEF_TCPCS_INIT) | 499 | #define V_CTCP_DEF_TCPCS_INIT(r) _SB_MAKEVALUE(r, S_CTCP_DEF_TCPCS_INIT) |
500 | #define G_CTCP_DEF_TCPCS_INIT(r) _SB_GETVALUE(r, S_CTCP_DEF_TCPCS_INIT,\ | 500 | #define G_CTCP_DEF_TCPCS_INIT(r) _SB_GETVALUE(r, S_CTCP_DEF_TCPCS_INIT,\ |
501 | M_CTCP_DEF_TCPCS_INIT) | 501 | M_CTCP_DEF_TCPCS_INIT) |
502 | 502 | ||
503 | #define S_CTCP_DEF_CRC_WIDTH _SB_MAKE64(48) | 503 | #define S_CTCP_DEF_CRC_WIDTH _SB_MAKE64(48) |
504 | #define M_CTCP_DEF_CRC_WIDTH _SB_MAKEMASK(2, S_CTCP_DEF_CRC_WIDTH) | 504 | #define M_CTCP_DEF_CRC_WIDTH _SB_MAKEMASK(2, S_CTCP_DEF_CRC_WIDTH) |
505 | #define V_CTCP_DEF_CRC_WIDTH(r) _SB_MAKEVALUE(r, S_CTCP_DEF_CRC_WIDTH) | 505 | #define V_CTCP_DEF_CRC_WIDTH(r) _SB_MAKEVALUE(r, S_CTCP_DEF_CRC_WIDTH) |
506 | #define G_CTCP_DEF_CRC_WIDTH(r) _SB_GETVALUE(r, S_CTCP_DEF_CRC_WIDTH,\ | 506 | #define G_CTCP_DEF_CRC_WIDTH(r) _SB_GETVALUE(r, S_CTCP_DEF_CRC_WIDTH,\ |
507 | M_CTCP_DEF_CRC_WIDTH) | 507 | M_CTCP_DEF_CRC_WIDTH) |
508 | 508 | ||
509 | #define K_CTCP_DEF_CRC_WIDTH_4 0 | 509 | #define K_CTCP_DEF_CRC_WIDTH_4 0 |
510 | #define K_CTCP_DEF_CRC_WIDTH_2 1 | 510 | #define K_CTCP_DEF_CRC_WIDTH_2 1 |
511 | #define K_CTCP_DEF_CRC_WIDTH_1 2 | 511 | #define K_CTCP_DEF_CRC_WIDTH_1 2 |
512 | 512 | ||
513 | #define M_CTCP_DEF_CRC_BIT_ORDER _SB_MAKEMASK1(50) | 513 | #define M_CTCP_DEF_CRC_BIT_ORDER _SB_MAKEMASK1(50) |
514 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 514 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
515 | 515 | ||
516 | 516 | ||
517 | /* | 517 | /* |
518 | * Data Mover Descriptor Doubleword "A" (Table 7-26) | 518 | * Data Mover Descriptor Doubleword "A" (Table 7-26) |
519 | */ | 519 | */ |
520 | 520 | ||
521 | #define S_DM_DSCRA_DST_ADDR _SB_MAKE64(0) | 521 | #define S_DM_DSCRA_DST_ADDR _SB_MAKE64(0) |
522 | #define M_DM_DSCRA_DST_ADDR _SB_MAKEMASK(40, S_DM_DSCRA_DST_ADDR) | 522 | #define M_DM_DSCRA_DST_ADDR _SB_MAKEMASK(40, S_DM_DSCRA_DST_ADDR) |
523 | 523 | ||
524 | #define M_DM_DSCRA_UN_DEST _SB_MAKEMASK1(40) | 524 | #define M_DM_DSCRA_UN_DEST _SB_MAKEMASK1(40) |
525 | #define M_DM_DSCRA_UN_SRC _SB_MAKEMASK1(41) | 525 | #define M_DM_DSCRA_UN_SRC _SB_MAKEMASK1(41) |
526 | #define M_DM_DSCRA_INTERRUPT _SB_MAKEMASK1(42) | 526 | #define M_DM_DSCRA_INTERRUPT _SB_MAKEMASK1(42) |
527 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) | 527 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) |
528 | #define M_DM_DSCRA_THROTTLE _SB_MAKEMASK1(43) | 528 | #define M_DM_DSCRA_THROTTLE _SB_MAKEMASK1(43) |
529 | #endif /* up to 1250 PASS1 */ | 529 | #endif /* up to 1250 PASS1 */ |
530 | 530 | ||
531 | #define S_DM_DSCRA_DIR_DEST _SB_MAKE64(44) | 531 | #define S_DM_DSCRA_DIR_DEST _SB_MAKE64(44) |
532 | #define M_DM_DSCRA_DIR_DEST _SB_MAKEMASK(2, S_DM_DSCRA_DIR_DEST) | 532 | #define M_DM_DSCRA_DIR_DEST _SB_MAKEMASK(2, S_DM_DSCRA_DIR_DEST) |
533 | #define V_DM_DSCRA_DIR_DEST(x) _SB_MAKEVALUE(x, S_DM_DSCRA_DIR_DEST) | 533 | #define V_DM_DSCRA_DIR_DEST(x) _SB_MAKEVALUE(x, S_DM_DSCRA_DIR_DEST) |
534 | #define G_DM_DSCRA_DIR_DEST(x) _SB_GETVALUE(x, S_DM_DSCRA_DIR_DEST, M_DM_DSCRA_DIR_DEST) | 534 | #define G_DM_DSCRA_DIR_DEST(x) _SB_GETVALUE(x, S_DM_DSCRA_DIR_DEST, M_DM_DSCRA_DIR_DEST) |
535 | 535 | ||
536 | #define K_DM_DSCRA_DIR_DEST_INCR 0 | 536 | #define K_DM_DSCRA_DIR_DEST_INCR 0 |
537 | #define K_DM_DSCRA_DIR_DEST_DECR 1 | 537 | #define K_DM_DSCRA_DIR_DEST_DECR 1 |
@@ -541,24 +541,24 @@ | |||
541 | #define V_DM_DSCRA_DIR_DEST_DECR _SB_MAKEVALUE(K_DM_DSCRA_DIR_DEST_DECR, S_DM_DSCRA_DIR_DEST) | 541 | #define V_DM_DSCRA_DIR_DEST_DECR _SB_MAKEVALUE(K_DM_DSCRA_DIR_DEST_DECR, S_DM_DSCRA_DIR_DEST) |
542 | #define V_DM_DSCRA_DIR_DEST_CONST _SB_MAKEVALUE(K_DM_DSCRA_DIR_DEST_CONST, S_DM_DSCRA_DIR_DEST) | 542 | #define V_DM_DSCRA_DIR_DEST_CONST _SB_MAKEVALUE(K_DM_DSCRA_DIR_DEST_CONST, S_DM_DSCRA_DIR_DEST) |
543 | 543 | ||
544 | #define S_DM_DSCRA_DIR_SRC _SB_MAKE64(46) | 544 | #define S_DM_DSCRA_DIR_SRC _SB_MAKE64(46) |
545 | #define M_DM_DSCRA_DIR_SRC _SB_MAKEMASK(2, S_DM_DSCRA_DIR_SRC) | 545 | #define M_DM_DSCRA_DIR_SRC _SB_MAKEMASK(2, S_DM_DSCRA_DIR_SRC) |
546 | #define V_DM_DSCRA_DIR_SRC(x) _SB_MAKEVALUE(x, S_DM_DSCRA_DIR_SRC) | 546 | #define V_DM_DSCRA_DIR_SRC(x) _SB_MAKEVALUE(x, S_DM_DSCRA_DIR_SRC) |
547 | #define G_DM_DSCRA_DIR_SRC(x) _SB_GETVALUE(x, S_DM_DSCRA_DIR_SRC, M_DM_DSCRA_DIR_SRC) | 547 | #define G_DM_DSCRA_DIR_SRC(x) _SB_GETVALUE(x, S_DM_DSCRA_DIR_SRC, M_DM_DSCRA_DIR_SRC) |
548 | 548 | ||
549 | #define K_DM_DSCRA_DIR_SRC_INCR 0 | 549 | #define K_DM_DSCRA_DIR_SRC_INCR 0 |
550 | #define K_DM_DSCRA_DIR_SRC_DECR 1 | 550 | #define K_DM_DSCRA_DIR_SRC_DECR 1 |
551 | #define K_DM_DSCRA_DIR_SRC_CONST 2 | 551 | #define K_DM_DSCRA_DIR_SRC_CONST 2 |
552 | 552 | ||
553 | #define V_DM_DSCRA_DIR_SRC_INCR _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_INCR, S_DM_DSCRA_DIR_SRC) | 553 | #define V_DM_DSCRA_DIR_SRC_INCR _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_INCR, S_DM_DSCRA_DIR_SRC) |
554 | #define V_DM_DSCRA_DIR_SRC_DECR _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_DECR, S_DM_DSCRA_DIR_SRC) | 554 | #define V_DM_DSCRA_DIR_SRC_DECR _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_DECR, S_DM_DSCRA_DIR_SRC) |
555 | #define V_DM_DSCRA_DIR_SRC_CONST _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_CONST, S_DM_DSCRA_DIR_SRC) | 555 | #define V_DM_DSCRA_DIR_SRC_CONST _SB_MAKEVALUE(K_DM_DSCRA_DIR_SRC_CONST, S_DM_DSCRA_DIR_SRC) |
556 | 556 | ||
557 | 557 | ||
558 | #define M_DM_DSCRA_ZERO_MEM _SB_MAKEMASK1(48) | 558 | #define M_DM_DSCRA_ZERO_MEM _SB_MAKEMASK1(48) |
559 | #define M_DM_DSCRA_PREFETCH _SB_MAKEMASK1(49) | 559 | #define M_DM_DSCRA_PREFETCH _SB_MAKEMASK1(49) |
560 | #define M_DM_DSCRA_L2C_DEST _SB_MAKEMASK1(50) | 560 | #define M_DM_DSCRA_L2C_DEST _SB_MAKEMASK1(50) |
561 | #define M_DM_DSCRA_L2C_SRC _SB_MAKEMASK1(51) | 561 | #define M_DM_DSCRA_L2C_SRC _SB_MAKEMASK1(51) |
562 | 562 | ||
563 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 563 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
564 | #define M_DM_DSCRA_RD_BKOFF _SB_MAKEMASK1(52) | 564 | #define M_DM_DSCRA_RD_BKOFF _SB_MAKEMASK1(52) |
@@ -566,27 +566,27 @@ | |||
566 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 566 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
567 | 567 | ||
568 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 568 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
569 | #define M_DM_DSCRA_TCPCS_EN _SB_MAKEMASK1(54) | 569 | #define M_DM_DSCRA_TCPCS_EN _SB_MAKEMASK1(54) |
570 | #define M_DM_DSCRA_TCPCS_RES _SB_MAKEMASK1(55) | 570 | #define M_DM_DSCRA_TCPCS_RES _SB_MAKEMASK1(55) |
571 | #define M_DM_DSCRA_TCPCS_AP _SB_MAKEMASK1(56) | 571 | #define M_DM_DSCRA_TCPCS_AP _SB_MAKEMASK1(56) |
572 | #define M_DM_DSCRA_CRC_EN _SB_MAKEMASK1(57) | 572 | #define M_DM_DSCRA_CRC_EN _SB_MAKEMASK1(57) |
573 | #define M_DM_DSCRA_CRC_RES _SB_MAKEMASK1(58) | 573 | #define M_DM_DSCRA_CRC_RES _SB_MAKEMASK1(58) |
574 | #define M_DM_DSCRA_CRC_AP _SB_MAKEMASK1(59) | 574 | #define M_DM_DSCRA_CRC_AP _SB_MAKEMASK1(59) |
575 | #define M_DM_DSCRA_CRC_DFN _SB_MAKEMASK1(60) | 575 | #define M_DM_DSCRA_CRC_DFN _SB_MAKEMASK1(60) |
576 | #define M_DM_DSCRA_CRC_XBIT _SB_MAKEMASK1(61) | 576 | #define M_DM_DSCRA_CRC_XBIT _SB_MAKEMASK1(61) |
577 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 577 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
578 | 578 | ||
579 | #define M_DM_DSCRA_RESERVED2 _SB_MAKEMASK(3, 61) | 579 | #define M_DM_DSCRA_RESERVED2 _SB_MAKEMASK(3, 61) |
580 | 580 | ||
581 | /* | 581 | /* |
582 | * Data Mover Descriptor Doubleword "B" (Table 7-25) | 582 | * Data Mover Descriptor Doubleword "B" (Table 7-25) |
583 | */ | 583 | */ |
584 | 584 | ||
585 | #define S_DM_DSCRB_SRC_ADDR _SB_MAKE64(0) | 585 | #define S_DM_DSCRB_SRC_ADDR _SB_MAKE64(0) |
586 | #define M_DM_DSCRB_SRC_ADDR _SB_MAKEMASK(40, S_DM_DSCRB_SRC_ADDR) | 586 | #define M_DM_DSCRB_SRC_ADDR _SB_MAKEMASK(40, S_DM_DSCRB_SRC_ADDR) |
587 | 587 | ||
588 | #define S_DM_DSCRB_SRC_LENGTH _SB_MAKE64(40) | 588 | #define S_DM_DSCRB_SRC_LENGTH _SB_MAKE64(40) |
589 | #define M_DM_DSCRB_SRC_LENGTH _SB_MAKEMASK(20, S_DM_DSCRB_SRC_LENGTH) | 589 | #define M_DM_DSCRB_SRC_LENGTH _SB_MAKEMASK(20, S_DM_DSCRB_SRC_LENGTH) |
590 | #define V_DM_DSCRB_SRC_LENGTH(x) _SB_MAKEVALUE(x, S_DM_DSCRB_SRC_LENGTH) | 590 | #define V_DM_DSCRB_SRC_LENGTH(x) _SB_MAKEVALUE(x, S_DM_DSCRB_SRC_LENGTH) |
591 | #define G_DM_DSCRB_SRC_LENGTH(x) _SB_GETVALUE(x, S_DM_DSCRB_SRC_LENGTH, M_DM_DSCRB_SRC_LENGTH) | 591 | #define G_DM_DSCRB_SRC_LENGTH(x) _SB_GETVALUE(x, S_DM_DSCRB_SRC_LENGTH, M_DM_DSCRB_SRC_LENGTH) |
592 | 592 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_genbus.h b/arch/mips/include/asm/sibyte/sb1250_genbus.h index a96ded17bdc9..04c009c36937 100644 --- a/arch/mips/include/asm/sibyte/sb1250_genbus.h +++ b/arch/mips/include/asm/sibyte/sb1250_genbus.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Generic Bus Constants File: sb1250_genbus.h | 4 | * Generic Bus Constants File: sb1250_genbus.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's Generic Bus interface | 7 | * manipulating the SB1250's Generic Bus interface |
@@ -40,10 +40,10 @@ | |||
40 | * Generic Bus Region Configuration Registers (Table 11-4) | 40 | * Generic Bus Region Configuration Registers (Table 11-4) |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #define S_IO_RDY_ACTIVE 0 | 43 | #define S_IO_RDY_ACTIVE 0 |
44 | #define M_IO_RDY_ACTIVE _SB_MAKEMASK1(S_IO_RDY_ACTIVE) | 44 | #define M_IO_RDY_ACTIVE _SB_MAKEMASK1(S_IO_RDY_ACTIVE) |
45 | 45 | ||
46 | #define S_IO_ENA_RDY 1 | 46 | #define S_IO_ENA_RDY 1 |
47 | #define M_IO_ENA_RDY _SB_MAKEMASK1(S_IO_ENA_RDY) | 47 | #define M_IO_ENA_RDY _SB_MAKEMASK1(S_IO_ENA_RDY) |
48 | 48 | ||
49 | #define S_IO_WIDTH_SEL 2 | 49 | #define S_IO_WIDTH_SEL 2 |
@@ -52,7 +52,7 @@ | |||
52 | #define K_IO_WIDTH_SEL_2 1 | 52 | #define K_IO_WIDTH_SEL_2 1 |
53 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ | 53 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ |
54 | || SIBYTE_HDR_FEATURE_CHIP(1480) | 54 | || SIBYTE_HDR_FEATURE_CHIP(1480) |
55 | #define K_IO_WIDTH_SEL_1L 2 | 55 | #define K_IO_WIDTH_SEL_1L 2 |
56 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 56 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
57 | #define K_IO_WIDTH_SEL_4 3 | 57 | #define K_IO_WIDTH_SEL_4 3 |
58 | #define V_IO_WIDTH_SEL(x) _SB_MAKEVALUE(x, S_IO_WIDTH_SEL) | 58 | #define V_IO_WIDTH_SEL(x) _SB_MAKEVALUE(x, S_IO_WIDTH_SEL) |
@@ -111,7 +111,7 @@ | |||
111 | 111 | ||
112 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ | 112 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ |
113 | || SIBYTE_HDR_FEATURE_CHIP(1480) | 113 | || SIBYTE_HDR_FEATURE_CHIP(1480) |
114 | #define M_IO_EARLY_CS _SB_MAKEMASK1(3) | 114 | #define M_IO_EARLY_CS _SB_MAKEMASK1(3) |
115 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 115 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
116 | 116 | ||
117 | #define S_IO_ALE_TO_CS 4 | 117 | #define S_IO_ALE_TO_CS 4 |
@@ -121,10 +121,10 @@ | |||
121 | 121 | ||
122 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ | 122 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ |
123 | || SIBYTE_HDR_FEATURE_CHIP(1480) | 123 | || SIBYTE_HDR_FEATURE_CHIP(1480) |
124 | #define S_IO_BURST_WIDTH _SB_MAKE64(6) | 124 | #define S_IO_BURST_WIDTH _SB_MAKE64(6) |
125 | #define M_IO_BURST_WIDTH _SB_MAKEMASK(2, S_IO_BURST_WIDTH) | 125 | #define M_IO_BURST_WIDTH _SB_MAKEMASK(2, S_IO_BURST_WIDTH) |
126 | #define V_IO_BURST_WIDTH(x) _SB_MAKEVALUE(x, S_IO_BURST_WIDTH) | 126 | #define V_IO_BURST_WIDTH(x) _SB_MAKEVALUE(x, S_IO_BURST_WIDTH) |
127 | #define G_IO_BURST_WIDTH(x) _SB_GETVALUE(x, S_IO_BURST_WIDTH, M_IO_BURST_WIDTH) | 127 | #define G_IO_BURST_WIDTH(x) _SB_GETVALUE(x, S_IO_BURST_WIDTH, M_IO_BURST_WIDTH) |
128 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 128 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
129 | 129 | ||
130 | #define S_IO_CS_WIDTH 8 | 130 | #define S_IO_CS_WIDTH 8 |
@@ -149,7 +149,7 @@ | |||
149 | 149 | ||
150 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ | 150 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) \ |
151 | || SIBYTE_HDR_FEATURE_CHIP(1480) | 151 | || SIBYTE_HDR_FEATURE_CHIP(1480) |
152 | #define M_IO_RDY_SYNC _SB_MAKEMASK1(3) | 152 | #define M_IO_RDY_SYNC _SB_MAKEMASK1(3) |
153 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 153 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
154 | 154 | ||
155 | #define S_IO_WRITE_WIDTH 4 | 155 | #define S_IO_WRITE_WIDTH 4 |
@@ -191,7 +191,7 @@ | |||
191 | #define M_IO_ILL_ADDR_INT _SB_MAKEMASK1(11) | 191 | #define M_IO_ILL_ADDR_INT _SB_MAKEMASK1(11) |
192 | #define M_IO_MULT_CS_INT _SB_MAKEMASK1(12) | 192 | #define M_IO_MULT_CS_INT _SB_MAKEMASK1(12) |
193 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 193 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
194 | #define M_IO_COH_ERR _SB_MAKEMASK1(14) | 194 | #define M_IO_COH_ERR _SB_MAKEMASK1(14) |
195 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 195 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
196 | 196 | ||
197 | 197 | ||
@@ -370,8 +370,8 @@ | |||
370 | 370 | ||
371 | #define S_GPIO_INTR_TYPEX(n) (((n)/2)*2) | 371 | #define S_GPIO_INTR_TYPEX(n) (((n)/2)*2) |
372 | #define M_GPIO_INTR_TYPEX(n) _SB_MAKEMASK(2, S_GPIO_INTR_TYPEX(n)) | 372 | #define M_GPIO_INTR_TYPEX(n) _SB_MAKEMASK(2, S_GPIO_INTR_TYPEX(n)) |
373 | #define V_GPIO_INTR_TYPEX(n, x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPEX(n)) | 373 | #define V_GPIO_INTR_TYPEX(n, x) _SB_MAKEVALUE(x, S_GPIO_INTR_TYPEX(n)) |
374 | #define G_GPIO_INTR_TYPEX(n, x) _SB_GETVALUE(x, S_GPIO_INTR_TYPEX(n), M_GPIO_INTR_TYPEX(n)) | 374 | #define G_GPIO_INTR_TYPEX(n, x) _SB_GETVALUE(x, S_GPIO_INTR_TYPEX(n), M_GPIO_INTR_TYPEX(n)) |
375 | 375 | ||
376 | #define S_GPIO_INTR_TYPE0 0 | 376 | #define S_GPIO_INTR_TYPE0 0 |
377 | #define M_GPIO_INTR_TYPE0 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE0) | 377 | #define M_GPIO_INTR_TYPE0 _SB_MAKEMASK(2, S_GPIO_INTR_TYPE0) |
diff --git a/arch/mips/include/asm/sibyte/sb1250_int.h b/arch/mips/include/asm/sibyte/sb1250_int.h index dbea73ddd2fe..36afcb2766c6 100644 --- a/arch/mips/include/asm/sibyte/sb1250_int.h +++ b/arch/mips/include/asm/sibyte/sb1250_int.h | |||
@@ -45,71 +45,71 @@ | |||
45 | * First, the interrupt numbers. | 45 | * First, the interrupt numbers. |
46 | */ | 46 | */ |
47 | 47 | ||
48 | #define K_INT_SOURCES 64 | 48 | #define K_INT_SOURCES 64 |
49 | 49 | ||
50 | #define K_INT_WATCHDOG_TIMER_0 0 | 50 | #define K_INT_WATCHDOG_TIMER_0 0 |
51 | #define K_INT_WATCHDOG_TIMER_1 1 | 51 | #define K_INT_WATCHDOG_TIMER_1 1 |
52 | #define K_INT_TIMER_0 2 | 52 | #define K_INT_TIMER_0 2 |
53 | #define K_INT_TIMER_1 3 | 53 | #define K_INT_TIMER_1 3 |
54 | #define K_INT_TIMER_2 4 | 54 | #define K_INT_TIMER_2 4 |
55 | #define K_INT_TIMER_3 5 | 55 | #define K_INT_TIMER_3 5 |
56 | #define K_INT_SMB_0 6 | 56 | #define K_INT_SMB_0 6 |
57 | #define K_INT_SMB_1 7 | 57 | #define K_INT_SMB_1 7 |
58 | #define K_INT_UART_0 8 | 58 | #define K_INT_UART_0 8 |
59 | #define K_INT_UART_1 9 | 59 | #define K_INT_UART_1 9 |
60 | #define K_INT_SER_0 10 | 60 | #define K_INT_SER_0 10 |
61 | #define K_INT_SER_1 11 | 61 | #define K_INT_SER_1 11 |
62 | #define K_INT_PCMCIA 12 | 62 | #define K_INT_PCMCIA 12 |
63 | #define K_INT_ADDR_TRAP 13 | 63 | #define K_INT_ADDR_TRAP 13 |
64 | #define K_INT_PERF_CNT 14 | 64 | #define K_INT_PERF_CNT 14 |
65 | #define K_INT_TRACE_FREEZE 15 | 65 | #define K_INT_TRACE_FREEZE 15 |
66 | #define K_INT_BAD_ECC 16 | 66 | #define K_INT_BAD_ECC 16 |
67 | #define K_INT_COR_ECC 17 | 67 | #define K_INT_COR_ECC 17 |
68 | #define K_INT_IO_BUS 18 | 68 | #define K_INT_IO_BUS 18 |
69 | #define K_INT_MAC_0 19 | 69 | #define K_INT_MAC_0 19 |
70 | #define K_INT_MAC_1 20 | 70 | #define K_INT_MAC_1 20 |
71 | #define K_INT_MAC_2 21 | 71 | #define K_INT_MAC_2 21 |
72 | #define K_INT_DM_CH_0 22 | 72 | #define K_INT_DM_CH_0 22 |
73 | #define K_INT_DM_CH_1 23 | 73 | #define K_INT_DM_CH_1 23 |
74 | #define K_INT_DM_CH_2 24 | 74 | #define K_INT_DM_CH_2 24 |
75 | #define K_INT_DM_CH_3 25 | 75 | #define K_INT_DM_CH_3 25 |
76 | #define K_INT_MBOX_0 26 | 76 | #define K_INT_MBOX_0 26 |
77 | #define K_INT_MBOX_1 27 | 77 | #define K_INT_MBOX_1 27 |
78 | #define K_INT_MBOX_2 28 | 78 | #define K_INT_MBOX_2 28 |
79 | #define K_INT_MBOX_3 29 | 79 | #define K_INT_MBOX_3 29 |
80 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 80 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
81 | #define K_INT_CYCLE_CP0_INT 30 | 81 | #define K_INT_CYCLE_CP0_INT 30 |
82 | #define K_INT_CYCLE_CP1_INT 31 | 82 | #define K_INT_CYCLE_CP1_INT 31 |
83 | #endif /* 1250 PASS2 || 112x PASS1 */ | 83 | #endif /* 1250 PASS2 || 112x PASS1 */ |
84 | #define K_INT_GPIO_0 32 | 84 | #define K_INT_GPIO_0 32 |
85 | #define K_INT_GPIO_1 33 | 85 | #define K_INT_GPIO_1 33 |
86 | #define K_INT_GPIO_2 34 | 86 | #define K_INT_GPIO_2 34 |
87 | #define K_INT_GPIO_3 35 | 87 | #define K_INT_GPIO_3 35 |
88 | #define K_INT_GPIO_4 36 | 88 | #define K_INT_GPIO_4 36 |
89 | #define K_INT_GPIO_5 37 | 89 | #define K_INT_GPIO_5 37 |
90 | #define K_INT_GPIO_6 38 | 90 | #define K_INT_GPIO_6 38 |
91 | #define K_INT_GPIO_7 39 | 91 | #define K_INT_GPIO_7 39 |
92 | #define K_INT_GPIO_8 40 | 92 | #define K_INT_GPIO_8 40 |
93 | #define K_INT_GPIO_9 41 | 93 | #define K_INT_GPIO_9 41 |
94 | #define K_INT_GPIO_10 42 | 94 | #define K_INT_GPIO_10 42 |
95 | #define K_INT_GPIO_11 43 | 95 | #define K_INT_GPIO_11 43 |
96 | #define K_INT_GPIO_12 44 | 96 | #define K_INT_GPIO_12 44 |
97 | #define K_INT_GPIO_13 45 | 97 | #define K_INT_GPIO_13 45 |
98 | #define K_INT_GPIO_14 46 | 98 | #define K_INT_GPIO_14 46 |
99 | #define K_INT_GPIO_15 47 | 99 | #define K_INT_GPIO_15 47 |
100 | #define K_INT_LDT_FATAL 48 | 100 | #define K_INT_LDT_FATAL 48 |
101 | #define K_INT_LDT_NONFATAL 49 | 101 | #define K_INT_LDT_NONFATAL 49 |
102 | #define K_INT_LDT_SMI 50 | 102 | #define K_INT_LDT_SMI 50 |
103 | #define K_INT_LDT_NMI 51 | 103 | #define K_INT_LDT_NMI 51 |
104 | #define K_INT_LDT_INIT 52 | 104 | #define K_INT_LDT_INIT 52 |
105 | #define K_INT_LDT_STARTUP 53 | 105 | #define K_INT_LDT_STARTUP 53 |
106 | #define K_INT_LDT_EXT 54 | 106 | #define K_INT_LDT_EXT 54 |
107 | #define K_INT_PCI_ERROR 55 | 107 | #define K_INT_PCI_ERROR 55 |
108 | #define K_INT_PCI_INTA 56 | 108 | #define K_INT_PCI_INTA 56 |
109 | #define K_INT_PCI_INTB 57 | 109 | #define K_INT_PCI_INTB 57 |
110 | #define K_INT_PCI_INTC 58 | 110 | #define K_INT_PCI_INTC 58 |
111 | #define K_INT_PCI_INTD 59 | 111 | #define K_INT_PCI_INTD 59 |
112 | #define K_INT_SPARE_2 60 | 112 | #define K_INT_SPARE_2 60 |
113 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 113 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
114 | #define K_INT_MAC_0_CH1 61 | 114 | #define K_INT_MAC_0_CH1 61 |
115 | #define K_INT_MAC_1_CH1 62 | 115 | #define K_INT_MAC_1_CH1 62 |
@@ -120,70 +120,70 @@ | |||
120 | * Mask values for each interrupt | 120 | * Mask values for each interrupt |
121 | */ | 121 | */ |
122 | 122 | ||
123 | #define M_INT_WATCHDOG_TIMER_0 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_0) | 123 | #define M_INT_WATCHDOG_TIMER_0 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_0) |
124 | #define M_INT_WATCHDOG_TIMER_1 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_1) | 124 | #define M_INT_WATCHDOG_TIMER_1 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_1) |
125 | #define M_INT_TIMER_0 _SB_MAKEMASK1(K_INT_TIMER_0) | 125 | #define M_INT_TIMER_0 _SB_MAKEMASK1(K_INT_TIMER_0) |
126 | #define M_INT_TIMER_1 _SB_MAKEMASK1(K_INT_TIMER_1) | 126 | #define M_INT_TIMER_1 _SB_MAKEMASK1(K_INT_TIMER_1) |
127 | #define M_INT_TIMER_2 _SB_MAKEMASK1(K_INT_TIMER_2) | 127 | #define M_INT_TIMER_2 _SB_MAKEMASK1(K_INT_TIMER_2) |
128 | #define M_INT_TIMER_3 _SB_MAKEMASK1(K_INT_TIMER_3) | 128 | #define M_INT_TIMER_3 _SB_MAKEMASK1(K_INT_TIMER_3) |
129 | #define M_INT_SMB_0 _SB_MAKEMASK1(K_INT_SMB_0) | 129 | #define M_INT_SMB_0 _SB_MAKEMASK1(K_INT_SMB_0) |
130 | #define M_INT_SMB_1 _SB_MAKEMASK1(K_INT_SMB_1) | 130 | #define M_INT_SMB_1 _SB_MAKEMASK1(K_INT_SMB_1) |
131 | #define M_INT_UART_0 _SB_MAKEMASK1(K_INT_UART_0) | 131 | #define M_INT_UART_0 _SB_MAKEMASK1(K_INT_UART_0) |
132 | #define M_INT_UART_1 _SB_MAKEMASK1(K_INT_UART_1) | 132 | #define M_INT_UART_1 _SB_MAKEMASK1(K_INT_UART_1) |
133 | #define M_INT_SER_0 _SB_MAKEMASK1(K_INT_SER_0) | 133 | #define M_INT_SER_0 _SB_MAKEMASK1(K_INT_SER_0) |
134 | #define M_INT_SER_1 _SB_MAKEMASK1(K_INT_SER_1) | 134 | #define M_INT_SER_1 _SB_MAKEMASK1(K_INT_SER_1) |
135 | #define M_INT_PCMCIA _SB_MAKEMASK1(K_INT_PCMCIA) | 135 | #define M_INT_PCMCIA _SB_MAKEMASK1(K_INT_PCMCIA) |
136 | #define M_INT_ADDR_TRAP _SB_MAKEMASK1(K_INT_ADDR_TRAP) | 136 | #define M_INT_ADDR_TRAP _SB_MAKEMASK1(K_INT_ADDR_TRAP) |
137 | #define M_INT_PERF_CNT _SB_MAKEMASK1(K_INT_PERF_CNT) | 137 | #define M_INT_PERF_CNT _SB_MAKEMASK1(K_INT_PERF_CNT) |
138 | #define M_INT_TRACE_FREEZE _SB_MAKEMASK1(K_INT_TRACE_FREEZE) | 138 | #define M_INT_TRACE_FREEZE _SB_MAKEMASK1(K_INT_TRACE_FREEZE) |
139 | #define M_INT_BAD_ECC _SB_MAKEMASK1(K_INT_BAD_ECC) | 139 | #define M_INT_BAD_ECC _SB_MAKEMASK1(K_INT_BAD_ECC) |
140 | #define M_INT_COR_ECC _SB_MAKEMASK1(K_INT_COR_ECC) | 140 | #define M_INT_COR_ECC _SB_MAKEMASK1(K_INT_COR_ECC) |
141 | #define M_INT_IO_BUS _SB_MAKEMASK1(K_INT_IO_BUS) | 141 | #define M_INT_IO_BUS _SB_MAKEMASK1(K_INT_IO_BUS) |
142 | #define M_INT_MAC_0 _SB_MAKEMASK1(K_INT_MAC_0) | 142 | #define M_INT_MAC_0 _SB_MAKEMASK1(K_INT_MAC_0) |
143 | #define M_INT_MAC_1 _SB_MAKEMASK1(K_INT_MAC_1) | 143 | #define M_INT_MAC_1 _SB_MAKEMASK1(K_INT_MAC_1) |
144 | #define M_INT_MAC_2 _SB_MAKEMASK1(K_INT_MAC_2) | 144 | #define M_INT_MAC_2 _SB_MAKEMASK1(K_INT_MAC_2) |
145 | #define M_INT_DM_CH_0 _SB_MAKEMASK1(K_INT_DM_CH_0) | 145 | #define M_INT_DM_CH_0 _SB_MAKEMASK1(K_INT_DM_CH_0) |
146 | #define M_INT_DM_CH_1 _SB_MAKEMASK1(K_INT_DM_CH_1) | 146 | #define M_INT_DM_CH_1 _SB_MAKEMASK1(K_INT_DM_CH_1) |
147 | #define M_INT_DM_CH_2 _SB_MAKEMASK1(K_INT_DM_CH_2) | 147 | #define M_INT_DM_CH_2 _SB_MAKEMASK1(K_INT_DM_CH_2) |
148 | #define M_INT_DM_CH_3 _SB_MAKEMASK1(K_INT_DM_CH_3) | 148 | #define M_INT_DM_CH_3 _SB_MAKEMASK1(K_INT_DM_CH_3) |
149 | #define M_INT_MBOX_0 _SB_MAKEMASK1(K_INT_MBOX_0) | 149 | #define M_INT_MBOX_0 _SB_MAKEMASK1(K_INT_MBOX_0) |
150 | #define M_INT_MBOX_1 _SB_MAKEMASK1(K_INT_MBOX_1) | 150 | #define M_INT_MBOX_1 _SB_MAKEMASK1(K_INT_MBOX_1) |
151 | #define M_INT_MBOX_2 _SB_MAKEMASK1(K_INT_MBOX_2) | 151 | #define M_INT_MBOX_2 _SB_MAKEMASK1(K_INT_MBOX_2) |
152 | #define M_INT_MBOX_3 _SB_MAKEMASK1(K_INT_MBOX_3) | 152 | #define M_INT_MBOX_3 _SB_MAKEMASK1(K_INT_MBOX_3) |
153 | #define M_INT_MBOX_ALL _SB_MAKEMASK(4, K_INT_MBOX_0) | 153 | #define M_INT_MBOX_ALL _SB_MAKEMASK(4, K_INT_MBOX_0) |
154 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 154 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
155 | #define M_INT_CYCLE_CP0_INT _SB_MAKEMASK1(K_INT_CYCLE_CP0_INT) | 155 | #define M_INT_CYCLE_CP0_INT _SB_MAKEMASK1(K_INT_CYCLE_CP0_INT) |
156 | #define M_INT_CYCLE_CP1_INT _SB_MAKEMASK1(K_INT_CYCLE_CP1_INT) | 156 | #define M_INT_CYCLE_CP1_INT _SB_MAKEMASK1(K_INT_CYCLE_CP1_INT) |
157 | #endif /* 1250 PASS2 || 112x PASS1 */ | 157 | #endif /* 1250 PASS2 || 112x PASS1 */ |
158 | #define M_INT_GPIO_0 _SB_MAKEMASK1(K_INT_GPIO_0) | 158 | #define M_INT_GPIO_0 _SB_MAKEMASK1(K_INT_GPIO_0) |
159 | #define M_INT_GPIO_1 _SB_MAKEMASK1(K_INT_GPIO_1) | 159 | #define M_INT_GPIO_1 _SB_MAKEMASK1(K_INT_GPIO_1) |
160 | #define M_INT_GPIO_2 _SB_MAKEMASK1(K_INT_GPIO_2) | 160 | #define M_INT_GPIO_2 _SB_MAKEMASK1(K_INT_GPIO_2) |
161 | #define M_INT_GPIO_3 _SB_MAKEMASK1(K_INT_GPIO_3) | 161 | #define M_INT_GPIO_3 _SB_MAKEMASK1(K_INT_GPIO_3) |
162 | #define M_INT_GPIO_4 _SB_MAKEMASK1(K_INT_GPIO_4) | 162 | #define M_INT_GPIO_4 _SB_MAKEMASK1(K_INT_GPIO_4) |
163 | #define M_INT_GPIO_5 _SB_MAKEMASK1(K_INT_GPIO_5) | 163 | #define M_INT_GPIO_5 _SB_MAKEMASK1(K_INT_GPIO_5) |
164 | #define M_INT_GPIO_6 _SB_MAKEMASK1(K_INT_GPIO_6) | 164 | #define M_INT_GPIO_6 _SB_MAKEMASK1(K_INT_GPIO_6) |
165 | #define M_INT_GPIO_7 _SB_MAKEMASK1(K_INT_GPIO_7) | 165 | #define M_INT_GPIO_7 _SB_MAKEMASK1(K_INT_GPIO_7) |
166 | #define M_INT_GPIO_8 _SB_MAKEMASK1(K_INT_GPIO_8) | 166 | #define M_INT_GPIO_8 _SB_MAKEMASK1(K_INT_GPIO_8) |
167 | #define M_INT_GPIO_9 _SB_MAKEMASK1(K_INT_GPIO_9) | 167 | #define M_INT_GPIO_9 _SB_MAKEMASK1(K_INT_GPIO_9) |
168 | #define M_INT_GPIO_10 _SB_MAKEMASK1(K_INT_GPIO_10) | 168 | #define M_INT_GPIO_10 _SB_MAKEMASK1(K_INT_GPIO_10) |
169 | #define M_INT_GPIO_11 _SB_MAKEMASK1(K_INT_GPIO_11) | 169 | #define M_INT_GPIO_11 _SB_MAKEMASK1(K_INT_GPIO_11) |
170 | #define M_INT_GPIO_12 _SB_MAKEMASK1(K_INT_GPIO_12) | 170 | #define M_INT_GPIO_12 _SB_MAKEMASK1(K_INT_GPIO_12) |
171 | #define M_INT_GPIO_13 _SB_MAKEMASK1(K_INT_GPIO_13) | 171 | #define M_INT_GPIO_13 _SB_MAKEMASK1(K_INT_GPIO_13) |
172 | #define M_INT_GPIO_14 _SB_MAKEMASK1(K_INT_GPIO_14) | 172 | #define M_INT_GPIO_14 _SB_MAKEMASK1(K_INT_GPIO_14) |
173 | #define M_INT_GPIO_15 _SB_MAKEMASK1(K_INT_GPIO_15) | 173 | #define M_INT_GPIO_15 _SB_MAKEMASK1(K_INT_GPIO_15) |
174 | #define M_INT_LDT_FATAL _SB_MAKEMASK1(K_INT_LDT_FATAL) | 174 | #define M_INT_LDT_FATAL _SB_MAKEMASK1(K_INT_LDT_FATAL) |
175 | #define M_INT_LDT_NONFATAL _SB_MAKEMASK1(K_INT_LDT_NONFATAL) | 175 | #define M_INT_LDT_NONFATAL _SB_MAKEMASK1(K_INT_LDT_NONFATAL) |
176 | #define M_INT_LDT_SMI _SB_MAKEMASK1(K_INT_LDT_SMI) | 176 | #define M_INT_LDT_SMI _SB_MAKEMASK1(K_INT_LDT_SMI) |
177 | #define M_INT_LDT_NMI _SB_MAKEMASK1(K_INT_LDT_NMI) | 177 | #define M_INT_LDT_NMI _SB_MAKEMASK1(K_INT_LDT_NMI) |
178 | #define M_INT_LDT_INIT _SB_MAKEMASK1(K_INT_LDT_INIT) | 178 | #define M_INT_LDT_INIT _SB_MAKEMASK1(K_INT_LDT_INIT) |
179 | #define M_INT_LDT_STARTUP _SB_MAKEMASK1(K_INT_LDT_STARTUP) | 179 | #define M_INT_LDT_STARTUP _SB_MAKEMASK1(K_INT_LDT_STARTUP) |
180 | #define M_INT_LDT_EXT _SB_MAKEMASK1(K_INT_LDT_EXT) | 180 | #define M_INT_LDT_EXT _SB_MAKEMASK1(K_INT_LDT_EXT) |
181 | #define M_INT_PCI_ERROR _SB_MAKEMASK1(K_INT_PCI_ERROR) | 181 | #define M_INT_PCI_ERROR _SB_MAKEMASK1(K_INT_PCI_ERROR) |
182 | #define M_INT_PCI_INTA _SB_MAKEMASK1(K_INT_PCI_INTA) | 182 | #define M_INT_PCI_INTA _SB_MAKEMASK1(K_INT_PCI_INTA) |
183 | #define M_INT_PCI_INTB _SB_MAKEMASK1(K_INT_PCI_INTB) | 183 | #define M_INT_PCI_INTB _SB_MAKEMASK1(K_INT_PCI_INTB) |
184 | #define M_INT_PCI_INTC _SB_MAKEMASK1(K_INT_PCI_INTC) | 184 | #define M_INT_PCI_INTC _SB_MAKEMASK1(K_INT_PCI_INTC) |
185 | #define M_INT_PCI_INTD _SB_MAKEMASK1(K_INT_PCI_INTD) | 185 | #define M_INT_PCI_INTD _SB_MAKEMASK1(K_INT_PCI_INTD) |
186 | #define M_INT_SPARE_2 _SB_MAKEMASK1(K_INT_SPARE_2) | 186 | #define M_INT_SPARE_2 _SB_MAKEMASK1(K_INT_SPARE_2) |
187 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 187 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
188 | #define M_INT_MAC_0_CH1 _SB_MAKEMASK1(K_INT_MAC_0_CH1) | 188 | #define M_INT_MAC_0_CH1 _SB_MAKEMASK1(K_INT_MAC_0_CH1) |
189 | #define M_INT_MAC_1_CH1 _SB_MAKEMASK1(K_INT_MAC_1_CH1) | 189 | #define M_INT_MAC_1_CH1 _SB_MAKEMASK1(K_INT_MAC_1_CH1) |
@@ -208,9 +208,9 @@ | |||
208 | */ | 208 | */ |
209 | 209 | ||
210 | #define S_INT_LDT_INTMSG 0 | 210 | #define S_INT_LDT_INTMSG 0 |
211 | #define M_INT_LDT_INTMSG _SB_MAKEMASK(3, S_INT_LDT_INTMSG) | 211 | #define M_INT_LDT_INTMSG _SB_MAKEMASK(3, S_INT_LDT_INTMSG) |
212 | #define V_INT_LDT_INTMSG(x) _SB_MAKEVALUE(x, S_INT_LDT_INTMSG) | 212 | #define V_INT_LDT_INTMSG(x) _SB_MAKEVALUE(x, S_INT_LDT_INTMSG) |
213 | #define G_INT_LDT_INTMSG(x) _SB_GETVALUE(x, S_INT_LDT_INTMSG, M_INT_LDT_INTMSG) | 213 | #define G_INT_LDT_INTMSG(x) _SB_GETVALUE(x, S_INT_LDT_INTMSG, M_INT_LDT_INTMSG) |
214 | 214 | ||
215 | #define K_INT_LDT_INTMSG_FIXED 0 | 215 | #define K_INT_LDT_INTMSG_FIXED 0 |
216 | #define K_INT_LDT_INTMSG_ARBITRATED 1 | 216 | #define K_INT_LDT_INTMSG_ARBITRATED 1 |
@@ -221,28 +221,28 @@ | |||
221 | #define K_INT_LDT_INTMSG_EXTINT 6 | 221 | #define K_INT_LDT_INTMSG_EXTINT 6 |
222 | #define K_INT_LDT_INTMSG_RESERVED 7 | 222 | #define K_INT_LDT_INTMSG_RESERVED 7 |
223 | 223 | ||
224 | #define M_INT_LDT_EDGETRIGGER 0 | 224 | #define M_INT_LDT_EDGETRIGGER 0 |
225 | #define M_INT_LDT_LEVELTRIGGER _SB_MAKEMASK1(3) | 225 | #define M_INT_LDT_LEVELTRIGGER _SB_MAKEMASK1(3) |
226 | 226 | ||
227 | #define M_INT_LDT_PHYSICALDEST 0 | 227 | #define M_INT_LDT_PHYSICALDEST 0 |
228 | #define M_INT_LDT_LOGICALDEST _SB_MAKEMASK1(4) | 228 | #define M_INT_LDT_LOGICALDEST _SB_MAKEMASK1(4) |
229 | 229 | ||
230 | #define S_INT_LDT_INTDEST 5 | 230 | #define S_INT_LDT_INTDEST 5 |
231 | #define M_INT_LDT_INTDEST _SB_MAKEMASK(10, S_INT_LDT_INTDEST) | 231 | #define M_INT_LDT_INTDEST _SB_MAKEMASK(10, S_INT_LDT_INTDEST) |
232 | #define V_INT_LDT_INTDEST(x) _SB_MAKEVALUE(x, S_INT_LDT_INTDEST) | 232 | #define V_INT_LDT_INTDEST(x) _SB_MAKEVALUE(x, S_INT_LDT_INTDEST) |
233 | #define G_INT_LDT_INTDEST(x) _SB_GETVALUE(x, S_INT_LDT_INTDEST, M_INT_LDT_INTDEST) | 233 | #define G_INT_LDT_INTDEST(x) _SB_GETVALUE(x, S_INT_LDT_INTDEST, M_INT_LDT_INTDEST) |
234 | 234 | ||
235 | #define S_INT_LDT_VECTOR 13 | 235 | #define S_INT_LDT_VECTOR 13 |
236 | #define M_INT_LDT_VECTOR _SB_MAKEMASK(8, S_INT_LDT_VECTOR) | 236 | #define M_INT_LDT_VECTOR _SB_MAKEMASK(8, S_INT_LDT_VECTOR) |
237 | #define V_INT_LDT_VECTOR(x) _SB_MAKEVALUE(x, S_INT_LDT_VECTOR) | 237 | #define V_INT_LDT_VECTOR(x) _SB_MAKEVALUE(x, S_INT_LDT_VECTOR) |
238 | #define G_INT_LDT_VECTOR(x) _SB_GETVALUE(x, S_INT_LDT_VECTOR, M_INT_LDT_VECTOR) | 238 | #define G_INT_LDT_VECTOR(x) _SB_GETVALUE(x, S_INT_LDT_VECTOR, M_INT_LDT_VECTOR) |
239 | 239 | ||
240 | /* | 240 | /* |
241 | * Vector format (Table 4-6) | 241 | * Vector format (Table 4-6) |
242 | */ | 242 | */ |
243 | 243 | ||
244 | #define M_LDTVECT_RAISEINT 0x00 | 244 | #define M_LDTVECT_RAISEINT 0x00 |
245 | #define M_LDTVECT_RAISEMBOX 0x40 | 245 | #define M_LDTVECT_RAISEMBOX 0x40 |
246 | 246 | ||
247 | 247 | ||
248 | #endif /* 1250/112x */ | 248 | #endif /* 1250/112x */ |
diff --git a/arch/mips/include/asm/sibyte/sb1250_l2c.h b/arch/mips/include/asm/sibyte/sb1250_l2c.h index b61a7491607d..30092d7cfdc2 100644 --- a/arch/mips/include/asm/sibyte/sb1250_l2c.h +++ b/arch/mips/include/asm/sibyte/sb1250_l2c.h | |||
@@ -39,71 +39,71 @@ | |||
39 | * Level 2 Cache Tag register (Table 5-3) | 39 | * Level 2 Cache Tag register (Table 5-3) |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define S_L2C_TAG_MBZ 0 | 42 | #define S_L2C_TAG_MBZ 0 |
43 | #define M_L2C_TAG_MBZ _SB_MAKEMASK(5, S_L2C_TAG_MBZ) | 43 | #define M_L2C_TAG_MBZ _SB_MAKEMASK(5, S_L2C_TAG_MBZ) |
44 | 44 | ||
45 | #define S_L2C_TAG_INDEX 5 | 45 | #define S_L2C_TAG_INDEX 5 |
46 | #define M_L2C_TAG_INDEX _SB_MAKEMASK(12, S_L2C_TAG_INDEX) | 46 | #define M_L2C_TAG_INDEX _SB_MAKEMASK(12, S_L2C_TAG_INDEX) |
47 | #define V_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x, S_L2C_TAG_INDEX) | 47 | #define V_L2C_TAG_INDEX(x) _SB_MAKEVALUE(x, S_L2C_TAG_INDEX) |
48 | #define G_L2C_TAG_INDEX(x) _SB_GETVALUE(x, S_L2C_TAG_INDEX, M_L2C_TAG_INDEX) | 48 | #define G_L2C_TAG_INDEX(x) _SB_GETVALUE(x, S_L2C_TAG_INDEX, M_L2C_TAG_INDEX) |
49 | 49 | ||
50 | #define S_L2C_TAG_TAG 17 | 50 | #define S_L2C_TAG_TAG 17 |
51 | #define M_L2C_TAG_TAG _SB_MAKEMASK(23, S_L2C_TAG_TAG) | 51 | #define M_L2C_TAG_TAG _SB_MAKEMASK(23, S_L2C_TAG_TAG) |
52 | #define V_L2C_TAG_TAG(x) _SB_MAKEVALUE(x, S_L2C_TAG_TAG) | 52 | #define V_L2C_TAG_TAG(x) _SB_MAKEVALUE(x, S_L2C_TAG_TAG) |
53 | #define G_L2C_TAG_TAG(x) _SB_GETVALUE(x, S_L2C_TAG_TAG, M_L2C_TAG_TAG) | 53 | #define G_L2C_TAG_TAG(x) _SB_GETVALUE(x, S_L2C_TAG_TAG, M_L2C_TAG_TAG) |
54 | 54 | ||
55 | #define S_L2C_TAG_ECC 40 | 55 | #define S_L2C_TAG_ECC 40 |
56 | #define M_L2C_TAG_ECC _SB_MAKEMASK(6, S_L2C_TAG_ECC) | 56 | #define M_L2C_TAG_ECC _SB_MAKEMASK(6, S_L2C_TAG_ECC) |
57 | #define V_L2C_TAG_ECC(x) _SB_MAKEVALUE(x, S_L2C_TAG_ECC) | 57 | #define V_L2C_TAG_ECC(x) _SB_MAKEVALUE(x, S_L2C_TAG_ECC) |
58 | #define G_L2C_TAG_ECC(x) _SB_GETVALUE(x, S_L2C_TAG_ECC, M_L2C_TAG_ECC) | 58 | #define G_L2C_TAG_ECC(x) _SB_GETVALUE(x, S_L2C_TAG_ECC, M_L2C_TAG_ECC) |
59 | 59 | ||
60 | #define S_L2C_TAG_WAY 46 | 60 | #define S_L2C_TAG_WAY 46 |
61 | #define M_L2C_TAG_WAY _SB_MAKEMASK(2, S_L2C_TAG_WAY) | 61 | #define M_L2C_TAG_WAY _SB_MAKEMASK(2, S_L2C_TAG_WAY) |
62 | #define V_L2C_TAG_WAY(x) _SB_MAKEVALUE(x, S_L2C_TAG_WAY) | 62 | #define V_L2C_TAG_WAY(x) _SB_MAKEVALUE(x, S_L2C_TAG_WAY) |
63 | #define G_L2C_TAG_WAY(x) _SB_GETVALUE(x, S_L2C_TAG_WAY, M_L2C_TAG_WAY) | 63 | #define G_L2C_TAG_WAY(x) _SB_GETVALUE(x, S_L2C_TAG_WAY, M_L2C_TAG_WAY) |
64 | 64 | ||
65 | #define M_L2C_TAG_DIRTY _SB_MAKEMASK1(48) | 65 | #define M_L2C_TAG_DIRTY _SB_MAKEMASK1(48) |
66 | #define M_L2C_TAG_VALID _SB_MAKEMASK1(49) | 66 | #define M_L2C_TAG_VALID _SB_MAKEMASK1(49) |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * Format of level 2 cache management address (table 5-2) | 69 | * Format of level 2 cache management address (table 5-2) |
70 | */ | 70 | */ |
71 | 71 | ||
72 | #define S_L2C_MGMT_INDEX 5 | 72 | #define S_L2C_MGMT_INDEX 5 |
73 | #define M_L2C_MGMT_INDEX _SB_MAKEMASK(12, S_L2C_MGMT_INDEX) | 73 | #define M_L2C_MGMT_INDEX _SB_MAKEMASK(12, S_L2C_MGMT_INDEX) |
74 | #define V_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x, S_L2C_MGMT_INDEX) | 74 | #define V_L2C_MGMT_INDEX(x) _SB_MAKEVALUE(x, S_L2C_MGMT_INDEX) |
75 | #define G_L2C_MGMT_INDEX(x) _SB_GETVALUE(x, S_L2C_MGMT_INDEX, M_L2C_MGMT_INDEX) | 75 | #define G_L2C_MGMT_INDEX(x) _SB_GETVALUE(x, S_L2C_MGMT_INDEX, M_L2C_MGMT_INDEX) |
76 | 76 | ||
77 | #define S_L2C_MGMT_QUADRANT 15 | 77 | #define S_L2C_MGMT_QUADRANT 15 |
78 | #define M_L2C_MGMT_QUADRANT _SB_MAKEMASK(2, S_L2C_MGMT_QUADRANT) | 78 | #define M_L2C_MGMT_QUADRANT _SB_MAKEMASK(2, S_L2C_MGMT_QUADRANT) |
79 | #define V_L2C_MGMT_QUADRANT(x) _SB_MAKEVALUE(x, S_L2C_MGMT_QUADRANT) | 79 | #define V_L2C_MGMT_QUADRANT(x) _SB_MAKEVALUE(x, S_L2C_MGMT_QUADRANT) |
80 | #define G_L2C_MGMT_QUADRANT(x) _SB_GETVALUE(x, S_L2C_MGMT_QUADRANT, M_L2C_MGMT_QUADRANT) | 80 | #define G_L2C_MGMT_QUADRANT(x) _SB_GETVALUE(x, S_L2C_MGMT_QUADRANT, M_L2C_MGMT_QUADRANT) |
81 | 81 | ||
82 | #define S_L2C_MGMT_HALF 16 | 82 | #define S_L2C_MGMT_HALF 16 |
83 | #define M_L2C_MGMT_HALF _SB_MAKEMASK(1, S_L2C_MGMT_HALF) | 83 | #define M_L2C_MGMT_HALF _SB_MAKEMASK(1, S_L2C_MGMT_HALF) |
84 | 84 | ||
85 | #define S_L2C_MGMT_WAY 17 | 85 | #define S_L2C_MGMT_WAY 17 |
86 | #define M_L2C_MGMT_WAY _SB_MAKEMASK(2, S_L2C_MGMT_WAY) | 86 | #define M_L2C_MGMT_WAY _SB_MAKEMASK(2, S_L2C_MGMT_WAY) |
87 | #define V_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x, S_L2C_MGMT_WAY) | 87 | #define V_L2C_MGMT_WAY(x) _SB_MAKEVALUE(x, S_L2C_MGMT_WAY) |
88 | #define G_L2C_MGMT_WAY(x) _SB_GETVALUE(x, S_L2C_MGMT_WAY, M_L2C_MGMT_WAY) | 88 | #define G_L2C_MGMT_WAY(x) _SB_GETVALUE(x, S_L2C_MGMT_WAY, M_L2C_MGMT_WAY) |
89 | 89 | ||
90 | #define S_L2C_MGMT_ECC_DIAG 21 | 90 | #define S_L2C_MGMT_ECC_DIAG 21 |
91 | #define M_L2C_MGMT_ECC_DIAG _SB_MAKEMASK(2, S_L2C_MGMT_ECC_DIAG) | 91 | #define M_L2C_MGMT_ECC_DIAG _SB_MAKEMASK(2, S_L2C_MGMT_ECC_DIAG) |
92 | #define V_L2C_MGMT_ECC_DIAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_ECC_DIAG) | 92 | #define V_L2C_MGMT_ECC_DIAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_ECC_DIAG) |
93 | #define G_L2C_MGMT_ECC_DIAG(x) _SB_GETVALUE(x, S_L2C_MGMT_ECC_DIAG, M_L2C_MGMT_ECC_DIAG) | 93 | #define G_L2C_MGMT_ECC_DIAG(x) _SB_GETVALUE(x, S_L2C_MGMT_ECC_DIAG, M_L2C_MGMT_ECC_DIAG) |
94 | 94 | ||
95 | #define S_L2C_MGMT_TAG 23 | 95 | #define S_L2C_MGMT_TAG 23 |
96 | #define M_L2C_MGMT_TAG _SB_MAKEMASK(4, S_L2C_MGMT_TAG) | 96 | #define M_L2C_MGMT_TAG _SB_MAKEMASK(4, S_L2C_MGMT_TAG) |
97 | #define V_L2C_MGMT_TAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_TAG) | 97 | #define V_L2C_MGMT_TAG(x) _SB_MAKEVALUE(x, S_L2C_MGMT_TAG) |
98 | #define G_L2C_MGMT_TAG(x) _SB_GETVALUE(x, S_L2C_MGMT_TAG, M_L2C_MGMT_TAG) | 98 | #define G_L2C_MGMT_TAG(x) _SB_GETVALUE(x, S_L2C_MGMT_TAG, M_L2C_MGMT_TAG) |
99 | 99 | ||
100 | #define M_L2C_MGMT_DIRTY _SB_MAKEMASK1(19) | 100 | #define M_L2C_MGMT_DIRTY _SB_MAKEMASK1(19) |
101 | #define M_L2C_MGMT_VALID _SB_MAKEMASK1(20) | 101 | #define M_L2C_MGMT_VALID _SB_MAKEMASK1(20) |
102 | 102 | ||
103 | #define A_L2C_MGMT_TAG_BASE 0x00D0000000 | 103 | #define A_L2C_MGMT_TAG_BASE 0x00D0000000 |
104 | 104 | ||
105 | #define L2C_ENTRIES_PER_WAY 4096 | 105 | #define L2C_ENTRIES_PER_WAY 4096 |
106 | #define L2C_NUM_WAYS 4 | 106 | #define L2C_NUM_WAYS 4 |
107 | 107 | ||
108 | 108 | ||
109 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 109 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
diff --git a/arch/mips/include/asm/sibyte/sb1250_ldt.h b/arch/mips/include/asm/sibyte/sb1250_ldt.h index bf7f320d1a87..2340c29dc0c7 100644 --- a/arch/mips/include/asm/sibyte/sb1250_ldt.h +++ b/arch/mips/include/asm/sibyte/sb1250_ldt.h | |||
@@ -66,7 +66,7 @@ | |||
66 | #define R_LDT_TYPE1_SRICMD 0x0050 | 66 | #define R_LDT_TYPE1_SRICMD 0x0050 |
67 | #define R_LDT_TYPE1_SRITXNUM 0x0054 | 67 | #define R_LDT_TYPE1_SRITXNUM 0x0054 |
68 | #define R_LDT_TYPE1_SRIRXNUM 0x0058 | 68 | #define R_LDT_TYPE1_SRIRXNUM 0x0058 |
69 | #define R_LDT_TYPE1_ERRSTATUS 0x0068 | 69 | #define R_LDT_TYPE1_ERRSTATUS 0x0068 |
70 | #define R_LDT_TYPE1_SRICTRL 0x006C | 70 | #define R_LDT_TYPE1_SRICTRL 0x006C |
71 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 71 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
72 | #define R_LDT_TYPE1_ADDSTATUS 0x0070 | 72 | #define R_LDT_TYPE1_ADDSTATUS 0x0070 |
@@ -258,7 +258,7 @@ | |||
258 | #define M_LDT_LINKCTRL_DWFCOUT_EN _SB_MAKEMASK1_32(31) | 258 | #define M_LDT_LINKCTRL_DWFCOUT_EN _SB_MAKEMASK1_32(31) |
259 | 259 | ||
260 | /* | 260 | /* |
261 | * LDT Link frequency register (Table 8-20) offset 0x48 | 261 | * LDT Link frequency register (Table 8-20) offset 0x48 |
262 | */ | 262 | */ |
263 | 263 | ||
264 | #define S_LDT_LINKFREQ_FREQ 8 | 264 | #define S_LDT_LINKFREQ_FREQ 8 |
@@ -301,8 +301,8 @@ | |||
301 | 301 | ||
302 | #define S_LDT_SRICMD_TXINITIALOFFSET 28 | 302 | #define S_LDT_SRICMD_TXINITIALOFFSET 28 |
303 | #define M_LDT_SRICMD_TXINITIALOFFSET _SB_MAKEMASK_32(3, S_LDT_SRICMD_TXINITIALOFFSET) | 303 | #define M_LDT_SRICMD_TXINITIALOFFSET _SB_MAKEMASK_32(3, S_LDT_SRICMD_TXINITIALOFFSET) |
304 | #define V_LDT_SRICMD_TXINITIALOFFSET(x) _SB_MAKEVALUE_32(x, S_LDT_SRICMD_TXINITIALOFFSET) | 304 | #define V_LDT_SRICMD_TXINITIALOFFSET(x) _SB_MAKEVALUE_32(x, S_LDT_SRICMD_TXINITIALOFFSET) |
305 | #define G_LDT_SRICMD_TXINITIALOFFSET(x) _SB_GETVALUE_32(x, S_LDT_SRICMD_TXINITIALOFFSET, M_LDT_SRICMD_TXINITIALOFFSET) | 305 | #define G_LDT_SRICMD_TXINITIALOFFSET(x) _SB_GETVALUE_32(x, S_LDT_SRICMD_TXINITIALOFFSET, M_LDT_SRICMD_TXINITIALOFFSET) |
306 | 306 | ||
307 | #define M_LDT_SRICMD_LINKFREQDIRECT _SB_MAKEMASK1_32(31) | 307 | #define M_LDT_SRICMD_LINKFREQDIRECT _SB_MAKEMASK1_32(31) |
308 | 308 | ||
@@ -318,16 +318,16 @@ | |||
318 | #define M_LDT_ERRCTL_OVFSYNCFLOOD_EN _SB_MAKEMASK1_32(5) | 318 | #define M_LDT_ERRCTL_OVFSYNCFLOOD_EN _SB_MAKEMASK1_32(5) |
319 | #define M_LDT_ERRCTL_EOCNXAFATAL_EN _SB_MAKEMASK1_32(6) | 319 | #define M_LDT_ERRCTL_EOCNXAFATAL_EN _SB_MAKEMASK1_32(6) |
320 | #define M_LDT_ERRCTL_EOCNXANONFATAL_EN _SB_MAKEMASK1_32(7) | 320 | #define M_LDT_ERRCTL_EOCNXANONFATAL_EN _SB_MAKEMASK1_32(7) |
321 | #define M_LDT_ERRCTL_EOCNXASYNCFLOOD_EN _SB_MAKEMASK1_32(8) | 321 | #define M_LDT_ERRCTL_EOCNXASYNCFLOOD_EN _SB_MAKEMASK1_32(8) |
322 | #define M_LDT_ERRCTL_CRCFATAL_EN _SB_MAKEMASK1_32(9) | 322 | #define M_LDT_ERRCTL_CRCFATAL_EN _SB_MAKEMASK1_32(9) |
323 | #define M_LDT_ERRCTL_CRCNONFATAL_EN _SB_MAKEMASK1_32(10) | 323 | #define M_LDT_ERRCTL_CRCNONFATAL_EN _SB_MAKEMASK1_32(10) |
324 | #define M_LDT_ERRCTL_SERRFATAL_EN _SB_MAKEMASK1_32(11) | 324 | #define M_LDT_ERRCTL_SERRFATAL_EN _SB_MAKEMASK1_32(11) |
325 | #define M_LDT_ERRCTL_SRCTAGFATAL_EN _SB_MAKEMASK1_32(12) | 325 | #define M_LDT_ERRCTL_SRCTAGFATAL_EN _SB_MAKEMASK1_32(12) |
326 | #define M_LDT_ERRCTL_SRCTAGNONFATAL_EN _SB_MAKEMASK1_32(13) | 326 | #define M_LDT_ERRCTL_SRCTAGNONFATAL_EN _SB_MAKEMASK1_32(13) |
327 | #define M_LDT_ERRCTL_SRCTAGSYNCFLOOD_EN _SB_MAKEMASK1_32(14) | 327 | #define M_LDT_ERRCTL_SRCTAGSYNCFLOOD_EN _SB_MAKEMASK1_32(14) |
328 | #define M_LDT_ERRCTL_MAPNXAFATAL_EN _SB_MAKEMASK1_32(15) | 328 | #define M_LDT_ERRCTL_MAPNXAFATAL_EN _SB_MAKEMASK1_32(15) |
329 | #define M_LDT_ERRCTL_MAPNXANONFATAL_EN _SB_MAKEMASK1_32(16) | 329 | #define M_LDT_ERRCTL_MAPNXANONFATAL_EN _SB_MAKEMASK1_32(16) |
330 | #define M_LDT_ERRCTL_MAPNXASYNCFLOOD_EN _SB_MAKEMASK1_32(17) | 330 | #define M_LDT_ERRCTL_MAPNXASYNCFLOOD_EN _SB_MAKEMASK1_32(17) |
331 | 331 | ||
332 | #define M_LDT_ERRCTL_PROTOERR _SB_MAKEMASK1_32(24) | 332 | #define M_LDT_ERRCTL_PROTOERR _SB_MAKEMASK1_32(24) |
333 | #define M_LDT_ERRCTL_OVFERR _SB_MAKEMASK1_32(25) | 333 | #define M_LDT_ERRCTL_OVFERR _SB_MAKEMASK1_32(25) |
diff --git a/arch/mips/include/asm/sibyte/sb1250_mac.h b/arch/mips/include/asm/sibyte/sb1250_mac.h index cfc4d7870882..3fa94fc74042 100644 --- a/arch/mips/include/asm/sibyte/sb1250_mac.h +++ b/arch/mips/include/asm/sibyte/sb1250_mac.h | |||
@@ -47,86 +47,86 @@ | |||
47 | */ | 47 | */ |
48 | 48 | ||
49 | 49 | ||
50 | #define M_MAC_RESERVED0 _SB_MAKEMASK1(0) | 50 | #define M_MAC_RESERVED0 _SB_MAKEMASK1(0) |
51 | #define M_MAC_TX_HOLD_SOP_EN _SB_MAKEMASK1(1) | 51 | #define M_MAC_TX_HOLD_SOP_EN _SB_MAKEMASK1(1) |
52 | #define M_MAC_RETRY_EN _SB_MAKEMASK1(2) | 52 | #define M_MAC_RETRY_EN _SB_MAKEMASK1(2) |
53 | #define M_MAC_RET_DRPREQ_EN _SB_MAKEMASK1(3) | 53 | #define M_MAC_RET_DRPREQ_EN _SB_MAKEMASK1(3) |
54 | #define M_MAC_RET_UFL_EN _SB_MAKEMASK1(4) | 54 | #define M_MAC_RET_UFL_EN _SB_MAKEMASK1(4) |
55 | #define M_MAC_BURST_EN _SB_MAKEMASK1(5) | 55 | #define M_MAC_BURST_EN _SB_MAKEMASK1(5) |
56 | 56 | ||
57 | #define S_MAC_TX_PAUSE _SB_MAKE64(6) | 57 | #define S_MAC_TX_PAUSE _SB_MAKE64(6) |
58 | #define M_MAC_TX_PAUSE_CNT _SB_MAKEMASK(3, S_MAC_TX_PAUSE) | 58 | #define M_MAC_TX_PAUSE_CNT _SB_MAKEMASK(3, S_MAC_TX_PAUSE) |
59 | #define V_MAC_TX_PAUSE_CNT(x) _SB_MAKEVALUE(x, S_MAC_TX_PAUSE) | 59 | #define V_MAC_TX_PAUSE_CNT(x) _SB_MAKEVALUE(x, S_MAC_TX_PAUSE) |
60 | 60 | ||
61 | #define K_MAC_TX_PAUSE_CNT_512 0 | 61 | #define K_MAC_TX_PAUSE_CNT_512 0 |
62 | #define K_MAC_TX_PAUSE_CNT_1K 1 | 62 | #define K_MAC_TX_PAUSE_CNT_1K 1 |
63 | #define K_MAC_TX_PAUSE_CNT_2K 2 | 63 | #define K_MAC_TX_PAUSE_CNT_2K 2 |
64 | #define K_MAC_TX_PAUSE_CNT_4K 3 | 64 | #define K_MAC_TX_PAUSE_CNT_4K 3 |
65 | #define K_MAC_TX_PAUSE_CNT_8K 4 | 65 | #define K_MAC_TX_PAUSE_CNT_8K 4 |
66 | #define K_MAC_TX_PAUSE_CNT_16K 5 | 66 | #define K_MAC_TX_PAUSE_CNT_16K 5 |
67 | #define K_MAC_TX_PAUSE_CNT_32K 6 | 67 | #define K_MAC_TX_PAUSE_CNT_32K 6 |
68 | #define K_MAC_TX_PAUSE_CNT_64K 7 | 68 | #define K_MAC_TX_PAUSE_CNT_64K 7 |
69 | 69 | ||
70 | #define V_MAC_TX_PAUSE_CNT_512 V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_512) | 70 | #define V_MAC_TX_PAUSE_CNT_512 V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_512) |
71 | #define V_MAC_TX_PAUSE_CNT_1K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_1K) | 71 | #define V_MAC_TX_PAUSE_CNT_1K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_1K) |
72 | #define V_MAC_TX_PAUSE_CNT_2K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_2K) | 72 | #define V_MAC_TX_PAUSE_CNT_2K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_2K) |
73 | #define V_MAC_TX_PAUSE_CNT_4K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_4K) | 73 | #define V_MAC_TX_PAUSE_CNT_4K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_4K) |
74 | #define V_MAC_TX_PAUSE_CNT_8K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_8K) | 74 | #define V_MAC_TX_PAUSE_CNT_8K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_8K) |
75 | #define V_MAC_TX_PAUSE_CNT_16K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_16K) | 75 | #define V_MAC_TX_PAUSE_CNT_16K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_16K) |
76 | #define V_MAC_TX_PAUSE_CNT_32K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_32K) | 76 | #define V_MAC_TX_PAUSE_CNT_32K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_32K) |
77 | #define V_MAC_TX_PAUSE_CNT_64K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_64K) | 77 | #define V_MAC_TX_PAUSE_CNT_64K V_MAC_TX_PAUSE_CNT(K_MAC_TX_PAUSE_CNT_64K) |
78 | 78 | ||
79 | #define M_MAC_RESERVED1 _SB_MAKEMASK(8, 9) | 79 | #define M_MAC_RESERVED1 _SB_MAKEMASK(8, 9) |
80 | 80 | ||
81 | #define M_MAC_AP_STAT_EN _SB_MAKEMASK1(17) | 81 | #define M_MAC_AP_STAT_EN _SB_MAKEMASK1(17) |
82 | 82 | ||
83 | #if SIBYTE_HDR_FEATURE_CHIP(1480) | 83 | #if SIBYTE_HDR_FEATURE_CHIP(1480) |
84 | #define M_MAC_TIMESTAMP _SB_MAKEMASK1(18) | 84 | #define M_MAC_TIMESTAMP _SB_MAKEMASK1(18) |
85 | #endif | 85 | #endif |
86 | #define M_MAC_DRP_ERRPKT_EN _SB_MAKEMASK1(19) | 86 | #define M_MAC_DRP_ERRPKT_EN _SB_MAKEMASK1(19) |
87 | #define M_MAC_DRP_FCSERRPKT_EN _SB_MAKEMASK1(20) | 87 | #define M_MAC_DRP_FCSERRPKT_EN _SB_MAKEMASK1(20) |
88 | #define M_MAC_DRP_CODEERRPKT_EN _SB_MAKEMASK1(21) | 88 | #define M_MAC_DRP_CODEERRPKT_EN _SB_MAKEMASK1(21) |
89 | #define M_MAC_DRP_DRBLERRPKT_EN _SB_MAKEMASK1(22) | 89 | #define M_MAC_DRP_DRBLERRPKT_EN _SB_MAKEMASK1(22) |
90 | #define M_MAC_DRP_RNTPKT_EN _SB_MAKEMASK1(23) | 90 | #define M_MAC_DRP_RNTPKT_EN _SB_MAKEMASK1(23) |
91 | #define M_MAC_DRP_OSZPKT_EN _SB_MAKEMASK1(24) | 91 | #define M_MAC_DRP_OSZPKT_EN _SB_MAKEMASK1(24) |
92 | #define M_MAC_DRP_LENERRPKT_EN _SB_MAKEMASK1(25) | 92 | #define M_MAC_DRP_LENERRPKT_EN _SB_MAKEMASK1(25) |
93 | 93 | ||
94 | #define M_MAC_RESERVED3 _SB_MAKEMASK(6, 26) | 94 | #define M_MAC_RESERVED3 _SB_MAKEMASK(6, 26) |
95 | 95 | ||
96 | #define M_MAC_BYPASS_SEL _SB_MAKEMASK1(32) | 96 | #define M_MAC_BYPASS_SEL _SB_MAKEMASK1(32) |
97 | #define M_MAC_HDX_EN _SB_MAKEMASK1(33) | 97 | #define M_MAC_HDX_EN _SB_MAKEMASK1(33) |
98 | 98 | ||
99 | #define S_MAC_SPEED_SEL _SB_MAKE64(34) | 99 | #define S_MAC_SPEED_SEL _SB_MAKE64(34) |
100 | #define M_MAC_SPEED_SEL _SB_MAKEMASK(2, S_MAC_SPEED_SEL) | 100 | #define M_MAC_SPEED_SEL _SB_MAKEMASK(2, S_MAC_SPEED_SEL) |
101 | #define V_MAC_SPEED_SEL(x) _SB_MAKEVALUE(x, S_MAC_SPEED_SEL) | 101 | #define V_MAC_SPEED_SEL(x) _SB_MAKEVALUE(x, S_MAC_SPEED_SEL) |
102 | #define G_MAC_SPEED_SEL(x) _SB_GETVALUE(x, S_MAC_SPEED_SEL, M_MAC_SPEED_SEL) | 102 | #define G_MAC_SPEED_SEL(x) _SB_GETVALUE(x, S_MAC_SPEED_SEL, M_MAC_SPEED_SEL) |
103 | 103 | ||
104 | #define K_MAC_SPEED_SEL_10MBPS 0 | 104 | #define K_MAC_SPEED_SEL_10MBPS 0 |
105 | #define K_MAC_SPEED_SEL_100MBPS 1 | 105 | #define K_MAC_SPEED_SEL_100MBPS 1 |
106 | #define K_MAC_SPEED_SEL_1000MBPS 2 | 106 | #define K_MAC_SPEED_SEL_1000MBPS 2 |
107 | #define K_MAC_SPEED_SEL_RESERVED 3 | 107 | #define K_MAC_SPEED_SEL_RESERVED 3 |
108 | 108 | ||
109 | #define V_MAC_SPEED_SEL_10MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_10MBPS) | 109 | #define V_MAC_SPEED_SEL_10MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_10MBPS) |
110 | #define V_MAC_SPEED_SEL_100MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_100MBPS) | 110 | #define V_MAC_SPEED_SEL_100MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_100MBPS) |
111 | #define V_MAC_SPEED_SEL_1000MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_1000MBPS) | 111 | #define V_MAC_SPEED_SEL_1000MBPS V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_1000MBPS) |
112 | #define V_MAC_SPEED_SEL_RESERVED V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_RESERVED) | 112 | #define V_MAC_SPEED_SEL_RESERVED V_MAC_SPEED_SEL(K_MAC_SPEED_SEL_RESERVED) |
113 | 113 | ||
114 | #define M_MAC_TX_CLK_EDGE_SEL _SB_MAKEMASK1(36) | 114 | #define M_MAC_TX_CLK_EDGE_SEL _SB_MAKEMASK1(36) |
115 | #define M_MAC_LOOPBACK_SEL _SB_MAKEMASK1(37) | 115 | #define M_MAC_LOOPBACK_SEL _SB_MAKEMASK1(37) |
116 | #define M_MAC_FAST_SYNC _SB_MAKEMASK1(38) | 116 | #define M_MAC_FAST_SYNC _SB_MAKEMASK1(38) |
117 | #define M_MAC_SS_EN _SB_MAKEMASK1(39) | 117 | #define M_MAC_SS_EN _SB_MAKEMASK1(39) |
118 | 118 | ||
119 | #define S_MAC_BYPASS_CFG _SB_MAKE64(40) | 119 | #define S_MAC_BYPASS_CFG _SB_MAKE64(40) |
120 | #define M_MAC_BYPASS_CFG _SB_MAKEMASK(2, S_MAC_BYPASS_CFG) | 120 | #define M_MAC_BYPASS_CFG _SB_MAKEMASK(2, S_MAC_BYPASS_CFG) |
121 | #define V_MAC_BYPASS_CFG(x) _SB_MAKEVALUE(x, S_MAC_BYPASS_CFG) | 121 | #define V_MAC_BYPASS_CFG(x) _SB_MAKEVALUE(x, S_MAC_BYPASS_CFG) |
122 | #define G_MAC_BYPASS_CFG(x) _SB_GETVALUE(x, S_MAC_BYPASS_CFG, M_MAC_BYPASS_CFG) | 122 | #define G_MAC_BYPASS_CFG(x) _SB_GETVALUE(x, S_MAC_BYPASS_CFG, M_MAC_BYPASS_CFG) |
123 | 123 | ||
124 | #define K_MAC_BYPASS_GMII 0 | 124 | #define K_MAC_BYPASS_GMII 0 |
125 | #define K_MAC_BYPASS_ENCODED 1 | 125 | #define K_MAC_BYPASS_ENCODED 1 |
126 | #define K_MAC_BYPASS_SOP 2 | 126 | #define K_MAC_BYPASS_SOP 2 |
127 | #define K_MAC_BYPASS_EOP 3 | 127 | #define K_MAC_BYPASS_EOP 3 |
128 | 128 | ||
129 | #define M_MAC_BYPASS_16 _SB_MAKEMASK1(42) | 129 | #define M_MAC_BYPASS_16 _SB_MAKEMASK1(42) |
130 | #define M_MAC_BYPASS_FCS_CHK _SB_MAKEMASK1(43) | 130 | #define M_MAC_BYPASS_FCS_CHK _SB_MAKEMASK1(43) |
131 | 131 | ||
132 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 132 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
@@ -137,30 +137,30 @@ | |||
137 | #define M_MAC_SPLIT_CH_SEL _SB_MAKEMASK1(45) | 137 | #define M_MAC_SPLIT_CH_SEL _SB_MAKEMASK1(45) |
138 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 138 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
139 | 139 | ||
140 | #define S_MAC_BYPASS_IFG _SB_MAKE64(46) | 140 | #define S_MAC_BYPASS_IFG _SB_MAKE64(46) |
141 | #define M_MAC_BYPASS_IFG _SB_MAKEMASK(8, S_MAC_BYPASS_IFG) | 141 | #define M_MAC_BYPASS_IFG _SB_MAKEMASK(8, S_MAC_BYPASS_IFG) |
142 | #define V_MAC_BYPASS_IFG(x) _SB_MAKEVALUE(x, S_MAC_BYPASS_IFG) | 142 | #define V_MAC_BYPASS_IFG(x) _SB_MAKEVALUE(x, S_MAC_BYPASS_IFG) |
143 | #define G_MAC_BYPASS_IFG(x) _SB_GETVALUE(x, S_MAC_BYPASS_IFG, M_MAC_BYPASS_IFG) | 143 | #define G_MAC_BYPASS_IFG(x) _SB_GETVALUE(x, S_MAC_BYPASS_IFG, M_MAC_BYPASS_IFG) |
144 | 144 | ||
145 | #define K_MAC_FC_CMD_DISABLED 0 | 145 | #define K_MAC_FC_CMD_DISABLED 0 |
146 | #define K_MAC_FC_CMD_ENABLED 1 | 146 | #define K_MAC_FC_CMD_ENABLED 1 |
147 | #define K_MAC_FC_CMD_ENAB_FALSECARR 2 | 147 | #define K_MAC_FC_CMD_ENAB_FALSECARR 2 |
148 | 148 | ||
149 | #define V_MAC_FC_CMD_DISABLED V_MAC_FC_CMD(K_MAC_FC_CMD_DISABLED) | 149 | #define V_MAC_FC_CMD_DISABLED V_MAC_FC_CMD(K_MAC_FC_CMD_DISABLED) |
150 | #define V_MAC_FC_CMD_ENABLED V_MAC_FC_CMD(K_MAC_FC_CMD_ENABLED) | 150 | #define V_MAC_FC_CMD_ENABLED V_MAC_FC_CMD(K_MAC_FC_CMD_ENABLED) |
151 | #define V_MAC_FC_CMD_ENAB_FALSECARR V_MAC_FC_CMD(K_MAC_FC_CMD_ENAB_FALSECARR) | 151 | #define V_MAC_FC_CMD_ENAB_FALSECARR V_MAC_FC_CMD(K_MAC_FC_CMD_ENAB_FALSECARR) |
152 | 152 | ||
153 | #define M_MAC_FC_SEL _SB_MAKEMASK1(54) | 153 | #define M_MAC_FC_SEL _SB_MAKEMASK1(54) |
154 | 154 | ||
155 | #define S_MAC_FC_CMD _SB_MAKE64(55) | 155 | #define S_MAC_FC_CMD _SB_MAKE64(55) |
156 | #define M_MAC_FC_CMD _SB_MAKEMASK(2, S_MAC_FC_CMD) | 156 | #define M_MAC_FC_CMD _SB_MAKEMASK(2, S_MAC_FC_CMD) |
157 | #define V_MAC_FC_CMD(x) _SB_MAKEVALUE(x, S_MAC_FC_CMD) | 157 | #define V_MAC_FC_CMD(x) _SB_MAKEVALUE(x, S_MAC_FC_CMD) |
158 | #define G_MAC_FC_CMD(x) _SB_GETVALUE(x, S_MAC_FC_CMD, M_MAC_FC_CMD) | 158 | #define G_MAC_FC_CMD(x) _SB_GETVALUE(x, S_MAC_FC_CMD, M_MAC_FC_CMD) |
159 | 159 | ||
160 | #define S_MAC_RX_CH_SEL _SB_MAKE64(57) | 160 | #define S_MAC_RX_CH_SEL _SB_MAKE64(57) |
161 | #define M_MAC_RX_CH_SEL _SB_MAKEMASK(7, S_MAC_RX_CH_SEL) | 161 | #define M_MAC_RX_CH_SEL _SB_MAKEMASK(7, S_MAC_RX_CH_SEL) |
162 | #define V_MAC_RX_CH_SEL(x) _SB_MAKEVALUE(x, S_MAC_RX_CH_SEL) | 162 | #define V_MAC_RX_CH_SEL(x) _SB_MAKEVALUE(x, S_MAC_RX_CH_SEL) |
163 | #define G_MAC_RX_CH_SEL(x) _SB_GETVALUE(x, S_MAC_RX_CH_SEL, M_MAC_RX_CH_SEL) | 163 | #define G_MAC_RX_CH_SEL(x) _SB_GETVALUE(x, S_MAC_RX_CH_SEL, M_MAC_RX_CH_SEL) |
164 | 164 | ||
165 | 165 | ||
166 | /* | 166 | /* |
@@ -170,18 +170,18 @@ | |||
170 | * Register: MAC_ENABLE_2 | 170 | * Register: MAC_ENABLE_2 |
171 | */ | 171 | */ |
172 | 172 | ||
173 | #define M_MAC_RXDMA_EN0 _SB_MAKEMASK1(0) | 173 | #define M_MAC_RXDMA_EN0 _SB_MAKEMASK1(0) |
174 | #define M_MAC_RXDMA_EN1 _SB_MAKEMASK1(1) | 174 | #define M_MAC_RXDMA_EN1 _SB_MAKEMASK1(1) |
175 | #define M_MAC_TXDMA_EN0 _SB_MAKEMASK1(4) | 175 | #define M_MAC_TXDMA_EN0 _SB_MAKEMASK1(4) |
176 | #define M_MAC_TXDMA_EN1 _SB_MAKEMASK1(5) | 176 | #define M_MAC_TXDMA_EN1 _SB_MAKEMASK1(5) |
177 | 177 | ||
178 | #define M_MAC_PORT_RESET _SB_MAKEMASK1(8) | 178 | #define M_MAC_PORT_RESET _SB_MAKEMASK1(8) |
179 | 179 | ||
180 | #if (SIBYTE_HDR_FEATURE_CHIP(1250) || SIBYTE_HDR_FEATURE_CHIP(112x)) | 180 | #if (SIBYTE_HDR_FEATURE_CHIP(1250) || SIBYTE_HDR_FEATURE_CHIP(112x)) |
181 | #define M_MAC_RX_ENABLE _SB_MAKEMASK1(10) | 181 | #define M_MAC_RX_ENABLE _SB_MAKEMASK1(10) |
182 | #define M_MAC_TX_ENABLE _SB_MAKEMASK1(11) | 182 | #define M_MAC_TX_ENABLE _SB_MAKEMASK1(11) |
183 | #define M_MAC_BYP_RX_ENABLE _SB_MAKEMASK1(12) | 183 | #define M_MAC_BYP_RX_ENABLE _SB_MAKEMASK1(12) |
184 | #define M_MAC_BYP_TX_ENABLE _SB_MAKEMASK1(13) | 184 | #define M_MAC_BYP_TX_ENABLE _SB_MAKEMASK1(13) |
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | /* | 187 | /* |
@@ -203,13 +203,13 @@ | |||
203 | 203 | ||
204 | #define S_MAC_TXD_WEIGHT0 _SB_MAKE64(0) | 204 | #define S_MAC_TXD_WEIGHT0 _SB_MAKE64(0) |
205 | #define M_MAC_TXD_WEIGHT0 _SB_MAKEMASK(4, S_MAC_TXD_WEIGHT0) | 205 | #define M_MAC_TXD_WEIGHT0 _SB_MAKEMASK(4, S_MAC_TXD_WEIGHT0) |
206 | #define V_MAC_TXD_WEIGHT0(x) _SB_MAKEVALUE(x, S_MAC_TXD_WEIGHT0) | 206 | #define V_MAC_TXD_WEIGHT0(x) _SB_MAKEVALUE(x, S_MAC_TXD_WEIGHT0) |
207 | #define G_MAC_TXD_WEIGHT0(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT0, M_MAC_TXD_WEIGHT0) | 207 | #define G_MAC_TXD_WEIGHT0(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT0, M_MAC_TXD_WEIGHT0) |
208 | 208 | ||
209 | #define S_MAC_TXD_WEIGHT1 _SB_MAKE64(4) | 209 | #define S_MAC_TXD_WEIGHT1 _SB_MAKE64(4) |
210 | #define M_MAC_TXD_WEIGHT1 _SB_MAKEMASK(4, S_MAC_TXD_WEIGHT1) | 210 | #define M_MAC_TXD_WEIGHT1 _SB_MAKEMASK(4, S_MAC_TXD_WEIGHT1) |
211 | #define V_MAC_TXD_WEIGHT1(x) _SB_MAKEVALUE(x, S_MAC_TXD_WEIGHT1) | 211 | #define V_MAC_TXD_WEIGHT1(x) _SB_MAKEVALUE(x, S_MAC_TXD_WEIGHT1) |
212 | #define G_MAC_TXD_WEIGHT1(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT1, M_MAC_TXD_WEIGHT1) | 212 | #define G_MAC_TXD_WEIGHT1(x) _SB_GETVALUE(x, S_MAC_TXD_WEIGHT1, M_MAC_TXD_WEIGHT1) |
213 | 213 | ||
214 | /* | 214 | /* |
215 | * MAC Fifo Threshold registers (Table 9-14) | 215 | * MAC Fifo Threshold registers (Table 9-14) |
@@ -218,53 +218,53 @@ | |||
218 | * Register: MAC_THRSH_CFG_2 | 218 | * Register: MAC_THRSH_CFG_2 |
219 | */ | 219 | */ |
220 | 220 | ||
221 | #define S_MAC_TX_WR_THRSH _SB_MAKE64(0) | 221 | #define S_MAC_TX_WR_THRSH _SB_MAKE64(0) |
222 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) | 222 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) |
223 | /* XXX: Can't enable, as it has the same name as a pass2+ define below. */ | 223 | /* XXX: Can't enable, as it has the same name as a pass2+ define below. */ |
224 | /* #define M_MAC_TX_WR_THRSH _SB_MAKEMASK(6, S_MAC_TX_WR_THRSH) */ | 224 | /* #define M_MAC_TX_WR_THRSH _SB_MAKEMASK(6, S_MAC_TX_WR_THRSH) */ |
225 | #endif /* up to 1250 PASS1 */ | 225 | #endif /* up to 1250 PASS1 */ |
226 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 226 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
227 | #define M_MAC_TX_WR_THRSH _SB_MAKEMASK(7, S_MAC_TX_WR_THRSH) | 227 | #define M_MAC_TX_WR_THRSH _SB_MAKEMASK(7, S_MAC_TX_WR_THRSH) |
228 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 228 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
229 | #define V_MAC_TX_WR_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_WR_THRSH) | 229 | #define V_MAC_TX_WR_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_WR_THRSH) |
230 | #define G_MAC_TX_WR_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_WR_THRSH, M_MAC_TX_WR_THRSH) | 230 | #define G_MAC_TX_WR_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_WR_THRSH, M_MAC_TX_WR_THRSH) |
231 | 231 | ||
232 | #define S_MAC_TX_RD_THRSH _SB_MAKE64(8) | 232 | #define S_MAC_TX_RD_THRSH _SB_MAKE64(8) |
233 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) | 233 | #if SIBYTE_HDR_FEATURE_UP_TO(1250, PASS1) |
234 | /* XXX: Can't enable, as it has the same name as a pass2+ define below. */ | 234 | /* XXX: Can't enable, as it has the same name as a pass2+ define below. */ |
235 | /* #define M_MAC_TX_RD_THRSH _SB_MAKEMASK(6, S_MAC_TX_RD_THRSH) */ | 235 | /* #define M_MAC_TX_RD_THRSH _SB_MAKEMASK(6, S_MAC_TX_RD_THRSH) */ |
236 | #endif /* up to 1250 PASS1 */ | 236 | #endif /* up to 1250 PASS1 */ |
237 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 237 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
238 | #define M_MAC_TX_RD_THRSH _SB_MAKEMASK(7, S_MAC_TX_RD_THRSH) | 238 | #define M_MAC_TX_RD_THRSH _SB_MAKEMASK(7, S_MAC_TX_RD_THRSH) |
239 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 239 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
240 | #define V_MAC_TX_RD_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_RD_THRSH) | 240 | #define V_MAC_TX_RD_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_RD_THRSH) |
241 | #define G_MAC_TX_RD_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_RD_THRSH, M_MAC_TX_RD_THRSH) | 241 | #define G_MAC_TX_RD_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_RD_THRSH, M_MAC_TX_RD_THRSH) |
242 | 242 | ||
243 | #define S_MAC_TX_RL_THRSH _SB_MAKE64(16) | 243 | #define S_MAC_TX_RL_THRSH _SB_MAKE64(16) |
244 | #define M_MAC_TX_RL_THRSH _SB_MAKEMASK(4, S_MAC_TX_RL_THRSH) | 244 | #define M_MAC_TX_RL_THRSH _SB_MAKEMASK(4, S_MAC_TX_RL_THRSH) |
245 | #define V_MAC_TX_RL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_RL_THRSH) | 245 | #define V_MAC_TX_RL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_TX_RL_THRSH) |
246 | #define G_MAC_TX_RL_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_RL_THRSH, M_MAC_TX_RL_THRSH) | 246 | #define G_MAC_TX_RL_THRSH(x) _SB_GETVALUE(x, S_MAC_TX_RL_THRSH, M_MAC_TX_RL_THRSH) |
247 | 247 | ||
248 | #define S_MAC_RX_PL_THRSH _SB_MAKE64(24) | 248 | #define S_MAC_RX_PL_THRSH _SB_MAKE64(24) |
249 | #define M_MAC_RX_PL_THRSH _SB_MAKEMASK(6, S_MAC_RX_PL_THRSH) | 249 | #define M_MAC_RX_PL_THRSH _SB_MAKEMASK(6, S_MAC_RX_PL_THRSH) |
250 | #define V_MAC_RX_PL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_PL_THRSH) | 250 | #define V_MAC_RX_PL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_PL_THRSH) |
251 | #define G_MAC_RX_PL_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_PL_THRSH, M_MAC_RX_PL_THRSH) | 251 | #define G_MAC_RX_PL_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_PL_THRSH, M_MAC_RX_PL_THRSH) |
252 | 252 | ||
253 | #define S_MAC_RX_RD_THRSH _SB_MAKE64(32) | 253 | #define S_MAC_RX_RD_THRSH _SB_MAKE64(32) |
254 | #define M_MAC_RX_RD_THRSH _SB_MAKEMASK(6, S_MAC_RX_RD_THRSH) | 254 | #define M_MAC_RX_RD_THRSH _SB_MAKEMASK(6, S_MAC_RX_RD_THRSH) |
255 | #define V_MAC_RX_RD_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_RD_THRSH) | 255 | #define V_MAC_RX_RD_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_RD_THRSH) |
256 | #define G_MAC_RX_RD_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_RD_THRSH, M_MAC_RX_RD_THRSH) | 256 | #define G_MAC_RX_RD_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_RD_THRSH, M_MAC_RX_RD_THRSH) |
257 | 257 | ||
258 | #define S_MAC_RX_RL_THRSH _SB_MAKE64(40) | 258 | #define S_MAC_RX_RL_THRSH _SB_MAKE64(40) |
259 | #define M_MAC_RX_RL_THRSH _SB_MAKEMASK(6, S_MAC_RX_RL_THRSH) | 259 | #define M_MAC_RX_RL_THRSH _SB_MAKEMASK(6, S_MAC_RX_RL_THRSH) |
260 | #define V_MAC_RX_RL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_RL_THRSH) | 260 | #define V_MAC_RX_RL_THRSH(x) _SB_MAKEVALUE(x, S_MAC_RX_RL_THRSH) |
261 | #define G_MAC_RX_RL_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_RL_THRSH, M_MAC_RX_RL_THRSH) | 261 | #define G_MAC_RX_RL_THRSH(x) _SB_GETVALUE(x, S_MAC_RX_RL_THRSH, M_MAC_RX_RL_THRSH) |
262 | 262 | ||
263 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 263 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
264 | #define S_MAC_ENC_FC_THRSH _SB_MAKE64(56) | 264 | #define S_MAC_ENC_FC_THRSH _SB_MAKE64(56) |
265 | #define M_MAC_ENC_FC_THRSH _SB_MAKEMASK(6, S_MAC_ENC_FC_THRSH) | 265 | #define M_MAC_ENC_FC_THRSH _SB_MAKEMASK(6, S_MAC_ENC_FC_THRSH) |
266 | #define V_MAC_ENC_FC_THRSH(x) _SB_MAKEVALUE(x, S_MAC_ENC_FC_THRSH) | 266 | #define V_MAC_ENC_FC_THRSH(x) _SB_MAKEVALUE(x, S_MAC_ENC_FC_THRSH) |
267 | #define G_MAC_ENC_FC_THRSH(x) _SB_GETVALUE(x, S_MAC_ENC_FC_THRSH, M_MAC_ENC_FC_THRSH) | 267 | #define G_MAC_ENC_FC_THRSH(x) _SB_GETVALUE(x, S_MAC_ENC_FC_THRSH, M_MAC_ENC_FC_THRSH) |
268 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 268 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
269 | 269 | ||
270 | /* | 270 | /* |
@@ -275,79 +275,79 @@ | |||
275 | */ | 275 | */ |
276 | 276 | ||
277 | /* XXXCGD: ??? Unused in pass2? */ | 277 | /* XXXCGD: ??? Unused in pass2? */ |
278 | #define S_MAC_IFG_RX _SB_MAKE64(0) | 278 | #define S_MAC_IFG_RX _SB_MAKE64(0) |
279 | #define M_MAC_IFG_RX _SB_MAKEMASK(6, S_MAC_IFG_RX) | 279 | #define M_MAC_IFG_RX _SB_MAKEMASK(6, S_MAC_IFG_RX) |
280 | #define V_MAC_IFG_RX(x) _SB_MAKEVALUE(x, S_MAC_IFG_RX) | 280 | #define V_MAC_IFG_RX(x) _SB_MAKEVALUE(x, S_MAC_IFG_RX) |
281 | #define G_MAC_IFG_RX(x) _SB_GETVALUE(x, S_MAC_IFG_RX, M_MAC_IFG_RX) | 281 | #define G_MAC_IFG_RX(x) _SB_GETVALUE(x, S_MAC_IFG_RX, M_MAC_IFG_RX) |
282 | 282 | ||
283 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 283 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
284 | #define S_MAC_PRE_LEN _SB_MAKE64(0) | 284 | #define S_MAC_PRE_LEN _SB_MAKE64(0) |
285 | #define M_MAC_PRE_LEN _SB_MAKEMASK(6, S_MAC_PRE_LEN) | 285 | #define M_MAC_PRE_LEN _SB_MAKEMASK(6, S_MAC_PRE_LEN) |
286 | #define V_MAC_PRE_LEN(x) _SB_MAKEVALUE(x, S_MAC_PRE_LEN) | 286 | #define V_MAC_PRE_LEN(x) _SB_MAKEVALUE(x, S_MAC_PRE_LEN) |
287 | #define G_MAC_PRE_LEN(x) _SB_GETVALUE(x, S_MAC_PRE_LEN, M_MAC_PRE_LEN) | 287 | #define G_MAC_PRE_LEN(x) _SB_GETVALUE(x, S_MAC_PRE_LEN, M_MAC_PRE_LEN) |
288 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 288 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
289 | 289 | ||
290 | #define S_MAC_IFG_TX _SB_MAKE64(6) | 290 | #define S_MAC_IFG_TX _SB_MAKE64(6) |
291 | #define M_MAC_IFG_TX _SB_MAKEMASK(6, S_MAC_IFG_TX) | 291 | #define M_MAC_IFG_TX _SB_MAKEMASK(6, S_MAC_IFG_TX) |
292 | #define V_MAC_IFG_TX(x) _SB_MAKEVALUE(x, S_MAC_IFG_TX) | 292 | #define V_MAC_IFG_TX(x) _SB_MAKEVALUE(x, S_MAC_IFG_TX) |
293 | #define G_MAC_IFG_TX(x) _SB_GETVALUE(x, S_MAC_IFG_TX, M_MAC_IFG_TX) | 293 | #define G_MAC_IFG_TX(x) _SB_GETVALUE(x, S_MAC_IFG_TX, M_MAC_IFG_TX) |
294 | 294 | ||
295 | #define S_MAC_IFG_THRSH _SB_MAKE64(12) | 295 | #define S_MAC_IFG_THRSH _SB_MAKE64(12) |
296 | #define M_MAC_IFG_THRSH _SB_MAKEMASK(6, S_MAC_IFG_THRSH) | 296 | #define M_MAC_IFG_THRSH _SB_MAKEMASK(6, S_MAC_IFG_THRSH) |
297 | #define V_MAC_IFG_THRSH(x) _SB_MAKEVALUE(x, S_MAC_IFG_THRSH) | 297 | #define V_MAC_IFG_THRSH(x) _SB_MAKEVALUE(x, S_MAC_IFG_THRSH) |
298 | #define G_MAC_IFG_THRSH(x) _SB_GETVALUE(x, S_MAC_IFG_THRSH, M_MAC_IFG_THRSH) | 298 | #define G_MAC_IFG_THRSH(x) _SB_GETVALUE(x, S_MAC_IFG_THRSH, M_MAC_IFG_THRSH) |
299 | 299 | ||
300 | #define S_MAC_BACKOFF_SEL _SB_MAKE64(18) | 300 | #define S_MAC_BACKOFF_SEL _SB_MAKE64(18) |
301 | #define M_MAC_BACKOFF_SEL _SB_MAKEMASK(4, S_MAC_BACKOFF_SEL) | 301 | #define M_MAC_BACKOFF_SEL _SB_MAKEMASK(4, S_MAC_BACKOFF_SEL) |
302 | #define V_MAC_BACKOFF_SEL(x) _SB_MAKEVALUE(x, S_MAC_BACKOFF_SEL) | 302 | #define V_MAC_BACKOFF_SEL(x) _SB_MAKEVALUE(x, S_MAC_BACKOFF_SEL) |
303 | #define G_MAC_BACKOFF_SEL(x) _SB_GETVALUE(x, S_MAC_BACKOFF_SEL, M_MAC_BACKOFF_SEL) | 303 | #define G_MAC_BACKOFF_SEL(x) _SB_GETVALUE(x, S_MAC_BACKOFF_SEL, M_MAC_BACKOFF_SEL) |
304 | 304 | ||
305 | #define S_MAC_LFSR_SEED _SB_MAKE64(22) | 305 | #define S_MAC_LFSR_SEED _SB_MAKE64(22) |
306 | #define M_MAC_LFSR_SEED _SB_MAKEMASK(8, S_MAC_LFSR_SEED) | 306 | #define M_MAC_LFSR_SEED _SB_MAKEMASK(8, S_MAC_LFSR_SEED) |
307 | #define V_MAC_LFSR_SEED(x) _SB_MAKEVALUE(x, S_MAC_LFSR_SEED) | 307 | #define V_MAC_LFSR_SEED(x) _SB_MAKEVALUE(x, S_MAC_LFSR_SEED) |
308 | #define G_MAC_LFSR_SEED(x) _SB_GETVALUE(x, S_MAC_LFSR_SEED, M_MAC_LFSR_SEED) | 308 | #define G_MAC_LFSR_SEED(x) _SB_GETVALUE(x, S_MAC_LFSR_SEED, M_MAC_LFSR_SEED) |
309 | 309 | ||
310 | #define S_MAC_SLOT_SIZE _SB_MAKE64(30) | 310 | #define S_MAC_SLOT_SIZE _SB_MAKE64(30) |
311 | #define M_MAC_SLOT_SIZE _SB_MAKEMASK(10, S_MAC_SLOT_SIZE) | 311 | #define M_MAC_SLOT_SIZE _SB_MAKEMASK(10, S_MAC_SLOT_SIZE) |
312 | #define V_MAC_SLOT_SIZE(x) _SB_MAKEVALUE(x, S_MAC_SLOT_SIZE) | 312 | #define V_MAC_SLOT_SIZE(x) _SB_MAKEVALUE(x, S_MAC_SLOT_SIZE) |
313 | #define G_MAC_SLOT_SIZE(x) _SB_GETVALUE(x, S_MAC_SLOT_SIZE, M_MAC_SLOT_SIZE) | 313 | #define G_MAC_SLOT_SIZE(x) _SB_GETVALUE(x, S_MAC_SLOT_SIZE, M_MAC_SLOT_SIZE) |
314 | 314 | ||
315 | #define S_MAC_MIN_FRAMESZ _SB_MAKE64(40) | 315 | #define S_MAC_MIN_FRAMESZ _SB_MAKE64(40) |
316 | #define M_MAC_MIN_FRAMESZ _SB_MAKEMASK(8, S_MAC_MIN_FRAMESZ) | 316 | #define M_MAC_MIN_FRAMESZ _SB_MAKEMASK(8, S_MAC_MIN_FRAMESZ) |
317 | #define V_MAC_MIN_FRAMESZ(x) _SB_MAKEVALUE(x, S_MAC_MIN_FRAMESZ) | 317 | #define V_MAC_MIN_FRAMESZ(x) _SB_MAKEVALUE(x, S_MAC_MIN_FRAMESZ) |
318 | #define G_MAC_MIN_FRAMESZ(x) _SB_GETVALUE(x, S_MAC_MIN_FRAMESZ, M_MAC_MIN_FRAMESZ) | 318 | #define G_MAC_MIN_FRAMESZ(x) _SB_GETVALUE(x, S_MAC_MIN_FRAMESZ, M_MAC_MIN_FRAMESZ) |
319 | 319 | ||
320 | #define S_MAC_MAX_FRAMESZ _SB_MAKE64(48) | 320 | #define S_MAC_MAX_FRAMESZ _SB_MAKE64(48) |
321 | #define M_MAC_MAX_FRAMESZ _SB_MAKEMASK(16, S_MAC_MAX_FRAMESZ) | 321 | #define M_MAC_MAX_FRAMESZ _SB_MAKEMASK(16, S_MAC_MAX_FRAMESZ) |
322 | #define V_MAC_MAX_FRAMESZ(x) _SB_MAKEVALUE(x, S_MAC_MAX_FRAMESZ) | 322 | #define V_MAC_MAX_FRAMESZ(x) _SB_MAKEVALUE(x, S_MAC_MAX_FRAMESZ) |
323 | #define G_MAC_MAX_FRAMESZ(x) _SB_GETVALUE(x, S_MAC_MAX_FRAMESZ, M_MAC_MAX_FRAMESZ) | 323 | #define G_MAC_MAX_FRAMESZ(x) _SB_GETVALUE(x, S_MAC_MAX_FRAMESZ, M_MAC_MAX_FRAMESZ) |
324 | 324 | ||
325 | /* | 325 | /* |
326 | * These constants are used to configure the fields within the Frame | 326 | * These constants are used to configure the fields within the Frame |
327 | * Configuration Register. | 327 | * Configuration Register. |
328 | */ | 328 | */ |
329 | 329 | ||
330 | #define K_MAC_IFG_RX_10 _SB_MAKE64(0) /* See table 176, not used */ | 330 | #define K_MAC_IFG_RX_10 _SB_MAKE64(0) /* See table 176, not used */ |
331 | #define K_MAC_IFG_RX_100 _SB_MAKE64(0) | 331 | #define K_MAC_IFG_RX_100 _SB_MAKE64(0) |
332 | #define K_MAC_IFG_RX_1000 _SB_MAKE64(0) | 332 | #define K_MAC_IFG_RX_1000 _SB_MAKE64(0) |
333 | 333 | ||
334 | #define K_MAC_IFG_TX_10 _SB_MAKE64(20) | 334 | #define K_MAC_IFG_TX_10 _SB_MAKE64(20) |
335 | #define K_MAC_IFG_TX_100 _SB_MAKE64(20) | 335 | #define K_MAC_IFG_TX_100 _SB_MAKE64(20) |
336 | #define K_MAC_IFG_TX_1000 _SB_MAKE64(8) | 336 | #define K_MAC_IFG_TX_1000 _SB_MAKE64(8) |
337 | 337 | ||
338 | #define K_MAC_IFG_THRSH_10 _SB_MAKE64(4) | 338 | #define K_MAC_IFG_THRSH_10 _SB_MAKE64(4) |
339 | #define K_MAC_IFG_THRSH_100 _SB_MAKE64(4) | 339 | #define K_MAC_IFG_THRSH_100 _SB_MAKE64(4) |
340 | #define K_MAC_IFG_THRSH_1000 _SB_MAKE64(0) | 340 | #define K_MAC_IFG_THRSH_1000 _SB_MAKE64(0) |
341 | 341 | ||
342 | #define K_MAC_SLOT_SIZE_10 _SB_MAKE64(0) | 342 | #define K_MAC_SLOT_SIZE_10 _SB_MAKE64(0) |
343 | #define K_MAC_SLOT_SIZE_100 _SB_MAKE64(0) | 343 | #define K_MAC_SLOT_SIZE_100 _SB_MAKE64(0) |
344 | #define K_MAC_SLOT_SIZE_1000 _SB_MAKE64(0) | 344 | #define K_MAC_SLOT_SIZE_1000 _SB_MAKE64(0) |
345 | 345 | ||
346 | #define V_MAC_IFG_RX_10 V_MAC_IFG_RX(K_MAC_IFG_RX_10) | 346 | #define V_MAC_IFG_RX_10 V_MAC_IFG_RX(K_MAC_IFG_RX_10) |
347 | #define V_MAC_IFG_RX_100 V_MAC_IFG_RX(K_MAC_IFG_RX_100) | 347 | #define V_MAC_IFG_RX_100 V_MAC_IFG_RX(K_MAC_IFG_RX_100) |
348 | #define V_MAC_IFG_RX_1000 V_MAC_IFG_RX(K_MAC_IFG_RX_1000) | 348 | #define V_MAC_IFG_RX_1000 V_MAC_IFG_RX(K_MAC_IFG_RX_1000) |
349 | 349 | ||
350 | #define V_MAC_IFG_TX_10 V_MAC_IFG_TX(K_MAC_IFG_TX_10) | 350 | #define V_MAC_IFG_TX_10 V_MAC_IFG_TX(K_MAC_IFG_TX_10) |
351 | #define V_MAC_IFG_TX_100 V_MAC_IFG_TX(K_MAC_IFG_TX_100) | 351 | #define V_MAC_IFG_TX_100 V_MAC_IFG_TX(K_MAC_IFG_TX_100) |
352 | #define V_MAC_IFG_TX_1000 V_MAC_IFG_TX(K_MAC_IFG_TX_1000) | 352 | #define V_MAC_IFG_TX_1000 V_MAC_IFG_TX(K_MAC_IFG_TX_1000) |
353 | 353 | ||
@@ -359,15 +359,15 @@ | |||
359 | #define V_MAC_SLOT_SIZE_100 V_MAC_SLOT_SIZE(K_MAC_SLOT_SIZE_100) | 359 | #define V_MAC_SLOT_SIZE_100 V_MAC_SLOT_SIZE(K_MAC_SLOT_SIZE_100) |
360 | #define V_MAC_SLOT_SIZE_1000 V_MAC_SLOT_SIZE(K_MAC_SLOT_SIZE_1000) | 360 | #define V_MAC_SLOT_SIZE_1000 V_MAC_SLOT_SIZE(K_MAC_SLOT_SIZE_1000) |
361 | 361 | ||
362 | #define K_MAC_MIN_FRAMESZ_FIFO _SB_MAKE64(9) | 362 | #define K_MAC_MIN_FRAMESZ_FIFO _SB_MAKE64(9) |
363 | #define K_MAC_MIN_FRAMESZ_DEFAULT _SB_MAKE64(64) | 363 | #define K_MAC_MIN_FRAMESZ_DEFAULT _SB_MAKE64(64) |
364 | #define K_MAC_MAX_FRAMESZ_DEFAULT _SB_MAKE64(1518) | 364 | #define K_MAC_MAX_FRAMESZ_DEFAULT _SB_MAKE64(1518) |
365 | #define K_MAC_MAX_FRAMESZ_JUMBO _SB_MAKE64(9216) | 365 | #define K_MAC_MAX_FRAMESZ_JUMBO _SB_MAKE64(9216) |
366 | 366 | ||
367 | #define V_MAC_MIN_FRAMESZ_FIFO V_MAC_MIN_FRAMESZ(K_MAC_MIN_FRAMESZ_FIFO) | 367 | #define V_MAC_MIN_FRAMESZ_FIFO V_MAC_MIN_FRAMESZ(K_MAC_MIN_FRAMESZ_FIFO) |
368 | #define V_MAC_MIN_FRAMESZ_DEFAULT V_MAC_MIN_FRAMESZ(K_MAC_MIN_FRAMESZ_DEFAULT) | 368 | #define V_MAC_MIN_FRAMESZ_DEFAULT V_MAC_MIN_FRAMESZ(K_MAC_MIN_FRAMESZ_DEFAULT) |
369 | #define V_MAC_MAX_FRAMESZ_DEFAULT V_MAC_MAX_FRAMESZ(K_MAC_MAX_FRAMESZ_DEFAULT) | 369 | #define V_MAC_MAX_FRAMESZ_DEFAULT V_MAC_MAX_FRAMESZ(K_MAC_MAX_FRAMESZ_DEFAULT) |
370 | #define V_MAC_MAX_FRAMESZ_JUMBO V_MAC_MAX_FRAMESZ(K_MAC_MAX_FRAMESZ_JUMBO) | 370 | #define V_MAC_MAX_FRAMESZ_JUMBO V_MAC_MAX_FRAMESZ(K_MAC_MAX_FRAMESZ_JUMBO) |
371 | 371 | ||
372 | /* | 372 | /* |
373 | * MAC VLAN Tag Registers (Table 9-16) | 373 | * MAC VLAN Tag Registers (Table 9-16) |
@@ -376,23 +376,23 @@ | |||
376 | * Register: MAC_VLANTAG_2 | 376 | * Register: MAC_VLANTAG_2 |
377 | */ | 377 | */ |
378 | 378 | ||
379 | #define S_MAC_VLAN_TAG _SB_MAKE64(0) | 379 | #define S_MAC_VLAN_TAG _SB_MAKE64(0) |
380 | #define M_MAC_VLAN_TAG _SB_MAKEMASK(32, S_MAC_VLAN_TAG) | 380 | #define M_MAC_VLAN_TAG _SB_MAKEMASK(32, S_MAC_VLAN_TAG) |
381 | #define V_MAC_VLAN_TAG(x) _SB_MAKEVALUE(x, S_MAC_VLAN_TAG) | 381 | #define V_MAC_VLAN_TAG(x) _SB_MAKEVALUE(x, S_MAC_VLAN_TAG) |
382 | #define G_MAC_VLAN_TAG(x) _SB_GETVALUE(x, S_MAC_VLAN_TAG, M_MAC_VLAN_TAG) | 382 | #define G_MAC_VLAN_TAG(x) _SB_GETVALUE(x, S_MAC_VLAN_TAG, M_MAC_VLAN_TAG) |
383 | 383 | ||
384 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 384 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
385 | #define S_MAC_TX_PKT_OFFSET _SB_MAKE64(32) | 385 | #define S_MAC_TX_PKT_OFFSET _SB_MAKE64(32) |
386 | #define M_MAC_TX_PKT_OFFSET _SB_MAKEMASK(8, S_MAC_TX_PKT_OFFSET) | 386 | #define M_MAC_TX_PKT_OFFSET _SB_MAKEMASK(8, S_MAC_TX_PKT_OFFSET) |
387 | #define V_MAC_TX_PKT_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_TX_PKT_OFFSET) | 387 | #define V_MAC_TX_PKT_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_TX_PKT_OFFSET) |
388 | #define G_MAC_TX_PKT_OFFSET(x) _SB_GETVALUE(x, S_MAC_TX_PKT_OFFSET, M_MAC_TX_PKT_OFFSET) | 388 | #define G_MAC_TX_PKT_OFFSET(x) _SB_GETVALUE(x, S_MAC_TX_PKT_OFFSET, M_MAC_TX_PKT_OFFSET) |
389 | 389 | ||
390 | #define S_MAC_TX_CRC_OFFSET _SB_MAKE64(40) | 390 | #define S_MAC_TX_CRC_OFFSET _SB_MAKE64(40) |
391 | #define M_MAC_TX_CRC_OFFSET _SB_MAKEMASK(8, S_MAC_TX_CRC_OFFSET) | 391 | #define M_MAC_TX_CRC_OFFSET _SB_MAKEMASK(8, S_MAC_TX_CRC_OFFSET) |
392 | #define V_MAC_TX_CRC_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_TX_CRC_OFFSET) | 392 | #define V_MAC_TX_CRC_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_TX_CRC_OFFSET) |
393 | #define G_MAC_TX_CRC_OFFSET(x) _SB_GETVALUE(x, S_MAC_TX_CRC_OFFSET, M_MAC_TX_CRC_OFFSET) | 393 | #define G_MAC_TX_CRC_OFFSET(x) _SB_GETVALUE(x, S_MAC_TX_CRC_OFFSET, M_MAC_TX_CRC_OFFSET) |
394 | 394 | ||
395 | #define M_MAC_CH_BASE_FC_EN _SB_MAKEMASK1(48) | 395 | #define M_MAC_CH_BASE_FC_EN _SB_MAKEMASK1(48) |
396 | #endif /* 1250 PASS3 || 112x PASS1 */ | 396 | #endif /* 1250 PASS3 || 112x PASS1 */ |
397 | 397 | ||
398 | /* | 398 | /* |
@@ -412,29 +412,29 @@ | |||
412 | * on each channel. | 412 | * on each channel. |
413 | */ | 413 | */ |
414 | 414 | ||
415 | #define S_MAC_RX_CH0 _SB_MAKE64(0) | 415 | #define S_MAC_RX_CH0 _SB_MAKE64(0) |
416 | #define S_MAC_RX_CH1 _SB_MAKE64(8) | 416 | #define S_MAC_RX_CH1 _SB_MAKE64(8) |
417 | #define S_MAC_TX_CH0 _SB_MAKE64(16) | 417 | #define S_MAC_TX_CH0 _SB_MAKE64(16) |
418 | #define S_MAC_TX_CH1 _SB_MAKE64(24) | 418 | #define S_MAC_TX_CH1 _SB_MAKE64(24) |
419 | 419 | ||
420 | #define S_MAC_TXCHANNELS _SB_MAKE64(16) /* this is 1st TX chan */ | 420 | #define S_MAC_TXCHANNELS _SB_MAKE64(16) /* this is 1st TX chan */ |
421 | #define S_MAC_CHANWIDTH _SB_MAKE64(8) /* bits between channels */ | 421 | #define S_MAC_CHANWIDTH _SB_MAKE64(8) /* bits between channels */ |
422 | 422 | ||
423 | /* | 423 | /* |
424 | * These are the same as RX channel 0. The idea here | 424 | * These are the same as RX channel 0. The idea here |
425 | * is that you'll use one of the "S_" things above | 425 | * is that you'll use one of the "S_" things above |
426 | * and pass just the six bits to a DMA-channel-specific ISR | 426 | * and pass just the six bits to a DMA-channel-specific ISR |
427 | */ | 427 | */ |
428 | #define M_MAC_INT_CHANNEL _SB_MAKEMASK(8, 0) | 428 | #define M_MAC_INT_CHANNEL _SB_MAKEMASK(8, 0) |
429 | #define M_MAC_INT_EOP_COUNT _SB_MAKEMASK1(0) | 429 | #define M_MAC_INT_EOP_COUNT _SB_MAKEMASK1(0) |
430 | #define M_MAC_INT_EOP_TIMER _SB_MAKEMASK1(1) | 430 | #define M_MAC_INT_EOP_TIMER _SB_MAKEMASK1(1) |
431 | #define M_MAC_INT_EOP_SEEN _SB_MAKEMASK1(2) | 431 | #define M_MAC_INT_EOP_SEEN _SB_MAKEMASK1(2) |
432 | #define M_MAC_INT_HWM _SB_MAKEMASK1(3) | 432 | #define M_MAC_INT_HWM _SB_MAKEMASK1(3) |
433 | #define M_MAC_INT_LWM _SB_MAKEMASK1(4) | 433 | #define M_MAC_INT_LWM _SB_MAKEMASK1(4) |
434 | #define M_MAC_INT_DSCR _SB_MAKEMASK1(5) | 434 | #define M_MAC_INT_DSCR _SB_MAKEMASK1(5) |
435 | #define M_MAC_INT_ERR _SB_MAKEMASK1(6) | 435 | #define M_MAC_INT_ERR _SB_MAKEMASK1(6) |
436 | #define M_MAC_INT_DZERO _SB_MAKEMASK1(7) /* only for TX channels */ | 436 | #define M_MAC_INT_DZERO _SB_MAKEMASK1(7) /* only for TX channels */ |
437 | #define M_MAC_INT_DROP _SB_MAKEMASK1(7) /* only for RX channels */ | 437 | #define M_MAC_INT_DROP _SB_MAKEMASK1(7) /* only for RX channels */ |
438 | 438 | ||
439 | /* | 439 | /* |
440 | * In the following definitions we use ch (0/1) and txrx (TX=1, RX=0, see | 440 | * In the following definitions we use ch (0/1) and txrx (TX=1, RX=0, see |
@@ -442,34 +442,34 @@ | |||
442 | */ | 442 | */ |
443 | #define S_MAC_STATUS_CH_OFFSET(ch, txrx) _SB_MAKE64(((ch) + 2 * (txrx)) * S_MAC_CHANWIDTH) | 443 | #define S_MAC_STATUS_CH_OFFSET(ch, txrx) _SB_MAKE64(((ch) + 2 * (txrx)) * S_MAC_CHANWIDTH) |
444 | 444 | ||
445 | #define M_MAC_STATUS_CHANNEL(ch, txrx) _SB_MAKEVALUE(_SB_MAKEMASK(8, 0), S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 445 | #define M_MAC_STATUS_CHANNEL(ch, txrx) _SB_MAKEVALUE(_SB_MAKEMASK(8, 0), S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
446 | #define M_MAC_STATUS_EOP_COUNT(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_COUNT, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 446 | #define M_MAC_STATUS_EOP_COUNT(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_COUNT, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
447 | #define M_MAC_STATUS_EOP_TIMER(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_TIMER, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 447 | #define M_MAC_STATUS_EOP_TIMER(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_TIMER, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
448 | #define M_MAC_STATUS_EOP_SEEN(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_SEEN, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 448 | #define M_MAC_STATUS_EOP_SEEN(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_EOP_SEEN, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
449 | #define M_MAC_STATUS_HWM(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_HWM, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 449 | #define M_MAC_STATUS_HWM(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_HWM, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
450 | #define M_MAC_STATUS_LWM(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_LWM, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 450 | #define M_MAC_STATUS_LWM(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_LWM, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
451 | #define M_MAC_STATUS_DSCR(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DSCR, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 451 | #define M_MAC_STATUS_DSCR(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DSCR, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
452 | #define M_MAC_STATUS_ERR(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_ERR, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 452 | #define M_MAC_STATUS_ERR(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_ERR, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
453 | #define M_MAC_STATUS_DZERO(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DZERO, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 453 | #define M_MAC_STATUS_DZERO(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DZERO, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
454 | #define M_MAC_STATUS_DROP(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DROP, S_MAC_STATUS_CH_OFFSET(ch, txrx)) | 454 | #define M_MAC_STATUS_DROP(ch, txrx) _SB_MAKEVALUE(M_MAC_INT_DROP, S_MAC_STATUS_CH_OFFSET(ch, txrx)) |
455 | #define M_MAC_STATUS_OTHER_ERR _SB_MAKEVALUE(_SB_MAKEMASK(7, 0), 40) | 455 | #define M_MAC_STATUS_OTHER_ERR _SB_MAKEVALUE(_SB_MAKEMASK(7, 0), 40) |
456 | 456 | ||
457 | 457 | ||
458 | #define M_MAC_RX_UNDRFL _SB_MAKEMASK1(40) | 458 | #define M_MAC_RX_UNDRFL _SB_MAKEMASK1(40) |
459 | #define M_MAC_RX_OVRFL _SB_MAKEMASK1(41) | 459 | #define M_MAC_RX_OVRFL _SB_MAKEMASK1(41) |
460 | #define M_MAC_TX_UNDRFL _SB_MAKEMASK1(42) | 460 | #define M_MAC_TX_UNDRFL _SB_MAKEMASK1(42) |
461 | #define M_MAC_TX_OVRFL _SB_MAKEMASK1(43) | 461 | #define M_MAC_TX_OVRFL _SB_MAKEMASK1(43) |
462 | #define M_MAC_LTCOL_ERR _SB_MAKEMASK1(44) | 462 | #define M_MAC_LTCOL_ERR _SB_MAKEMASK1(44) |
463 | #define M_MAC_EXCOL_ERR _SB_MAKEMASK1(45) | 463 | #define M_MAC_EXCOL_ERR _SB_MAKEMASK1(45) |
464 | #define M_MAC_CNTR_OVRFL_ERR _SB_MAKEMASK1(46) | 464 | #define M_MAC_CNTR_OVRFL_ERR _SB_MAKEMASK1(46) |
465 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 465 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
466 | #define M_MAC_SPLIT_EN _SB_MAKEMASK1(47) /* interrupt mask only */ | 466 | #define M_MAC_SPLIT_EN _SB_MAKEMASK1(47) /* interrupt mask only */ |
467 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 467 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
468 | 468 | ||
469 | #define S_MAC_COUNTER_ADDR _SB_MAKE64(47) | 469 | #define S_MAC_COUNTER_ADDR _SB_MAKE64(47) |
470 | #define M_MAC_COUNTER_ADDR _SB_MAKEMASK(5, S_MAC_COUNTER_ADDR) | 470 | #define M_MAC_COUNTER_ADDR _SB_MAKEMASK(5, S_MAC_COUNTER_ADDR) |
471 | #define V_MAC_COUNTER_ADDR(x) _SB_MAKEVALUE(x, S_MAC_COUNTER_ADDR) | 471 | #define V_MAC_COUNTER_ADDR(x) _SB_MAKEVALUE(x, S_MAC_COUNTER_ADDR) |
472 | #define G_MAC_COUNTER_ADDR(x) _SB_GETVALUE(x, S_MAC_COUNTER_ADDR, M_MAC_COUNTER_ADDR) | 472 | #define G_MAC_COUNTER_ADDR(x) _SB_GETVALUE(x, S_MAC_COUNTER_ADDR, M_MAC_COUNTER_ADDR) |
473 | 473 | ||
474 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 474 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
475 | #define M_MAC_TX_PAUSE_ON _SB_MAKEMASK1(52) | 475 | #define M_MAC_TX_PAUSE_ON _SB_MAKEMASK1(52) |
@@ -482,42 +482,42 @@ | |||
482 | * Register: MAC_FIFO_PTRS_2 | 482 | * Register: MAC_FIFO_PTRS_2 |
483 | */ | 483 | */ |
484 | 484 | ||
485 | #define S_MAC_TX_WRPTR _SB_MAKE64(0) | 485 | #define S_MAC_TX_WRPTR _SB_MAKE64(0) |
486 | #define M_MAC_TX_WRPTR _SB_MAKEMASK(6, S_MAC_TX_WRPTR) | 486 | #define M_MAC_TX_WRPTR _SB_MAKEMASK(6, S_MAC_TX_WRPTR) |
487 | #define V_MAC_TX_WRPTR(x) _SB_MAKEVALUE(x, S_MAC_TX_WRPTR) | 487 | #define V_MAC_TX_WRPTR(x) _SB_MAKEVALUE(x, S_MAC_TX_WRPTR) |
488 | #define G_MAC_TX_WRPTR(x) _SB_GETVALUE(x, S_MAC_TX_WRPTR, M_MAC_TX_WRPTR) | 488 | #define G_MAC_TX_WRPTR(x) _SB_GETVALUE(x, S_MAC_TX_WRPTR, M_MAC_TX_WRPTR) |
489 | 489 | ||
490 | #define S_MAC_TX_RDPTR _SB_MAKE64(8) | 490 | #define S_MAC_TX_RDPTR _SB_MAKE64(8) |
491 | #define M_MAC_TX_RDPTR _SB_MAKEMASK(6, S_MAC_TX_RDPTR) | 491 | #define M_MAC_TX_RDPTR _SB_MAKEMASK(6, S_MAC_TX_RDPTR) |
492 | #define V_MAC_TX_RDPTR(x) _SB_MAKEVALUE(x, S_MAC_TX_RDPTR) | 492 | #define V_MAC_TX_RDPTR(x) _SB_MAKEVALUE(x, S_MAC_TX_RDPTR) |
493 | #define G_MAC_TX_RDPTR(x) _SB_GETVALUE(x, S_MAC_TX_RDPTR, M_MAC_TX_RDPTR) | 493 | #define G_MAC_TX_RDPTR(x) _SB_GETVALUE(x, S_MAC_TX_RDPTR, M_MAC_TX_RDPTR) |
494 | 494 | ||
495 | #define S_MAC_RX_WRPTR _SB_MAKE64(16) | 495 | #define S_MAC_RX_WRPTR _SB_MAKE64(16) |
496 | #define M_MAC_RX_WRPTR _SB_MAKEMASK(6, S_MAC_RX_WRPTR) | 496 | #define M_MAC_RX_WRPTR _SB_MAKEMASK(6, S_MAC_RX_WRPTR) |
497 | #define V_MAC_RX_WRPTR(x) _SB_MAKEVALUE(x, S_MAC_RX_WRPTR) | 497 | #define V_MAC_RX_WRPTR(x) _SB_MAKEVALUE(x, S_MAC_RX_WRPTR) |
498 | #define G_MAC_RX_WRPTR(x) _SB_GETVALUE(x, S_MAC_RX_WRPTR, M_MAC_TX_WRPTR) | 498 | #define G_MAC_RX_WRPTR(x) _SB_GETVALUE(x, S_MAC_RX_WRPTR, M_MAC_TX_WRPTR) |
499 | 499 | ||
500 | #define S_MAC_RX_RDPTR _SB_MAKE64(24) | 500 | #define S_MAC_RX_RDPTR _SB_MAKE64(24) |
501 | #define M_MAC_RX_RDPTR _SB_MAKEMASK(6, S_MAC_RX_RDPTR) | 501 | #define M_MAC_RX_RDPTR _SB_MAKEMASK(6, S_MAC_RX_RDPTR) |
502 | #define V_MAC_RX_RDPTR(x) _SB_MAKEVALUE(x, S_MAC_RX_RDPTR) | 502 | #define V_MAC_RX_RDPTR(x) _SB_MAKEVALUE(x, S_MAC_RX_RDPTR) |
503 | #define G_MAC_RX_RDPTR(x) _SB_GETVALUE(x, S_MAC_RX_RDPTR, M_MAC_TX_RDPTR) | 503 | #define G_MAC_RX_RDPTR(x) _SB_GETVALUE(x, S_MAC_RX_RDPTR, M_MAC_TX_RDPTR) |
504 | 504 | ||
505 | /* | 505 | /* |
506 | * MAC Fifo End Of Packet Count Registers (Table 9-20) [Debug register] | 506 | * MAC Fifo End Of Packet Count Registers (Table 9-20) [Debug register] |
507 | * Register: MAC_EOPCNT_0 | 507 | * Register: MAC_EOPCNT_0 |
508 | * Register: MAC_EOPCNT_1 | 508 | * Register: MAC_EOPCNT_1 |
509 | * Register: MAC_EOPCNT_2 | 509 | * Register: MAC_EOPCNT_2 |
510 | */ | 510 | */ |
511 | 511 | ||
512 | #define S_MAC_TX_EOP_COUNTER _SB_MAKE64(0) | 512 | #define S_MAC_TX_EOP_COUNTER _SB_MAKE64(0) |
513 | #define M_MAC_TX_EOP_COUNTER _SB_MAKEMASK(6, S_MAC_TX_EOP_COUNTER) | 513 | #define M_MAC_TX_EOP_COUNTER _SB_MAKEMASK(6, S_MAC_TX_EOP_COUNTER) |
514 | #define V_MAC_TX_EOP_COUNTER(x) _SB_MAKEVALUE(x, S_MAC_TX_EOP_COUNTER) | 514 | #define V_MAC_TX_EOP_COUNTER(x) _SB_MAKEVALUE(x, S_MAC_TX_EOP_COUNTER) |
515 | #define G_MAC_TX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_TX_EOP_COUNTER, M_MAC_TX_EOP_COUNTER) | 515 | #define G_MAC_TX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_TX_EOP_COUNTER, M_MAC_TX_EOP_COUNTER) |
516 | 516 | ||
517 | #define S_MAC_RX_EOP_COUNTER _SB_MAKE64(8) | 517 | #define S_MAC_RX_EOP_COUNTER _SB_MAKE64(8) |
518 | #define M_MAC_RX_EOP_COUNTER _SB_MAKEMASK(6, S_MAC_RX_EOP_COUNTER) | 518 | #define M_MAC_RX_EOP_COUNTER _SB_MAKEMASK(6, S_MAC_RX_EOP_COUNTER) |
519 | #define V_MAC_RX_EOP_COUNTER(x) _SB_MAKEVALUE(x, S_MAC_RX_EOP_COUNTER) | 519 | #define V_MAC_RX_EOP_COUNTER(x) _SB_MAKEVALUE(x, S_MAC_RX_EOP_COUNTER) |
520 | #define G_MAC_RX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_RX_EOP_COUNTER, M_MAC_RX_EOP_COUNTER) | 520 | #define G_MAC_RX_EOP_COUNTER(x) _SB_GETVALUE(x, S_MAC_RX_EOP_COUNTER, M_MAC_RX_EOP_COUNTER) |
521 | 521 | ||
522 | /* | 522 | /* |
523 | * MAC Receive Address Filter Exact Match Registers (Table 9-21) | 523 | * MAC Receive Address Filter Exact Match Registers (Table 9-21) |
@@ -562,27 +562,27 @@ | |||
562 | * Register: MAC_TYPE_CFG_2 | 562 | * Register: MAC_TYPE_CFG_2 |
563 | */ | 563 | */ |
564 | 564 | ||
565 | #define S_TYPECFG_TYPESIZE _SB_MAKE64(16) | 565 | #define S_TYPECFG_TYPESIZE _SB_MAKE64(16) |
566 | 566 | ||
567 | #define S_TYPECFG_TYPE0 _SB_MAKE64(0) | 567 | #define S_TYPECFG_TYPE0 _SB_MAKE64(0) |
568 | #define M_TYPECFG_TYPE0 _SB_MAKEMASK(16, S_TYPECFG_TYPE0) | 568 | #define M_TYPECFG_TYPE0 _SB_MAKEMASK(16, S_TYPECFG_TYPE0) |
569 | #define V_TYPECFG_TYPE0(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE0) | 569 | #define V_TYPECFG_TYPE0(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE0) |
570 | #define G_TYPECFG_TYPE0(x) _SB_GETVALUE(x, S_TYPECFG_TYPE0, M_TYPECFG_TYPE0) | 570 | #define G_TYPECFG_TYPE0(x) _SB_GETVALUE(x, S_TYPECFG_TYPE0, M_TYPECFG_TYPE0) |
571 | 571 | ||
572 | #define S_TYPECFG_TYPE1 _SB_MAKE64(0) | 572 | #define S_TYPECFG_TYPE1 _SB_MAKE64(0) |
573 | #define M_TYPECFG_TYPE1 _SB_MAKEMASK(16, S_TYPECFG_TYPE1) | 573 | #define M_TYPECFG_TYPE1 _SB_MAKEMASK(16, S_TYPECFG_TYPE1) |
574 | #define V_TYPECFG_TYPE1(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE1) | 574 | #define V_TYPECFG_TYPE1(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE1) |
575 | #define G_TYPECFG_TYPE1(x) _SB_GETVALUE(x, S_TYPECFG_TYPE1, M_TYPECFG_TYPE1) | 575 | #define G_TYPECFG_TYPE1(x) _SB_GETVALUE(x, S_TYPECFG_TYPE1, M_TYPECFG_TYPE1) |
576 | 576 | ||
577 | #define S_TYPECFG_TYPE2 _SB_MAKE64(0) | 577 | #define S_TYPECFG_TYPE2 _SB_MAKE64(0) |
578 | #define M_TYPECFG_TYPE2 _SB_MAKEMASK(16, S_TYPECFG_TYPE2) | 578 | #define M_TYPECFG_TYPE2 _SB_MAKEMASK(16, S_TYPECFG_TYPE2) |
579 | #define V_TYPECFG_TYPE2(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE2) | 579 | #define V_TYPECFG_TYPE2(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE2) |
580 | #define G_TYPECFG_TYPE2(x) _SB_GETVALUE(x, S_TYPECFG_TYPE2, M_TYPECFG_TYPE2) | 580 | #define G_TYPECFG_TYPE2(x) _SB_GETVALUE(x, S_TYPECFG_TYPE2, M_TYPECFG_TYPE2) |
581 | 581 | ||
582 | #define S_TYPECFG_TYPE3 _SB_MAKE64(0) | 582 | #define S_TYPECFG_TYPE3 _SB_MAKE64(0) |
583 | #define M_TYPECFG_TYPE3 _SB_MAKEMASK(16, S_TYPECFG_TYPE3) | 583 | #define M_TYPECFG_TYPE3 _SB_MAKEMASK(16, S_TYPECFG_TYPE3) |
584 | #define V_TYPECFG_TYPE3(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE3) | 584 | #define V_TYPECFG_TYPE3(x) _SB_MAKEVALUE(x, S_TYPECFG_TYPE3) |
585 | #define G_TYPECFG_TYPE3(x) _SB_GETVALUE(x, S_TYPECFG_TYPE3, M_TYPECFG_TYPE3) | 585 | #define G_TYPECFG_TYPE3(x) _SB_GETVALUE(x, S_TYPECFG_TYPE3, M_TYPECFG_TYPE3) |
586 | 586 | ||
587 | /* | 587 | /* |
588 | * MAC Receive Address Filter Control Registers (Table 9-24) | 588 | * MAC Receive Address Filter Control Registers (Table 9-24) |
@@ -591,38 +591,38 @@ | |||
591 | * Register: MAC_ADFILTER_CFG_2 | 591 | * Register: MAC_ADFILTER_CFG_2 |
592 | */ | 592 | */ |
593 | 593 | ||
594 | #define M_MAC_ALLPKT_EN _SB_MAKEMASK1(0) | 594 | #define M_MAC_ALLPKT_EN _SB_MAKEMASK1(0) |
595 | #define M_MAC_UCAST_EN _SB_MAKEMASK1(1) | 595 | #define M_MAC_UCAST_EN _SB_MAKEMASK1(1) |
596 | #define M_MAC_UCAST_INV _SB_MAKEMASK1(2) | 596 | #define M_MAC_UCAST_INV _SB_MAKEMASK1(2) |
597 | #define M_MAC_MCAST_EN _SB_MAKEMASK1(3) | 597 | #define M_MAC_MCAST_EN _SB_MAKEMASK1(3) |
598 | #define M_MAC_MCAST_INV _SB_MAKEMASK1(4) | 598 | #define M_MAC_MCAST_INV _SB_MAKEMASK1(4) |
599 | #define M_MAC_BCAST_EN _SB_MAKEMASK1(5) | 599 | #define M_MAC_BCAST_EN _SB_MAKEMASK1(5) |
600 | #define M_MAC_DIRECT_INV _SB_MAKEMASK1(6) | 600 | #define M_MAC_DIRECT_INV _SB_MAKEMASK1(6) |
601 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 601 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
602 | #define M_MAC_ALLMCAST_EN _SB_MAKEMASK1(7) | 602 | #define M_MAC_ALLMCAST_EN _SB_MAKEMASK1(7) |
603 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 603 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
604 | 604 | ||
605 | #define S_MAC_IPHDR_OFFSET _SB_MAKE64(8) | 605 | #define S_MAC_IPHDR_OFFSET _SB_MAKE64(8) |
606 | #define M_MAC_IPHDR_OFFSET _SB_MAKEMASK(8, S_MAC_IPHDR_OFFSET) | 606 | #define M_MAC_IPHDR_OFFSET _SB_MAKEMASK(8, S_MAC_IPHDR_OFFSET) |
607 | #define V_MAC_IPHDR_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_IPHDR_OFFSET) | 607 | #define V_MAC_IPHDR_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_IPHDR_OFFSET) |
608 | #define G_MAC_IPHDR_OFFSET(x) _SB_GETVALUE(x, S_MAC_IPHDR_OFFSET, M_MAC_IPHDR_OFFSET) | 608 | #define G_MAC_IPHDR_OFFSET(x) _SB_GETVALUE(x, S_MAC_IPHDR_OFFSET, M_MAC_IPHDR_OFFSET) |
609 | 609 | ||
610 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 610 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
611 | #define S_MAC_RX_CRC_OFFSET _SB_MAKE64(16) | 611 | #define S_MAC_RX_CRC_OFFSET _SB_MAKE64(16) |
612 | #define M_MAC_RX_CRC_OFFSET _SB_MAKEMASK(8, S_MAC_RX_CRC_OFFSET) | 612 | #define M_MAC_RX_CRC_OFFSET _SB_MAKEMASK(8, S_MAC_RX_CRC_OFFSET) |
613 | #define V_MAC_RX_CRC_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_RX_CRC_OFFSET) | 613 | #define V_MAC_RX_CRC_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_RX_CRC_OFFSET) |
614 | #define G_MAC_RX_CRC_OFFSET(x) _SB_GETVALUE(x, S_MAC_RX_CRC_OFFSET, M_MAC_RX_CRC_OFFSET) | 614 | #define G_MAC_RX_CRC_OFFSET(x) _SB_GETVALUE(x, S_MAC_RX_CRC_OFFSET, M_MAC_RX_CRC_OFFSET) |
615 | 615 | ||
616 | #define S_MAC_RX_PKT_OFFSET _SB_MAKE64(24) | 616 | #define S_MAC_RX_PKT_OFFSET _SB_MAKE64(24) |
617 | #define M_MAC_RX_PKT_OFFSET _SB_MAKEMASK(8, S_MAC_RX_PKT_OFFSET) | 617 | #define M_MAC_RX_PKT_OFFSET _SB_MAKEMASK(8, S_MAC_RX_PKT_OFFSET) |
618 | #define V_MAC_RX_PKT_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_RX_PKT_OFFSET) | 618 | #define V_MAC_RX_PKT_OFFSET(x) _SB_MAKEVALUE(x, S_MAC_RX_PKT_OFFSET) |
619 | #define G_MAC_RX_PKT_OFFSET(x) _SB_GETVALUE(x, S_MAC_RX_PKT_OFFSET, M_MAC_RX_PKT_OFFSET) | 619 | #define G_MAC_RX_PKT_OFFSET(x) _SB_GETVALUE(x, S_MAC_RX_PKT_OFFSET, M_MAC_RX_PKT_OFFSET) |
620 | 620 | ||
621 | #define M_MAC_FWDPAUSE_EN _SB_MAKEMASK1(32) | 621 | #define M_MAC_FWDPAUSE_EN _SB_MAKEMASK1(32) |
622 | #define M_MAC_VLAN_DET_EN _SB_MAKEMASK1(33) | 622 | #define M_MAC_VLAN_DET_EN _SB_MAKEMASK1(33) |
623 | 623 | ||
624 | #define S_MAC_RX_CH_MSN_SEL _SB_MAKE64(34) | 624 | #define S_MAC_RX_CH_MSN_SEL _SB_MAKE64(34) |
625 | #define M_MAC_RX_CH_MSN_SEL _SB_MAKEMASK(8, S_MAC_RX_CH_MSN_SEL) | 625 | #define M_MAC_RX_CH_MSN_SEL _SB_MAKEMASK(8, S_MAC_RX_CH_MSN_SEL) |
626 | #define V_MAC_RX_CH_MSN_SEL(x) _SB_MAKEVALUE(x, S_MAC_RX_CH_MSN_SEL) | 626 | #define V_MAC_RX_CH_MSN_SEL(x) _SB_MAKEVALUE(x, S_MAC_RX_CH_MSN_SEL) |
627 | #define G_MAC_RX_CH_MSN_SEL(x) _SB_GETVALUE(x, S_MAC_RX_CH_MSN_SEL, M_MAC_RX_CH_MSN_SEL) | 627 | #define G_MAC_RX_CH_MSN_SEL(x) _SB_GETVALUE(x, S_MAC_RX_CH_MSN_SEL, M_MAC_RX_CH_MSN_SEL) |
628 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 628 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
diff --git a/arch/mips/include/asm/sibyte/sb1250_mc.h b/arch/mips/include/asm/sibyte/sb1250_mc.h index 15048dcaf22f..8368e411131f 100644 --- a/arch/mips/include/asm/sibyte/sb1250_mc.h +++ b/arch/mips/include/asm/sibyte/sb1250_mc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Memory Controller constants File: sb1250_mc.h | 4 | * Memory Controller constants File: sb1250_mc.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * programming the memory controller. | 7 | * programming the memory controller. |
@@ -39,96 +39,96 @@ | |||
39 | * Memory Channel Config Register (table 6-14) | 39 | * Memory Channel Config Register (table 6-14) |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define S_MC_RESERVED0 0 | 42 | #define S_MC_RESERVED0 0 |
43 | #define M_MC_RESERVED0 _SB_MAKEMASK(8, S_MC_RESERVED0) | 43 | #define M_MC_RESERVED0 _SB_MAKEMASK(8, S_MC_RESERVED0) |
44 | 44 | ||
45 | #define S_MC_CHANNEL_SEL 8 | 45 | #define S_MC_CHANNEL_SEL 8 |
46 | #define M_MC_CHANNEL_SEL _SB_MAKEMASK(8, S_MC_CHANNEL_SEL) | 46 | #define M_MC_CHANNEL_SEL _SB_MAKEMASK(8, S_MC_CHANNEL_SEL) |
47 | #define V_MC_CHANNEL_SEL(x) _SB_MAKEVALUE(x, S_MC_CHANNEL_SEL) | 47 | #define V_MC_CHANNEL_SEL(x) _SB_MAKEVALUE(x, S_MC_CHANNEL_SEL) |
48 | #define G_MC_CHANNEL_SEL(x) _SB_GETVALUE(x, S_MC_CHANNEL_SEL, M_MC_CHANNEL_SEL) | 48 | #define G_MC_CHANNEL_SEL(x) _SB_GETVALUE(x, S_MC_CHANNEL_SEL, M_MC_CHANNEL_SEL) |
49 | 49 | ||
50 | #define S_MC_BANK0_MAP 16 | 50 | #define S_MC_BANK0_MAP 16 |
51 | #define M_MC_BANK0_MAP _SB_MAKEMASK(4, S_MC_BANK0_MAP) | 51 | #define M_MC_BANK0_MAP _SB_MAKEMASK(4, S_MC_BANK0_MAP) |
52 | #define V_MC_BANK0_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK0_MAP) | 52 | #define V_MC_BANK0_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK0_MAP) |
53 | #define G_MC_BANK0_MAP(x) _SB_GETVALUE(x, S_MC_BANK0_MAP, M_MC_BANK0_MAP) | 53 | #define G_MC_BANK0_MAP(x) _SB_GETVALUE(x, S_MC_BANK0_MAP, M_MC_BANK0_MAP) |
54 | 54 | ||
55 | #define K_MC_BANK0_MAP_DEFAULT 0x00 | 55 | #define K_MC_BANK0_MAP_DEFAULT 0x00 |
56 | #define V_MC_BANK0_MAP_DEFAULT V_MC_BANK0_MAP(K_MC_BANK0_MAP_DEFAULT) | 56 | #define V_MC_BANK0_MAP_DEFAULT V_MC_BANK0_MAP(K_MC_BANK0_MAP_DEFAULT) |
57 | 57 | ||
58 | #define S_MC_BANK1_MAP 20 | 58 | #define S_MC_BANK1_MAP 20 |
59 | #define M_MC_BANK1_MAP _SB_MAKEMASK(4, S_MC_BANK1_MAP) | 59 | #define M_MC_BANK1_MAP _SB_MAKEMASK(4, S_MC_BANK1_MAP) |
60 | #define V_MC_BANK1_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK1_MAP) | 60 | #define V_MC_BANK1_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK1_MAP) |
61 | #define G_MC_BANK1_MAP(x) _SB_GETVALUE(x, S_MC_BANK1_MAP, M_MC_BANK1_MAP) | 61 | #define G_MC_BANK1_MAP(x) _SB_GETVALUE(x, S_MC_BANK1_MAP, M_MC_BANK1_MAP) |
62 | 62 | ||
63 | #define K_MC_BANK1_MAP_DEFAULT 0x08 | 63 | #define K_MC_BANK1_MAP_DEFAULT 0x08 |
64 | #define V_MC_BANK1_MAP_DEFAULT V_MC_BANK1_MAP(K_MC_BANK1_MAP_DEFAULT) | 64 | #define V_MC_BANK1_MAP_DEFAULT V_MC_BANK1_MAP(K_MC_BANK1_MAP_DEFAULT) |
65 | 65 | ||
66 | #define S_MC_BANK2_MAP 24 | 66 | #define S_MC_BANK2_MAP 24 |
67 | #define M_MC_BANK2_MAP _SB_MAKEMASK(4, S_MC_BANK2_MAP) | 67 | #define M_MC_BANK2_MAP _SB_MAKEMASK(4, S_MC_BANK2_MAP) |
68 | #define V_MC_BANK2_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK2_MAP) | 68 | #define V_MC_BANK2_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK2_MAP) |
69 | #define G_MC_BANK2_MAP(x) _SB_GETVALUE(x, S_MC_BANK2_MAP, M_MC_BANK2_MAP) | 69 | #define G_MC_BANK2_MAP(x) _SB_GETVALUE(x, S_MC_BANK2_MAP, M_MC_BANK2_MAP) |
70 | 70 | ||
71 | #define K_MC_BANK2_MAP_DEFAULT 0x09 | 71 | #define K_MC_BANK2_MAP_DEFAULT 0x09 |
72 | #define V_MC_BANK2_MAP_DEFAULT V_MC_BANK2_MAP(K_MC_BANK2_MAP_DEFAULT) | 72 | #define V_MC_BANK2_MAP_DEFAULT V_MC_BANK2_MAP(K_MC_BANK2_MAP_DEFAULT) |
73 | 73 | ||
74 | #define S_MC_BANK3_MAP 28 | 74 | #define S_MC_BANK3_MAP 28 |
75 | #define M_MC_BANK3_MAP _SB_MAKEMASK(4, S_MC_BANK3_MAP) | 75 | #define M_MC_BANK3_MAP _SB_MAKEMASK(4, S_MC_BANK3_MAP) |
76 | #define V_MC_BANK3_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK3_MAP) | 76 | #define V_MC_BANK3_MAP(x) _SB_MAKEVALUE(x, S_MC_BANK3_MAP) |
77 | #define G_MC_BANK3_MAP(x) _SB_GETVALUE(x, S_MC_BANK3_MAP, M_MC_BANK3_MAP) | 77 | #define G_MC_BANK3_MAP(x) _SB_GETVALUE(x, S_MC_BANK3_MAP, M_MC_BANK3_MAP) |
78 | 78 | ||
79 | #define K_MC_BANK3_MAP_DEFAULT 0x0C | 79 | #define K_MC_BANK3_MAP_DEFAULT 0x0C |
80 | #define V_MC_BANK3_MAP_DEFAULT V_MC_BANK3_MAP(K_MC_BANK3_MAP_DEFAULT) | 80 | #define V_MC_BANK3_MAP_DEFAULT V_MC_BANK3_MAP(K_MC_BANK3_MAP_DEFAULT) |
81 | 81 | ||
82 | #define M_MC_RESERVED1 _SB_MAKEMASK(8, 32) | 82 | #define M_MC_RESERVED1 _SB_MAKEMASK(8, 32) |
83 | 83 | ||
84 | #define S_MC_QUEUE_SIZE 40 | 84 | #define S_MC_QUEUE_SIZE 40 |
85 | #define M_MC_QUEUE_SIZE _SB_MAKEMASK(4, S_MC_QUEUE_SIZE) | 85 | #define M_MC_QUEUE_SIZE _SB_MAKEMASK(4, S_MC_QUEUE_SIZE) |
86 | #define V_MC_QUEUE_SIZE(x) _SB_MAKEVALUE(x, S_MC_QUEUE_SIZE) | 86 | #define V_MC_QUEUE_SIZE(x) _SB_MAKEVALUE(x, S_MC_QUEUE_SIZE) |
87 | #define G_MC_QUEUE_SIZE(x) _SB_GETVALUE(x, S_MC_QUEUE_SIZE, M_MC_QUEUE_SIZE) | 87 | #define G_MC_QUEUE_SIZE(x) _SB_GETVALUE(x, S_MC_QUEUE_SIZE, M_MC_QUEUE_SIZE) |
88 | #define V_MC_QUEUE_SIZE_DEFAULT V_MC_QUEUE_SIZE(0x0A) | 88 | #define V_MC_QUEUE_SIZE_DEFAULT V_MC_QUEUE_SIZE(0x0A) |
89 | 89 | ||
90 | #define S_MC_AGE_LIMIT 44 | 90 | #define S_MC_AGE_LIMIT 44 |
91 | #define M_MC_AGE_LIMIT _SB_MAKEMASK(4, S_MC_AGE_LIMIT) | 91 | #define M_MC_AGE_LIMIT _SB_MAKEMASK(4, S_MC_AGE_LIMIT) |
92 | #define V_MC_AGE_LIMIT(x) _SB_MAKEVALUE(x, S_MC_AGE_LIMIT) | 92 | #define V_MC_AGE_LIMIT(x) _SB_MAKEVALUE(x, S_MC_AGE_LIMIT) |
93 | #define G_MC_AGE_LIMIT(x) _SB_GETVALUE(x, S_MC_AGE_LIMIT, M_MC_AGE_LIMIT) | 93 | #define G_MC_AGE_LIMIT(x) _SB_GETVALUE(x, S_MC_AGE_LIMIT, M_MC_AGE_LIMIT) |
94 | #define V_MC_AGE_LIMIT_DEFAULT V_MC_AGE_LIMIT(8) | 94 | #define V_MC_AGE_LIMIT_DEFAULT V_MC_AGE_LIMIT(8) |
95 | 95 | ||
96 | #define S_MC_WR_LIMIT 48 | 96 | #define S_MC_WR_LIMIT 48 |
97 | #define M_MC_WR_LIMIT _SB_MAKEMASK(4, S_MC_WR_LIMIT) | 97 | #define M_MC_WR_LIMIT _SB_MAKEMASK(4, S_MC_WR_LIMIT) |
98 | #define V_MC_WR_LIMIT(x) _SB_MAKEVALUE(x, S_MC_WR_LIMIT) | 98 | #define V_MC_WR_LIMIT(x) _SB_MAKEVALUE(x, S_MC_WR_LIMIT) |
99 | #define G_MC_WR_LIMIT(x) _SB_GETVALUE(x, S_MC_WR_LIMIT, M_MC_WR_LIMIT) | 99 | #define G_MC_WR_LIMIT(x) _SB_GETVALUE(x, S_MC_WR_LIMIT, M_MC_WR_LIMIT) |
100 | #define V_MC_WR_LIMIT_DEFAULT V_MC_WR_LIMIT(5) | 100 | #define V_MC_WR_LIMIT_DEFAULT V_MC_WR_LIMIT(5) |
101 | 101 | ||
102 | #define M_MC_IOB1HIGHPRIORITY _SB_MAKEMASK1(52) | 102 | #define M_MC_IOB1HIGHPRIORITY _SB_MAKEMASK1(52) |
103 | 103 | ||
104 | #define M_MC_RESERVED2 _SB_MAKEMASK(3, 53) | 104 | #define M_MC_RESERVED2 _SB_MAKEMASK(3, 53) |
105 | 105 | ||
106 | #define S_MC_CS_MODE 56 | 106 | #define S_MC_CS_MODE 56 |
107 | #define M_MC_CS_MODE _SB_MAKEMASK(4, S_MC_CS_MODE) | 107 | #define M_MC_CS_MODE _SB_MAKEMASK(4, S_MC_CS_MODE) |
108 | #define V_MC_CS_MODE(x) _SB_MAKEVALUE(x, S_MC_CS_MODE) | 108 | #define V_MC_CS_MODE(x) _SB_MAKEVALUE(x, S_MC_CS_MODE) |
109 | #define G_MC_CS_MODE(x) _SB_GETVALUE(x, S_MC_CS_MODE, M_MC_CS_MODE) | 109 | #define G_MC_CS_MODE(x) _SB_GETVALUE(x, S_MC_CS_MODE, M_MC_CS_MODE) |
110 | 110 | ||
111 | #define K_MC_CS_MODE_MSB_CS 0 | 111 | #define K_MC_CS_MODE_MSB_CS 0 |
112 | #define K_MC_CS_MODE_INTLV_CS 15 | 112 | #define K_MC_CS_MODE_INTLV_CS 15 |
113 | #define K_MC_CS_MODE_MIXED_CS_10 12 | 113 | #define K_MC_CS_MODE_MIXED_CS_10 12 |
114 | #define K_MC_CS_MODE_MIXED_CS_30 6 | 114 | #define K_MC_CS_MODE_MIXED_CS_30 6 |
115 | #define K_MC_CS_MODE_MIXED_CS_32 3 | 115 | #define K_MC_CS_MODE_MIXED_CS_32 3 |
116 | 116 | ||
117 | #define V_MC_CS_MODE_MSB_CS V_MC_CS_MODE(K_MC_CS_MODE_MSB_CS) | 117 | #define V_MC_CS_MODE_MSB_CS V_MC_CS_MODE(K_MC_CS_MODE_MSB_CS) |
118 | #define V_MC_CS_MODE_INTLV_CS V_MC_CS_MODE(K_MC_CS_MODE_INTLV_CS) | 118 | #define V_MC_CS_MODE_INTLV_CS V_MC_CS_MODE(K_MC_CS_MODE_INTLV_CS) |
119 | #define V_MC_CS_MODE_MIXED_CS_10 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_10) | 119 | #define V_MC_CS_MODE_MIXED_CS_10 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_10) |
120 | #define V_MC_CS_MODE_MIXED_CS_30 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_30) | 120 | #define V_MC_CS_MODE_MIXED_CS_30 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_30) |
121 | #define V_MC_CS_MODE_MIXED_CS_32 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_32) | 121 | #define V_MC_CS_MODE_MIXED_CS_32 V_MC_CS_MODE(K_MC_CS_MODE_MIXED_CS_32) |
122 | 122 | ||
123 | #define M_MC_ECC_DISABLE _SB_MAKEMASK1(60) | 123 | #define M_MC_ECC_DISABLE _SB_MAKEMASK1(60) |
124 | #define M_MC_BERR_DISABLE _SB_MAKEMASK1(61) | 124 | #define M_MC_BERR_DISABLE _SB_MAKEMASK1(61) |
125 | #define M_MC_FORCE_SEQ _SB_MAKEMASK1(62) | 125 | #define M_MC_FORCE_SEQ _SB_MAKEMASK1(62) |
126 | #define M_MC_DEBUG _SB_MAKEMASK1(63) | 126 | #define M_MC_DEBUG _SB_MAKEMASK1(63) |
127 | 127 | ||
128 | #define V_MC_CONFIG_DEFAULT V_MC_WR_LIMIT_DEFAULT | V_MC_AGE_LIMIT_DEFAULT | \ | 128 | #define V_MC_CONFIG_DEFAULT V_MC_WR_LIMIT_DEFAULT | V_MC_AGE_LIMIT_DEFAULT | \ |
129 | V_MC_BANK0_MAP_DEFAULT | V_MC_BANK1_MAP_DEFAULT | \ | 129 | V_MC_BANK0_MAP_DEFAULT | V_MC_BANK1_MAP_DEFAULT | \ |
130 | V_MC_BANK2_MAP_DEFAULT | V_MC_BANK3_MAP_DEFAULT | V_MC_CHANNEL_SEL(0) | \ | 130 | V_MC_BANK2_MAP_DEFAULT | V_MC_BANK3_MAP_DEFAULT | V_MC_CHANNEL_SEL(0) | \ |
131 | M_MC_IOB1HIGHPRIORITY | V_MC_QUEUE_SIZE_DEFAULT | 131 | M_MC_IOB1HIGHPRIORITY | V_MC_QUEUE_SIZE_DEFAULT |
132 | 132 | ||
133 | 133 | ||
134 | /* | 134 | /* |
@@ -137,96 +137,96 @@ | |||
137 | * Note: this field has been updated to be consistent with the errata to 0.2 | 137 | * Note: this field has been updated to be consistent with the errata to 0.2 |
138 | */ | 138 | */ |
139 | 139 | ||
140 | #define S_MC_CLK_RATIO 0 | 140 | #define S_MC_CLK_RATIO 0 |
141 | #define M_MC_CLK_RATIO _SB_MAKEMASK(4, S_MC_CLK_RATIO) | 141 | #define M_MC_CLK_RATIO _SB_MAKEMASK(4, S_MC_CLK_RATIO) |
142 | #define V_MC_CLK_RATIO(x) _SB_MAKEVALUE(x, S_MC_CLK_RATIO) | 142 | #define V_MC_CLK_RATIO(x) _SB_MAKEVALUE(x, S_MC_CLK_RATIO) |
143 | #define G_MC_CLK_RATIO(x) _SB_GETVALUE(x, S_MC_CLK_RATIO, M_MC_CLK_RATIO) | 143 | #define G_MC_CLK_RATIO(x) _SB_GETVALUE(x, S_MC_CLK_RATIO, M_MC_CLK_RATIO) |
144 | 144 | ||
145 | #define K_MC_CLK_RATIO_2X 4 | 145 | #define K_MC_CLK_RATIO_2X 4 |
146 | #define K_MC_CLK_RATIO_25X 5 | 146 | #define K_MC_CLK_RATIO_25X 5 |
147 | #define K_MC_CLK_RATIO_3X 6 | 147 | #define K_MC_CLK_RATIO_3X 6 |
148 | #define K_MC_CLK_RATIO_35X 7 | 148 | #define K_MC_CLK_RATIO_35X 7 |
149 | #define K_MC_CLK_RATIO_4X 8 | 149 | #define K_MC_CLK_RATIO_4X 8 |
150 | #define K_MC_CLK_RATIO_45X 9 | 150 | #define K_MC_CLK_RATIO_45X 9 |
151 | 151 | ||
152 | #define V_MC_CLK_RATIO_2X V_MC_CLK_RATIO(K_MC_CLK_RATIO_2X) | 152 | #define V_MC_CLK_RATIO_2X V_MC_CLK_RATIO(K_MC_CLK_RATIO_2X) |
153 | #define V_MC_CLK_RATIO_25X V_MC_CLK_RATIO(K_MC_CLK_RATIO_25X) | 153 | #define V_MC_CLK_RATIO_25X V_MC_CLK_RATIO(K_MC_CLK_RATIO_25X) |
154 | #define V_MC_CLK_RATIO_3X V_MC_CLK_RATIO(K_MC_CLK_RATIO_3X) | 154 | #define V_MC_CLK_RATIO_3X V_MC_CLK_RATIO(K_MC_CLK_RATIO_3X) |
155 | #define V_MC_CLK_RATIO_35X V_MC_CLK_RATIO(K_MC_CLK_RATIO_35X) | 155 | #define V_MC_CLK_RATIO_35X V_MC_CLK_RATIO(K_MC_CLK_RATIO_35X) |
156 | #define V_MC_CLK_RATIO_4X V_MC_CLK_RATIO(K_MC_CLK_RATIO_4X) | 156 | #define V_MC_CLK_RATIO_4X V_MC_CLK_RATIO(K_MC_CLK_RATIO_4X) |
157 | #define V_MC_CLK_RATIO_45X V_MC_CLK_RATIO(K_MC_CLK_RATIO_45X) | 157 | #define V_MC_CLK_RATIO_45X V_MC_CLK_RATIO(K_MC_CLK_RATIO_45X) |
158 | #define V_MC_CLK_RATIO_DEFAULT V_MC_CLK_RATIO_25X | 158 | #define V_MC_CLK_RATIO_DEFAULT V_MC_CLK_RATIO_25X |
159 | 159 | ||
160 | #define S_MC_REF_RATE 8 | 160 | #define S_MC_REF_RATE 8 |
161 | #define M_MC_REF_RATE _SB_MAKEMASK(8, S_MC_REF_RATE) | 161 | #define M_MC_REF_RATE _SB_MAKEMASK(8, S_MC_REF_RATE) |
162 | #define V_MC_REF_RATE(x) _SB_MAKEVALUE(x, S_MC_REF_RATE) | 162 | #define V_MC_REF_RATE(x) _SB_MAKEVALUE(x, S_MC_REF_RATE) |
163 | #define G_MC_REF_RATE(x) _SB_GETVALUE(x, S_MC_REF_RATE, M_MC_REF_RATE) | 163 | #define G_MC_REF_RATE(x) _SB_GETVALUE(x, S_MC_REF_RATE, M_MC_REF_RATE) |
164 | 164 | ||
165 | #define K_MC_REF_RATE_100MHz 0x62 | 165 | #define K_MC_REF_RATE_100MHz 0x62 |
166 | #define K_MC_REF_RATE_133MHz 0x81 | 166 | #define K_MC_REF_RATE_133MHz 0x81 |
167 | #define K_MC_REF_RATE_200MHz 0xC4 | 167 | #define K_MC_REF_RATE_200MHz 0xC4 |
168 | 168 | ||
169 | #define V_MC_REF_RATE_100MHz V_MC_REF_RATE(K_MC_REF_RATE_100MHz) | 169 | #define V_MC_REF_RATE_100MHz V_MC_REF_RATE(K_MC_REF_RATE_100MHz) |
170 | #define V_MC_REF_RATE_133MHz V_MC_REF_RATE(K_MC_REF_RATE_133MHz) | 170 | #define V_MC_REF_RATE_133MHz V_MC_REF_RATE(K_MC_REF_RATE_133MHz) |
171 | #define V_MC_REF_RATE_200MHz V_MC_REF_RATE(K_MC_REF_RATE_200MHz) | 171 | #define V_MC_REF_RATE_200MHz V_MC_REF_RATE(K_MC_REF_RATE_200MHz) |
172 | #define V_MC_REF_RATE_DEFAULT V_MC_REF_RATE_100MHz | 172 | #define V_MC_REF_RATE_DEFAULT V_MC_REF_RATE_100MHz |
173 | 173 | ||
174 | #define S_MC_CLOCK_DRIVE 16 | 174 | #define S_MC_CLOCK_DRIVE 16 |
175 | #define M_MC_CLOCK_DRIVE _SB_MAKEMASK(4, S_MC_CLOCK_DRIVE) | 175 | #define M_MC_CLOCK_DRIVE _SB_MAKEMASK(4, S_MC_CLOCK_DRIVE) |
176 | #define V_MC_CLOCK_DRIVE(x) _SB_MAKEVALUE(x, S_MC_CLOCK_DRIVE) | 176 | #define V_MC_CLOCK_DRIVE(x) _SB_MAKEVALUE(x, S_MC_CLOCK_DRIVE) |
177 | #define G_MC_CLOCK_DRIVE(x) _SB_GETVALUE(x, S_MC_CLOCK_DRIVE, M_MC_CLOCK_DRIVE) | 177 | #define G_MC_CLOCK_DRIVE(x) _SB_GETVALUE(x, S_MC_CLOCK_DRIVE, M_MC_CLOCK_DRIVE) |
178 | #define V_MC_CLOCK_DRIVE_DEFAULT V_MC_CLOCK_DRIVE(0xF) | 178 | #define V_MC_CLOCK_DRIVE_DEFAULT V_MC_CLOCK_DRIVE(0xF) |
179 | 179 | ||
180 | #define S_MC_DATA_DRIVE 20 | 180 | #define S_MC_DATA_DRIVE 20 |
181 | #define M_MC_DATA_DRIVE _SB_MAKEMASK(4, S_MC_DATA_DRIVE) | 181 | #define M_MC_DATA_DRIVE _SB_MAKEMASK(4, S_MC_DATA_DRIVE) |
182 | #define V_MC_DATA_DRIVE(x) _SB_MAKEVALUE(x, S_MC_DATA_DRIVE) | 182 | #define V_MC_DATA_DRIVE(x) _SB_MAKEVALUE(x, S_MC_DATA_DRIVE) |
183 | #define G_MC_DATA_DRIVE(x) _SB_GETVALUE(x, S_MC_DATA_DRIVE, M_MC_DATA_DRIVE) | 183 | #define G_MC_DATA_DRIVE(x) _SB_GETVALUE(x, S_MC_DATA_DRIVE, M_MC_DATA_DRIVE) |
184 | #define V_MC_DATA_DRIVE_DEFAULT V_MC_DATA_DRIVE(0x0) | 184 | #define V_MC_DATA_DRIVE_DEFAULT V_MC_DATA_DRIVE(0x0) |
185 | 185 | ||
186 | #define S_MC_ADDR_DRIVE 24 | 186 | #define S_MC_ADDR_DRIVE 24 |
187 | #define M_MC_ADDR_DRIVE _SB_MAKEMASK(4, S_MC_ADDR_DRIVE) | 187 | #define M_MC_ADDR_DRIVE _SB_MAKEMASK(4, S_MC_ADDR_DRIVE) |
188 | #define V_MC_ADDR_DRIVE(x) _SB_MAKEVALUE(x, S_MC_ADDR_DRIVE) | 188 | #define V_MC_ADDR_DRIVE(x) _SB_MAKEVALUE(x, S_MC_ADDR_DRIVE) |
189 | #define G_MC_ADDR_DRIVE(x) _SB_GETVALUE(x, S_MC_ADDR_DRIVE, M_MC_ADDR_DRIVE) | 189 | #define G_MC_ADDR_DRIVE(x) _SB_GETVALUE(x, S_MC_ADDR_DRIVE, M_MC_ADDR_DRIVE) |
190 | #define V_MC_ADDR_DRIVE_DEFAULT V_MC_ADDR_DRIVE(0x0) | 190 | #define V_MC_ADDR_DRIVE_DEFAULT V_MC_ADDR_DRIVE(0x0) |
191 | 191 | ||
192 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 192 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
193 | #define M_MC_REF_DISABLE _SB_MAKEMASK1(30) | 193 | #define M_MC_REF_DISABLE _SB_MAKEMASK1(30) |
194 | #endif /* 1250 PASS3 || 112x PASS1 */ | 194 | #endif /* 1250 PASS3 || 112x PASS1 */ |
195 | 195 | ||
196 | #define M_MC_DLL_BYPASS _SB_MAKEMASK1(31) | 196 | #define M_MC_DLL_BYPASS _SB_MAKEMASK1(31) |
197 | 197 | ||
198 | #define S_MC_DQI_SKEW 32 | 198 | #define S_MC_DQI_SKEW 32 |
199 | #define M_MC_DQI_SKEW _SB_MAKEMASK(8, S_MC_DQI_SKEW) | 199 | #define M_MC_DQI_SKEW _SB_MAKEMASK(8, S_MC_DQI_SKEW) |
200 | #define V_MC_DQI_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQI_SKEW) | 200 | #define V_MC_DQI_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQI_SKEW) |
201 | #define G_MC_DQI_SKEW(x) _SB_GETVALUE(x, S_MC_DQI_SKEW, M_MC_DQI_SKEW) | 201 | #define G_MC_DQI_SKEW(x) _SB_GETVALUE(x, S_MC_DQI_SKEW, M_MC_DQI_SKEW) |
202 | #define V_MC_DQI_SKEW_DEFAULT V_MC_DQI_SKEW(0) | 202 | #define V_MC_DQI_SKEW_DEFAULT V_MC_DQI_SKEW(0) |
203 | 203 | ||
204 | #define S_MC_DQO_SKEW 40 | 204 | #define S_MC_DQO_SKEW 40 |
205 | #define M_MC_DQO_SKEW _SB_MAKEMASK(8, S_MC_DQO_SKEW) | 205 | #define M_MC_DQO_SKEW _SB_MAKEMASK(8, S_MC_DQO_SKEW) |
206 | #define V_MC_DQO_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQO_SKEW) | 206 | #define V_MC_DQO_SKEW(x) _SB_MAKEVALUE(x, S_MC_DQO_SKEW) |
207 | #define G_MC_DQO_SKEW(x) _SB_GETVALUE(x, S_MC_DQO_SKEW, M_MC_DQO_SKEW) | 207 | #define G_MC_DQO_SKEW(x) _SB_GETVALUE(x, S_MC_DQO_SKEW, M_MC_DQO_SKEW) |
208 | #define V_MC_DQO_SKEW_DEFAULT V_MC_DQO_SKEW(0) | 208 | #define V_MC_DQO_SKEW_DEFAULT V_MC_DQO_SKEW(0) |
209 | 209 | ||
210 | #define S_MC_ADDR_SKEW 48 | 210 | #define S_MC_ADDR_SKEW 48 |
211 | #define M_MC_ADDR_SKEW _SB_MAKEMASK(8, S_MC_ADDR_SKEW) | 211 | #define M_MC_ADDR_SKEW _SB_MAKEMASK(8, S_MC_ADDR_SKEW) |
212 | #define V_MC_ADDR_SKEW(x) _SB_MAKEVALUE(x, S_MC_ADDR_SKEW) | 212 | #define V_MC_ADDR_SKEW(x) _SB_MAKEVALUE(x, S_MC_ADDR_SKEW) |
213 | #define G_MC_ADDR_SKEW(x) _SB_GETVALUE(x, S_MC_ADDR_SKEW, M_MC_ADDR_SKEW) | 213 | #define G_MC_ADDR_SKEW(x) _SB_GETVALUE(x, S_MC_ADDR_SKEW, M_MC_ADDR_SKEW) |
214 | #define V_MC_ADDR_SKEW_DEFAULT V_MC_ADDR_SKEW(0x0F) | 214 | #define V_MC_ADDR_SKEW_DEFAULT V_MC_ADDR_SKEW(0x0F) |
215 | 215 | ||
216 | #define S_MC_DLL_DEFAULT 56 | 216 | #define S_MC_DLL_DEFAULT 56 |
217 | #define M_MC_DLL_DEFAULT _SB_MAKEMASK(8, S_MC_DLL_DEFAULT) | 217 | #define M_MC_DLL_DEFAULT _SB_MAKEMASK(8, S_MC_DLL_DEFAULT) |
218 | #define V_MC_DLL_DEFAULT(x) _SB_MAKEVALUE(x, S_MC_DLL_DEFAULT) | 218 | #define V_MC_DLL_DEFAULT(x) _SB_MAKEVALUE(x, S_MC_DLL_DEFAULT) |
219 | #define G_MC_DLL_DEFAULT(x) _SB_GETVALUE(x, S_MC_DLL_DEFAULT, M_MC_DLL_DEFAULT) | 219 | #define G_MC_DLL_DEFAULT(x) _SB_GETVALUE(x, S_MC_DLL_DEFAULT, M_MC_DLL_DEFAULT) |
220 | #define V_MC_DLL_DEFAULT_DEFAULT V_MC_DLL_DEFAULT(0x10) | 220 | #define V_MC_DLL_DEFAULT_DEFAULT V_MC_DLL_DEFAULT(0x10) |
221 | 221 | ||
222 | #define V_MC_CLKCONFIG_DEFAULT V_MC_DLL_DEFAULT_DEFAULT | \ | 222 | #define V_MC_CLKCONFIG_DEFAULT V_MC_DLL_DEFAULT_DEFAULT | \ |
223 | V_MC_ADDR_SKEW_DEFAULT | \ | 223 | V_MC_ADDR_SKEW_DEFAULT | \ |
224 | V_MC_DQO_SKEW_DEFAULT | \ | 224 | V_MC_DQO_SKEW_DEFAULT | \ |
225 | V_MC_DQI_SKEW_DEFAULT | \ | 225 | V_MC_DQI_SKEW_DEFAULT | \ |
226 | V_MC_ADDR_DRIVE_DEFAULT | \ | 226 | V_MC_ADDR_DRIVE_DEFAULT | \ |
227 | V_MC_DATA_DRIVE_DEFAULT | \ | 227 | V_MC_DATA_DRIVE_DEFAULT | \ |
228 | V_MC_CLOCK_DRIVE_DEFAULT | \ | 228 | V_MC_CLOCK_DRIVE_DEFAULT | \ |
229 | V_MC_REF_RATE_DEFAULT | 229 | V_MC_REF_RATE_DEFAULT |
230 | 230 | ||
231 | 231 | ||
232 | 232 | ||
@@ -234,68 +234,68 @@ | |||
234 | * DRAM Command Register (Table 6-13) | 234 | * DRAM Command Register (Table 6-13) |
235 | */ | 235 | */ |
236 | 236 | ||
237 | #define S_MC_COMMAND 0 | 237 | #define S_MC_COMMAND 0 |
238 | #define M_MC_COMMAND _SB_MAKEMASK(4, S_MC_COMMAND) | 238 | #define M_MC_COMMAND _SB_MAKEMASK(4, S_MC_COMMAND) |
239 | #define V_MC_COMMAND(x) _SB_MAKEVALUE(x, S_MC_COMMAND) | 239 | #define V_MC_COMMAND(x) _SB_MAKEVALUE(x, S_MC_COMMAND) |
240 | #define G_MC_COMMAND(x) _SB_GETVALUE(x, S_MC_COMMAND, M_MC_COMMAND) | 240 | #define G_MC_COMMAND(x) _SB_GETVALUE(x, S_MC_COMMAND, M_MC_COMMAND) |
241 | 241 | ||
242 | #define K_MC_COMMAND_EMRS 0 | 242 | #define K_MC_COMMAND_EMRS 0 |
243 | #define K_MC_COMMAND_MRS 1 | 243 | #define K_MC_COMMAND_MRS 1 |
244 | #define K_MC_COMMAND_PRE 2 | 244 | #define K_MC_COMMAND_PRE 2 |
245 | #define K_MC_COMMAND_AR 3 | 245 | #define K_MC_COMMAND_AR 3 |
246 | #define K_MC_COMMAND_SETRFSH 4 | 246 | #define K_MC_COMMAND_SETRFSH 4 |
247 | #define K_MC_COMMAND_CLRRFSH 5 | 247 | #define K_MC_COMMAND_CLRRFSH 5 |
248 | #define K_MC_COMMAND_SETPWRDN 6 | 248 | #define K_MC_COMMAND_SETPWRDN 6 |
249 | #define K_MC_COMMAND_CLRPWRDN 7 | 249 | #define K_MC_COMMAND_CLRPWRDN 7 |
250 | 250 | ||
251 | #define V_MC_COMMAND_EMRS V_MC_COMMAND(K_MC_COMMAND_EMRS) | 251 | #define V_MC_COMMAND_EMRS V_MC_COMMAND(K_MC_COMMAND_EMRS) |
252 | #define V_MC_COMMAND_MRS V_MC_COMMAND(K_MC_COMMAND_MRS) | 252 | #define V_MC_COMMAND_MRS V_MC_COMMAND(K_MC_COMMAND_MRS) |
253 | #define V_MC_COMMAND_PRE V_MC_COMMAND(K_MC_COMMAND_PRE) | 253 | #define V_MC_COMMAND_PRE V_MC_COMMAND(K_MC_COMMAND_PRE) |
254 | #define V_MC_COMMAND_AR V_MC_COMMAND(K_MC_COMMAND_AR) | 254 | #define V_MC_COMMAND_AR V_MC_COMMAND(K_MC_COMMAND_AR) |
255 | #define V_MC_COMMAND_SETRFSH V_MC_COMMAND(K_MC_COMMAND_SETRFSH) | 255 | #define V_MC_COMMAND_SETRFSH V_MC_COMMAND(K_MC_COMMAND_SETRFSH) |
256 | #define V_MC_COMMAND_CLRRFSH V_MC_COMMAND(K_MC_COMMAND_CLRRFSH) | 256 | #define V_MC_COMMAND_CLRRFSH V_MC_COMMAND(K_MC_COMMAND_CLRRFSH) |
257 | #define V_MC_COMMAND_SETPWRDN V_MC_COMMAND(K_MC_COMMAND_SETPWRDN) | 257 | #define V_MC_COMMAND_SETPWRDN V_MC_COMMAND(K_MC_COMMAND_SETPWRDN) |
258 | #define V_MC_COMMAND_CLRPWRDN V_MC_COMMAND(K_MC_COMMAND_CLRPWRDN) | 258 | #define V_MC_COMMAND_CLRPWRDN V_MC_COMMAND(K_MC_COMMAND_CLRPWRDN) |
259 | 259 | ||
260 | #define M_MC_CS0 _SB_MAKEMASK1(4) | 260 | #define M_MC_CS0 _SB_MAKEMASK1(4) |
261 | #define M_MC_CS1 _SB_MAKEMASK1(5) | 261 | #define M_MC_CS1 _SB_MAKEMASK1(5) |
262 | #define M_MC_CS2 _SB_MAKEMASK1(6) | 262 | #define M_MC_CS2 _SB_MAKEMASK1(6) |
263 | #define M_MC_CS3 _SB_MAKEMASK1(7) | 263 | #define M_MC_CS3 _SB_MAKEMASK1(7) |
264 | 264 | ||
265 | /* | 265 | /* |
266 | * DRAM Mode Register (Table 6-14) | 266 | * DRAM Mode Register (Table 6-14) |
267 | */ | 267 | */ |
268 | 268 | ||
269 | #define S_MC_EMODE 0 | 269 | #define S_MC_EMODE 0 |
270 | #define M_MC_EMODE _SB_MAKEMASK(15, S_MC_EMODE) | 270 | #define M_MC_EMODE _SB_MAKEMASK(15, S_MC_EMODE) |
271 | #define V_MC_EMODE(x) _SB_MAKEVALUE(x, S_MC_EMODE) | 271 | #define V_MC_EMODE(x) _SB_MAKEVALUE(x, S_MC_EMODE) |
272 | #define G_MC_EMODE(x) _SB_GETVALUE(x, S_MC_EMODE, M_MC_EMODE) | 272 | #define G_MC_EMODE(x) _SB_GETVALUE(x, S_MC_EMODE, M_MC_EMODE) |
273 | #define V_MC_EMODE_DEFAULT V_MC_EMODE(0) | 273 | #define V_MC_EMODE_DEFAULT V_MC_EMODE(0) |
274 | 274 | ||
275 | #define S_MC_MODE 16 | 275 | #define S_MC_MODE 16 |
276 | #define M_MC_MODE _SB_MAKEMASK(15, S_MC_MODE) | 276 | #define M_MC_MODE _SB_MAKEMASK(15, S_MC_MODE) |
277 | #define V_MC_MODE(x) _SB_MAKEVALUE(x, S_MC_MODE) | 277 | #define V_MC_MODE(x) _SB_MAKEVALUE(x, S_MC_MODE) |
278 | #define G_MC_MODE(x) _SB_GETVALUE(x, S_MC_MODE, M_MC_MODE) | 278 | #define G_MC_MODE(x) _SB_GETVALUE(x, S_MC_MODE, M_MC_MODE) |
279 | #define V_MC_MODE_DEFAULT V_MC_MODE(0x22) | 279 | #define V_MC_MODE_DEFAULT V_MC_MODE(0x22) |
280 | 280 | ||
281 | #define S_MC_DRAM_TYPE 32 | 281 | #define S_MC_DRAM_TYPE 32 |
282 | #define M_MC_DRAM_TYPE _SB_MAKEMASK(3, S_MC_DRAM_TYPE) | 282 | #define M_MC_DRAM_TYPE _SB_MAKEMASK(3, S_MC_DRAM_TYPE) |
283 | #define V_MC_DRAM_TYPE(x) _SB_MAKEVALUE(x, S_MC_DRAM_TYPE) | 283 | #define V_MC_DRAM_TYPE(x) _SB_MAKEVALUE(x, S_MC_DRAM_TYPE) |
284 | #define G_MC_DRAM_TYPE(x) _SB_GETVALUE(x, S_MC_DRAM_TYPE, M_MC_DRAM_TYPE) | 284 | #define G_MC_DRAM_TYPE(x) _SB_GETVALUE(x, S_MC_DRAM_TYPE, M_MC_DRAM_TYPE) |
285 | 285 | ||
286 | #define K_MC_DRAM_TYPE_JEDEC 0 | 286 | #define K_MC_DRAM_TYPE_JEDEC 0 |
287 | #define K_MC_DRAM_TYPE_FCRAM 1 | 287 | #define K_MC_DRAM_TYPE_FCRAM 1 |
288 | #define K_MC_DRAM_TYPE_SGRAM 2 | 288 | #define K_MC_DRAM_TYPE_SGRAM 2 |
289 | 289 | ||
290 | #define V_MC_DRAM_TYPE_JEDEC V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_JEDEC) | 290 | #define V_MC_DRAM_TYPE_JEDEC V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_JEDEC) |
291 | #define V_MC_DRAM_TYPE_FCRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_FCRAM) | 291 | #define V_MC_DRAM_TYPE_FCRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_FCRAM) |
292 | #define V_MC_DRAM_TYPE_SGRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_SGRAM) | 292 | #define V_MC_DRAM_TYPE_SGRAM V_MC_DRAM_TYPE(K_MC_DRAM_TYPE_SGRAM) |
293 | 293 | ||
294 | #define M_MC_EXTERNALDECODE _SB_MAKEMASK1(35) | 294 | #define M_MC_EXTERNALDECODE _SB_MAKEMASK1(35) |
295 | 295 | ||
296 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 296 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
297 | #define M_MC_PRE_ON_A8 _SB_MAKEMASK1(36) | 297 | #define M_MC_PRE_ON_A8 _SB_MAKEMASK1(36) |
298 | #define M_MC_RAM_WITH_A13 _SB_MAKEMASK1(37) | 298 | #define M_MC_RAM_WITH_A13 _SB_MAKEMASK1(37) |
299 | #endif /* 1250 PASS3 || 112x PASS1 */ | 299 | #endif /* 1250 PASS3 || 112x PASS1 */ |
300 | 300 | ||
301 | 301 | ||
@@ -308,99 +308,99 @@ | |||
308 | #define M_MC_r2wIDLE_TWOCYCLES _SB_MAKEMASK1(61) | 308 | #define M_MC_r2wIDLE_TWOCYCLES _SB_MAKEMASK1(61) |
309 | #define M_MC_r2rIDLE_TWOCYCLES _SB_MAKEMASK1(62) | 309 | #define M_MC_r2rIDLE_TWOCYCLES _SB_MAKEMASK1(62) |
310 | 310 | ||
311 | #define S_MC_tFIFO 56 | 311 | #define S_MC_tFIFO 56 |
312 | #define M_MC_tFIFO _SB_MAKEMASK(4, S_MC_tFIFO) | 312 | #define M_MC_tFIFO _SB_MAKEMASK(4, S_MC_tFIFO) |
313 | #define V_MC_tFIFO(x) _SB_MAKEVALUE(x, S_MC_tFIFO) | 313 | #define V_MC_tFIFO(x) _SB_MAKEVALUE(x, S_MC_tFIFO) |
314 | #define G_MC_tFIFO(x) _SB_GETVALUE(x, S_MC_tFIFO, M_MC_tFIFO) | 314 | #define G_MC_tFIFO(x) _SB_GETVALUE(x, S_MC_tFIFO, M_MC_tFIFO) |
315 | #define K_MC_tFIFO_DEFAULT 1 | 315 | #define K_MC_tFIFO_DEFAULT 1 |
316 | #define V_MC_tFIFO_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) | 316 | #define V_MC_tFIFO_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) |
317 | 317 | ||
318 | #define S_MC_tRFC 52 | 318 | #define S_MC_tRFC 52 |
319 | #define M_MC_tRFC _SB_MAKEMASK(4, S_MC_tRFC) | 319 | #define M_MC_tRFC _SB_MAKEMASK(4, S_MC_tRFC) |
320 | #define V_MC_tRFC(x) _SB_MAKEVALUE(x, S_MC_tRFC) | 320 | #define V_MC_tRFC(x) _SB_MAKEVALUE(x, S_MC_tRFC) |
321 | #define G_MC_tRFC(x) _SB_GETVALUE(x, S_MC_tRFC, M_MC_tRFC) | 321 | #define G_MC_tRFC(x) _SB_GETVALUE(x, S_MC_tRFC, M_MC_tRFC) |
322 | #define K_MC_tRFC_DEFAULT 12 | 322 | #define K_MC_tRFC_DEFAULT 12 |
323 | #define V_MC_tRFC_DEFAULT V_MC_tRFC(K_MC_tRFC_DEFAULT) | 323 | #define V_MC_tRFC_DEFAULT V_MC_tRFC(K_MC_tRFC_DEFAULT) |
324 | 324 | ||
325 | #if SIBYTE_HDR_FEATURE(1250, PASS3) | 325 | #if SIBYTE_HDR_FEATURE(1250, PASS3) |
326 | #define M_MC_tRFC_PLUS16 _SB_MAKEMASK1(51) /* 1250C3 and later. */ | 326 | #define M_MC_tRFC_PLUS16 _SB_MAKEMASK1(51) /* 1250C3 and later. */ |
327 | #endif | 327 | #endif |
328 | 328 | ||
329 | #define S_MC_tCwCr 40 | 329 | #define S_MC_tCwCr 40 |
330 | #define M_MC_tCwCr _SB_MAKEMASK(4, S_MC_tCwCr) | 330 | #define M_MC_tCwCr _SB_MAKEMASK(4, S_MC_tCwCr) |
331 | #define V_MC_tCwCr(x) _SB_MAKEVALUE(x, S_MC_tCwCr) | 331 | #define V_MC_tCwCr(x) _SB_MAKEVALUE(x, S_MC_tCwCr) |
332 | #define G_MC_tCwCr(x) _SB_GETVALUE(x, S_MC_tCwCr, M_MC_tCwCr) | 332 | #define G_MC_tCwCr(x) _SB_GETVALUE(x, S_MC_tCwCr, M_MC_tCwCr) |
333 | #define K_MC_tCwCr_DEFAULT 4 | 333 | #define K_MC_tCwCr_DEFAULT 4 |
334 | #define V_MC_tCwCr_DEFAULT V_MC_tCwCr(K_MC_tCwCr_DEFAULT) | 334 | #define V_MC_tCwCr_DEFAULT V_MC_tCwCr(K_MC_tCwCr_DEFAULT) |
335 | 335 | ||
336 | #define S_MC_tRCr 28 | 336 | #define S_MC_tRCr 28 |
337 | #define M_MC_tRCr _SB_MAKEMASK(4, S_MC_tRCr) | 337 | #define M_MC_tRCr _SB_MAKEMASK(4, S_MC_tRCr) |
338 | #define V_MC_tRCr(x) _SB_MAKEVALUE(x, S_MC_tRCr) | 338 | #define V_MC_tRCr(x) _SB_MAKEVALUE(x, S_MC_tRCr) |
339 | #define G_MC_tRCr(x) _SB_GETVALUE(x, S_MC_tRCr, M_MC_tRCr) | 339 | #define G_MC_tRCr(x) _SB_GETVALUE(x, S_MC_tRCr, M_MC_tRCr) |
340 | #define K_MC_tRCr_DEFAULT 9 | 340 | #define K_MC_tRCr_DEFAULT 9 |
341 | #define V_MC_tRCr_DEFAULT V_MC_tRCr(K_MC_tRCr_DEFAULT) | 341 | #define V_MC_tRCr_DEFAULT V_MC_tRCr(K_MC_tRCr_DEFAULT) |
342 | 342 | ||
343 | #define S_MC_tRCw 24 | 343 | #define S_MC_tRCw 24 |
344 | #define M_MC_tRCw _SB_MAKEMASK(4, S_MC_tRCw) | 344 | #define M_MC_tRCw _SB_MAKEMASK(4, S_MC_tRCw) |
345 | #define V_MC_tRCw(x) _SB_MAKEVALUE(x, S_MC_tRCw) | 345 | #define V_MC_tRCw(x) _SB_MAKEVALUE(x, S_MC_tRCw) |
346 | #define G_MC_tRCw(x) _SB_GETVALUE(x, S_MC_tRCw, M_MC_tRCw) | 346 | #define G_MC_tRCw(x) _SB_GETVALUE(x, S_MC_tRCw, M_MC_tRCw) |
347 | #define K_MC_tRCw_DEFAULT 10 | 347 | #define K_MC_tRCw_DEFAULT 10 |
348 | #define V_MC_tRCw_DEFAULT V_MC_tRCw(K_MC_tRCw_DEFAULT) | 348 | #define V_MC_tRCw_DEFAULT V_MC_tRCw(K_MC_tRCw_DEFAULT) |
349 | 349 | ||
350 | #define S_MC_tRRD 20 | 350 | #define S_MC_tRRD 20 |
351 | #define M_MC_tRRD _SB_MAKEMASK(4, S_MC_tRRD) | 351 | #define M_MC_tRRD _SB_MAKEMASK(4, S_MC_tRRD) |
352 | #define V_MC_tRRD(x) _SB_MAKEVALUE(x, S_MC_tRRD) | 352 | #define V_MC_tRRD(x) _SB_MAKEVALUE(x, S_MC_tRRD) |
353 | #define G_MC_tRRD(x) _SB_GETVALUE(x, S_MC_tRRD, M_MC_tRRD) | 353 | #define G_MC_tRRD(x) _SB_GETVALUE(x, S_MC_tRRD, M_MC_tRRD) |
354 | #define K_MC_tRRD_DEFAULT 2 | 354 | #define K_MC_tRRD_DEFAULT 2 |
355 | #define V_MC_tRRD_DEFAULT V_MC_tRRD(K_MC_tRRD_DEFAULT) | 355 | #define V_MC_tRRD_DEFAULT V_MC_tRRD(K_MC_tRRD_DEFAULT) |
356 | 356 | ||
357 | #define S_MC_tRP 16 | 357 | #define S_MC_tRP 16 |
358 | #define M_MC_tRP _SB_MAKEMASK(4, S_MC_tRP) | 358 | #define M_MC_tRP _SB_MAKEMASK(4, S_MC_tRP) |
359 | #define V_MC_tRP(x) _SB_MAKEVALUE(x, S_MC_tRP) | 359 | #define V_MC_tRP(x) _SB_MAKEVALUE(x, S_MC_tRP) |
360 | #define G_MC_tRP(x) _SB_GETVALUE(x, S_MC_tRP, M_MC_tRP) | 360 | #define G_MC_tRP(x) _SB_GETVALUE(x, S_MC_tRP, M_MC_tRP) |
361 | #define K_MC_tRP_DEFAULT 4 | 361 | #define K_MC_tRP_DEFAULT 4 |
362 | #define V_MC_tRP_DEFAULT V_MC_tRP(K_MC_tRP_DEFAULT) | 362 | #define V_MC_tRP_DEFAULT V_MC_tRP(K_MC_tRP_DEFAULT) |
363 | 363 | ||
364 | #define S_MC_tCwD 8 | 364 | #define S_MC_tCwD 8 |
365 | #define M_MC_tCwD _SB_MAKEMASK(4, S_MC_tCwD) | 365 | #define M_MC_tCwD _SB_MAKEMASK(4, S_MC_tCwD) |
366 | #define V_MC_tCwD(x) _SB_MAKEVALUE(x, S_MC_tCwD) | 366 | #define V_MC_tCwD(x) _SB_MAKEVALUE(x, S_MC_tCwD) |
367 | #define G_MC_tCwD(x) _SB_GETVALUE(x, S_MC_tCwD, M_MC_tCwD) | 367 | #define G_MC_tCwD(x) _SB_GETVALUE(x, S_MC_tCwD, M_MC_tCwD) |
368 | #define K_MC_tCwD_DEFAULT 1 | 368 | #define K_MC_tCwD_DEFAULT 1 |
369 | #define V_MC_tCwD_DEFAULT V_MC_tCwD(K_MC_tCwD_DEFAULT) | 369 | #define V_MC_tCwD_DEFAULT V_MC_tCwD(K_MC_tCwD_DEFAULT) |
370 | 370 | ||
371 | #define M_tCrDh _SB_MAKEMASK1(7) | 371 | #define M_tCrDh _SB_MAKEMASK1(7) |
372 | #define M_MC_tCrDh M_tCrDh | 372 | #define M_MC_tCrDh M_tCrDh |
373 | 373 | ||
374 | #define S_MC_tCrD 4 | 374 | #define S_MC_tCrD 4 |
375 | #define M_MC_tCrD _SB_MAKEMASK(3, S_MC_tCrD) | 375 | #define M_MC_tCrD _SB_MAKEMASK(3, S_MC_tCrD) |
376 | #define V_MC_tCrD(x) _SB_MAKEVALUE(x, S_MC_tCrD) | 376 | #define V_MC_tCrD(x) _SB_MAKEVALUE(x, S_MC_tCrD) |
377 | #define G_MC_tCrD(x) _SB_GETVALUE(x, S_MC_tCrD, M_MC_tCrD) | 377 | #define G_MC_tCrD(x) _SB_GETVALUE(x, S_MC_tCrD, M_MC_tCrD) |
378 | #define K_MC_tCrD_DEFAULT 2 | 378 | #define K_MC_tCrD_DEFAULT 2 |
379 | #define V_MC_tCrD_DEFAULT V_MC_tCrD(K_MC_tCrD_DEFAULT) | 379 | #define V_MC_tCrD_DEFAULT V_MC_tCrD(K_MC_tCrD_DEFAULT) |
380 | 380 | ||
381 | #define S_MC_tRCD 0 | 381 | #define S_MC_tRCD 0 |
382 | #define M_MC_tRCD _SB_MAKEMASK(4, S_MC_tRCD) | 382 | #define M_MC_tRCD _SB_MAKEMASK(4, S_MC_tRCD) |
383 | #define V_MC_tRCD(x) _SB_MAKEVALUE(x, S_MC_tRCD) | 383 | #define V_MC_tRCD(x) _SB_MAKEVALUE(x, S_MC_tRCD) |
384 | #define G_MC_tRCD(x) _SB_GETVALUE(x, S_MC_tRCD, M_MC_tRCD) | 384 | #define G_MC_tRCD(x) _SB_GETVALUE(x, S_MC_tRCD, M_MC_tRCD) |
385 | #define K_MC_tRCD_DEFAULT 3 | 385 | #define K_MC_tRCD_DEFAULT 3 |
386 | #define V_MC_tRCD_DEFAULT V_MC_tRCD(K_MC_tRCD_DEFAULT) | 386 | #define V_MC_tRCD_DEFAULT V_MC_tRCD(K_MC_tRCD_DEFAULT) |
387 | 387 | ||
388 | #define V_MC_TIMING_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) | \ | 388 | #define V_MC_TIMING_DEFAULT V_MC_tFIFO(K_MC_tFIFO_DEFAULT) | \ |
389 | V_MC_tRFC(K_MC_tRFC_DEFAULT) | \ | 389 | V_MC_tRFC(K_MC_tRFC_DEFAULT) | \ |
390 | V_MC_tCwCr(K_MC_tCwCr_DEFAULT) | \ | 390 | V_MC_tCwCr(K_MC_tCwCr_DEFAULT) | \ |
391 | V_MC_tRCr(K_MC_tRCr_DEFAULT) | \ | 391 | V_MC_tRCr(K_MC_tRCr_DEFAULT) | \ |
392 | V_MC_tRCw(K_MC_tRCw_DEFAULT) | \ | 392 | V_MC_tRCw(K_MC_tRCw_DEFAULT) | \ |
393 | V_MC_tRRD(K_MC_tRRD_DEFAULT) | \ | 393 | V_MC_tRRD(K_MC_tRRD_DEFAULT) | \ |
394 | V_MC_tRP(K_MC_tRP_DEFAULT) | \ | 394 | V_MC_tRP(K_MC_tRP_DEFAULT) | \ |
395 | V_MC_tCwD(K_MC_tCwD_DEFAULT) | \ | 395 | V_MC_tCwD(K_MC_tCwD_DEFAULT) | \ |
396 | V_MC_tCrD(K_MC_tCrD_DEFAULT) | \ | 396 | V_MC_tCrD(K_MC_tCrD_DEFAULT) | \ |
397 | V_MC_tRCD(K_MC_tRCD_DEFAULT) | \ | 397 | V_MC_tRCD(K_MC_tRCD_DEFAULT) | \ |
398 | M_MC_r2rIDLE_TWOCYCLES | 398 | M_MC_r2rIDLE_TWOCYCLES |
399 | 399 | ||
400 | /* | 400 | /* |
401 | * Errata says these are not the default | 401 | * Errata says these are not the default |
402 | * M_MC_w2rIDLE_TWOCYCLES | \ | 402 | * M_MC_w2rIDLE_TWOCYCLES | \ |
403 | * M_MC_r2wIDLE_TWOCYCLES | \ | 403 | * M_MC_r2wIDLE_TWOCYCLES | \ |
404 | */ | 404 | */ |
405 | 405 | ||
406 | 406 | ||
@@ -408,143 +408,143 @@ | |||
408 | * Chip Select Start Address Register (Table 6-17) | 408 | * Chip Select Start Address Register (Table 6-17) |
409 | */ | 409 | */ |
410 | 410 | ||
411 | #define S_MC_CS0_START 0 | 411 | #define S_MC_CS0_START 0 |
412 | #define M_MC_CS0_START _SB_MAKEMASK(16, S_MC_CS0_START) | 412 | #define M_MC_CS0_START _SB_MAKEMASK(16, S_MC_CS0_START) |
413 | #define V_MC_CS0_START(x) _SB_MAKEVALUE(x, S_MC_CS0_START) | 413 | #define V_MC_CS0_START(x) _SB_MAKEVALUE(x, S_MC_CS0_START) |
414 | #define G_MC_CS0_START(x) _SB_GETVALUE(x, S_MC_CS0_START, M_MC_CS0_START) | 414 | #define G_MC_CS0_START(x) _SB_GETVALUE(x, S_MC_CS0_START, M_MC_CS0_START) |
415 | 415 | ||
416 | #define S_MC_CS1_START 16 | 416 | #define S_MC_CS1_START 16 |
417 | #define M_MC_CS1_START _SB_MAKEMASK(16, S_MC_CS1_START) | 417 | #define M_MC_CS1_START _SB_MAKEMASK(16, S_MC_CS1_START) |
418 | #define V_MC_CS1_START(x) _SB_MAKEVALUE(x, S_MC_CS1_START) | 418 | #define V_MC_CS1_START(x) _SB_MAKEVALUE(x, S_MC_CS1_START) |
419 | #define G_MC_CS1_START(x) _SB_GETVALUE(x, S_MC_CS1_START, M_MC_CS1_START) | 419 | #define G_MC_CS1_START(x) _SB_GETVALUE(x, S_MC_CS1_START, M_MC_CS1_START) |
420 | 420 | ||
421 | #define S_MC_CS2_START 32 | 421 | #define S_MC_CS2_START 32 |
422 | #define M_MC_CS2_START _SB_MAKEMASK(16, S_MC_CS2_START) | 422 | #define M_MC_CS2_START _SB_MAKEMASK(16, S_MC_CS2_START) |
423 | #define V_MC_CS2_START(x) _SB_MAKEVALUE(x, S_MC_CS2_START) | 423 | #define V_MC_CS2_START(x) _SB_MAKEVALUE(x, S_MC_CS2_START) |
424 | #define G_MC_CS2_START(x) _SB_GETVALUE(x, S_MC_CS2_START, M_MC_CS2_START) | 424 | #define G_MC_CS2_START(x) _SB_GETVALUE(x, S_MC_CS2_START, M_MC_CS2_START) |
425 | 425 | ||
426 | #define S_MC_CS3_START 48 | 426 | #define S_MC_CS3_START 48 |
427 | #define M_MC_CS3_START _SB_MAKEMASK(16, S_MC_CS3_START) | 427 | #define M_MC_CS3_START _SB_MAKEMASK(16, S_MC_CS3_START) |
428 | #define V_MC_CS3_START(x) _SB_MAKEVALUE(x, S_MC_CS3_START) | 428 | #define V_MC_CS3_START(x) _SB_MAKEVALUE(x, S_MC_CS3_START) |
429 | #define G_MC_CS3_START(x) _SB_GETVALUE(x, S_MC_CS3_START, M_MC_CS3_START) | 429 | #define G_MC_CS3_START(x) _SB_GETVALUE(x, S_MC_CS3_START, M_MC_CS3_START) |
430 | 430 | ||
431 | /* | 431 | /* |
432 | * Chip Select End Address Register (Table 6-18) | 432 | * Chip Select End Address Register (Table 6-18) |
433 | */ | 433 | */ |
434 | 434 | ||
435 | #define S_MC_CS0_END 0 | 435 | #define S_MC_CS0_END 0 |
436 | #define M_MC_CS0_END _SB_MAKEMASK(16, S_MC_CS0_END) | 436 | #define M_MC_CS0_END _SB_MAKEMASK(16, S_MC_CS0_END) |
437 | #define V_MC_CS0_END(x) _SB_MAKEVALUE(x, S_MC_CS0_END) | 437 | #define V_MC_CS0_END(x) _SB_MAKEVALUE(x, S_MC_CS0_END) |
438 | #define G_MC_CS0_END(x) _SB_GETVALUE(x, S_MC_CS0_END, M_MC_CS0_END) | 438 | #define G_MC_CS0_END(x) _SB_GETVALUE(x, S_MC_CS0_END, M_MC_CS0_END) |
439 | 439 | ||
440 | #define S_MC_CS1_END 16 | 440 | #define S_MC_CS1_END 16 |
441 | #define M_MC_CS1_END _SB_MAKEMASK(16, S_MC_CS1_END) | 441 | #define M_MC_CS1_END _SB_MAKEMASK(16, S_MC_CS1_END) |
442 | #define V_MC_CS1_END(x) _SB_MAKEVALUE(x, S_MC_CS1_END) | 442 | #define V_MC_CS1_END(x) _SB_MAKEVALUE(x, S_MC_CS1_END) |
443 | #define G_MC_CS1_END(x) _SB_GETVALUE(x, S_MC_CS1_END, M_MC_CS1_END) | 443 | #define G_MC_CS1_END(x) _SB_GETVALUE(x, S_MC_CS1_END, M_MC_CS1_END) |
444 | 444 | ||
445 | #define S_MC_CS2_END 32 | 445 | #define S_MC_CS2_END 32 |
446 | #define M_MC_CS2_END _SB_MAKEMASK(16, S_MC_CS2_END) | 446 | #define M_MC_CS2_END _SB_MAKEMASK(16, S_MC_CS2_END) |
447 | #define V_MC_CS2_END(x) _SB_MAKEVALUE(x, S_MC_CS2_END) | 447 | #define V_MC_CS2_END(x) _SB_MAKEVALUE(x, S_MC_CS2_END) |
448 | #define G_MC_CS2_END(x) _SB_GETVALUE(x, S_MC_CS2_END, M_MC_CS2_END) | 448 | #define G_MC_CS2_END(x) _SB_GETVALUE(x, S_MC_CS2_END, M_MC_CS2_END) |
449 | 449 | ||
450 | #define S_MC_CS3_END 48 | 450 | #define S_MC_CS3_END 48 |
451 | #define M_MC_CS3_END _SB_MAKEMASK(16, S_MC_CS3_END) | 451 | #define M_MC_CS3_END _SB_MAKEMASK(16, S_MC_CS3_END) |
452 | #define V_MC_CS3_END(x) _SB_MAKEVALUE(x, S_MC_CS3_END) | 452 | #define V_MC_CS3_END(x) _SB_MAKEVALUE(x, S_MC_CS3_END) |
453 | #define G_MC_CS3_END(x) _SB_GETVALUE(x, S_MC_CS3_END, M_MC_CS3_END) | 453 | #define G_MC_CS3_END(x) _SB_GETVALUE(x, S_MC_CS3_END, M_MC_CS3_END) |
454 | 454 | ||
455 | /* | 455 | /* |
456 | * Chip Select Interleave Register (Table 6-19) | 456 | * Chip Select Interleave Register (Table 6-19) |
457 | */ | 457 | */ |
458 | 458 | ||
459 | #define S_MC_INTLV_RESERVED 0 | 459 | #define S_MC_INTLV_RESERVED 0 |
460 | #define M_MC_INTLV_RESERVED _SB_MAKEMASK(5, S_MC_INTLV_RESERVED) | 460 | #define M_MC_INTLV_RESERVED _SB_MAKEMASK(5, S_MC_INTLV_RESERVED) |
461 | 461 | ||
462 | #define S_MC_INTERLEAVE 7 | 462 | #define S_MC_INTERLEAVE 7 |
463 | #define M_MC_INTERLEAVE _SB_MAKEMASK(18, S_MC_INTERLEAVE) | 463 | #define M_MC_INTERLEAVE _SB_MAKEMASK(18, S_MC_INTERLEAVE) |
464 | #define V_MC_INTERLEAVE(x) _SB_MAKEVALUE(x, S_MC_INTERLEAVE) | 464 | #define V_MC_INTERLEAVE(x) _SB_MAKEVALUE(x, S_MC_INTERLEAVE) |
465 | 465 | ||
466 | #define S_MC_INTLV_MBZ 25 | 466 | #define S_MC_INTLV_MBZ 25 |
467 | #define M_MC_INTLV_MBZ _SB_MAKEMASK(39, S_MC_INTLV_MBZ) | 467 | #define M_MC_INTLV_MBZ _SB_MAKEMASK(39, S_MC_INTLV_MBZ) |
468 | 468 | ||
469 | /* | 469 | /* |
470 | * Row Address Bits Register (Table 6-20) | 470 | * Row Address Bits Register (Table 6-20) |
471 | */ | 471 | */ |
472 | 472 | ||
473 | #define S_MC_RAS_RESERVED 0 | 473 | #define S_MC_RAS_RESERVED 0 |
474 | #define M_MC_RAS_RESERVED _SB_MAKEMASK(5, S_MC_RAS_RESERVED) | 474 | #define M_MC_RAS_RESERVED _SB_MAKEMASK(5, S_MC_RAS_RESERVED) |
475 | 475 | ||
476 | #define S_MC_RAS_SELECT 12 | 476 | #define S_MC_RAS_SELECT 12 |
477 | #define M_MC_RAS_SELECT _SB_MAKEMASK(25, S_MC_RAS_SELECT) | 477 | #define M_MC_RAS_SELECT _SB_MAKEMASK(25, S_MC_RAS_SELECT) |
478 | #define V_MC_RAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_RAS_SELECT) | 478 | #define V_MC_RAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_RAS_SELECT) |
479 | 479 | ||
480 | #define S_MC_RAS_MBZ 37 | 480 | #define S_MC_RAS_MBZ 37 |
481 | #define M_MC_RAS_MBZ _SB_MAKEMASK(27, S_MC_RAS_MBZ) | 481 | #define M_MC_RAS_MBZ _SB_MAKEMASK(27, S_MC_RAS_MBZ) |
482 | 482 | ||
483 | 483 | ||
484 | /* | 484 | /* |
485 | * Column Address Bits Register (Table 6-21) | 485 | * Column Address Bits Register (Table 6-21) |
486 | */ | 486 | */ |
487 | 487 | ||
488 | #define S_MC_CAS_RESERVED 0 | 488 | #define S_MC_CAS_RESERVED 0 |
489 | #define M_MC_CAS_RESERVED _SB_MAKEMASK(5, S_MC_CAS_RESERVED) | 489 | #define M_MC_CAS_RESERVED _SB_MAKEMASK(5, S_MC_CAS_RESERVED) |
490 | 490 | ||
491 | #define S_MC_CAS_SELECT 5 | 491 | #define S_MC_CAS_SELECT 5 |
492 | #define M_MC_CAS_SELECT _SB_MAKEMASK(18, S_MC_CAS_SELECT) | 492 | #define M_MC_CAS_SELECT _SB_MAKEMASK(18, S_MC_CAS_SELECT) |
493 | #define V_MC_CAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_CAS_SELECT) | 493 | #define V_MC_CAS_SELECT(x) _SB_MAKEVALUE(x, S_MC_CAS_SELECT) |
494 | 494 | ||
495 | #define S_MC_CAS_MBZ 23 | 495 | #define S_MC_CAS_MBZ 23 |
496 | #define M_MC_CAS_MBZ _SB_MAKEMASK(41, S_MC_CAS_MBZ) | 496 | #define M_MC_CAS_MBZ _SB_MAKEMASK(41, S_MC_CAS_MBZ) |
497 | 497 | ||
498 | 498 | ||
499 | /* | 499 | /* |
500 | * Bank Address Address Bits Register (Table 6-22) | 500 | * Bank Address Address Bits Register (Table 6-22) |
501 | */ | 501 | */ |
502 | 502 | ||
503 | #define S_MC_BA_RESERVED 0 | 503 | #define S_MC_BA_RESERVED 0 |
504 | #define M_MC_BA_RESERVED _SB_MAKEMASK(5, S_MC_BA_RESERVED) | 504 | #define M_MC_BA_RESERVED _SB_MAKEMASK(5, S_MC_BA_RESERVED) |
505 | 505 | ||
506 | #define S_MC_BA_SELECT 5 | 506 | #define S_MC_BA_SELECT 5 |
507 | #define M_MC_BA_SELECT _SB_MAKEMASK(20, S_MC_BA_SELECT) | 507 | #define M_MC_BA_SELECT _SB_MAKEMASK(20, S_MC_BA_SELECT) |
508 | #define V_MC_BA_SELECT(x) _SB_MAKEVALUE(x, S_MC_BA_SELECT) | 508 | #define V_MC_BA_SELECT(x) _SB_MAKEVALUE(x, S_MC_BA_SELECT) |
509 | 509 | ||
510 | #define S_MC_BA_MBZ 25 | 510 | #define S_MC_BA_MBZ 25 |
511 | #define M_MC_BA_MBZ _SB_MAKEMASK(39, S_MC_BA_MBZ) | 511 | #define M_MC_BA_MBZ _SB_MAKEMASK(39, S_MC_BA_MBZ) |
512 | 512 | ||
513 | /* | 513 | /* |
514 | * Chip Select Attribute Register (Table 6-23) | 514 | * Chip Select Attribute Register (Table 6-23) |
515 | */ | 515 | */ |
516 | 516 | ||
517 | #define K_MC_CS_ATTR_CLOSED 0 | 517 | #define K_MC_CS_ATTR_CLOSED 0 |
518 | #define K_MC_CS_ATTR_CASCHECK 1 | 518 | #define K_MC_CS_ATTR_CASCHECK 1 |
519 | #define K_MC_CS_ATTR_HINT 2 | 519 | #define K_MC_CS_ATTR_HINT 2 |
520 | #define K_MC_CS_ATTR_OPEN 3 | 520 | #define K_MC_CS_ATTR_OPEN 3 |
521 | 521 | ||
522 | #define S_MC_CS0_PAGE 0 | 522 | #define S_MC_CS0_PAGE 0 |
523 | #define M_MC_CS0_PAGE _SB_MAKEMASK(2, S_MC_CS0_PAGE) | 523 | #define M_MC_CS0_PAGE _SB_MAKEMASK(2, S_MC_CS0_PAGE) |
524 | #define V_MC_CS0_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS0_PAGE) | 524 | #define V_MC_CS0_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS0_PAGE) |
525 | #define G_MC_CS0_PAGE(x) _SB_GETVALUE(x, S_MC_CS0_PAGE, M_MC_CS0_PAGE) | 525 | #define G_MC_CS0_PAGE(x) _SB_GETVALUE(x, S_MC_CS0_PAGE, M_MC_CS0_PAGE) |
526 | 526 | ||
527 | #define S_MC_CS1_PAGE 16 | 527 | #define S_MC_CS1_PAGE 16 |
528 | #define M_MC_CS1_PAGE _SB_MAKEMASK(2, S_MC_CS1_PAGE) | 528 | #define M_MC_CS1_PAGE _SB_MAKEMASK(2, S_MC_CS1_PAGE) |
529 | #define V_MC_CS1_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS1_PAGE) | 529 | #define V_MC_CS1_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS1_PAGE) |
530 | #define G_MC_CS1_PAGE(x) _SB_GETVALUE(x, S_MC_CS1_PAGE, M_MC_CS1_PAGE) | 530 | #define G_MC_CS1_PAGE(x) _SB_GETVALUE(x, S_MC_CS1_PAGE, M_MC_CS1_PAGE) |
531 | 531 | ||
532 | #define S_MC_CS2_PAGE 32 | 532 | #define S_MC_CS2_PAGE 32 |
533 | #define M_MC_CS2_PAGE _SB_MAKEMASK(2, S_MC_CS2_PAGE) | 533 | #define M_MC_CS2_PAGE _SB_MAKEMASK(2, S_MC_CS2_PAGE) |
534 | #define V_MC_CS2_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS2_PAGE) | 534 | #define V_MC_CS2_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS2_PAGE) |
535 | #define G_MC_CS2_PAGE(x) _SB_GETVALUE(x, S_MC_CS2_PAGE, M_MC_CS2_PAGE) | 535 | #define G_MC_CS2_PAGE(x) _SB_GETVALUE(x, S_MC_CS2_PAGE, M_MC_CS2_PAGE) |
536 | 536 | ||
537 | #define S_MC_CS3_PAGE 48 | 537 | #define S_MC_CS3_PAGE 48 |
538 | #define M_MC_CS3_PAGE _SB_MAKEMASK(2, S_MC_CS3_PAGE) | 538 | #define M_MC_CS3_PAGE _SB_MAKEMASK(2, S_MC_CS3_PAGE) |
539 | #define V_MC_CS3_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS3_PAGE) | 539 | #define V_MC_CS3_PAGE(x) _SB_MAKEVALUE(x, S_MC_CS3_PAGE) |
540 | #define G_MC_CS3_PAGE(x) _SB_GETVALUE(x, S_MC_CS3_PAGE, M_MC_CS3_PAGE) | 540 | #define G_MC_CS3_PAGE(x) _SB_GETVALUE(x, S_MC_CS3_PAGE, M_MC_CS3_PAGE) |
541 | 541 | ||
542 | /* | 542 | /* |
543 | * ECC Test ECC Register (Table 6-25) | 543 | * ECC Test ECC Register (Table 6-25) |
544 | */ | 544 | */ |
545 | 545 | ||
546 | #define S_MC_ECC_INVERT 0 | 546 | #define S_MC_ECC_INVERT 0 |
547 | #define M_MC_ECC_INVERT _SB_MAKEMASK(8, S_MC_ECC_INVERT) | 547 | #define M_MC_ECC_INVERT _SB_MAKEMASK(8, S_MC_ECC_INVERT) |
548 | 548 | ||
549 | 549 | ||
550 | #endif | 550 | #endif |
diff --git a/arch/mips/include/asm/sibyte/sb1250_regs.h b/arch/mips/include/asm/sibyte/sb1250_regs.h index 29b9f0b26b3a..ee86ca0fad32 100644 --- a/arch/mips/include/asm/sibyte/sb1250_regs.h +++ b/arch/mips/include/asm/sibyte/sb1250_regs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Register Definitions File: sb1250_regs.h | 4 | * Register Definitions File: sb1250_regs.h |
5 | * | 5 | * |
6 | * This module contains the addresses of the on-chip peripherals | 6 | * This module contains the addresses of the on-chip peripherals |
7 | * on the SB1250. | 7 | * on the SB1250. |
@@ -61,45 +61,45 @@ | |||
61 | */ | 61 | */ |
62 | 62 | ||
63 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ | 63 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ |
64 | #define A_MC_BASE_0 0x0010051000 | 64 | #define A_MC_BASE_0 0x0010051000 |
65 | #define A_MC_BASE_1 0x0010052000 | 65 | #define A_MC_BASE_1 0x0010052000 |
66 | #define MC_REGISTER_SPACING 0x1000 | 66 | #define MC_REGISTER_SPACING 0x1000 |
67 | 67 | ||
68 | #define A_MC_BASE(ctlid) ((ctlid)*MC_REGISTER_SPACING+A_MC_BASE_0) | 68 | #define A_MC_BASE(ctlid) ((ctlid)*MC_REGISTER_SPACING+A_MC_BASE_0) |
69 | #define A_MC_REGISTER(ctlid, reg) (A_MC_BASE(ctlid)+(reg)) | 69 | #define A_MC_REGISTER(ctlid, reg) (A_MC_BASE(ctlid)+(reg)) |
70 | 70 | ||
71 | #define R_MC_CONFIG 0x0000000100 | 71 | #define R_MC_CONFIG 0x0000000100 |
72 | #define R_MC_DRAMCMD 0x0000000120 | 72 | #define R_MC_DRAMCMD 0x0000000120 |
73 | #define R_MC_DRAMMODE 0x0000000140 | 73 | #define R_MC_DRAMMODE 0x0000000140 |
74 | #define R_MC_TIMING1 0x0000000160 | 74 | #define R_MC_TIMING1 0x0000000160 |
75 | #define R_MC_TIMING2 0x0000000180 | 75 | #define R_MC_TIMING2 0x0000000180 |
76 | #define R_MC_CS_START 0x00000001A0 | 76 | #define R_MC_CS_START 0x00000001A0 |
77 | #define R_MC_CS_END 0x00000001C0 | 77 | #define R_MC_CS_END 0x00000001C0 |
78 | #define R_MC_CS_INTERLEAVE 0x00000001E0 | 78 | #define R_MC_CS_INTERLEAVE 0x00000001E0 |
79 | #define S_MC_CS_STARTEND 16 | 79 | #define S_MC_CS_STARTEND 16 |
80 | 80 | ||
81 | #define R_MC_CSX_BASE 0x0000000200 | 81 | #define R_MC_CSX_BASE 0x0000000200 |
82 | #define R_MC_CSX_ROW 0x0000000000 /* relative to CSX_BASE, above */ | 82 | #define R_MC_CSX_ROW 0x0000000000 /* relative to CSX_BASE, above */ |
83 | #define R_MC_CSX_COL 0x0000000020 /* relative to CSX_BASE, above */ | 83 | #define R_MC_CSX_COL 0x0000000020 /* relative to CSX_BASE, above */ |
84 | #define R_MC_CSX_BA 0x0000000040 /* relative to CSX_BASE, above */ | 84 | #define R_MC_CSX_BA 0x0000000040 /* relative to CSX_BASE, above */ |
85 | #define MC_CSX_SPACING 0x0000000060 /* relative to CSX_BASE, above */ | 85 | #define MC_CSX_SPACING 0x0000000060 /* relative to CSX_BASE, above */ |
86 | 86 | ||
87 | #define R_MC_CS0_ROW 0x0000000200 | 87 | #define R_MC_CS0_ROW 0x0000000200 |
88 | #define R_MC_CS0_COL 0x0000000220 | 88 | #define R_MC_CS0_COL 0x0000000220 |
89 | #define R_MC_CS0_BA 0x0000000240 | 89 | #define R_MC_CS0_BA 0x0000000240 |
90 | #define R_MC_CS1_ROW 0x0000000260 | 90 | #define R_MC_CS1_ROW 0x0000000260 |
91 | #define R_MC_CS1_COL 0x0000000280 | 91 | #define R_MC_CS1_COL 0x0000000280 |
92 | #define R_MC_CS1_BA 0x00000002A0 | 92 | #define R_MC_CS1_BA 0x00000002A0 |
93 | #define R_MC_CS2_ROW 0x00000002C0 | 93 | #define R_MC_CS2_ROW 0x00000002C0 |
94 | #define R_MC_CS2_COL 0x00000002E0 | 94 | #define R_MC_CS2_COL 0x00000002E0 |
95 | #define R_MC_CS2_BA 0x0000000300 | 95 | #define R_MC_CS2_BA 0x0000000300 |
96 | #define R_MC_CS3_ROW 0x0000000320 | 96 | #define R_MC_CS3_ROW 0x0000000320 |
97 | #define R_MC_CS3_COL 0x0000000340 | 97 | #define R_MC_CS3_COL 0x0000000340 |
98 | #define R_MC_CS3_BA 0x0000000360 | 98 | #define R_MC_CS3_BA 0x0000000360 |
99 | #define R_MC_CS_ATTR 0x0000000380 | 99 | #define R_MC_CS_ATTR 0x0000000380 |
100 | #define R_MC_TEST_DATA 0x0000000400 | 100 | #define R_MC_TEST_DATA 0x0000000400 |
101 | #define R_MC_TEST_ECC 0x0000000420 | 101 | #define R_MC_TEST_ECC 0x0000000420 |
102 | #define R_MC_MCLK_CFG 0x0000000500 | 102 | #define R_MC_MCLK_CFG 0x0000000500 |
103 | 103 | ||
104 | #endif /* 1250 & 112x */ | 104 | #endif /* 1250 & 112x */ |
105 | 105 | ||
@@ -109,14 +109,14 @@ | |||
109 | 109 | ||
110 | #if SIBYTE_HDR_FEATURE_1250_112x /* This L2C only on 1250/112x */ | 110 | #if SIBYTE_HDR_FEATURE_1250_112x /* This L2C only on 1250/112x */ |
111 | 111 | ||
112 | #define A_L2_READ_TAG 0x0010040018 | 112 | #define A_L2_READ_TAG 0x0010040018 |
113 | #define A_L2_ECC_TAG 0x0010040038 | 113 | #define A_L2_ECC_TAG 0x0010040038 |
114 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 114 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
115 | #define A_L2_READ_MISC 0x0010040058 | 115 | #define A_L2_READ_MISC 0x0010040058 |
116 | #endif /* 1250 PASS3 || 112x PASS1 */ | 116 | #endif /* 1250 PASS3 || 112x PASS1 */ |
117 | #define A_L2_WAY_DISABLE 0x0010041000 | 117 | #define A_L2_WAY_DISABLE 0x0010041000 |
118 | #define A_L2_MAKEDISABLE(x) (A_L2_WAY_DISABLE | (((~(x))&0x0F) << 8)) | 118 | #define A_L2_MAKEDISABLE(x) (A_L2_WAY_DISABLE | (((~(x))&0x0F) << 8)) |
119 | #define A_L2_MGMT_TAG_BASE 0x00D0000000 | 119 | #define A_L2_MGMT_TAG_BASE 0x00D0000000 |
120 | 120 | ||
121 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 121 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
122 | #define A_L2_CACHE_DISABLE 0x0010042000 | 122 | #define A_L2_CACHE_DISABLE 0x0010042000 |
@@ -124,10 +124,10 @@ | |||
124 | #define A_L2_MISC_CONFIG 0x0010043000 | 124 | #define A_L2_MISC_CONFIG 0x0010043000 |
125 | #endif /* 1250 PASS2 || 112x PASS1 */ | 125 | #endif /* 1250 PASS2 || 112x PASS1 */ |
126 | 126 | ||
127 | /* Backward-compatibility definitions. */ | 127 | /* Backward-compatibility definitions. */ |
128 | /* XXX: discourage people from using these constants. */ | 128 | /* XXX: discourage people from using these constants. */ |
129 | #define A_L2_READ_ADDRESS A_L2_READ_TAG | 129 | #define A_L2_READ_ADDRESS A_L2_READ_TAG |
130 | #define A_L2_EEC_ADDRESS A_L2_ECC_TAG | 130 | #define A_L2_EEC_ADDRESS A_L2_ECC_TAG |
131 | 131 | ||
132 | #endif | 132 | #endif |
133 | 133 | ||
@@ -137,8 +137,8 @@ | |||
137 | ********************************************************************* */ | 137 | ********************************************************************* */ |
138 | 138 | ||
139 | #if SIBYTE_HDR_FEATURE_1250_112x /* This PCI/HT only on 1250/112x */ | 139 | #if SIBYTE_HDR_FEATURE_1250_112x /* This PCI/HT only on 1250/112x */ |
140 | #define A_PCI_TYPE00_HEADER 0x00DE000000 | 140 | #define A_PCI_TYPE00_HEADER 0x00DE000000 |
141 | #define A_PCI_TYPE01_HEADER 0x00DE000800 | 141 | #define A_PCI_TYPE01_HEADER 0x00DE000800 |
142 | #endif | 142 | #endif |
143 | 143 | ||
144 | 144 | ||
@@ -146,121 +146,121 @@ | |||
146 | * Ethernet DMA and MACs | 146 | * Ethernet DMA and MACs |
147 | ********************************************************************* */ | 147 | ********************************************************************* */ |
148 | 148 | ||
149 | #define A_MAC_BASE_0 0x0010064000 | 149 | #define A_MAC_BASE_0 0x0010064000 |
150 | #define A_MAC_BASE_1 0x0010065000 | 150 | #define A_MAC_BASE_1 0x0010065000 |
151 | #if SIBYTE_HDR_FEATURE_CHIP(1250) | 151 | #if SIBYTE_HDR_FEATURE_CHIP(1250) |
152 | #define A_MAC_BASE_2 0x0010066000 | 152 | #define A_MAC_BASE_2 0x0010066000 |
153 | #endif /* 1250 */ | 153 | #endif /* 1250 */ |
154 | 154 | ||
155 | #define MAC_SPACING 0x1000 | 155 | #define MAC_SPACING 0x1000 |
156 | #define MAC_DMA_TXRX_SPACING 0x0400 | 156 | #define MAC_DMA_TXRX_SPACING 0x0400 |
157 | #define MAC_DMA_CHANNEL_SPACING 0x0100 | 157 | #define MAC_DMA_CHANNEL_SPACING 0x0100 |
158 | #define DMA_RX 0 | 158 | #define DMA_RX 0 |
159 | #define DMA_TX 1 | 159 | #define DMA_TX 1 |
160 | #define MAC_NUM_DMACHAN 2 /* channels per direction */ | 160 | #define MAC_NUM_DMACHAN 2 /* channels per direction */ |
161 | 161 | ||
162 | /* XXX: not correct; depends on SOC type. */ | 162 | /* XXX: not correct; depends on SOC type. */ |
163 | #define MAC_NUM_PORTS 3 | 163 | #define MAC_NUM_PORTS 3 |
164 | 164 | ||
165 | #define A_MAC_CHANNEL_BASE(macnum) \ | 165 | #define A_MAC_CHANNEL_BASE(macnum) \ |
166 | (A_MAC_BASE_0 + \ | 166 | (A_MAC_BASE_0 + \ |
167 | MAC_SPACING*(macnum)) | 167 | MAC_SPACING*(macnum)) |
168 | 168 | ||
169 | #define A_MAC_REGISTER(macnum,reg) \ | 169 | #define A_MAC_REGISTER(macnum,reg) \ |
170 | (A_MAC_BASE_0 + \ | 170 | (A_MAC_BASE_0 + \ |
171 | MAC_SPACING*(macnum) + (reg)) | 171 | MAC_SPACING*(macnum) + (reg)) |
172 | 172 | ||
173 | 173 | ||
174 | #define R_MAC_DMA_CHANNELS 0x800 /* Relative to A_MAC_CHANNEL_BASE */ | 174 | #define R_MAC_DMA_CHANNELS 0x800 /* Relative to A_MAC_CHANNEL_BASE */ |
175 | 175 | ||
176 | #define A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) \ | 176 | #define A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) \ |
177 | ((A_MAC_CHANNEL_BASE(macnum)) + \ | 177 | ((A_MAC_CHANNEL_BASE(macnum)) + \ |
178 | R_MAC_DMA_CHANNELS + \ | 178 | R_MAC_DMA_CHANNELS + \ |
179 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ | 179 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ |
180 | (MAC_DMA_CHANNEL_SPACING*(chan))) | 180 | (MAC_DMA_CHANNEL_SPACING*(chan))) |
181 | 181 | ||
182 | #define R_MAC_DMA_CHANNEL_BASE(txrx, chan) \ | 182 | #define R_MAC_DMA_CHANNEL_BASE(txrx, chan) \ |
183 | (R_MAC_DMA_CHANNELS + \ | 183 | (R_MAC_DMA_CHANNELS + \ |
184 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ | 184 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ |
185 | (MAC_DMA_CHANNEL_SPACING*(chan))) | 185 | (MAC_DMA_CHANNEL_SPACING*(chan))) |
186 | 186 | ||
187 | #define A_MAC_DMA_REGISTER(macnum, txrx, chan, reg) \ | 187 | #define A_MAC_DMA_REGISTER(macnum, txrx, chan, reg) \ |
188 | (A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) + \ | 188 | (A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) + \ |
189 | (reg)) | 189 | (reg)) |
190 | 190 | ||
191 | #define R_MAC_DMA_REGISTER(txrx, chan, reg) \ | 191 | #define R_MAC_DMA_REGISTER(txrx, chan, reg) \ |
192 | (R_MAC_DMA_CHANNEL_BASE(txrx, chan) + \ | 192 | (R_MAC_DMA_CHANNEL_BASE(txrx, chan) + \ |
193 | (reg)) | 193 | (reg)) |
194 | 194 | ||
195 | /* | 195 | /* |
196 | * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE | 196 | * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE |
197 | */ | 197 | */ |
198 | 198 | ||
199 | #define R_MAC_DMA_CONFIG0 0x00000000 | 199 | #define R_MAC_DMA_CONFIG0 0x00000000 |
200 | #define R_MAC_DMA_CONFIG1 0x00000008 | 200 | #define R_MAC_DMA_CONFIG1 0x00000008 |
201 | #define R_MAC_DMA_DSCR_BASE 0x00000010 | 201 | #define R_MAC_DMA_DSCR_BASE 0x00000010 |
202 | #define R_MAC_DMA_DSCR_CNT 0x00000018 | 202 | #define R_MAC_DMA_DSCR_CNT 0x00000018 |
203 | #define R_MAC_DMA_CUR_DSCRA 0x00000020 | 203 | #define R_MAC_DMA_CUR_DSCRA 0x00000020 |
204 | #define R_MAC_DMA_CUR_DSCRB 0x00000028 | 204 | #define R_MAC_DMA_CUR_DSCRB 0x00000028 |
205 | #define R_MAC_DMA_CUR_DSCRADDR 0x00000030 | 205 | #define R_MAC_DMA_CUR_DSCRADDR 0x00000030 |
206 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) | 206 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
207 | #define R_MAC_DMA_OODPKTLOST_RX 0x00000038 /* rx only */ | 207 | #define R_MAC_DMA_OODPKTLOST_RX 0x00000038 /* rx only */ |
208 | #endif /* 1250 PASS3 || 112x PASS1 */ | 208 | #endif /* 1250 PASS3 || 112x PASS1 */ |
209 | 209 | ||
210 | /* | 210 | /* |
211 | * RMON Counters | 211 | * RMON Counters |
212 | */ | 212 | */ |
213 | 213 | ||
214 | #define R_MAC_RMON_TX_BYTES 0x00000000 | 214 | #define R_MAC_RMON_TX_BYTES 0x00000000 |
215 | #define R_MAC_RMON_COLLISIONS 0x00000008 | 215 | #define R_MAC_RMON_COLLISIONS 0x00000008 |
216 | #define R_MAC_RMON_LATE_COL 0x00000010 | 216 | #define R_MAC_RMON_LATE_COL 0x00000010 |
217 | #define R_MAC_RMON_EX_COL 0x00000018 | 217 | #define R_MAC_RMON_EX_COL 0x00000018 |
218 | #define R_MAC_RMON_FCS_ERROR 0x00000020 | 218 | #define R_MAC_RMON_FCS_ERROR 0x00000020 |
219 | #define R_MAC_RMON_TX_ABORT 0x00000028 | 219 | #define R_MAC_RMON_TX_ABORT 0x00000028 |
220 | /* Counter #6 (0x30) now reserved */ | 220 | /* Counter #6 (0x30) now reserved */ |
221 | #define R_MAC_RMON_TX_BAD 0x00000038 | 221 | #define R_MAC_RMON_TX_BAD 0x00000038 |
222 | #define R_MAC_RMON_TX_GOOD 0x00000040 | 222 | #define R_MAC_RMON_TX_GOOD 0x00000040 |
223 | #define R_MAC_RMON_TX_RUNT 0x00000048 | 223 | #define R_MAC_RMON_TX_RUNT 0x00000048 |
224 | #define R_MAC_RMON_TX_OVERSIZE 0x00000050 | 224 | #define R_MAC_RMON_TX_OVERSIZE 0x00000050 |
225 | #define R_MAC_RMON_RX_BYTES 0x00000080 | 225 | #define R_MAC_RMON_RX_BYTES 0x00000080 |
226 | #define R_MAC_RMON_RX_MCAST 0x00000088 | 226 | #define R_MAC_RMON_RX_MCAST 0x00000088 |
227 | #define R_MAC_RMON_RX_BCAST 0x00000090 | 227 | #define R_MAC_RMON_RX_BCAST 0x00000090 |
228 | #define R_MAC_RMON_RX_BAD 0x00000098 | 228 | #define R_MAC_RMON_RX_BAD 0x00000098 |
229 | #define R_MAC_RMON_RX_GOOD 0x000000A0 | 229 | #define R_MAC_RMON_RX_GOOD 0x000000A0 |
230 | #define R_MAC_RMON_RX_RUNT 0x000000A8 | 230 | #define R_MAC_RMON_RX_RUNT 0x000000A8 |
231 | #define R_MAC_RMON_RX_OVERSIZE 0x000000B0 | 231 | #define R_MAC_RMON_RX_OVERSIZE 0x000000B0 |
232 | #define R_MAC_RMON_RX_FCS_ERROR 0x000000B8 | 232 | #define R_MAC_RMON_RX_FCS_ERROR 0x000000B8 |
233 | #define R_MAC_RMON_RX_LENGTH_ERROR 0x000000C0 | 233 | #define R_MAC_RMON_RX_LENGTH_ERROR 0x000000C0 |
234 | #define R_MAC_RMON_RX_CODE_ERROR 0x000000C8 | 234 | #define R_MAC_RMON_RX_CODE_ERROR 0x000000C8 |
235 | #define R_MAC_RMON_RX_ALIGN_ERROR 0x000000D0 | 235 | #define R_MAC_RMON_RX_ALIGN_ERROR 0x000000D0 |
236 | 236 | ||
237 | /* Updated to spec 0.2 */ | 237 | /* Updated to spec 0.2 */ |
238 | #define R_MAC_CFG 0x00000100 | 238 | #define R_MAC_CFG 0x00000100 |
239 | #define R_MAC_THRSH_CFG 0x00000108 | 239 | #define R_MAC_THRSH_CFG 0x00000108 |
240 | #define R_MAC_VLANTAG 0x00000110 | 240 | #define R_MAC_VLANTAG 0x00000110 |
241 | #define R_MAC_FRAMECFG 0x00000118 | 241 | #define R_MAC_FRAMECFG 0x00000118 |
242 | #define R_MAC_EOPCNT 0x00000120 | 242 | #define R_MAC_EOPCNT 0x00000120 |
243 | #define R_MAC_FIFO_PTRS 0x00000128 | 243 | #define R_MAC_FIFO_PTRS 0x00000128 |
244 | #define R_MAC_ADFILTER_CFG 0x00000200 | 244 | #define R_MAC_ADFILTER_CFG 0x00000200 |
245 | #define R_MAC_ETHERNET_ADDR 0x00000208 | 245 | #define R_MAC_ETHERNET_ADDR 0x00000208 |
246 | #define R_MAC_PKT_TYPE 0x00000210 | 246 | #define R_MAC_PKT_TYPE 0x00000210 |
247 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 247 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
248 | #define R_MAC_ADMASK0 0x00000218 | 248 | #define R_MAC_ADMASK0 0x00000218 |
249 | #define R_MAC_ADMASK1 0x00000220 | 249 | #define R_MAC_ADMASK1 0x00000220 |
250 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 250 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
251 | #define R_MAC_HASH_BASE 0x00000240 | 251 | #define R_MAC_HASH_BASE 0x00000240 |
252 | #define R_MAC_ADDR_BASE 0x00000280 | 252 | #define R_MAC_ADDR_BASE 0x00000280 |
253 | #define R_MAC_CHLO0_BASE 0x00000300 | 253 | #define R_MAC_CHLO0_BASE 0x00000300 |
254 | #define R_MAC_CHUP0_BASE 0x00000320 | 254 | #define R_MAC_CHUP0_BASE 0x00000320 |
255 | #define R_MAC_ENABLE 0x00000400 | 255 | #define R_MAC_ENABLE 0x00000400 |
256 | #define R_MAC_STATUS 0x00000408 | 256 | #define R_MAC_STATUS 0x00000408 |
257 | #define R_MAC_INT_MASK 0x00000410 | 257 | #define R_MAC_INT_MASK 0x00000410 |
258 | #define R_MAC_TXD_CTL 0x00000420 | 258 | #define R_MAC_TXD_CTL 0x00000420 |
259 | #define R_MAC_MDIO 0x00000428 | 259 | #define R_MAC_MDIO 0x00000428 |
260 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 260 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
261 | #define R_MAC_STATUS1 0x00000430 | 261 | #define R_MAC_STATUS1 0x00000430 |
262 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 262 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
263 | #define R_MAC_DEBUG_STATUS 0x00000448 | 263 | #define R_MAC_DEBUG_STATUS 0x00000448 |
264 | 264 | ||
265 | #define MAC_HASH_COUNT 8 | 265 | #define MAC_HASH_COUNT 8 |
266 | #define MAC_ADDR_COUNT 8 | 266 | #define MAC_ADDR_COUNT 8 |
@@ -273,11 +273,11 @@ | |||
273 | 273 | ||
274 | 274 | ||
275 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ | 275 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ |
276 | #define R_DUART_NUM_PORTS 2 | 276 | #define R_DUART_NUM_PORTS 2 |
277 | 277 | ||
278 | #define A_DUART 0x0010060000 | 278 | #define A_DUART 0x0010060000 |
279 | 279 | ||
280 | #define DUART_CHANREG_SPACING 0x100 | 280 | #define DUART_CHANREG_SPACING 0x100 |
281 | 281 | ||
282 | #define A_DUART_CHANREG(chan, reg) \ | 282 | #define A_DUART_CHANREG(chan, reg) \ |
283 | (A_DUART + DUART_CHANREG_SPACING * ((chan) + 1) + (reg)) | 283 | (A_DUART + DUART_CHANREG_SPACING * ((chan) + 1) + (reg)) |
@@ -341,44 +341,44 @@ | |||
341 | * These constants are the absolute addresses. | 341 | * These constants are the absolute addresses. |
342 | */ | 342 | */ |
343 | 343 | ||
344 | #define A_DUART_MODE_REG_1_A 0x0010060100 | 344 | #define A_DUART_MODE_REG_1_A 0x0010060100 |
345 | #define A_DUART_MODE_REG_2_A 0x0010060110 | 345 | #define A_DUART_MODE_REG_2_A 0x0010060110 |
346 | #define A_DUART_STATUS_A 0x0010060120 | 346 | #define A_DUART_STATUS_A 0x0010060120 |
347 | #define A_DUART_CLK_SEL_A 0x0010060130 | 347 | #define A_DUART_CLK_SEL_A 0x0010060130 |
348 | #define A_DUART_CMD_A 0x0010060150 | 348 | #define A_DUART_CMD_A 0x0010060150 |
349 | #define A_DUART_RX_HOLD_A 0x0010060160 | 349 | #define A_DUART_RX_HOLD_A 0x0010060160 |
350 | #define A_DUART_TX_HOLD_A 0x0010060170 | 350 | #define A_DUART_TX_HOLD_A 0x0010060170 |
351 | 351 | ||
352 | #define A_DUART_MODE_REG_1_B 0x0010060200 | 352 | #define A_DUART_MODE_REG_1_B 0x0010060200 |
353 | #define A_DUART_MODE_REG_2_B 0x0010060210 | 353 | #define A_DUART_MODE_REG_2_B 0x0010060210 |
354 | #define A_DUART_STATUS_B 0x0010060220 | 354 | #define A_DUART_STATUS_B 0x0010060220 |
355 | #define A_DUART_CLK_SEL_B 0x0010060230 | 355 | #define A_DUART_CLK_SEL_B 0x0010060230 |
356 | #define A_DUART_CMD_B 0x0010060250 | 356 | #define A_DUART_CMD_B 0x0010060250 |
357 | #define A_DUART_RX_HOLD_B 0x0010060260 | 357 | #define A_DUART_RX_HOLD_B 0x0010060260 |
358 | #define A_DUART_TX_HOLD_B 0x0010060270 | 358 | #define A_DUART_TX_HOLD_B 0x0010060270 |
359 | 359 | ||
360 | #define A_DUART_INPORT_CHNG 0x0010060300 | 360 | #define A_DUART_INPORT_CHNG 0x0010060300 |
361 | #define A_DUART_AUX_CTRL 0x0010060310 | 361 | #define A_DUART_AUX_CTRL 0x0010060310 |
362 | #define A_DUART_ISR_A 0x0010060320 | 362 | #define A_DUART_ISR_A 0x0010060320 |
363 | #define A_DUART_IMR_A 0x0010060330 | 363 | #define A_DUART_IMR_A 0x0010060330 |
364 | #define A_DUART_ISR_B 0x0010060340 | 364 | #define A_DUART_ISR_B 0x0010060340 |
365 | #define A_DUART_IMR_B 0x0010060350 | 365 | #define A_DUART_IMR_B 0x0010060350 |
366 | #define A_DUART_OUT_PORT 0x0010060360 | 366 | #define A_DUART_OUT_PORT 0x0010060360 |
367 | #define A_DUART_OPCR 0x0010060370 | 367 | #define A_DUART_OPCR 0x0010060370 |
368 | #define A_DUART_IN_PORT 0x0010060380 | 368 | #define A_DUART_IN_PORT 0x0010060380 |
369 | #define A_DUART_ISR 0x0010060390 | 369 | #define A_DUART_ISR 0x0010060390 |
370 | #define A_DUART_IMR 0x00100603A0 | 370 | #define A_DUART_IMR 0x00100603A0 |
371 | #define A_DUART_SET_OPR 0x00100603B0 | 371 | #define A_DUART_SET_OPR 0x00100603B0 |
372 | #define A_DUART_CLEAR_OPR 0x00100603C0 | 372 | #define A_DUART_CLEAR_OPR 0x00100603C0 |
373 | #define A_DUART_INPORT_CHNG_A 0x00100603D0 | 373 | #define A_DUART_INPORT_CHNG_A 0x00100603D0 |
374 | #define A_DUART_INPORT_CHNG_B 0x00100603E0 | 374 | #define A_DUART_INPORT_CHNG_B 0x00100603E0 |
375 | 375 | ||
376 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 376 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
377 | #define A_DUART_FULL_CTL_A 0x0010060140 | 377 | #define A_DUART_FULL_CTL_A 0x0010060140 |
378 | #define A_DUART_FULL_CTL_B 0x0010060240 | 378 | #define A_DUART_FULL_CTL_B 0x0010060240 |
379 | 379 | ||
380 | #define A_DUART_OPCR_A 0x0010060180 | 380 | #define A_DUART_OPCR_A 0x0010060180 |
381 | #define A_DUART_OPCR_B 0x0010060280 | 381 | #define A_DUART_OPCR_B 0x0010060280 |
382 | 382 | ||
383 | #define A_DUART_INPORT_CHNG_DEBUG 0x00100603F0 | 383 | #define A_DUART_INPORT_CHNG_DEBUG 0x00100603F0 |
384 | #endif /* 1250 PASS2 || 112x PASS1 */ | 384 | #endif /* 1250 PASS2 || 112x PASS1 */ |
@@ -391,94 +391,94 @@ | |||
391 | 391 | ||
392 | #if SIBYTE_HDR_FEATURE_1250_112x /* sync serial only on 1250/112x */ | 392 | #if SIBYTE_HDR_FEATURE_1250_112x /* sync serial only on 1250/112x */ |
393 | 393 | ||
394 | #define A_SER_BASE_0 0x0010060400 | 394 | #define A_SER_BASE_0 0x0010060400 |
395 | #define A_SER_BASE_1 0x0010060800 | 395 | #define A_SER_BASE_1 0x0010060800 |
396 | #define SER_SPACING 0x400 | 396 | #define SER_SPACING 0x400 |
397 | 397 | ||
398 | #define SER_DMA_TXRX_SPACING 0x80 | 398 | #define SER_DMA_TXRX_SPACING 0x80 |
399 | 399 | ||
400 | #define SER_NUM_PORTS 2 | 400 | #define SER_NUM_PORTS 2 |
401 | 401 | ||
402 | #define A_SER_CHANNEL_BASE(sernum) \ | 402 | #define A_SER_CHANNEL_BASE(sernum) \ |
403 | (A_SER_BASE_0 + \ | 403 | (A_SER_BASE_0 + \ |
404 | SER_SPACING*(sernum)) | 404 | SER_SPACING*(sernum)) |
405 | 405 | ||
406 | #define A_SER_REGISTER(sernum,reg) \ | 406 | #define A_SER_REGISTER(sernum,reg) \ |
407 | (A_SER_BASE_0 + \ | 407 | (A_SER_BASE_0 + \ |
408 | SER_SPACING*(sernum) + (reg)) | 408 | SER_SPACING*(sernum) + (reg)) |
409 | 409 | ||
410 | 410 | ||
411 | #define R_SER_DMA_CHANNELS 0 /* Relative to A_SER_BASE_x */ | 411 | #define R_SER_DMA_CHANNELS 0 /* Relative to A_SER_BASE_x */ |
412 | 412 | ||
413 | #define A_SER_DMA_CHANNEL_BASE(sernum,txrx) \ | 413 | #define A_SER_DMA_CHANNEL_BASE(sernum,txrx) \ |
414 | ((A_SER_CHANNEL_BASE(sernum)) + \ | 414 | ((A_SER_CHANNEL_BASE(sernum)) + \ |
415 | R_SER_DMA_CHANNELS + \ | 415 | R_SER_DMA_CHANNELS + \ |
416 | (SER_DMA_TXRX_SPACING*(txrx))) | 416 | (SER_DMA_TXRX_SPACING*(txrx))) |
417 | 417 | ||
418 | #define A_SER_DMA_REGISTER(sernum, txrx, reg) \ | 418 | #define A_SER_DMA_REGISTER(sernum, txrx, reg) \ |
419 | (A_SER_DMA_CHANNEL_BASE(sernum, txrx) + \ | 419 | (A_SER_DMA_CHANNEL_BASE(sernum, txrx) + \ |
420 | (reg)) | 420 | (reg)) |
421 | 421 | ||
422 | 422 | ||
423 | /* | 423 | /* |
424 | * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE | 424 | * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE |
425 | */ | 425 | */ |
426 | 426 | ||
427 | #define R_SER_DMA_CONFIG0 0x00000000 | 427 | #define R_SER_DMA_CONFIG0 0x00000000 |
428 | #define R_SER_DMA_CONFIG1 0x00000008 | 428 | #define R_SER_DMA_CONFIG1 0x00000008 |
429 | #define R_SER_DMA_DSCR_BASE 0x00000010 | 429 | #define R_SER_DMA_DSCR_BASE 0x00000010 |
430 | #define R_SER_DMA_DSCR_CNT 0x00000018 | 430 | #define R_SER_DMA_DSCR_CNT 0x00000018 |
431 | #define R_SER_DMA_CUR_DSCRA 0x00000020 | 431 | #define R_SER_DMA_CUR_DSCRA 0x00000020 |
432 | #define R_SER_DMA_CUR_DSCRB 0x00000028 | 432 | #define R_SER_DMA_CUR_DSCRB 0x00000028 |
433 | #define R_SER_DMA_CUR_DSCRADDR 0x00000030 | 433 | #define R_SER_DMA_CUR_DSCRADDR 0x00000030 |
434 | 434 | ||
435 | #define R_SER_DMA_CONFIG0_RX 0x00000000 | 435 | #define R_SER_DMA_CONFIG0_RX 0x00000000 |
436 | #define R_SER_DMA_CONFIG1_RX 0x00000008 | 436 | #define R_SER_DMA_CONFIG1_RX 0x00000008 |
437 | #define R_SER_DMA_DSCR_BASE_RX 0x00000010 | 437 | #define R_SER_DMA_DSCR_BASE_RX 0x00000010 |
438 | #define R_SER_DMA_DSCR_COUNT_RX 0x00000018 | 438 | #define R_SER_DMA_DSCR_COUNT_RX 0x00000018 |
439 | #define R_SER_DMA_CUR_DSCR_A_RX 0x00000020 | 439 | #define R_SER_DMA_CUR_DSCR_A_RX 0x00000020 |
440 | #define R_SER_DMA_CUR_DSCR_B_RX 0x00000028 | 440 | #define R_SER_DMA_CUR_DSCR_B_RX 0x00000028 |
441 | #define R_SER_DMA_CUR_DSCR_ADDR_RX 0x00000030 | 441 | #define R_SER_DMA_CUR_DSCR_ADDR_RX 0x00000030 |
442 | 442 | ||
443 | #define R_SER_DMA_CONFIG0_TX 0x00000080 | 443 | #define R_SER_DMA_CONFIG0_TX 0x00000080 |
444 | #define R_SER_DMA_CONFIG1_TX 0x00000088 | 444 | #define R_SER_DMA_CONFIG1_TX 0x00000088 |
445 | #define R_SER_DMA_DSCR_BASE_TX 0x00000090 | 445 | #define R_SER_DMA_DSCR_BASE_TX 0x00000090 |
446 | #define R_SER_DMA_DSCR_COUNT_TX 0x00000098 | 446 | #define R_SER_DMA_DSCR_COUNT_TX 0x00000098 |
447 | #define R_SER_DMA_CUR_DSCR_A_TX 0x000000A0 | 447 | #define R_SER_DMA_CUR_DSCR_A_TX 0x000000A0 |
448 | #define R_SER_DMA_CUR_DSCR_B_TX 0x000000A8 | 448 | #define R_SER_DMA_CUR_DSCR_B_TX 0x000000A8 |
449 | #define R_SER_DMA_CUR_DSCR_ADDR_TX 0x000000B0 | 449 | #define R_SER_DMA_CUR_DSCR_ADDR_TX 0x000000B0 |
450 | 450 | ||
451 | #define R_SER_MODE 0x00000100 | 451 | #define R_SER_MODE 0x00000100 |
452 | #define R_SER_MINFRM_SZ 0x00000108 | 452 | #define R_SER_MINFRM_SZ 0x00000108 |
453 | #define R_SER_MAXFRM_SZ 0x00000110 | 453 | #define R_SER_MAXFRM_SZ 0x00000110 |
454 | #define R_SER_ADDR 0x00000118 | 454 | #define R_SER_ADDR 0x00000118 |
455 | #define R_SER_USR0_ADDR 0x00000120 | 455 | #define R_SER_USR0_ADDR 0x00000120 |
456 | #define R_SER_USR1_ADDR 0x00000128 | 456 | #define R_SER_USR1_ADDR 0x00000128 |
457 | #define R_SER_USR2_ADDR 0x00000130 | 457 | #define R_SER_USR2_ADDR 0x00000130 |
458 | #define R_SER_USR3_ADDR 0x00000138 | 458 | #define R_SER_USR3_ADDR 0x00000138 |
459 | #define R_SER_CMD 0x00000140 | 459 | #define R_SER_CMD 0x00000140 |
460 | #define R_SER_TX_RD_THRSH 0x00000160 | 460 | #define R_SER_TX_RD_THRSH 0x00000160 |
461 | #define R_SER_TX_WR_THRSH 0x00000168 | 461 | #define R_SER_TX_WR_THRSH 0x00000168 |
462 | #define R_SER_RX_RD_THRSH 0x00000170 | 462 | #define R_SER_RX_RD_THRSH 0x00000170 |
463 | #define R_SER_LINE_MODE 0x00000178 | 463 | #define R_SER_LINE_MODE 0x00000178 |
464 | #define R_SER_DMA_ENABLE 0x00000180 | 464 | #define R_SER_DMA_ENABLE 0x00000180 |
465 | #define R_SER_INT_MASK 0x00000190 | 465 | #define R_SER_INT_MASK 0x00000190 |
466 | #define R_SER_STATUS 0x00000188 | 466 | #define R_SER_STATUS 0x00000188 |
467 | #define R_SER_STATUS_DEBUG 0x000001A8 | 467 | #define R_SER_STATUS_DEBUG 0x000001A8 |
468 | #define R_SER_RX_TABLE_BASE 0x00000200 | 468 | #define R_SER_RX_TABLE_BASE 0x00000200 |
469 | #define SER_RX_TABLE_COUNT 16 | 469 | #define SER_RX_TABLE_COUNT 16 |
470 | #define R_SER_TX_TABLE_BASE 0x00000300 | 470 | #define R_SER_TX_TABLE_BASE 0x00000300 |
471 | #define SER_TX_TABLE_COUNT 16 | 471 | #define SER_TX_TABLE_COUNT 16 |
472 | 472 | ||
473 | /* RMON Counters */ | 473 | /* RMON Counters */ |
474 | #define R_SER_RMON_TX_BYTE_LO 0x000001C0 | 474 | #define R_SER_RMON_TX_BYTE_LO 0x000001C0 |
475 | #define R_SER_RMON_TX_BYTE_HI 0x000001C8 | 475 | #define R_SER_RMON_TX_BYTE_HI 0x000001C8 |
476 | #define R_SER_RMON_RX_BYTE_LO 0x000001D0 | 476 | #define R_SER_RMON_RX_BYTE_LO 0x000001D0 |
477 | #define R_SER_RMON_RX_BYTE_HI 0x000001D8 | 477 | #define R_SER_RMON_RX_BYTE_HI 0x000001D8 |
478 | #define R_SER_RMON_TX_UNDERRUN 0x000001E0 | 478 | #define R_SER_RMON_TX_UNDERRUN 0x000001E0 |
479 | #define R_SER_RMON_RX_OVERFLOW 0x000001E8 | 479 | #define R_SER_RMON_RX_OVERFLOW 0x000001E8 |
480 | #define R_SER_RMON_RX_ERRORS 0x000001F0 | 480 | #define R_SER_RMON_RX_ERRORS 0x000001F0 |
481 | #define R_SER_RMON_RX_BADADDR 0x000001F8 | 481 | #define R_SER_RMON_RX_BADADDR 0x000001F8 |
482 | 482 | ||
483 | #endif /* 1250/112x */ | 483 | #endif /* 1250/112x */ |
484 | 484 | ||
@@ -486,38 +486,38 @@ | |||
486 | * Generic Bus Registers | 486 | * Generic Bus Registers |
487 | ********************************************************************* */ | 487 | ********************************************************************* */ |
488 | 488 | ||
489 | #define IO_EXT_CFG_COUNT 8 | 489 | #define IO_EXT_CFG_COUNT 8 |
490 | 490 | ||
491 | #define A_IO_EXT_BASE 0x0010061000 | 491 | #define A_IO_EXT_BASE 0x0010061000 |
492 | #define A_IO_EXT_REG(r) (A_IO_EXT_BASE + (r)) | 492 | #define A_IO_EXT_REG(r) (A_IO_EXT_BASE + (r)) |
493 | 493 | ||
494 | #define A_IO_EXT_CFG_BASE 0x0010061000 | 494 | #define A_IO_EXT_CFG_BASE 0x0010061000 |
495 | #define A_IO_EXT_MULT_SIZE_BASE 0x0010061100 | 495 | #define A_IO_EXT_MULT_SIZE_BASE 0x0010061100 |
496 | #define A_IO_EXT_START_ADDR_BASE 0x0010061200 | 496 | #define A_IO_EXT_START_ADDR_BASE 0x0010061200 |
497 | #define A_IO_EXT_TIME_CFG0_BASE 0x0010061600 | 497 | #define A_IO_EXT_TIME_CFG0_BASE 0x0010061600 |
498 | #define A_IO_EXT_TIME_CFG1_BASE 0x0010061700 | 498 | #define A_IO_EXT_TIME_CFG1_BASE 0x0010061700 |
499 | 499 | ||
500 | #define IO_EXT_REGISTER_SPACING 8 | 500 | #define IO_EXT_REGISTER_SPACING 8 |
501 | #define A_IO_EXT_CS_BASE(cs) (A_IO_EXT_CFG_BASE+IO_EXT_REGISTER_SPACING*(cs)) | 501 | #define A_IO_EXT_CS_BASE(cs) (A_IO_EXT_CFG_BASE+IO_EXT_REGISTER_SPACING*(cs)) |
502 | #define R_IO_EXT_REG(reg, cs) ((cs)*IO_EXT_REGISTER_SPACING + (reg)) | 502 | #define R_IO_EXT_REG(reg, cs) ((cs)*IO_EXT_REGISTER_SPACING + (reg)) |
503 | 503 | ||
504 | #define R_IO_EXT_CFG 0x0000 | 504 | #define R_IO_EXT_CFG 0x0000 |
505 | #define R_IO_EXT_MULT_SIZE 0x0100 | 505 | #define R_IO_EXT_MULT_SIZE 0x0100 |
506 | #define R_IO_EXT_START_ADDR 0x0200 | 506 | #define R_IO_EXT_START_ADDR 0x0200 |
507 | #define R_IO_EXT_TIME_CFG0 0x0600 | 507 | #define R_IO_EXT_TIME_CFG0 0x0600 |
508 | #define R_IO_EXT_TIME_CFG1 0x0700 | 508 | #define R_IO_EXT_TIME_CFG1 0x0700 |
509 | 509 | ||
510 | 510 | ||
511 | #define A_IO_INTERRUPT_STATUS 0x0010061A00 | 511 | #define A_IO_INTERRUPT_STATUS 0x0010061A00 |
512 | #define A_IO_INTERRUPT_DATA0 0x0010061A10 | 512 | #define A_IO_INTERRUPT_DATA0 0x0010061A10 |
513 | #define A_IO_INTERRUPT_DATA1 0x0010061A18 | 513 | #define A_IO_INTERRUPT_DATA1 0x0010061A18 |
514 | #define A_IO_INTERRUPT_DATA2 0x0010061A20 | 514 | #define A_IO_INTERRUPT_DATA2 0x0010061A20 |
515 | #define A_IO_INTERRUPT_DATA3 0x0010061A28 | 515 | #define A_IO_INTERRUPT_DATA3 0x0010061A28 |
516 | #define A_IO_INTERRUPT_ADDR0 0x0010061A30 | 516 | #define A_IO_INTERRUPT_ADDR0 0x0010061A30 |
517 | #define A_IO_INTERRUPT_ADDR1 0x0010061A40 | 517 | #define A_IO_INTERRUPT_ADDR1 0x0010061A40 |
518 | #define A_IO_INTERRUPT_PARITY 0x0010061A50 | 518 | #define A_IO_INTERRUPT_PARITY 0x0010061A50 |
519 | #define A_IO_PCMCIA_CFG 0x0010061A60 | 519 | #define A_IO_PCMCIA_CFG 0x0010061A60 |
520 | #define A_IO_PCMCIA_STATUS 0x0010061A70 | 520 | #define A_IO_PCMCIA_STATUS 0x0010061A70 |
521 | #define A_IO_DRIVE_0 0x0010061300 | 521 | #define A_IO_DRIVE_0 0x0010061300 |
522 | #define A_IO_DRIVE_1 0x0010061308 | 522 | #define A_IO_DRIVE_1 0x0010061308 |
523 | #define A_IO_DRIVE_2 0x0010061310 | 523 | #define A_IO_DRIVE_2 0x0010061310 |
@@ -527,76 +527,76 @@ | |||
527 | #define R_IO_DRIVE(x) ((x)*IO_DRIVE_REGISTER_SPACING) | 527 | #define R_IO_DRIVE(x) ((x)*IO_DRIVE_REGISTER_SPACING) |
528 | #define A_IO_DRIVE(x) (A_IO_DRIVE_BASE + R_IO_DRIVE(x)) | 528 | #define A_IO_DRIVE(x) (A_IO_DRIVE_BASE + R_IO_DRIVE(x)) |
529 | 529 | ||
530 | #define R_IO_INTERRUPT_STATUS 0x0A00 | 530 | #define R_IO_INTERRUPT_STATUS 0x0A00 |
531 | #define R_IO_INTERRUPT_DATA0 0x0A10 | 531 | #define R_IO_INTERRUPT_DATA0 0x0A10 |
532 | #define R_IO_INTERRUPT_DATA1 0x0A18 | 532 | #define R_IO_INTERRUPT_DATA1 0x0A18 |
533 | #define R_IO_INTERRUPT_DATA2 0x0A20 | 533 | #define R_IO_INTERRUPT_DATA2 0x0A20 |
534 | #define R_IO_INTERRUPT_DATA3 0x0A28 | 534 | #define R_IO_INTERRUPT_DATA3 0x0A28 |
535 | #define R_IO_INTERRUPT_ADDR0 0x0A30 | 535 | #define R_IO_INTERRUPT_ADDR0 0x0A30 |
536 | #define R_IO_INTERRUPT_ADDR1 0x0A40 | 536 | #define R_IO_INTERRUPT_ADDR1 0x0A40 |
537 | #define R_IO_INTERRUPT_PARITY 0x0A50 | 537 | #define R_IO_INTERRUPT_PARITY 0x0A50 |
538 | #define R_IO_PCMCIA_CFG 0x0A60 | 538 | #define R_IO_PCMCIA_CFG 0x0A60 |
539 | #define R_IO_PCMCIA_STATUS 0x0A70 | 539 | #define R_IO_PCMCIA_STATUS 0x0A70 |
540 | 540 | ||
541 | /* ********************************************************************* | 541 | /* ********************************************************************* |
542 | * GPIO Registers | 542 | * GPIO Registers |
543 | ********************************************************************* */ | 543 | ********************************************************************* */ |
544 | 544 | ||
545 | #define A_GPIO_CLR_EDGE 0x0010061A80 | 545 | #define A_GPIO_CLR_EDGE 0x0010061A80 |
546 | #define A_GPIO_INT_TYPE 0x0010061A88 | 546 | #define A_GPIO_INT_TYPE 0x0010061A88 |
547 | #define A_GPIO_INPUT_INVERT 0x0010061A90 | 547 | #define A_GPIO_INPUT_INVERT 0x0010061A90 |
548 | #define A_GPIO_GLITCH 0x0010061A98 | 548 | #define A_GPIO_GLITCH 0x0010061A98 |
549 | #define A_GPIO_READ 0x0010061AA0 | 549 | #define A_GPIO_READ 0x0010061AA0 |
550 | #define A_GPIO_DIRECTION 0x0010061AA8 | 550 | #define A_GPIO_DIRECTION 0x0010061AA8 |
551 | #define A_GPIO_PIN_CLR 0x0010061AB0 | 551 | #define A_GPIO_PIN_CLR 0x0010061AB0 |
552 | #define A_GPIO_PIN_SET 0x0010061AB8 | 552 | #define A_GPIO_PIN_SET 0x0010061AB8 |
553 | 553 | ||
554 | #define A_GPIO_BASE 0x0010061A80 | 554 | #define A_GPIO_BASE 0x0010061A80 |
555 | 555 | ||
556 | #define R_GPIO_CLR_EDGE 0x00 | 556 | #define R_GPIO_CLR_EDGE 0x00 |
557 | #define R_GPIO_INT_TYPE 0x08 | 557 | #define R_GPIO_INT_TYPE 0x08 |
558 | #define R_GPIO_INPUT_INVERT 0x10 | 558 | #define R_GPIO_INPUT_INVERT 0x10 |
559 | #define R_GPIO_GLITCH 0x18 | 559 | #define R_GPIO_GLITCH 0x18 |
560 | #define R_GPIO_READ 0x20 | 560 | #define R_GPIO_READ 0x20 |
561 | #define R_GPIO_DIRECTION 0x28 | 561 | #define R_GPIO_DIRECTION 0x28 |
562 | #define R_GPIO_PIN_CLR 0x30 | 562 | #define R_GPIO_PIN_CLR 0x30 |
563 | #define R_GPIO_PIN_SET 0x38 | 563 | #define R_GPIO_PIN_SET 0x38 |
564 | 564 | ||
565 | /* ********************************************************************* | 565 | /* ********************************************************************* |
566 | * SMBus Registers | 566 | * SMBus Registers |
567 | ********************************************************************* */ | 567 | ********************************************************************* */ |
568 | 568 | ||
569 | #define A_SMB_XTRA_0 0x0010060000 | 569 | #define A_SMB_XTRA_0 0x0010060000 |
570 | #define A_SMB_XTRA_1 0x0010060008 | 570 | #define A_SMB_XTRA_1 0x0010060008 |
571 | #define A_SMB_FREQ_0 0x0010060010 | 571 | #define A_SMB_FREQ_0 0x0010060010 |
572 | #define A_SMB_FREQ_1 0x0010060018 | 572 | #define A_SMB_FREQ_1 0x0010060018 |
573 | #define A_SMB_STATUS_0 0x0010060020 | 573 | #define A_SMB_STATUS_0 0x0010060020 |
574 | #define A_SMB_STATUS_1 0x0010060028 | 574 | #define A_SMB_STATUS_1 0x0010060028 |
575 | #define A_SMB_CMD_0 0x0010060030 | 575 | #define A_SMB_CMD_0 0x0010060030 |
576 | #define A_SMB_CMD_1 0x0010060038 | 576 | #define A_SMB_CMD_1 0x0010060038 |
577 | #define A_SMB_START_0 0x0010060040 | 577 | #define A_SMB_START_0 0x0010060040 |
578 | #define A_SMB_START_1 0x0010060048 | 578 | #define A_SMB_START_1 0x0010060048 |
579 | #define A_SMB_DATA_0 0x0010060050 | 579 | #define A_SMB_DATA_0 0x0010060050 |
580 | #define A_SMB_DATA_1 0x0010060058 | 580 | #define A_SMB_DATA_1 0x0010060058 |
581 | #define A_SMB_CONTROL_0 0x0010060060 | 581 | #define A_SMB_CONTROL_0 0x0010060060 |
582 | #define A_SMB_CONTROL_1 0x0010060068 | 582 | #define A_SMB_CONTROL_1 0x0010060068 |
583 | #define A_SMB_PEC_0 0x0010060070 | 583 | #define A_SMB_PEC_0 0x0010060070 |
584 | #define A_SMB_PEC_1 0x0010060078 | 584 | #define A_SMB_PEC_1 0x0010060078 |
585 | 585 | ||
586 | #define A_SMB_0 0x0010060000 | 586 | #define A_SMB_0 0x0010060000 |
587 | #define A_SMB_1 0x0010060008 | 587 | #define A_SMB_1 0x0010060008 |
588 | #define SMB_REGISTER_SPACING 0x8 | 588 | #define SMB_REGISTER_SPACING 0x8 |
589 | #define A_SMB_BASE(idx) (A_SMB_0+(idx)*SMB_REGISTER_SPACING) | 589 | #define A_SMB_BASE(idx) (A_SMB_0+(idx)*SMB_REGISTER_SPACING) |
590 | #define A_SMB_REGISTER(idx, reg) (A_SMB_BASE(idx)+(reg)) | 590 | #define A_SMB_REGISTER(idx, reg) (A_SMB_BASE(idx)+(reg)) |
591 | 591 | ||
592 | #define R_SMB_XTRA 0x0000000000 | 592 | #define R_SMB_XTRA 0x0000000000 |
593 | #define R_SMB_FREQ 0x0000000010 | 593 | #define R_SMB_FREQ 0x0000000010 |
594 | #define R_SMB_STATUS 0x0000000020 | 594 | #define R_SMB_STATUS 0x0000000020 |
595 | #define R_SMB_CMD 0x0000000030 | 595 | #define R_SMB_CMD 0x0000000030 |
596 | #define R_SMB_START 0x0000000040 | 596 | #define R_SMB_START 0x0000000040 |
597 | #define R_SMB_DATA 0x0000000050 | 597 | #define R_SMB_DATA 0x0000000050 |
598 | #define R_SMB_CONTROL 0x0000000060 | 598 | #define R_SMB_CONTROL 0x0000000060 |
599 | #define R_SMB_PEC 0x0000000070 | 599 | #define R_SMB_PEC 0x0000000070 |
600 | 600 | ||
601 | /* ********************************************************************* | 601 | /* ********************************************************************* |
602 | * Timer Registers | 602 | * Timer Registers |
@@ -607,55 +607,55 @@ | |||
607 | */ | 607 | */ |
608 | 608 | ||
609 | #define A_SCD_WDOG_0 0x0010020050 | 609 | #define A_SCD_WDOG_0 0x0010020050 |
610 | #define A_SCD_WDOG_1 0x0010020150 | 610 | #define A_SCD_WDOG_1 0x0010020150 |
611 | #define SCD_WDOG_SPACING 0x100 | 611 | #define SCD_WDOG_SPACING 0x100 |
612 | #define SCD_NUM_WDOGS 2 | 612 | #define SCD_NUM_WDOGS 2 |
613 | #define A_SCD_WDOG_BASE(w) (A_SCD_WDOG_0+SCD_WDOG_SPACING*(w)) | 613 | #define A_SCD_WDOG_BASE(w) (A_SCD_WDOG_0+SCD_WDOG_SPACING*(w)) |
614 | #define A_SCD_WDOG_REGISTER(w, r) (A_SCD_WDOG_BASE(w) + (r)) | 614 | #define A_SCD_WDOG_REGISTER(w, r) (A_SCD_WDOG_BASE(w) + (r)) |
615 | 615 | ||
616 | #define R_SCD_WDOG_INIT 0x0000000000 | 616 | #define R_SCD_WDOG_INIT 0x0000000000 |
617 | #define R_SCD_WDOG_CNT 0x0000000008 | 617 | #define R_SCD_WDOG_CNT 0x0000000008 |
618 | #define R_SCD_WDOG_CFG 0x0000000010 | 618 | #define R_SCD_WDOG_CFG 0x0000000010 |
619 | 619 | ||
620 | #define A_SCD_WDOG_INIT_0 0x0010020050 | 620 | #define A_SCD_WDOG_INIT_0 0x0010020050 |
621 | #define A_SCD_WDOG_CNT_0 0x0010020058 | 621 | #define A_SCD_WDOG_CNT_0 0x0010020058 |
622 | #define A_SCD_WDOG_CFG_0 0x0010020060 | 622 | #define A_SCD_WDOG_CFG_0 0x0010020060 |
623 | 623 | ||
624 | #define A_SCD_WDOG_INIT_1 0x0010020150 | 624 | #define A_SCD_WDOG_INIT_1 0x0010020150 |
625 | #define A_SCD_WDOG_CNT_1 0x0010020158 | 625 | #define A_SCD_WDOG_CNT_1 0x0010020158 |
626 | #define A_SCD_WDOG_CFG_1 0x0010020160 | 626 | #define A_SCD_WDOG_CFG_1 0x0010020160 |
627 | 627 | ||
628 | /* | 628 | /* |
629 | * Generic timers | 629 | * Generic timers |
630 | */ | 630 | */ |
631 | 631 | ||
632 | #define A_SCD_TIMER_0 0x0010020070 | 632 | #define A_SCD_TIMER_0 0x0010020070 |
633 | #define A_SCD_TIMER_1 0x0010020078 | 633 | #define A_SCD_TIMER_1 0x0010020078 |
634 | #define A_SCD_TIMER_2 0x0010020170 | 634 | #define A_SCD_TIMER_2 0x0010020170 |
635 | #define A_SCD_TIMER_3 0x0010020178 | 635 | #define A_SCD_TIMER_3 0x0010020178 |
636 | #define SCD_NUM_TIMERS 4 | 636 | #define SCD_NUM_TIMERS 4 |
637 | #define A_SCD_TIMER_BASE(w) (A_SCD_TIMER_0+0x08*((w)&1)+0x100*(((w)&2)>>1)) | 637 | #define A_SCD_TIMER_BASE(w) (A_SCD_TIMER_0+0x08*((w)&1)+0x100*(((w)&2)>>1)) |
638 | #define A_SCD_TIMER_REGISTER(w, r) (A_SCD_TIMER_BASE(w) + (r)) | 638 | #define A_SCD_TIMER_REGISTER(w, r) (A_SCD_TIMER_BASE(w) + (r)) |
639 | 639 | ||
640 | #define R_SCD_TIMER_INIT 0x0000000000 | 640 | #define R_SCD_TIMER_INIT 0x0000000000 |
641 | #define R_SCD_TIMER_CNT 0x0000000010 | 641 | #define R_SCD_TIMER_CNT 0x0000000010 |
642 | #define R_SCD_TIMER_CFG 0x0000000020 | 642 | #define R_SCD_TIMER_CFG 0x0000000020 |
643 | 643 | ||
644 | #define A_SCD_TIMER_INIT_0 0x0010020070 | 644 | #define A_SCD_TIMER_INIT_0 0x0010020070 |
645 | #define A_SCD_TIMER_CNT_0 0x0010020080 | 645 | #define A_SCD_TIMER_CNT_0 0x0010020080 |
646 | #define A_SCD_TIMER_CFG_0 0x0010020090 | 646 | #define A_SCD_TIMER_CFG_0 0x0010020090 |
647 | 647 | ||
648 | #define A_SCD_TIMER_INIT_1 0x0010020078 | 648 | #define A_SCD_TIMER_INIT_1 0x0010020078 |
649 | #define A_SCD_TIMER_CNT_1 0x0010020088 | 649 | #define A_SCD_TIMER_CNT_1 0x0010020088 |
650 | #define A_SCD_TIMER_CFG_1 0x0010020098 | 650 | #define A_SCD_TIMER_CFG_1 0x0010020098 |
651 | 651 | ||
652 | #define A_SCD_TIMER_INIT_2 0x0010020170 | 652 | #define A_SCD_TIMER_INIT_2 0x0010020170 |
653 | #define A_SCD_TIMER_CNT_2 0x0010020180 | 653 | #define A_SCD_TIMER_CNT_2 0x0010020180 |
654 | #define A_SCD_TIMER_CFG_2 0x0010020190 | 654 | #define A_SCD_TIMER_CFG_2 0x0010020190 |
655 | 655 | ||
656 | #define A_SCD_TIMER_INIT_3 0x0010020178 | 656 | #define A_SCD_TIMER_INIT_3 0x0010020178 |
657 | #define A_SCD_TIMER_CNT_3 0x0010020188 | 657 | #define A_SCD_TIMER_CNT_3 0x0010020188 |
658 | #define A_SCD_TIMER_CFG_3 0x0010020198 | 658 | #define A_SCD_TIMER_CFG_3 0x0010020198 |
659 | 659 | ||
660 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 660 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
661 | #define A_SCD_SCRATCH 0x0010020C10 | 661 | #define A_SCD_SCRATCH 0x0010020C10 |
@@ -671,28 +671,28 @@ | |||
671 | * System Control Registers | 671 | * System Control Registers |
672 | ********************************************************************* */ | 672 | ********************************************************************* */ |
673 | 673 | ||
674 | #define A_SCD_SYSTEM_REVISION 0x0010020000 | 674 | #define A_SCD_SYSTEM_REVISION 0x0010020000 |
675 | #define A_SCD_SYSTEM_CFG 0x0010020008 | 675 | #define A_SCD_SYSTEM_CFG 0x0010020008 |
676 | #define A_SCD_SYSTEM_MANUF 0x0010038000 | 676 | #define A_SCD_SYSTEM_MANUF 0x0010038000 |
677 | 677 | ||
678 | /* ********************************************************************* | 678 | /* ********************************************************************* |
679 | * System Address Trap Registers | 679 | * System Address Trap Registers |
680 | ********************************************************************* */ | 680 | ********************************************************************* */ |
681 | 681 | ||
682 | #define A_ADDR_TRAP_INDEX 0x00100200B0 | 682 | #define A_ADDR_TRAP_INDEX 0x00100200B0 |
683 | #define A_ADDR_TRAP_REG 0x00100200B8 | 683 | #define A_ADDR_TRAP_REG 0x00100200B8 |
684 | #define A_ADDR_TRAP_UP_0 0x0010020400 | 684 | #define A_ADDR_TRAP_UP_0 0x0010020400 |
685 | #define A_ADDR_TRAP_UP_1 0x0010020408 | 685 | #define A_ADDR_TRAP_UP_1 0x0010020408 |
686 | #define A_ADDR_TRAP_UP_2 0x0010020410 | 686 | #define A_ADDR_TRAP_UP_2 0x0010020410 |
687 | #define A_ADDR_TRAP_UP_3 0x0010020418 | 687 | #define A_ADDR_TRAP_UP_3 0x0010020418 |
688 | #define A_ADDR_TRAP_DOWN_0 0x0010020420 | 688 | #define A_ADDR_TRAP_DOWN_0 0x0010020420 |
689 | #define A_ADDR_TRAP_DOWN_1 0x0010020428 | 689 | #define A_ADDR_TRAP_DOWN_1 0x0010020428 |
690 | #define A_ADDR_TRAP_DOWN_2 0x0010020430 | 690 | #define A_ADDR_TRAP_DOWN_2 0x0010020430 |
691 | #define A_ADDR_TRAP_DOWN_3 0x0010020438 | 691 | #define A_ADDR_TRAP_DOWN_3 0x0010020438 |
692 | #define A_ADDR_TRAP_CFG_0 0x0010020440 | 692 | #define A_ADDR_TRAP_CFG_0 0x0010020440 |
693 | #define A_ADDR_TRAP_CFG_1 0x0010020448 | 693 | #define A_ADDR_TRAP_CFG_1 0x0010020448 |
694 | #define A_ADDR_TRAP_CFG_2 0x0010020450 | 694 | #define A_ADDR_TRAP_CFG_2 0x0010020450 |
695 | #define A_ADDR_TRAP_CFG_3 0x0010020458 | 695 | #define A_ADDR_TRAP_CFG_3 0x0010020458 |
696 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 696 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
697 | #define A_ADDR_TRAP_REG_DEBUG 0x0010020460 | 697 | #define A_ADDR_TRAP_REG_DEBUG 0x0010020460 |
698 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 698 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
@@ -708,31 +708,31 @@ | |||
708 | * System Interrupt Mapper Registers | 708 | * System Interrupt Mapper Registers |
709 | ********************************************************************* */ | 709 | ********************************************************************* */ |
710 | 710 | ||
711 | #define A_IMR_CPU0_BASE 0x0010020000 | 711 | #define A_IMR_CPU0_BASE 0x0010020000 |
712 | #define A_IMR_CPU1_BASE 0x0010022000 | 712 | #define A_IMR_CPU1_BASE 0x0010022000 |
713 | #define IMR_REGISTER_SPACING 0x2000 | 713 | #define IMR_REGISTER_SPACING 0x2000 |
714 | #define IMR_REGISTER_SPACING_SHIFT 13 | 714 | #define IMR_REGISTER_SPACING_SHIFT 13 |
715 | 715 | ||
716 | #define A_IMR_MAPPER(cpu) (A_IMR_CPU0_BASE+(cpu)*IMR_REGISTER_SPACING) | 716 | #define A_IMR_MAPPER(cpu) (A_IMR_CPU0_BASE+(cpu)*IMR_REGISTER_SPACING) |
717 | #define A_IMR_REGISTER(cpu, reg) (A_IMR_MAPPER(cpu)+(reg)) | 717 | #define A_IMR_REGISTER(cpu, reg) (A_IMR_MAPPER(cpu)+(reg)) |
718 | 718 | ||
719 | #define R_IMR_INTERRUPT_DIAG 0x0010 | 719 | #define R_IMR_INTERRUPT_DIAG 0x0010 |
720 | #define R_IMR_INTERRUPT_LDT 0x0018 | 720 | #define R_IMR_INTERRUPT_LDT 0x0018 |
721 | #define R_IMR_INTERRUPT_MASK 0x0028 | 721 | #define R_IMR_INTERRUPT_MASK 0x0028 |
722 | #define R_IMR_INTERRUPT_TRACE 0x0038 | 722 | #define R_IMR_INTERRUPT_TRACE 0x0038 |
723 | #define R_IMR_INTERRUPT_SOURCE_STATUS 0x0040 | 723 | #define R_IMR_INTERRUPT_SOURCE_STATUS 0x0040 |
724 | #define R_IMR_LDT_INTERRUPT_SET 0x0048 | 724 | #define R_IMR_LDT_INTERRUPT_SET 0x0048 |
725 | #define R_IMR_LDT_INTERRUPT 0x0018 | 725 | #define R_IMR_LDT_INTERRUPT 0x0018 |
726 | #define R_IMR_LDT_INTERRUPT_CLR 0x0020 | 726 | #define R_IMR_LDT_INTERRUPT_CLR 0x0020 |
727 | #define R_IMR_MAILBOX_CPU 0x00c0 | 727 | #define R_IMR_MAILBOX_CPU 0x00c0 |
728 | #define R_IMR_ALIAS_MAILBOX_CPU 0x1000 | 728 | #define R_IMR_ALIAS_MAILBOX_CPU 0x1000 |
729 | #define R_IMR_MAILBOX_SET_CPU 0x00C8 | 729 | #define R_IMR_MAILBOX_SET_CPU 0x00C8 |
730 | #define R_IMR_ALIAS_MAILBOX_SET_CPU 0x1008 | 730 | #define R_IMR_ALIAS_MAILBOX_SET_CPU 0x1008 |
731 | #define R_IMR_MAILBOX_CLR_CPU 0x00D0 | 731 | #define R_IMR_MAILBOX_CLR_CPU 0x00D0 |
732 | #define R_IMR_INTERRUPT_STATUS_BASE 0x0100 | 732 | #define R_IMR_INTERRUPT_STATUS_BASE 0x0100 |
733 | #define R_IMR_INTERRUPT_STATUS_COUNT 7 | 733 | #define R_IMR_INTERRUPT_STATUS_COUNT 7 |
734 | #define R_IMR_INTERRUPT_MAP_BASE 0x0200 | 734 | #define R_IMR_INTERRUPT_MAP_BASE 0x0200 |
735 | #define R_IMR_INTERRUPT_MAP_COUNT 64 | 735 | #define R_IMR_INTERRUPT_MAP_COUNT 64 |
736 | 736 | ||
737 | /* | 737 | /* |
738 | * these macros work together to build the address of a mailbox | 738 | * these macros work together to build the address of a mailbox |
@@ -746,11 +746,11 @@ | |||
746 | * System Performance Counter Registers | 746 | * System Performance Counter Registers |
747 | ********************************************************************* */ | 747 | ********************************************************************* */ |
748 | 748 | ||
749 | #define A_SCD_PERF_CNT_CFG 0x00100204C0 | 749 | #define A_SCD_PERF_CNT_CFG 0x00100204C0 |
750 | #define A_SCD_PERF_CNT_0 0x00100204D0 | 750 | #define A_SCD_PERF_CNT_0 0x00100204D0 |
751 | #define A_SCD_PERF_CNT_1 0x00100204D8 | 751 | #define A_SCD_PERF_CNT_1 0x00100204D8 |
752 | #define A_SCD_PERF_CNT_2 0x00100204E0 | 752 | #define A_SCD_PERF_CNT_2 0x00100204E0 |
753 | #define A_SCD_PERF_CNT_3 0x00100204E8 | 753 | #define A_SCD_PERF_CNT_3 0x00100204E8 |
754 | 754 | ||
755 | #define SCD_NUM_PERF_CNT 4 | 755 | #define SCD_NUM_PERF_CNT 4 |
756 | #define SCD_PERF_CNT_SPACING 8 | 756 | #define SCD_PERF_CNT_SPACING 8 |
@@ -760,46 +760,46 @@ | |||
760 | * System Bus Watcher Registers | 760 | * System Bus Watcher Registers |
761 | ********************************************************************* */ | 761 | ********************************************************************* */ |
762 | 762 | ||
763 | #define A_SCD_BUS_ERR_STATUS 0x0010020880 | 763 | #define A_SCD_BUS_ERR_STATUS 0x0010020880 |
764 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 764 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
765 | #define A_SCD_BUS_ERR_STATUS_DEBUG 0x00100208D0 | 765 | #define A_SCD_BUS_ERR_STATUS_DEBUG 0x00100208D0 |
766 | #define A_BUS_ERR_STATUS_DEBUG 0x00100208D0 | 766 | #define A_BUS_ERR_STATUS_DEBUG 0x00100208D0 |
767 | #endif /* 1250 PASS2 || 112x PASS1 */ | 767 | #endif /* 1250 PASS2 || 112x PASS1 */ |
768 | #define A_BUS_ERR_DATA_0 0x00100208A0 | 768 | #define A_BUS_ERR_DATA_0 0x00100208A0 |
769 | #define A_BUS_ERR_DATA_1 0x00100208A8 | 769 | #define A_BUS_ERR_DATA_1 0x00100208A8 |
770 | #define A_BUS_ERR_DATA_2 0x00100208B0 | 770 | #define A_BUS_ERR_DATA_2 0x00100208B0 |
771 | #define A_BUS_ERR_DATA_3 0x00100208B8 | 771 | #define A_BUS_ERR_DATA_3 0x00100208B8 |
772 | #define A_BUS_L2_ERRORS 0x00100208C0 | 772 | #define A_BUS_L2_ERRORS 0x00100208C0 |
773 | #define A_BUS_MEM_IO_ERRORS 0x00100208C8 | 773 | #define A_BUS_MEM_IO_ERRORS 0x00100208C8 |
774 | 774 | ||
775 | /* ********************************************************************* | 775 | /* ********************************************************************* |
776 | * System Debug Controller Registers | 776 | * System Debug Controller Registers |
777 | ********************************************************************* */ | 777 | ********************************************************************* */ |
778 | 778 | ||
779 | #define A_SCD_JTAG_BASE 0x0010000000 | 779 | #define A_SCD_JTAG_BASE 0x0010000000 |
780 | 780 | ||
781 | /* ********************************************************************* | 781 | /* ********************************************************************* |
782 | * System Trace Buffer Registers | 782 | * System Trace Buffer Registers |
783 | ********************************************************************* */ | 783 | ********************************************************************* */ |
784 | 784 | ||
785 | #define A_SCD_TRACE_CFG 0x0010020A00 | 785 | #define A_SCD_TRACE_CFG 0x0010020A00 |
786 | #define A_SCD_TRACE_READ 0x0010020A08 | 786 | #define A_SCD_TRACE_READ 0x0010020A08 |
787 | #define A_SCD_TRACE_EVENT_0 0x0010020A20 | 787 | #define A_SCD_TRACE_EVENT_0 0x0010020A20 |
788 | #define A_SCD_TRACE_EVENT_1 0x0010020A28 | 788 | #define A_SCD_TRACE_EVENT_1 0x0010020A28 |
789 | #define A_SCD_TRACE_EVENT_2 0x0010020A30 | 789 | #define A_SCD_TRACE_EVENT_2 0x0010020A30 |
790 | #define A_SCD_TRACE_EVENT_3 0x0010020A38 | 790 | #define A_SCD_TRACE_EVENT_3 0x0010020A38 |
791 | #define A_SCD_TRACE_SEQUENCE_0 0x0010020A40 | 791 | #define A_SCD_TRACE_SEQUENCE_0 0x0010020A40 |
792 | #define A_SCD_TRACE_SEQUENCE_1 0x0010020A48 | 792 | #define A_SCD_TRACE_SEQUENCE_1 0x0010020A48 |
793 | #define A_SCD_TRACE_SEQUENCE_2 0x0010020A50 | 793 | #define A_SCD_TRACE_SEQUENCE_2 0x0010020A50 |
794 | #define A_SCD_TRACE_SEQUENCE_3 0x0010020A58 | 794 | #define A_SCD_TRACE_SEQUENCE_3 0x0010020A58 |
795 | #define A_SCD_TRACE_EVENT_4 0x0010020A60 | 795 | #define A_SCD_TRACE_EVENT_4 0x0010020A60 |
796 | #define A_SCD_TRACE_EVENT_5 0x0010020A68 | 796 | #define A_SCD_TRACE_EVENT_5 0x0010020A68 |
797 | #define A_SCD_TRACE_EVENT_6 0x0010020A70 | 797 | #define A_SCD_TRACE_EVENT_6 0x0010020A70 |
798 | #define A_SCD_TRACE_EVENT_7 0x0010020A78 | 798 | #define A_SCD_TRACE_EVENT_7 0x0010020A78 |
799 | #define A_SCD_TRACE_SEQUENCE_4 0x0010020A80 | 799 | #define A_SCD_TRACE_SEQUENCE_4 0x0010020A80 |
800 | #define A_SCD_TRACE_SEQUENCE_5 0x0010020A88 | 800 | #define A_SCD_TRACE_SEQUENCE_5 0x0010020A88 |
801 | #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 | 801 | #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 |
802 | #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 | 802 | #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 |
803 | 803 | ||
804 | #define TRACE_REGISTER_SPACING 8 | 804 | #define TRACE_REGISTER_SPACING 8 |
805 | #define TRACE_NUM_REGISTERS 8 | 805 | #define TRACE_NUM_REGISTERS 8 |
@@ -814,8 +814,8 @@ | |||
814 | * System Generic DMA Registers | 814 | * System Generic DMA Registers |
815 | ********************************************************************* */ | 815 | ********************************************************************* */ |
816 | 816 | ||
817 | #define A_DM_0 0x0010020B00 | 817 | #define A_DM_0 0x0010020B00 |
818 | #define A_DM_1 0x0010020B20 | 818 | #define A_DM_1 0x0010020B20 |
819 | #define A_DM_2 0x0010020B40 | 819 | #define A_DM_2 0x0010020B40 |
820 | #define A_DM_3 0x0010020B60 | 820 | #define A_DM_3 0x0010020B60 |
821 | #define DM_REGISTER_SPACING 0x20 | 821 | #define DM_REGISTER_SPACING 0x20 |
@@ -854,39 +854,39 @@ | |||
854 | ********************************************************************* */ | 854 | ********************************************************************* */ |
855 | 855 | ||
856 | #if SIBYTE_HDR_FEATURE_1250_112x | 856 | #if SIBYTE_HDR_FEATURE_1250_112x |
857 | #define A_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) | 857 | #define A_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) |
858 | #define A_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) | 858 | #define A_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) |
859 | #define A_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) | 859 | #define A_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) |
860 | #define A_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) | 860 | #define A_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) |
861 | #define A_PHYS_GENBUS _SB_MAKE64(0x0010090000) | 861 | #define A_PHYS_GENBUS _SB_MAKE64(0x0010090000) |
862 | #define A_PHYS_GENBUS_END _SB_MAKE64(0x0040000000) | 862 | #define A_PHYS_GENBUS_END _SB_MAKE64(0x0040000000) |
863 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES_32 _SB_MAKE64(0x0040000000) | 863 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES_32 _SB_MAKE64(0x0040000000) |
864 | #define A_PHYS_LDTPCI_IO_MATCH_BITS_32 _SB_MAKE64(0x0060000000) | 864 | #define A_PHYS_LDTPCI_IO_MATCH_BITS_32 _SB_MAKE64(0x0060000000) |
865 | #define A_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) | 865 | #define A_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) |
866 | #define A_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) | 866 | #define A_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) |
867 | #define A_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) | 867 | #define A_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) |
868 | #define A_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) | 868 | #define A_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) |
869 | #define A_PHYS_LDT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) | 869 | #define A_PHYS_LDT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) |
870 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) | 870 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) |
871 | #define A_PHYS_LDTPCI_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) | 871 | #define A_PHYS_LDTPCI_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) |
872 | #define A_PHYS_LDT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) | 872 | #define A_PHYS_LDT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) |
873 | #define A_PHYS_LDTPCI_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) | 873 | #define A_PHYS_LDTPCI_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) |
874 | #define A_PHYS_LDTPCI_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) | 874 | #define A_PHYS_LDTPCI_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) |
875 | #define A_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) | 875 | #define A_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) |
876 | #define A_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) | 876 | #define A_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) |
877 | #define A_PHYS_LDT_EXP _SB_MAKE64(0x8000000000) | 877 | #define A_PHYS_LDT_EXP _SB_MAKE64(0x8000000000) |
878 | #define A_PHYS_PCI_FULLACCESS_BYTES _SB_MAKE64(0xF000000000) | 878 | #define A_PHYS_PCI_FULLACCESS_BYTES _SB_MAKE64(0xF000000000) |
879 | #define A_PHYS_PCI_FULLACCESS_BITS _SB_MAKE64(0xF100000000) | 879 | #define A_PHYS_PCI_FULLACCESS_BITS _SB_MAKE64(0xF100000000) |
880 | #define A_PHYS_RESERVED _SB_MAKE64(0xF200000000) | 880 | #define A_PHYS_RESERVED _SB_MAKE64(0xF200000000) |
881 | #define A_PHYS_RESERVED_SPECIAL_LDT _SB_MAKE64(0xFD00000000) | 881 | #define A_PHYS_RESERVED_SPECIAL_LDT _SB_MAKE64(0xFD00000000) |
882 | 882 | ||
883 | #define A_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) | 883 | #define A_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) |
884 | #define PHYS_L2CACHE_NUM_WAYS 4 | 884 | #define PHYS_L2CACHE_NUM_WAYS 4 |
885 | #define A_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000080000) | 885 | #define A_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000080000) |
886 | #define A_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0180000) | 886 | #define A_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0180000) |
887 | #define A_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D01A0000) | 887 | #define A_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D01A0000) |
888 | #define A_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D01C0000) | 888 | #define A_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D01C0000) |
889 | #define A_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D01E0000) | 889 | #define A_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D01E0000) |
890 | #endif | 890 | #endif |
891 | 891 | ||
892 | 892 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_scd.h b/arch/mips/include/asm/sibyte/sb1250_scd.h index 615e165dbd21..d725f2f41afa 100644 --- a/arch/mips/include/asm/sibyte/sb1250_scd.h +++ b/arch/mips/include/asm/sibyte/sb1250_scd.h | |||
@@ -44,10 +44,10 @@ | |||
44 | 44 | ||
45 | #define M_SYS_RESERVED _SB_MAKEMASK(8, 0) | 45 | #define M_SYS_RESERVED _SB_MAKEMASK(8, 0) |
46 | 46 | ||
47 | #define S_SYS_REVISION _SB_MAKE64(8) | 47 | #define S_SYS_REVISION _SB_MAKE64(8) |
48 | #define M_SYS_REVISION _SB_MAKEMASK(8, S_SYS_REVISION) | 48 | #define M_SYS_REVISION _SB_MAKEMASK(8, S_SYS_REVISION) |
49 | #define V_SYS_REVISION(x) _SB_MAKEVALUE(x, S_SYS_REVISION) | 49 | #define V_SYS_REVISION(x) _SB_MAKEVALUE(x, S_SYS_REVISION) |
50 | #define G_SYS_REVISION(x) _SB_GETVALUE(x, S_SYS_REVISION, M_SYS_REVISION) | 50 | #define G_SYS_REVISION(x) _SB_GETVALUE(x, S_SYS_REVISION, M_SYS_REVISION) |
51 | 51 | ||
52 | #define K_SYS_REVISION_BCM1250_PASS1 0x01 | 52 | #define K_SYS_REVISION_BCM1250_PASS1 0x01 |
53 | 53 | ||
@@ -93,10 +93,10 @@ | |||
93 | #define K_SYS_REVISION_BCM1480_B0 0x11 | 93 | #define K_SYS_REVISION_BCM1480_B0 0x11 |
94 | 94 | ||
95 | /*Cache size - 23:20 of revision register*/ | 95 | /*Cache size - 23:20 of revision register*/ |
96 | #define S_SYS_L2C_SIZE _SB_MAKE64(20) | 96 | #define S_SYS_L2C_SIZE _SB_MAKE64(20) |
97 | #define M_SYS_L2C_SIZE _SB_MAKEMASK(4, S_SYS_L2C_SIZE) | 97 | #define M_SYS_L2C_SIZE _SB_MAKEMASK(4, S_SYS_L2C_SIZE) |
98 | #define V_SYS_L2C_SIZE(x) _SB_MAKEVALUE(x, S_SYS_L2C_SIZE) | 98 | #define V_SYS_L2C_SIZE(x) _SB_MAKEVALUE(x, S_SYS_L2C_SIZE) |
99 | #define G_SYS_L2C_SIZE(x) _SB_GETVALUE(x, S_SYS_L2C_SIZE, M_SYS_L2C_SIZE) | 99 | #define G_SYS_L2C_SIZE(x) _SB_GETVALUE(x, S_SYS_L2C_SIZE, M_SYS_L2C_SIZE) |
100 | 100 | ||
101 | #define K_SYS_L2C_SIZE_1MB 0 | 101 | #define K_SYS_L2C_SIZE_1MB 0 |
102 | #define K_SYS_L2C_SIZE_512KB 5 | 102 | #define K_SYS_L2C_SIZE_512KB 5 |
@@ -109,40 +109,40 @@ | |||
109 | 109 | ||
110 | 110 | ||
111 | /* Number of CPU cores, bits 27:24 of revision register*/ | 111 | /* Number of CPU cores, bits 27:24 of revision register*/ |
112 | #define S_SYS_NUM_CPUS _SB_MAKE64(24) | 112 | #define S_SYS_NUM_CPUS _SB_MAKE64(24) |
113 | #define M_SYS_NUM_CPUS _SB_MAKEMASK(4, S_SYS_NUM_CPUS) | 113 | #define M_SYS_NUM_CPUS _SB_MAKEMASK(4, S_SYS_NUM_CPUS) |
114 | #define V_SYS_NUM_CPUS(x) _SB_MAKEVALUE(x, S_SYS_NUM_CPUS) | 114 | #define V_SYS_NUM_CPUS(x) _SB_MAKEVALUE(x, S_SYS_NUM_CPUS) |
115 | #define G_SYS_NUM_CPUS(x) _SB_GETVALUE(x, S_SYS_NUM_CPUS, M_SYS_NUM_CPUS) | 115 | #define G_SYS_NUM_CPUS(x) _SB_GETVALUE(x, S_SYS_NUM_CPUS, M_SYS_NUM_CPUS) |
116 | 116 | ||
117 | 117 | ||
118 | /* XXX: discourage people from using these constants. */ | 118 | /* XXX: discourage people from using these constants. */ |
119 | #define S_SYS_PART _SB_MAKE64(16) | 119 | #define S_SYS_PART _SB_MAKE64(16) |
120 | #define M_SYS_PART _SB_MAKEMASK(16, S_SYS_PART) | 120 | #define M_SYS_PART _SB_MAKEMASK(16, S_SYS_PART) |
121 | #define V_SYS_PART(x) _SB_MAKEVALUE(x, S_SYS_PART) | 121 | #define V_SYS_PART(x) _SB_MAKEVALUE(x, S_SYS_PART) |
122 | #define G_SYS_PART(x) _SB_GETVALUE(x, S_SYS_PART, M_SYS_PART) | 122 | #define G_SYS_PART(x) _SB_GETVALUE(x, S_SYS_PART, M_SYS_PART) |
123 | 123 | ||
124 | /* XXX: discourage people from using these constants. */ | 124 | /* XXX: discourage people from using these constants. */ |
125 | #define K_SYS_PART_SB1250 0x1250 | 125 | #define K_SYS_PART_SB1250 0x1250 |
126 | #define K_SYS_PART_BCM1120 0x1121 | 126 | #define K_SYS_PART_BCM1120 0x1121 |
127 | #define K_SYS_PART_BCM1125 0x1123 | 127 | #define K_SYS_PART_BCM1125 0x1123 |
128 | #define K_SYS_PART_BCM1125H 0x1124 | 128 | #define K_SYS_PART_BCM1125H 0x1124 |
129 | #define K_SYS_PART_BCM1122 0x1113 | 129 | #define K_SYS_PART_BCM1122 0x1113 |
130 | 130 | ||
131 | 131 | ||
132 | /* The "peripheral set" (SOC type) is the low 4 bits of the "part" field. */ | 132 | /* The "peripheral set" (SOC type) is the low 4 bits of the "part" field. */ |
133 | #define S_SYS_SOC_TYPE _SB_MAKE64(16) | 133 | #define S_SYS_SOC_TYPE _SB_MAKE64(16) |
134 | #define M_SYS_SOC_TYPE _SB_MAKEMASK(4, S_SYS_SOC_TYPE) | 134 | #define M_SYS_SOC_TYPE _SB_MAKEMASK(4, S_SYS_SOC_TYPE) |
135 | #define V_SYS_SOC_TYPE(x) _SB_MAKEVALUE(x, S_SYS_SOC_TYPE) | 135 | #define V_SYS_SOC_TYPE(x) _SB_MAKEVALUE(x, S_SYS_SOC_TYPE) |
136 | #define G_SYS_SOC_TYPE(x) _SB_GETVALUE(x, S_SYS_SOC_TYPE, M_SYS_SOC_TYPE) | 136 | #define G_SYS_SOC_TYPE(x) _SB_GETVALUE(x, S_SYS_SOC_TYPE, M_SYS_SOC_TYPE) |
137 | 137 | ||
138 | #define K_SYS_SOC_TYPE_BCM1250 0x0 | 138 | #define K_SYS_SOC_TYPE_BCM1250 0x0 |
139 | #define K_SYS_SOC_TYPE_BCM1120 0x1 | 139 | #define K_SYS_SOC_TYPE_BCM1120 0x1 |
140 | #define K_SYS_SOC_TYPE_BCM1250_ALT 0x2 /* 1250pass2 w/ 1/4 L2. */ | 140 | #define K_SYS_SOC_TYPE_BCM1250_ALT 0x2 /* 1250pass2 w/ 1/4 L2. */ |
141 | #define K_SYS_SOC_TYPE_BCM1125 0x3 | 141 | #define K_SYS_SOC_TYPE_BCM1125 0x3 |
142 | #define K_SYS_SOC_TYPE_BCM1125H 0x4 | 142 | #define K_SYS_SOC_TYPE_BCM1125H 0x4 |
143 | #define K_SYS_SOC_TYPE_BCM1250_ALT2 0x5 /* 1250pass2 w/ 1/2 L2. */ | 143 | #define K_SYS_SOC_TYPE_BCM1250_ALT2 0x5 /* 1250pass2 w/ 1/2 L2. */ |
144 | #define K_SYS_SOC_TYPE_BCM1x80 0x6 | 144 | #define K_SYS_SOC_TYPE_BCM1x80 0x6 |
145 | #define K_SYS_SOC_TYPE_BCM1x55 0x7 | 145 | #define K_SYS_SOC_TYPE_BCM1x55 0x7 |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * Calculate correct SOC type given a copy of system revision register. | 148 | * Calculate correct SOC type given a copy of system revision register. |
@@ -169,10 +169,10 @@ | |||
169 | ? K_SYS_SOC_TYPE_BCM1250 : G_SYS_SOC_TYPE(sysrev)) | 169 | ? K_SYS_SOC_TYPE_BCM1250 : G_SYS_SOC_TYPE(sysrev)) |
170 | #endif | 170 | #endif |
171 | 171 | ||
172 | #define S_SYS_WID _SB_MAKE64(32) | 172 | #define S_SYS_WID _SB_MAKE64(32) |
173 | #define M_SYS_WID _SB_MAKEMASK(32, S_SYS_WID) | 173 | #define M_SYS_WID _SB_MAKEMASK(32, S_SYS_WID) |
174 | #define V_SYS_WID(x) _SB_MAKEVALUE(x, S_SYS_WID) | 174 | #define V_SYS_WID(x) _SB_MAKEVALUE(x, S_SYS_WID) |
175 | #define G_SYS_WID(x) _SB_GETVALUE(x, S_SYS_WID, M_SYS_WID) | 175 | #define G_SYS_WID(x) _SB_GETVALUE(x, S_SYS_WID, M_SYS_WID) |
176 | 176 | ||
177 | /* | 177 | /* |
178 | * System Manufacturing Register | 178 | * System Manufacturing Register |
@@ -181,37 +181,37 @@ | |||
181 | 181 | ||
182 | #if SIBYTE_HDR_FEATURE_1250_112x | 182 | #if SIBYTE_HDR_FEATURE_1250_112x |
183 | /* Wafer ID: bits 31:0 */ | 183 | /* Wafer ID: bits 31:0 */ |
184 | #define S_SYS_WAFERID1_200 _SB_MAKE64(0) | 184 | #define S_SYS_WAFERID1_200 _SB_MAKE64(0) |
185 | #define M_SYS_WAFERID1_200 _SB_MAKEMASK(32, S_SYS_WAFERID1_200) | 185 | #define M_SYS_WAFERID1_200 _SB_MAKEMASK(32, S_SYS_WAFERID1_200) |
186 | #define V_SYS_WAFERID1_200(x) _SB_MAKEVALUE(x, S_SYS_WAFERID1_200) | 186 | #define V_SYS_WAFERID1_200(x) _SB_MAKEVALUE(x, S_SYS_WAFERID1_200) |
187 | #define G_SYS_WAFERID1_200(x) _SB_GETVALUE(x, S_SYS_WAFERID1_200, M_SYS_WAFERID1_200) | 187 | #define G_SYS_WAFERID1_200(x) _SB_GETVALUE(x, S_SYS_WAFERID1_200, M_SYS_WAFERID1_200) |
188 | 188 | ||
189 | #define S_SYS_BIN _SB_MAKE64(32) | 189 | #define S_SYS_BIN _SB_MAKE64(32) |
190 | #define M_SYS_BIN _SB_MAKEMASK(4, S_SYS_BIN) | 190 | #define M_SYS_BIN _SB_MAKEMASK(4, S_SYS_BIN) |
191 | #define V_SYS_BIN(x) _SB_MAKEVALUE(x, S_SYS_BIN) | 191 | #define V_SYS_BIN(x) _SB_MAKEVALUE(x, S_SYS_BIN) |
192 | #define G_SYS_BIN(x) _SB_GETVALUE(x, S_SYS_BIN, M_SYS_BIN) | 192 | #define G_SYS_BIN(x) _SB_GETVALUE(x, S_SYS_BIN, M_SYS_BIN) |
193 | 193 | ||
194 | /* Wafer ID: bits 39:36 */ | 194 | /* Wafer ID: bits 39:36 */ |
195 | #define S_SYS_WAFERID2_200 _SB_MAKE64(36) | 195 | #define S_SYS_WAFERID2_200 _SB_MAKE64(36) |
196 | #define M_SYS_WAFERID2_200 _SB_MAKEMASK(4, S_SYS_WAFERID2_200) | 196 | #define M_SYS_WAFERID2_200 _SB_MAKEMASK(4, S_SYS_WAFERID2_200) |
197 | #define V_SYS_WAFERID2_200(x) _SB_MAKEVALUE(x, S_SYS_WAFERID2_200) | 197 | #define V_SYS_WAFERID2_200(x) _SB_MAKEVALUE(x, S_SYS_WAFERID2_200) |
198 | #define G_SYS_WAFERID2_200(x) _SB_GETVALUE(x, S_SYS_WAFERID2_200, M_SYS_WAFERID2_200) | 198 | #define G_SYS_WAFERID2_200(x) _SB_GETVALUE(x, S_SYS_WAFERID2_200, M_SYS_WAFERID2_200) |
199 | 199 | ||
200 | /* Wafer ID: bits 39:0 */ | 200 | /* Wafer ID: bits 39:0 */ |
201 | #define S_SYS_WAFERID_300 _SB_MAKE64(0) | 201 | #define S_SYS_WAFERID_300 _SB_MAKE64(0) |
202 | #define M_SYS_WAFERID_300 _SB_MAKEMASK(40, S_SYS_WAFERID_300) | 202 | #define M_SYS_WAFERID_300 _SB_MAKEMASK(40, S_SYS_WAFERID_300) |
203 | #define V_SYS_WAFERID_300(x) _SB_MAKEVALUE(x, S_SYS_WAFERID_300) | 203 | #define V_SYS_WAFERID_300(x) _SB_MAKEVALUE(x, S_SYS_WAFERID_300) |
204 | #define G_SYS_WAFERID_300(x) _SB_GETVALUE(x, S_SYS_WAFERID_300, M_SYS_WAFERID_300) | 204 | #define G_SYS_WAFERID_300(x) _SB_GETVALUE(x, S_SYS_WAFERID_300, M_SYS_WAFERID_300) |
205 | 205 | ||
206 | #define S_SYS_XPOS _SB_MAKE64(40) | 206 | #define S_SYS_XPOS _SB_MAKE64(40) |
207 | #define M_SYS_XPOS _SB_MAKEMASK(6, S_SYS_XPOS) | 207 | #define M_SYS_XPOS _SB_MAKEMASK(6, S_SYS_XPOS) |
208 | #define V_SYS_XPOS(x) _SB_MAKEVALUE(x, S_SYS_XPOS) | 208 | #define V_SYS_XPOS(x) _SB_MAKEVALUE(x, S_SYS_XPOS) |
209 | #define G_SYS_XPOS(x) _SB_GETVALUE(x, S_SYS_XPOS, M_SYS_XPOS) | 209 | #define G_SYS_XPOS(x) _SB_GETVALUE(x, S_SYS_XPOS, M_SYS_XPOS) |
210 | 210 | ||
211 | #define S_SYS_YPOS _SB_MAKE64(46) | 211 | #define S_SYS_YPOS _SB_MAKE64(46) |
212 | #define M_SYS_YPOS _SB_MAKEMASK(6, S_SYS_YPOS) | 212 | #define M_SYS_YPOS _SB_MAKEMASK(6, S_SYS_YPOS) |
213 | #define V_SYS_YPOS(x) _SB_MAKEVALUE(x, S_SYS_YPOS) | 213 | #define V_SYS_YPOS(x) _SB_MAKEVALUE(x, S_SYS_YPOS) |
214 | #define G_SYS_YPOS(x) _SB_GETVALUE(x, S_SYS_YPOS, M_SYS_YPOS) | 214 | #define G_SYS_YPOS(x) _SB_GETVALUE(x, S_SYS_YPOS, M_SYS_YPOS) |
215 | #endif | 215 | #endif |
216 | 216 | ||
217 | 217 | ||
@@ -221,55 +221,55 @@ | |||
221 | */ | 221 | */ |
222 | 222 | ||
223 | #if SIBYTE_HDR_FEATURE_1250_112x | 223 | #if SIBYTE_HDR_FEATURE_1250_112x |
224 | #define M_SYS_LDT_PLL_BYP _SB_MAKEMASK1(3) | 224 | #define M_SYS_LDT_PLL_BYP _SB_MAKEMASK1(3) |
225 | #define M_SYS_PCI_SYNC_TEST_MODE _SB_MAKEMASK1(4) | 225 | #define M_SYS_PCI_SYNC_TEST_MODE _SB_MAKEMASK1(4) |
226 | #define M_SYS_IOB0_DIV _SB_MAKEMASK1(5) | 226 | #define M_SYS_IOB0_DIV _SB_MAKEMASK1(5) |
227 | #define M_SYS_IOB1_DIV _SB_MAKEMASK1(6) | 227 | #define M_SYS_IOB1_DIV _SB_MAKEMASK1(6) |
228 | 228 | ||
229 | #define S_SYS_PLL_DIV _SB_MAKE64(7) | 229 | #define S_SYS_PLL_DIV _SB_MAKE64(7) |
230 | #define M_SYS_PLL_DIV _SB_MAKEMASK(5, S_SYS_PLL_DIV) | 230 | #define M_SYS_PLL_DIV _SB_MAKEMASK(5, S_SYS_PLL_DIV) |
231 | #define V_SYS_PLL_DIV(x) _SB_MAKEVALUE(x, S_SYS_PLL_DIV) | 231 | #define V_SYS_PLL_DIV(x) _SB_MAKEVALUE(x, S_SYS_PLL_DIV) |
232 | #define G_SYS_PLL_DIV(x) _SB_GETVALUE(x, S_SYS_PLL_DIV, M_SYS_PLL_DIV) | 232 | #define G_SYS_PLL_DIV(x) _SB_GETVALUE(x, S_SYS_PLL_DIV, M_SYS_PLL_DIV) |
233 | 233 | ||
234 | #define M_SYS_SER0_ENABLE _SB_MAKEMASK1(12) | 234 | #define M_SYS_SER0_ENABLE _SB_MAKEMASK1(12) |
235 | #define M_SYS_SER0_RSTB_EN _SB_MAKEMASK1(13) | 235 | #define M_SYS_SER0_RSTB_EN _SB_MAKEMASK1(13) |
236 | #define M_SYS_SER1_ENABLE _SB_MAKEMASK1(14) | 236 | #define M_SYS_SER1_ENABLE _SB_MAKEMASK1(14) |
237 | #define M_SYS_SER1_RSTB_EN _SB_MAKEMASK1(15) | 237 | #define M_SYS_SER1_RSTB_EN _SB_MAKEMASK1(15) |
238 | #define M_SYS_PCMCIA_ENABLE _SB_MAKEMASK1(16) | 238 | #define M_SYS_PCMCIA_ENABLE _SB_MAKEMASK1(16) |
239 | 239 | ||
240 | #define S_SYS_BOOT_MODE _SB_MAKE64(17) | 240 | #define S_SYS_BOOT_MODE _SB_MAKE64(17) |
241 | #define M_SYS_BOOT_MODE _SB_MAKEMASK(2, S_SYS_BOOT_MODE) | 241 | #define M_SYS_BOOT_MODE _SB_MAKEMASK(2, S_SYS_BOOT_MODE) |
242 | #define V_SYS_BOOT_MODE(x) _SB_MAKEVALUE(x, S_SYS_BOOT_MODE) | 242 | #define V_SYS_BOOT_MODE(x) _SB_MAKEVALUE(x, S_SYS_BOOT_MODE) |
243 | #define G_SYS_BOOT_MODE(x) _SB_GETVALUE(x, S_SYS_BOOT_MODE, M_SYS_BOOT_MODE) | 243 | #define G_SYS_BOOT_MODE(x) _SB_GETVALUE(x, S_SYS_BOOT_MODE, M_SYS_BOOT_MODE) |
244 | #define K_SYS_BOOT_MODE_ROM32 0 | 244 | #define K_SYS_BOOT_MODE_ROM32 0 |
245 | #define K_SYS_BOOT_MODE_ROM8 1 | 245 | #define K_SYS_BOOT_MODE_ROM8 1 |
246 | #define K_SYS_BOOT_MODE_SMBUS_SMALL 2 | 246 | #define K_SYS_BOOT_MODE_SMBUS_SMALL 2 |
247 | #define K_SYS_BOOT_MODE_SMBUS_BIG 3 | 247 | #define K_SYS_BOOT_MODE_SMBUS_BIG 3 |
248 | 248 | ||
249 | #define M_SYS_PCI_HOST _SB_MAKEMASK1(19) | 249 | #define M_SYS_PCI_HOST _SB_MAKEMASK1(19) |
250 | #define M_SYS_PCI_ARBITER _SB_MAKEMASK1(20) | 250 | #define M_SYS_PCI_ARBITER _SB_MAKEMASK1(20) |
251 | #define M_SYS_SOUTH_ON_LDT _SB_MAKEMASK1(21) | 251 | #define M_SYS_SOUTH_ON_LDT _SB_MAKEMASK1(21) |
252 | #define M_SYS_BIG_ENDIAN _SB_MAKEMASK1(22) | 252 | #define M_SYS_BIG_ENDIAN _SB_MAKEMASK1(22) |
253 | #define M_SYS_GENCLK_EN _SB_MAKEMASK1(23) | 253 | #define M_SYS_GENCLK_EN _SB_MAKEMASK1(23) |
254 | #define M_SYS_LDT_TEST_EN _SB_MAKEMASK1(24) | 254 | #define M_SYS_LDT_TEST_EN _SB_MAKEMASK1(24) |
255 | #define M_SYS_GEN_PARITY_EN _SB_MAKEMASK1(25) | 255 | #define M_SYS_GEN_PARITY_EN _SB_MAKEMASK1(25) |
256 | 256 | ||
257 | #define S_SYS_CONFIG 26 | 257 | #define S_SYS_CONFIG 26 |
258 | #define M_SYS_CONFIG _SB_MAKEMASK(6, S_SYS_CONFIG) | 258 | #define M_SYS_CONFIG _SB_MAKEMASK(6, S_SYS_CONFIG) |
259 | #define V_SYS_CONFIG(x) _SB_MAKEVALUE(x, S_SYS_CONFIG) | 259 | #define V_SYS_CONFIG(x) _SB_MAKEVALUE(x, S_SYS_CONFIG) |
260 | #define G_SYS_CONFIG(x) _SB_GETVALUE(x, S_SYS_CONFIG, M_SYS_CONFIG) | 260 | #define G_SYS_CONFIG(x) _SB_GETVALUE(x, S_SYS_CONFIG, M_SYS_CONFIG) |
261 | 261 | ||
262 | /* The following bits are writeable by JTAG only. */ | 262 | /* The following bits are writeable by JTAG only. */ |
263 | 263 | ||
264 | #define M_SYS_CLKSTOP _SB_MAKEMASK1(32) | 264 | #define M_SYS_CLKSTOP _SB_MAKEMASK1(32) |
265 | #define M_SYS_CLKSTEP _SB_MAKEMASK1(33) | 265 | #define M_SYS_CLKSTEP _SB_MAKEMASK1(33) |
266 | 266 | ||
267 | #define S_SYS_CLKCOUNT 34 | 267 | #define S_SYS_CLKCOUNT 34 |
268 | #define M_SYS_CLKCOUNT _SB_MAKEMASK(8, S_SYS_CLKCOUNT) | 268 | #define M_SYS_CLKCOUNT _SB_MAKEMASK(8, S_SYS_CLKCOUNT) |
269 | #define V_SYS_CLKCOUNT(x) _SB_MAKEVALUE(x, S_SYS_CLKCOUNT) | 269 | #define V_SYS_CLKCOUNT(x) _SB_MAKEVALUE(x, S_SYS_CLKCOUNT) |
270 | #define G_SYS_CLKCOUNT(x) _SB_GETVALUE(x, S_SYS_CLKCOUNT, M_SYS_CLKCOUNT) | 270 | #define G_SYS_CLKCOUNT(x) _SB_GETVALUE(x, S_SYS_CLKCOUNT, M_SYS_CLKCOUNT) |
271 | 271 | ||
272 | #define M_SYS_PLL_BYPASS _SB_MAKEMASK1(42) | 272 | #define M_SYS_PLL_BYPASS _SB_MAKEMASK1(42) |
273 | 273 | ||
274 | #define S_SYS_PLL_IREF 43 | 274 | #define S_SYS_PLL_IREF 43 |
275 | #define M_SYS_PLL_IREF _SB_MAKEMASK(2, S_SYS_PLL_IREF) | 275 | #define M_SYS_PLL_IREF _SB_MAKEMASK(2, S_SYS_PLL_IREF) |
@@ -280,26 +280,26 @@ | |||
280 | #define S_SYS_PLL_VREG 47 | 280 | #define S_SYS_PLL_VREG 47 |
281 | #define M_SYS_PLL_VREG _SB_MAKEMASK(2, S_SYS_PLL_VREG) | 281 | #define M_SYS_PLL_VREG _SB_MAKEMASK(2, S_SYS_PLL_VREG) |
282 | 282 | ||
283 | #define M_SYS_MEM_RESET _SB_MAKEMASK1(49) | 283 | #define M_SYS_MEM_RESET _SB_MAKEMASK1(49) |
284 | #define M_SYS_L2C_RESET _SB_MAKEMASK1(50) | 284 | #define M_SYS_L2C_RESET _SB_MAKEMASK1(50) |
285 | #define M_SYS_IO_RESET_0 _SB_MAKEMASK1(51) | 285 | #define M_SYS_IO_RESET_0 _SB_MAKEMASK1(51) |
286 | #define M_SYS_IO_RESET_1 _SB_MAKEMASK1(52) | 286 | #define M_SYS_IO_RESET_1 _SB_MAKEMASK1(52) |
287 | #define M_SYS_SCD_RESET _SB_MAKEMASK1(53) | 287 | #define M_SYS_SCD_RESET _SB_MAKEMASK1(53) |
288 | 288 | ||
289 | /* End of bits writable by JTAG only. */ | 289 | /* End of bits writable by JTAG only. */ |
290 | 290 | ||
291 | #define M_SYS_CPU_RESET_0 _SB_MAKEMASK1(54) | 291 | #define M_SYS_CPU_RESET_0 _SB_MAKEMASK1(54) |
292 | #define M_SYS_CPU_RESET_1 _SB_MAKEMASK1(55) | 292 | #define M_SYS_CPU_RESET_1 _SB_MAKEMASK1(55) |
293 | 293 | ||
294 | #define M_SYS_UNICPU0 _SB_MAKEMASK1(56) | 294 | #define M_SYS_UNICPU0 _SB_MAKEMASK1(56) |
295 | #define M_SYS_UNICPU1 _SB_MAKEMASK1(57) | 295 | #define M_SYS_UNICPU1 _SB_MAKEMASK1(57) |
296 | 296 | ||
297 | #define M_SYS_SB_SOFTRES _SB_MAKEMASK1(58) | 297 | #define M_SYS_SB_SOFTRES _SB_MAKEMASK1(58) |
298 | #define M_SYS_EXT_RESET _SB_MAKEMASK1(59) | 298 | #define M_SYS_EXT_RESET _SB_MAKEMASK1(59) |
299 | #define M_SYS_SYSTEM_RESET _SB_MAKEMASK1(60) | 299 | #define M_SYS_SYSTEM_RESET _SB_MAKEMASK1(60) |
300 | 300 | ||
301 | #define M_SYS_MISR_MODE _SB_MAKEMASK1(61) | 301 | #define M_SYS_MISR_MODE _SB_MAKEMASK1(61) |
302 | #define M_SYS_MISR_RESET _SB_MAKEMASK1(62) | 302 | #define M_SYS_MISR_RESET _SB_MAKEMASK1(62) |
303 | 303 | ||
304 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 304 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
305 | #define M_SYS_SW_FLAG _SB_MAKEMASK1(63) | 305 | #define M_SYS_SW_FLAG _SB_MAKEMASK1(63) |
@@ -313,46 +313,46 @@ | |||
313 | * Registers: SCD_MBOX_CPU_x | 313 | * Registers: SCD_MBOX_CPU_x |
314 | */ | 314 | */ |
315 | 315 | ||
316 | #define S_MBOX_INT_3 0 | 316 | #define S_MBOX_INT_3 0 |
317 | #define M_MBOX_INT_3 _SB_MAKEMASK(16, S_MBOX_INT_3) | 317 | #define M_MBOX_INT_3 _SB_MAKEMASK(16, S_MBOX_INT_3) |
318 | #define S_MBOX_INT_2 16 | 318 | #define S_MBOX_INT_2 16 |
319 | #define M_MBOX_INT_2 _SB_MAKEMASK(16, S_MBOX_INT_2) | 319 | #define M_MBOX_INT_2 _SB_MAKEMASK(16, S_MBOX_INT_2) |
320 | #define S_MBOX_INT_1 32 | 320 | #define S_MBOX_INT_1 32 |
321 | #define M_MBOX_INT_1 _SB_MAKEMASK(16, S_MBOX_INT_1) | 321 | #define M_MBOX_INT_1 _SB_MAKEMASK(16, S_MBOX_INT_1) |
322 | #define S_MBOX_INT_0 48 | 322 | #define S_MBOX_INT_0 48 |
323 | #define M_MBOX_INT_0 _SB_MAKEMASK(16, S_MBOX_INT_0) | 323 | #define M_MBOX_INT_0 _SB_MAKEMASK(16, S_MBOX_INT_0) |
324 | 324 | ||
325 | /* | 325 | /* |
326 | * Watchdog Registers (Table 4-8) (Table 4-9) (Table 4-10) | 326 | * Watchdog Registers (Table 4-8) (Table 4-9) (Table 4-10) |
327 | * Registers: SCD_WDOG_INIT_CNT_x | 327 | * Registers: SCD_WDOG_INIT_CNT_x |
328 | */ | 328 | */ |
329 | 329 | ||
330 | #define V_SCD_WDOG_FREQ 1000000 | 330 | #define V_SCD_WDOG_FREQ 1000000 |
331 | 331 | ||
332 | #define S_SCD_WDOG_INIT 0 | 332 | #define S_SCD_WDOG_INIT 0 |
333 | #define M_SCD_WDOG_INIT _SB_MAKEMASK(23, S_SCD_WDOG_INIT) | 333 | #define M_SCD_WDOG_INIT _SB_MAKEMASK(23, S_SCD_WDOG_INIT) |
334 | 334 | ||
335 | #define S_SCD_WDOG_CNT 0 | 335 | #define S_SCD_WDOG_CNT 0 |
336 | #define M_SCD_WDOG_CNT _SB_MAKEMASK(23, S_SCD_WDOG_CNT) | 336 | #define M_SCD_WDOG_CNT _SB_MAKEMASK(23, S_SCD_WDOG_CNT) |
337 | 337 | ||
338 | #define S_SCD_WDOG_ENABLE 0 | 338 | #define S_SCD_WDOG_ENABLE 0 |
339 | #define M_SCD_WDOG_ENABLE _SB_MAKEMASK1(S_SCD_WDOG_ENABLE) | 339 | #define M_SCD_WDOG_ENABLE _SB_MAKEMASK1(S_SCD_WDOG_ENABLE) |
340 | 340 | ||
341 | #define S_SCD_WDOG_RESET_TYPE 2 | 341 | #define S_SCD_WDOG_RESET_TYPE 2 |
342 | #define M_SCD_WDOG_RESET_TYPE _SB_MAKEMASK(3, S_SCD_WDOG_RESET_TYPE) | 342 | #define M_SCD_WDOG_RESET_TYPE _SB_MAKEMASK(3, S_SCD_WDOG_RESET_TYPE) |
343 | #define V_SCD_WDOG_RESET_TYPE(x) _SB_MAKEVALUE(x, S_SCD_WDOG_RESET_TYPE) | 343 | #define V_SCD_WDOG_RESET_TYPE(x) _SB_MAKEVALUE(x, S_SCD_WDOG_RESET_TYPE) |
344 | #define G_SCD_WDOG_RESET_TYPE(x) _SB_GETVALUE(x, S_SCD_WDOG_RESET_TYPE, M_SCD_WDOG_RESET_TYPE) | 344 | #define G_SCD_WDOG_RESET_TYPE(x) _SB_GETVALUE(x, S_SCD_WDOG_RESET_TYPE, M_SCD_WDOG_RESET_TYPE) |
345 | 345 | ||
346 | #define K_SCD_WDOG_RESET_FULL 0 /* actually, (x & 1) == 0 */ | 346 | #define K_SCD_WDOG_RESET_FULL 0 /* actually, (x & 1) == 0 */ |
347 | #define K_SCD_WDOG_RESET_SOFT 1 | 347 | #define K_SCD_WDOG_RESET_SOFT 1 |
348 | #define K_SCD_WDOG_RESET_CPU0 3 | 348 | #define K_SCD_WDOG_RESET_CPU0 3 |
349 | #define K_SCD_WDOG_RESET_CPU1 5 | 349 | #define K_SCD_WDOG_RESET_CPU1 5 |
350 | #define K_SCD_WDOG_RESET_BOTH_CPUS 7 | 350 | #define K_SCD_WDOG_RESET_BOTH_CPUS 7 |
351 | 351 | ||
352 | /* This feature is present in 1250 C0 and later, but *not* in 112x A revs. */ | 352 | /* This feature is present in 1250 C0 and later, but *not* in 112x A revs. */ |
353 | #if SIBYTE_HDR_FEATURE(1250, PASS3) | 353 | #if SIBYTE_HDR_FEATURE(1250, PASS3) |
354 | #define S_SCD_WDOG_HAS_RESET 8 | 354 | #define S_SCD_WDOG_HAS_RESET 8 |
355 | #define M_SCD_WDOG_HAS_RESET _SB_MAKEMASK1(S_SCD_WDOG_HAS_RESET) | 355 | #define M_SCD_WDOG_HAS_RESET _SB_MAKEMASK1(S_SCD_WDOG_HAS_RESET) |
356 | #endif | 356 | #endif |
357 | 357 | ||
358 | 358 | ||
@@ -360,46 +360,46 @@ | |||
360 | * Timer Registers (Table 4-11) (Table 4-12) (Table 4-13) | 360 | * Timer Registers (Table 4-11) (Table 4-12) (Table 4-13) |
361 | */ | 361 | */ |
362 | 362 | ||
363 | #define V_SCD_TIMER_FREQ 1000000 | 363 | #define V_SCD_TIMER_FREQ 1000000 |
364 | 364 | ||
365 | #define S_SCD_TIMER_INIT 0 | 365 | #define S_SCD_TIMER_INIT 0 |
366 | #define M_SCD_TIMER_INIT _SB_MAKEMASK(23, S_SCD_TIMER_INIT) | 366 | #define M_SCD_TIMER_INIT _SB_MAKEMASK(23, S_SCD_TIMER_INIT) |
367 | #define V_SCD_TIMER_INIT(x) _SB_MAKEVALUE(x, S_SCD_TIMER_INIT) | 367 | #define V_SCD_TIMER_INIT(x) _SB_MAKEVALUE(x, S_SCD_TIMER_INIT) |
368 | #define G_SCD_TIMER_INIT(x) _SB_GETVALUE(x, S_SCD_TIMER_INIT, M_SCD_TIMER_INIT) | 368 | #define G_SCD_TIMER_INIT(x) _SB_GETVALUE(x, S_SCD_TIMER_INIT, M_SCD_TIMER_INIT) |
369 | 369 | ||
370 | #define V_SCD_TIMER_WIDTH 23 | 370 | #define V_SCD_TIMER_WIDTH 23 |
371 | #define S_SCD_TIMER_CNT 0 | 371 | #define S_SCD_TIMER_CNT 0 |
372 | #define M_SCD_TIMER_CNT _SB_MAKEMASK(V_SCD_TIMER_WIDTH, S_SCD_TIMER_CNT) | 372 | #define M_SCD_TIMER_CNT _SB_MAKEMASK(V_SCD_TIMER_WIDTH, S_SCD_TIMER_CNT) |
373 | #define V_SCD_TIMER_CNT(x) _SB_MAKEVALUE(x, S_SCD_TIMER_CNT) | 373 | #define V_SCD_TIMER_CNT(x) _SB_MAKEVALUE(x, S_SCD_TIMER_CNT) |
374 | #define G_SCD_TIMER_CNT(x) _SB_GETVALUE(x, S_SCD_TIMER_CNT, M_SCD_TIMER_CNT) | 374 | #define G_SCD_TIMER_CNT(x) _SB_GETVALUE(x, S_SCD_TIMER_CNT, M_SCD_TIMER_CNT) |
375 | 375 | ||
376 | #define M_SCD_TIMER_ENABLE _SB_MAKEMASK1(0) | 376 | #define M_SCD_TIMER_ENABLE _SB_MAKEMASK1(0) |
377 | #define M_SCD_TIMER_MODE _SB_MAKEMASK1(1) | 377 | #define M_SCD_TIMER_MODE _SB_MAKEMASK1(1) |
378 | #define M_SCD_TIMER_MODE_CONTINUOUS M_SCD_TIMER_MODE | 378 | #define M_SCD_TIMER_MODE_CONTINUOUS M_SCD_TIMER_MODE |
379 | 379 | ||
380 | /* | 380 | /* |
381 | * System Performance Counters | 381 | * System Performance Counters |
382 | */ | 382 | */ |
383 | 383 | ||
384 | #define S_SPC_CFG_SRC0 0 | 384 | #define S_SPC_CFG_SRC0 0 |
385 | #define M_SPC_CFG_SRC0 _SB_MAKEMASK(8, S_SPC_CFG_SRC0) | 385 | #define M_SPC_CFG_SRC0 _SB_MAKEMASK(8, S_SPC_CFG_SRC0) |
386 | #define V_SPC_CFG_SRC0(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC0) | 386 | #define V_SPC_CFG_SRC0(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC0) |
387 | #define G_SPC_CFG_SRC0(x) _SB_GETVALUE(x, S_SPC_CFG_SRC0, M_SPC_CFG_SRC0) | 387 | #define G_SPC_CFG_SRC0(x) _SB_GETVALUE(x, S_SPC_CFG_SRC0, M_SPC_CFG_SRC0) |
388 | 388 | ||
389 | #define S_SPC_CFG_SRC1 8 | 389 | #define S_SPC_CFG_SRC1 8 |
390 | #define M_SPC_CFG_SRC1 _SB_MAKEMASK(8, S_SPC_CFG_SRC1) | 390 | #define M_SPC_CFG_SRC1 _SB_MAKEMASK(8, S_SPC_CFG_SRC1) |
391 | #define V_SPC_CFG_SRC1(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC1) | 391 | #define V_SPC_CFG_SRC1(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC1) |
392 | #define G_SPC_CFG_SRC1(x) _SB_GETVALUE(x, S_SPC_CFG_SRC1, M_SPC_CFG_SRC1) | 392 | #define G_SPC_CFG_SRC1(x) _SB_GETVALUE(x, S_SPC_CFG_SRC1, M_SPC_CFG_SRC1) |
393 | 393 | ||
394 | #define S_SPC_CFG_SRC2 16 | 394 | #define S_SPC_CFG_SRC2 16 |
395 | #define M_SPC_CFG_SRC2 _SB_MAKEMASK(8, S_SPC_CFG_SRC2) | 395 | #define M_SPC_CFG_SRC2 _SB_MAKEMASK(8, S_SPC_CFG_SRC2) |
396 | #define V_SPC_CFG_SRC2(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC2) | 396 | #define V_SPC_CFG_SRC2(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC2) |
397 | #define G_SPC_CFG_SRC2(x) _SB_GETVALUE(x, S_SPC_CFG_SRC2, M_SPC_CFG_SRC2) | 397 | #define G_SPC_CFG_SRC2(x) _SB_GETVALUE(x, S_SPC_CFG_SRC2, M_SPC_CFG_SRC2) |
398 | 398 | ||
399 | #define S_SPC_CFG_SRC3 24 | 399 | #define S_SPC_CFG_SRC3 24 |
400 | #define M_SPC_CFG_SRC3 _SB_MAKEMASK(8, S_SPC_CFG_SRC3) | 400 | #define M_SPC_CFG_SRC3 _SB_MAKEMASK(8, S_SPC_CFG_SRC3) |
401 | #define V_SPC_CFG_SRC3(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC3) | 401 | #define V_SPC_CFG_SRC3(x) _SB_MAKEVALUE(x, S_SPC_CFG_SRC3) |
402 | #define G_SPC_CFG_SRC3(x) _SB_GETVALUE(x, S_SPC_CFG_SRC3, M_SPC_CFG_SRC3) | 402 | #define G_SPC_CFG_SRC3(x) _SB_GETVALUE(x, S_SPC_CFG_SRC3, M_SPC_CFG_SRC3) |
403 | 403 | ||
404 | #if SIBYTE_HDR_FEATURE_1250_112x | 404 | #if SIBYTE_HDR_FEATURE_1250_112x |
405 | #define M_SPC_CFG_CLEAR _SB_MAKEMASK1(32) | 405 | #define M_SPC_CFG_CLEAR _SB_MAKEMASK1(32) |
@@ -411,58 +411,58 @@ | |||
411 | * Bus Watcher | 411 | * Bus Watcher |
412 | */ | 412 | */ |
413 | 413 | ||
414 | #define S_SCD_BERR_TID 8 | 414 | #define S_SCD_BERR_TID 8 |
415 | #define M_SCD_BERR_TID _SB_MAKEMASK(10, S_SCD_BERR_TID) | 415 | #define M_SCD_BERR_TID _SB_MAKEMASK(10, S_SCD_BERR_TID) |
416 | #define V_SCD_BERR_TID(x) _SB_MAKEVALUE(x, S_SCD_BERR_TID) | 416 | #define V_SCD_BERR_TID(x) _SB_MAKEVALUE(x, S_SCD_BERR_TID) |
417 | #define G_SCD_BERR_TID(x) _SB_GETVALUE(x, S_SCD_BERR_TID, M_SCD_BERR_TID) | 417 | #define G_SCD_BERR_TID(x) _SB_GETVALUE(x, S_SCD_BERR_TID, M_SCD_BERR_TID) |
418 | 418 | ||
419 | #define S_SCD_BERR_RID 18 | 419 | #define S_SCD_BERR_RID 18 |
420 | #define M_SCD_BERR_RID _SB_MAKEMASK(4, S_SCD_BERR_RID) | 420 | #define M_SCD_BERR_RID _SB_MAKEMASK(4, S_SCD_BERR_RID) |
421 | #define V_SCD_BERR_RID(x) _SB_MAKEVALUE(x, S_SCD_BERR_RID) | 421 | #define V_SCD_BERR_RID(x) _SB_MAKEVALUE(x, S_SCD_BERR_RID) |
422 | #define G_SCD_BERR_RID(x) _SB_GETVALUE(x, S_SCD_BERR_RID, M_SCD_BERR_RID) | 422 | #define G_SCD_BERR_RID(x) _SB_GETVALUE(x, S_SCD_BERR_RID, M_SCD_BERR_RID) |
423 | 423 | ||
424 | #define S_SCD_BERR_DCODE 22 | 424 | #define S_SCD_BERR_DCODE 22 |
425 | #define M_SCD_BERR_DCODE _SB_MAKEMASK(3, S_SCD_BERR_DCODE) | 425 | #define M_SCD_BERR_DCODE _SB_MAKEMASK(3, S_SCD_BERR_DCODE) |
426 | #define V_SCD_BERR_DCODE(x) _SB_MAKEVALUE(x, S_SCD_BERR_DCODE) | 426 | #define V_SCD_BERR_DCODE(x) _SB_MAKEVALUE(x, S_SCD_BERR_DCODE) |
427 | #define G_SCD_BERR_DCODE(x) _SB_GETVALUE(x, S_SCD_BERR_DCODE, M_SCD_BERR_DCODE) | 427 | #define G_SCD_BERR_DCODE(x) _SB_GETVALUE(x, S_SCD_BERR_DCODE, M_SCD_BERR_DCODE) |
428 | 428 | ||
429 | #define M_SCD_BERR_MULTERRS _SB_MAKEMASK1(30) | 429 | #define M_SCD_BERR_MULTERRS _SB_MAKEMASK1(30) |
430 | 430 | ||
431 | 431 | ||
432 | #define S_SCD_L2ECC_CORR_D 0 | 432 | #define S_SCD_L2ECC_CORR_D 0 |
433 | #define M_SCD_L2ECC_CORR_D _SB_MAKEMASK(8, S_SCD_L2ECC_CORR_D) | 433 | #define M_SCD_L2ECC_CORR_D _SB_MAKEMASK(8, S_SCD_L2ECC_CORR_D) |
434 | #define V_SCD_L2ECC_CORR_D(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_CORR_D) | 434 | #define V_SCD_L2ECC_CORR_D(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_CORR_D) |
435 | #define G_SCD_L2ECC_CORR_D(x) _SB_GETVALUE(x, S_SCD_L2ECC_CORR_D, M_SCD_L2ECC_CORR_D) | 435 | #define G_SCD_L2ECC_CORR_D(x) _SB_GETVALUE(x, S_SCD_L2ECC_CORR_D, M_SCD_L2ECC_CORR_D) |
436 | 436 | ||
437 | #define S_SCD_L2ECC_BAD_D 8 | 437 | #define S_SCD_L2ECC_BAD_D 8 |
438 | #define M_SCD_L2ECC_BAD_D _SB_MAKEMASK(8, S_SCD_L2ECC_BAD_D) | 438 | #define M_SCD_L2ECC_BAD_D _SB_MAKEMASK(8, S_SCD_L2ECC_BAD_D) |
439 | #define V_SCD_L2ECC_BAD_D(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_BAD_D) | 439 | #define V_SCD_L2ECC_BAD_D(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_BAD_D) |
440 | #define G_SCD_L2ECC_BAD_D(x) _SB_GETVALUE(x, S_SCD_L2ECC_BAD_D, M_SCD_L2ECC_BAD_D) | 440 | #define G_SCD_L2ECC_BAD_D(x) _SB_GETVALUE(x, S_SCD_L2ECC_BAD_D, M_SCD_L2ECC_BAD_D) |
441 | 441 | ||
442 | #define S_SCD_L2ECC_CORR_T 16 | 442 | #define S_SCD_L2ECC_CORR_T 16 |
443 | #define M_SCD_L2ECC_CORR_T _SB_MAKEMASK(8, S_SCD_L2ECC_CORR_T) | 443 | #define M_SCD_L2ECC_CORR_T _SB_MAKEMASK(8, S_SCD_L2ECC_CORR_T) |
444 | #define V_SCD_L2ECC_CORR_T(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_CORR_T) | 444 | #define V_SCD_L2ECC_CORR_T(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_CORR_T) |
445 | #define G_SCD_L2ECC_CORR_T(x) _SB_GETVALUE(x, S_SCD_L2ECC_CORR_T, M_SCD_L2ECC_CORR_T) | 445 | #define G_SCD_L2ECC_CORR_T(x) _SB_GETVALUE(x, S_SCD_L2ECC_CORR_T, M_SCD_L2ECC_CORR_T) |
446 | 446 | ||
447 | #define S_SCD_L2ECC_BAD_T 24 | 447 | #define S_SCD_L2ECC_BAD_T 24 |
448 | #define M_SCD_L2ECC_BAD_T _SB_MAKEMASK(8, S_SCD_L2ECC_BAD_T) | 448 | #define M_SCD_L2ECC_BAD_T _SB_MAKEMASK(8, S_SCD_L2ECC_BAD_T) |
449 | #define V_SCD_L2ECC_BAD_T(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_BAD_T) | 449 | #define V_SCD_L2ECC_BAD_T(x) _SB_MAKEVALUE(x, S_SCD_L2ECC_BAD_T) |
450 | #define G_SCD_L2ECC_BAD_T(x) _SB_GETVALUE(x, S_SCD_L2ECC_BAD_T, M_SCD_L2ECC_BAD_T) | 450 | #define G_SCD_L2ECC_BAD_T(x) _SB_GETVALUE(x, S_SCD_L2ECC_BAD_T, M_SCD_L2ECC_BAD_T) |
451 | 451 | ||
452 | #define S_SCD_MEM_ECC_CORR 0 | 452 | #define S_SCD_MEM_ECC_CORR 0 |
453 | #define M_SCD_MEM_ECC_CORR _SB_MAKEMASK(8, S_SCD_MEM_ECC_CORR) | 453 | #define M_SCD_MEM_ECC_CORR _SB_MAKEMASK(8, S_SCD_MEM_ECC_CORR) |
454 | #define V_SCD_MEM_ECC_CORR(x) _SB_MAKEVALUE(x, S_SCD_MEM_ECC_CORR) | 454 | #define V_SCD_MEM_ECC_CORR(x) _SB_MAKEVALUE(x, S_SCD_MEM_ECC_CORR) |
455 | #define G_SCD_MEM_ECC_CORR(x) _SB_GETVALUE(x, S_SCD_MEM_ECC_CORR, M_SCD_MEM_ECC_CORR) | 455 | #define G_SCD_MEM_ECC_CORR(x) _SB_GETVALUE(x, S_SCD_MEM_ECC_CORR, M_SCD_MEM_ECC_CORR) |
456 | 456 | ||
457 | #define S_SCD_MEM_ECC_BAD 8 | 457 | #define S_SCD_MEM_ECC_BAD 8 |
458 | #define M_SCD_MEM_ECC_BAD _SB_MAKEMASK(8, S_SCD_MEM_ECC_BAD) | 458 | #define M_SCD_MEM_ECC_BAD _SB_MAKEMASK(8, S_SCD_MEM_ECC_BAD) |
459 | #define V_SCD_MEM_ECC_BAD(x) _SB_MAKEVALUE(x, S_SCD_MEM_ECC_BAD) | 459 | #define V_SCD_MEM_ECC_BAD(x) _SB_MAKEVALUE(x, S_SCD_MEM_ECC_BAD) |
460 | #define G_SCD_MEM_ECC_BAD(x) _SB_GETVALUE(x, S_SCD_MEM_ECC_BAD, M_SCD_MEM_ECC_BAD) | 460 | #define G_SCD_MEM_ECC_BAD(x) _SB_GETVALUE(x, S_SCD_MEM_ECC_BAD, M_SCD_MEM_ECC_BAD) |
461 | 461 | ||
462 | #define S_SCD_MEM_BUSERR 16 | 462 | #define S_SCD_MEM_BUSERR 16 |
463 | #define M_SCD_MEM_BUSERR _SB_MAKEMASK(8, S_SCD_MEM_BUSERR) | 463 | #define M_SCD_MEM_BUSERR _SB_MAKEMASK(8, S_SCD_MEM_BUSERR) |
464 | #define V_SCD_MEM_BUSERR(x) _SB_MAKEVALUE(x, S_SCD_MEM_BUSERR) | 464 | #define V_SCD_MEM_BUSERR(x) _SB_MAKEVALUE(x, S_SCD_MEM_BUSERR) |
465 | #define G_SCD_MEM_BUSERR(x) _SB_GETVALUE(x, S_SCD_MEM_BUSERR, M_SCD_MEM_BUSERR) | 465 | #define G_SCD_MEM_BUSERR(x) _SB_GETVALUE(x, S_SCD_MEM_BUSERR, M_SCD_MEM_BUSERR) |
466 | 466 | ||
467 | 467 | ||
468 | /* | 468 | /* |
@@ -473,28 +473,28 @@ | |||
473 | #define M_ATRAP_INDEX _SB_MAKEMASK(4, 0) | 473 | #define M_ATRAP_INDEX _SB_MAKEMASK(4, 0) |
474 | #define M_ATRAP_ADDRESS _SB_MAKEMASK(40, 0) | 474 | #define M_ATRAP_ADDRESS _SB_MAKEMASK(40, 0) |
475 | 475 | ||
476 | #define S_ATRAP_CFG_CNT 0 | 476 | #define S_ATRAP_CFG_CNT 0 |
477 | #define M_ATRAP_CFG_CNT _SB_MAKEMASK(3, S_ATRAP_CFG_CNT) | 477 | #define M_ATRAP_CFG_CNT _SB_MAKEMASK(3, S_ATRAP_CFG_CNT) |
478 | #define V_ATRAP_CFG_CNT(x) _SB_MAKEVALUE(x, S_ATRAP_CFG_CNT) | 478 | #define V_ATRAP_CFG_CNT(x) _SB_MAKEVALUE(x, S_ATRAP_CFG_CNT) |
479 | #define G_ATRAP_CFG_CNT(x) _SB_GETVALUE(x, S_ATRAP_CFG_CNT, M_ATRAP_CFG_CNT) | 479 | #define G_ATRAP_CFG_CNT(x) _SB_GETVALUE(x, S_ATRAP_CFG_CNT, M_ATRAP_CFG_CNT) |
480 | 480 | ||
481 | #define M_ATRAP_CFG_WRITE _SB_MAKEMASK1(3) | 481 | #define M_ATRAP_CFG_WRITE _SB_MAKEMASK1(3) |
482 | #define M_ATRAP_CFG_ALL _SB_MAKEMASK1(4) | 482 | #define M_ATRAP_CFG_ALL _SB_MAKEMASK1(4) |
483 | #define M_ATRAP_CFG_INV _SB_MAKEMASK1(5) | 483 | #define M_ATRAP_CFG_INV _SB_MAKEMASK1(5) |
484 | #define M_ATRAP_CFG_USESRC _SB_MAKEMASK1(6) | 484 | #define M_ATRAP_CFG_USESRC _SB_MAKEMASK1(6) |
485 | #define M_ATRAP_CFG_SRCINV _SB_MAKEMASK1(7) | 485 | #define M_ATRAP_CFG_SRCINV _SB_MAKEMASK1(7) |
486 | 486 | ||
487 | #define S_ATRAP_CFG_AGENTID 8 | 487 | #define S_ATRAP_CFG_AGENTID 8 |
488 | #define M_ATRAP_CFG_AGENTID _SB_MAKEMASK(4, S_ATRAP_CFG_AGENTID) | 488 | #define M_ATRAP_CFG_AGENTID _SB_MAKEMASK(4, S_ATRAP_CFG_AGENTID) |
489 | #define V_ATRAP_CFG_AGENTID(x) _SB_MAKEVALUE(x, S_ATRAP_CFG_AGENTID) | 489 | #define V_ATRAP_CFG_AGENTID(x) _SB_MAKEVALUE(x, S_ATRAP_CFG_AGENTID) |
490 | #define G_ATRAP_CFG_AGENTID(x) _SB_GETVALUE(x, S_ATRAP_CFG_AGENTID, M_ATRAP_CFG_AGENTID) | 490 | #define G_ATRAP_CFG_AGENTID(x) _SB_GETVALUE(x, S_ATRAP_CFG_AGENTID, M_ATRAP_CFG_AGENTID) |
491 | 491 | ||
492 | #define K_BUS_AGENT_CPU0 0 | 492 | #define K_BUS_AGENT_CPU0 0 |
493 | #define K_BUS_AGENT_CPU1 1 | 493 | #define K_BUS_AGENT_CPU1 1 |
494 | #define K_BUS_AGENT_IOB0 2 | 494 | #define K_BUS_AGENT_IOB0 2 |
495 | #define K_BUS_AGENT_IOB1 3 | 495 | #define K_BUS_AGENT_IOB1 3 |
496 | #define K_BUS_AGENT_SCD 4 | 496 | #define K_BUS_AGENT_SCD 4 |
497 | #define K_BUS_AGENT_L2C 6 | 497 | #define K_BUS_AGENT_L2C 6 |
498 | #define K_BUS_AGENT_MC 7 | 498 | #define K_BUS_AGENT_MC 7 |
499 | 499 | ||
500 | #define S_ATRAP_CFG_CATTR 12 | 500 | #define S_ATRAP_CFG_CATTR 12 |
@@ -503,13 +503,13 @@ | |||
503 | #define G_ATRAP_CFG_CATTR(x) _SB_GETVALUE(x, S_ATRAP_CFG_CATTR, M_ATRAP_CFG_CATTR) | 503 | #define G_ATRAP_CFG_CATTR(x) _SB_GETVALUE(x, S_ATRAP_CFG_CATTR, M_ATRAP_CFG_CATTR) |
504 | 504 | ||
505 | #define K_ATRAP_CFG_CATTR_IGNORE 0 | 505 | #define K_ATRAP_CFG_CATTR_IGNORE 0 |
506 | #define K_ATRAP_CFG_CATTR_UNC 1 | 506 | #define K_ATRAP_CFG_CATTR_UNC 1 |
507 | #define K_ATRAP_CFG_CATTR_CACHEABLE 2 | 507 | #define K_ATRAP_CFG_CATTR_CACHEABLE 2 |
508 | #define K_ATRAP_CFG_CATTR_NONCOH 3 | 508 | #define K_ATRAP_CFG_CATTR_NONCOH 3 |
509 | #define K_ATRAP_CFG_CATTR_COHERENT 4 | 509 | #define K_ATRAP_CFG_CATTR_COHERENT 4 |
510 | #define K_ATRAP_CFG_CATTR_NOTUNC 5 | 510 | #define K_ATRAP_CFG_CATTR_NOTUNC 5 |
511 | #define K_ATRAP_CFG_CATTR_NOTNONCOH 6 | 511 | #define K_ATRAP_CFG_CATTR_NOTNONCOH 6 |
512 | #define K_ATRAP_CFG_CATTR_NOTCOHERENT 7 | 512 | #define K_ATRAP_CFG_CATTR_NOTCOHERENT 7 |
513 | 513 | ||
514 | #endif /* 1250/112x */ | 514 | #endif /* 1250/112x */ |
515 | 515 | ||
@@ -517,16 +517,16 @@ | |||
517 | * Trace Buffer Config register | 517 | * Trace Buffer Config register |
518 | */ | 518 | */ |
519 | 519 | ||
520 | #define M_SCD_TRACE_CFG_RESET _SB_MAKEMASK1(0) | 520 | #define M_SCD_TRACE_CFG_RESET _SB_MAKEMASK1(0) |
521 | #define M_SCD_TRACE_CFG_START_READ _SB_MAKEMASK1(1) | 521 | #define M_SCD_TRACE_CFG_START_READ _SB_MAKEMASK1(1) |
522 | #define M_SCD_TRACE_CFG_START _SB_MAKEMASK1(2) | 522 | #define M_SCD_TRACE_CFG_START _SB_MAKEMASK1(2) |
523 | #define M_SCD_TRACE_CFG_STOP _SB_MAKEMASK1(3) | 523 | #define M_SCD_TRACE_CFG_STOP _SB_MAKEMASK1(3) |
524 | #define M_SCD_TRACE_CFG_FREEZE _SB_MAKEMASK1(4) | 524 | #define M_SCD_TRACE_CFG_FREEZE _SB_MAKEMASK1(4) |
525 | #define M_SCD_TRACE_CFG_FREEZE_FULL _SB_MAKEMASK1(5) | 525 | #define M_SCD_TRACE_CFG_FREEZE_FULL _SB_MAKEMASK1(5) |
526 | #define M_SCD_TRACE_CFG_DEBUG_FULL _SB_MAKEMASK1(6) | 526 | #define M_SCD_TRACE_CFG_DEBUG_FULL _SB_MAKEMASK1(6) |
527 | #define M_SCD_TRACE_CFG_FULL _SB_MAKEMASK1(7) | 527 | #define M_SCD_TRACE_CFG_FULL _SB_MAKEMASK1(7) |
528 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 528 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
529 | #define M_SCD_TRACE_CFG_FORCECNT _SB_MAKEMASK1(8) | 529 | #define M_SCD_TRACE_CFG_FORCECNT _SB_MAKEMASK1(8) |
530 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 530 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
531 | 531 | ||
532 | /* | 532 | /* |
@@ -534,121 +534,121 @@ | |||
534 | * a slightly different place in the register. | 534 | * a slightly different place in the register. |
535 | */ | 535 | */ |
536 | #if SIBYTE_HDR_FEATURE_1250_112x | 536 | #if SIBYTE_HDR_FEATURE_1250_112x |
537 | #define S_SCD_TRACE_CFG_CUR_ADDR 10 | 537 | #define S_SCD_TRACE_CFG_CUR_ADDR 10 |
538 | #else | 538 | #else |
539 | #if SIBYTE_HDR_FEATURE_CHIP(1480) | 539 | #if SIBYTE_HDR_FEATURE_CHIP(1480) |
540 | #define S_SCD_TRACE_CFG_CUR_ADDR 24 | 540 | #define S_SCD_TRACE_CFG_CUR_ADDR 24 |
541 | #endif /* 1480 */ | 541 | #endif /* 1480 */ |
542 | #endif /* 1250/112x */ | 542 | #endif /* 1250/112x */ |
543 | 543 | ||
544 | #define M_SCD_TRACE_CFG_CUR_ADDR _SB_MAKEMASK(8, S_SCD_TRACE_CFG_CUR_ADDR) | 544 | #define M_SCD_TRACE_CFG_CUR_ADDR _SB_MAKEMASK(8, S_SCD_TRACE_CFG_CUR_ADDR) |
545 | #define V_SCD_TRACE_CFG_CUR_ADDR(x) _SB_MAKEVALUE(x, S_SCD_TRACE_CFG_CUR_ADDR) | 545 | #define V_SCD_TRACE_CFG_CUR_ADDR(x) _SB_MAKEVALUE(x, S_SCD_TRACE_CFG_CUR_ADDR) |
546 | #define G_SCD_TRACE_CFG_CUR_ADDR(x) _SB_GETVALUE(x, S_SCD_TRACE_CFG_CUR_ADDR, M_SCD_TRACE_CFG_CUR_ADDR) | 546 | #define G_SCD_TRACE_CFG_CUR_ADDR(x) _SB_GETVALUE(x, S_SCD_TRACE_CFG_CUR_ADDR, M_SCD_TRACE_CFG_CUR_ADDR) |
547 | 547 | ||
548 | /* | 548 | /* |
549 | * Trace Event registers | 549 | * Trace Event registers |
550 | */ | 550 | */ |
551 | 551 | ||
552 | #define S_SCD_TREVT_ADDR_MATCH 0 | 552 | #define S_SCD_TREVT_ADDR_MATCH 0 |
553 | #define M_SCD_TREVT_ADDR_MATCH _SB_MAKEMASK(4, S_SCD_TREVT_ADDR_MATCH) | 553 | #define M_SCD_TREVT_ADDR_MATCH _SB_MAKEMASK(4, S_SCD_TREVT_ADDR_MATCH) |
554 | #define V_SCD_TREVT_ADDR_MATCH(x) _SB_MAKEVALUE(x, S_SCD_TREVT_ADDR_MATCH) | 554 | #define V_SCD_TREVT_ADDR_MATCH(x) _SB_MAKEVALUE(x, S_SCD_TREVT_ADDR_MATCH) |
555 | #define G_SCD_TREVT_ADDR_MATCH(x) _SB_GETVALUE(x, S_SCD_TREVT_ADDR_MATCH, M_SCD_TREVT_ADDR_MATCH) | 555 | #define G_SCD_TREVT_ADDR_MATCH(x) _SB_GETVALUE(x, S_SCD_TREVT_ADDR_MATCH, M_SCD_TREVT_ADDR_MATCH) |
556 | 556 | ||
557 | #define M_SCD_TREVT_REQID_MATCH _SB_MAKEMASK1(4) | 557 | #define M_SCD_TREVT_REQID_MATCH _SB_MAKEMASK1(4) |
558 | #define M_SCD_TREVT_DATAID_MATCH _SB_MAKEMASK1(5) | 558 | #define M_SCD_TREVT_DATAID_MATCH _SB_MAKEMASK1(5) |
559 | #define M_SCD_TREVT_RESPID_MATCH _SB_MAKEMASK1(6) | 559 | #define M_SCD_TREVT_RESPID_MATCH _SB_MAKEMASK1(6) |
560 | #define M_SCD_TREVT_INTERRUPT _SB_MAKEMASK1(7) | 560 | #define M_SCD_TREVT_INTERRUPT _SB_MAKEMASK1(7) |
561 | #define M_SCD_TREVT_DEBUG_PIN _SB_MAKEMASK1(9) | 561 | #define M_SCD_TREVT_DEBUG_PIN _SB_MAKEMASK1(9) |
562 | #define M_SCD_TREVT_WRITE _SB_MAKEMASK1(10) | 562 | #define M_SCD_TREVT_WRITE _SB_MAKEMASK1(10) |
563 | #define M_SCD_TREVT_READ _SB_MAKEMASK1(11) | 563 | #define M_SCD_TREVT_READ _SB_MAKEMASK1(11) |
564 | 564 | ||
565 | #define S_SCD_TREVT_REQID 12 | 565 | #define S_SCD_TREVT_REQID 12 |
566 | #define M_SCD_TREVT_REQID _SB_MAKEMASK(4, S_SCD_TREVT_REQID) | 566 | #define M_SCD_TREVT_REQID _SB_MAKEMASK(4, S_SCD_TREVT_REQID) |
567 | #define V_SCD_TREVT_REQID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_REQID) | 567 | #define V_SCD_TREVT_REQID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_REQID) |
568 | #define G_SCD_TREVT_REQID(x) _SB_GETVALUE(x, S_SCD_TREVT_REQID, M_SCD_TREVT_REQID) | 568 | #define G_SCD_TREVT_REQID(x) _SB_GETVALUE(x, S_SCD_TREVT_REQID, M_SCD_TREVT_REQID) |
569 | 569 | ||
570 | #define S_SCD_TREVT_RESPID 16 | 570 | #define S_SCD_TREVT_RESPID 16 |
571 | #define M_SCD_TREVT_RESPID _SB_MAKEMASK(4, S_SCD_TREVT_RESPID) | 571 | #define M_SCD_TREVT_RESPID _SB_MAKEMASK(4, S_SCD_TREVT_RESPID) |
572 | #define V_SCD_TREVT_RESPID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_RESPID) | 572 | #define V_SCD_TREVT_RESPID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_RESPID) |
573 | #define G_SCD_TREVT_RESPID(x) _SB_GETVALUE(x, S_SCD_TREVT_RESPID, M_SCD_TREVT_RESPID) | 573 | #define G_SCD_TREVT_RESPID(x) _SB_GETVALUE(x, S_SCD_TREVT_RESPID, M_SCD_TREVT_RESPID) |
574 | 574 | ||
575 | #define S_SCD_TREVT_DATAID 20 | 575 | #define S_SCD_TREVT_DATAID 20 |
576 | #define M_SCD_TREVT_DATAID _SB_MAKEMASK(4, S_SCD_TREVT_DATAID) | 576 | #define M_SCD_TREVT_DATAID _SB_MAKEMASK(4, S_SCD_TREVT_DATAID) |
577 | #define V_SCD_TREVT_DATAID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_DATAID) | 577 | #define V_SCD_TREVT_DATAID(x) _SB_MAKEVALUE(x, S_SCD_TREVT_DATAID) |
578 | #define G_SCD_TREVT_DATAID(x) _SB_GETVALUE(x, S_SCD_TREVT_DATAID, M_SCD_TREVT_DATID) | 578 | #define G_SCD_TREVT_DATAID(x) _SB_GETVALUE(x, S_SCD_TREVT_DATAID, M_SCD_TREVT_DATID) |
579 | 579 | ||
580 | #define S_SCD_TREVT_COUNT 24 | 580 | #define S_SCD_TREVT_COUNT 24 |
581 | #define M_SCD_TREVT_COUNT _SB_MAKEMASK(8, S_SCD_TREVT_COUNT) | 581 | #define M_SCD_TREVT_COUNT _SB_MAKEMASK(8, S_SCD_TREVT_COUNT) |
582 | #define V_SCD_TREVT_COUNT(x) _SB_MAKEVALUE(x, S_SCD_TREVT_COUNT) | 582 | #define V_SCD_TREVT_COUNT(x) _SB_MAKEVALUE(x, S_SCD_TREVT_COUNT) |
583 | #define G_SCD_TREVT_COUNT(x) _SB_GETVALUE(x, S_SCD_TREVT_COUNT, M_SCD_TREVT_COUNT) | 583 | #define G_SCD_TREVT_COUNT(x) _SB_GETVALUE(x, S_SCD_TREVT_COUNT, M_SCD_TREVT_COUNT) |
584 | 584 | ||
585 | /* | 585 | /* |
586 | * Trace Sequence registers | 586 | * Trace Sequence registers |
587 | */ | 587 | */ |
588 | 588 | ||
589 | #define S_SCD_TRSEQ_EVENT4 0 | 589 | #define S_SCD_TRSEQ_EVENT4 0 |
590 | #define M_SCD_TRSEQ_EVENT4 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT4) | 590 | #define M_SCD_TRSEQ_EVENT4 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT4) |
591 | #define V_SCD_TRSEQ_EVENT4(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT4) | 591 | #define V_SCD_TRSEQ_EVENT4(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT4) |
592 | #define G_SCD_TRSEQ_EVENT4(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT4, M_SCD_TRSEQ_EVENT4) | 592 | #define G_SCD_TRSEQ_EVENT4(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT4, M_SCD_TRSEQ_EVENT4) |
593 | 593 | ||
594 | #define S_SCD_TRSEQ_EVENT3 4 | 594 | #define S_SCD_TRSEQ_EVENT3 4 |
595 | #define M_SCD_TRSEQ_EVENT3 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT3) | 595 | #define M_SCD_TRSEQ_EVENT3 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT3) |
596 | #define V_SCD_TRSEQ_EVENT3(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT3) | 596 | #define V_SCD_TRSEQ_EVENT3(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT3) |
597 | #define G_SCD_TRSEQ_EVENT3(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT3, M_SCD_TRSEQ_EVENT3) | 597 | #define G_SCD_TRSEQ_EVENT3(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT3, M_SCD_TRSEQ_EVENT3) |
598 | 598 | ||
599 | #define S_SCD_TRSEQ_EVENT2 8 | 599 | #define S_SCD_TRSEQ_EVENT2 8 |
600 | #define M_SCD_TRSEQ_EVENT2 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT2) | 600 | #define M_SCD_TRSEQ_EVENT2 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT2) |
601 | #define V_SCD_TRSEQ_EVENT2(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT2) | 601 | #define V_SCD_TRSEQ_EVENT2(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT2) |
602 | #define G_SCD_TRSEQ_EVENT2(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT2, M_SCD_TRSEQ_EVENT2) | 602 | #define G_SCD_TRSEQ_EVENT2(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT2, M_SCD_TRSEQ_EVENT2) |
603 | 603 | ||
604 | #define S_SCD_TRSEQ_EVENT1 12 | 604 | #define S_SCD_TRSEQ_EVENT1 12 |
605 | #define M_SCD_TRSEQ_EVENT1 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT1) | 605 | #define M_SCD_TRSEQ_EVENT1 _SB_MAKEMASK(4, S_SCD_TRSEQ_EVENT1) |
606 | #define V_SCD_TRSEQ_EVENT1(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT1) | 606 | #define V_SCD_TRSEQ_EVENT1(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_EVENT1) |
607 | #define G_SCD_TRSEQ_EVENT1(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT1, M_SCD_TRSEQ_EVENT1) | 607 | #define G_SCD_TRSEQ_EVENT1(x) _SB_GETVALUE(x, S_SCD_TRSEQ_EVENT1, M_SCD_TRSEQ_EVENT1) |
608 | 608 | ||
609 | #define K_SCD_TRSEQ_E0 0 | 609 | #define K_SCD_TRSEQ_E0 0 |
610 | #define K_SCD_TRSEQ_E1 1 | 610 | #define K_SCD_TRSEQ_E1 1 |
611 | #define K_SCD_TRSEQ_E2 2 | 611 | #define K_SCD_TRSEQ_E2 2 |
612 | #define K_SCD_TRSEQ_E3 3 | 612 | #define K_SCD_TRSEQ_E3 3 |
613 | #define K_SCD_TRSEQ_E0_E1 4 | 613 | #define K_SCD_TRSEQ_E0_E1 4 |
614 | #define K_SCD_TRSEQ_E1_E2 5 | 614 | #define K_SCD_TRSEQ_E1_E2 5 |
615 | #define K_SCD_TRSEQ_E2_E3 6 | 615 | #define K_SCD_TRSEQ_E2_E3 6 |
616 | #define K_SCD_TRSEQ_E0_E1_E2 7 | 616 | #define K_SCD_TRSEQ_E0_E1_E2 7 |
617 | #define K_SCD_TRSEQ_E0_E1_E2_E3 8 | 617 | #define K_SCD_TRSEQ_E0_E1_E2_E3 8 |
618 | #define K_SCD_TRSEQ_E0E1 9 | 618 | #define K_SCD_TRSEQ_E0E1 9 |
619 | #define K_SCD_TRSEQ_E0E1E2 10 | 619 | #define K_SCD_TRSEQ_E0E1E2 10 |
620 | #define K_SCD_TRSEQ_E0E1E2E3 11 | 620 | #define K_SCD_TRSEQ_E0E1E2E3 11 |
621 | #define K_SCD_TRSEQ_E0E1_E2 12 | 621 | #define K_SCD_TRSEQ_E0E1_E2 12 |
622 | #define K_SCD_TRSEQ_E0E1_E2E3 13 | 622 | #define K_SCD_TRSEQ_E0E1_E2E3 13 |
623 | #define K_SCD_TRSEQ_E0E1_E2_E3 14 | 623 | #define K_SCD_TRSEQ_E0E1_E2_E3 14 |
624 | #define K_SCD_TRSEQ_IGNORED 15 | 624 | #define K_SCD_TRSEQ_IGNORED 15 |
625 | 625 | ||
626 | #define K_SCD_TRSEQ_TRIGGER_ALL (V_SCD_TRSEQ_EVENT1(K_SCD_TRSEQ_IGNORED) | \ | 626 | #define K_SCD_TRSEQ_TRIGGER_ALL (V_SCD_TRSEQ_EVENT1(K_SCD_TRSEQ_IGNORED) | \ |
627 | V_SCD_TRSEQ_EVENT2(K_SCD_TRSEQ_IGNORED) | \ | 627 | V_SCD_TRSEQ_EVENT2(K_SCD_TRSEQ_IGNORED) | \ |
628 | V_SCD_TRSEQ_EVENT3(K_SCD_TRSEQ_IGNORED) | \ | 628 | V_SCD_TRSEQ_EVENT3(K_SCD_TRSEQ_IGNORED) | \ |
629 | V_SCD_TRSEQ_EVENT4(K_SCD_TRSEQ_IGNORED)) | 629 | V_SCD_TRSEQ_EVENT4(K_SCD_TRSEQ_IGNORED)) |
630 | 630 | ||
631 | #define S_SCD_TRSEQ_FUNCTION 16 | 631 | #define S_SCD_TRSEQ_FUNCTION 16 |
632 | #define M_SCD_TRSEQ_FUNCTION _SB_MAKEMASK(4, S_SCD_TRSEQ_FUNCTION) | 632 | #define M_SCD_TRSEQ_FUNCTION _SB_MAKEMASK(4, S_SCD_TRSEQ_FUNCTION) |
633 | #define V_SCD_TRSEQ_FUNCTION(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_FUNCTION) | 633 | #define V_SCD_TRSEQ_FUNCTION(x) _SB_MAKEVALUE(x, S_SCD_TRSEQ_FUNCTION) |
634 | #define G_SCD_TRSEQ_FUNCTION(x) _SB_GETVALUE(x, S_SCD_TRSEQ_FUNCTION, M_SCD_TRSEQ_FUNCTION) | 634 | #define G_SCD_TRSEQ_FUNCTION(x) _SB_GETVALUE(x, S_SCD_TRSEQ_FUNCTION, M_SCD_TRSEQ_FUNCTION) |
635 | 635 | ||
636 | #define K_SCD_TRSEQ_FUNC_NOP 0 | 636 | #define K_SCD_TRSEQ_FUNC_NOP 0 |
637 | #define K_SCD_TRSEQ_FUNC_START 1 | 637 | #define K_SCD_TRSEQ_FUNC_START 1 |
638 | #define K_SCD_TRSEQ_FUNC_STOP 2 | 638 | #define K_SCD_TRSEQ_FUNC_STOP 2 |
639 | #define K_SCD_TRSEQ_FUNC_FREEZE 3 | 639 | #define K_SCD_TRSEQ_FUNC_FREEZE 3 |
640 | 640 | ||
641 | #define V_SCD_TRSEQ_FUNC_NOP V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_NOP) | 641 | #define V_SCD_TRSEQ_FUNC_NOP V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_NOP) |
642 | #define V_SCD_TRSEQ_FUNC_START V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_START) | 642 | #define V_SCD_TRSEQ_FUNC_START V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_START) |
643 | #define V_SCD_TRSEQ_FUNC_STOP V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_STOP) | 643 | #define V_SCD_TRSEQ_FUNC_STOP V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_STOP) |
644 | #define V_SCD_TRSEQ_FUNC_FREEZE V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_FREEZE) | 644 | #define V_SCD_TRSEQ_FUNC_FREEZE V_SCD_TRSEQ_FUNCTION(K_SCD_TRSEQ_FUNC_FREEZE) |
645 | 645 | ||
646 | #define M_SCD_TRSEQ_ASAMPLE _SB_MAKEMASK1(18) | 646 | #define M_SCD_TRSEQ_ASAMPLE _SB_MAKEMASK1(18) |
647 | #define M_SCD_TRSEQ_DSAMPLE _SB_MAKEMASK1(19) | 647 | #define M_SCD_TRSEQ_DSAMPLE _SB_MAKEMASK1(19) |
648 | #define M_SCD_TRSEQ_DEBUGPIN _SB_MAKEMASK1(20) | 648 | #define M_SCD_TRSEQ_DEBUGPIN _SB_MAKEMASK1(20) |
649 | #define M_SCD_TRSEQ_DEBUGCPU _SB_MAKEMASK1(21) | 649 | #define M_SCD_TRSEQ_DEBUGCPU _SB_MAKEMASK1(21) |
650 | #define M_SCD_TRSEQ_CLEARUSE _SB_MAKEMASK1(22) | 650 | #define M_SCD_TRSEQ_CLEARUSE _SB_MAKEMASK1(22) |
651 | #define M_SCD_TRSEQ_ALLD_A _SB_MAKEMASK1(23) | 651 | #define M_SCD_TRSEQ_ALLD_A _SB_MAKEMASK1(23) |
652 | #define M_SCD_TRSEQ_ALL_A _SB_MAKEMASK1(24) | 652 | #define M_SCD_TRSEQ_ALL_A _SB_MAKEMASK1(24) |
653 | 653 | ||
654 | #endif | 654 | #endif |
diff --git a/arch/mips/include/asm/sibyte/sb1250_smbus.h b/arch/mips/include/asm/sibyte/sb1250_smbus.h index 128d6b75b819..3cb73e89bbbc 100644 --- a/arch/mips/include/asm/sibyte/sb1250_smbus.h +++ b/arch/mips/include/asm/sibyte/sb1250_smbus.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * SMBUS Constants File: sb1250_smbus.h | 4 | * SMBUS Constants File: sb1250_smbus.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's SMbus devices. | 7 | * manipulating the SB1250's SMbus devices. |
@@ -40,83 +40,83 @@ | |||
40 | * SMBus Clock Frequency Register (Table 14-2) | 40 | * SMBus Clock Frequency Register (Table 14-2) |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #define S_SMB_FREQ_DIV 0 | 43 | #define S_SMB_FREQ_DIV 0 |
44 | #define M_SMB_FREQ_DIV _SB_MAKEMASK(13, S_SMB_FREQ_DIV) | 44 | #define M_SMB_FREQ_DIV _SB_MAKEMASK(13, S_SMB_FREQ_DIV) |
45 | #define V_SMB_FREQ_DIV(x) _SB_MAKEVALUE(x, S_SMB_FREQ_DIV) | 45 | #define V_SMB_FREQ_DIV(x) _SB_MAKEVALUE(x, S_SMB_FREQ_DIV) |
46 | 46 | ||
47 | #define K_SMB_FREQ_400KHZ 0x1F | 47 | #define K_SMB_FREQ_400KHZ 0x1F |
48 | #define K_SMB_FREQ_100KHZ 0x7D | 48 | #define K_SMB_FREQ_100KHZ 0x7D |
49 | #define K_SMB_FREQ_10KHZ 1250 | 49 | #define K_SMB_FREQ_10KHZ 1250 |
50 | 50 | ||
51 | #define S_SMB_CMD 0 | 51 | #define S_SMB_CMD 0 |
52 | #define M_SMB_CMD _SB_MAKEMASK(8, S_SMB_CMD) | 52 | #define M_SMB_CMD _SB_MAKEMASK(8, S_SMB_CMD) |
53 | #define V_SMB_CMD(x) _SB_MAKEVALUE(x, S_SMB_CMD) | 53 | #define V_SMB_CMD(x) _SB_MAKEVALUE(x, S_SMB_CMD) |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * SMBus control register (Table 14-4) | 56 | * SMBus control register (Table 14-4) |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #define M_SMB_ERR_INTR _SB_MAKEMASK1(0) | 59 | #define M_SMB_ERR_INTR _SB_MAKEMASK1(0) |
60 | #define M_SMB_FINISH_INTR _SB_MAKEMASK1(1) | 60 | #define M_SMB_FINISH_INTR _SB_MAKEMASK1(1) |
61 | 61 | ||
62 | #define S_SMB_DATA_OUT 4 | 62 | #define S_SMB_DATA_OUT 4 |
63 | #define M_SMB_DATA_OUT _SB_MAKEMASK1(S_SMB_DATA_OUT) | 63 | #define M_SMB_DATA_OUT _SB_MAKEMASK1(S_SMB_DATA_OUT) |
64 | #define V_SMB_DATA_OUT(x) _SB_MAKEVALUE(x, S_SMB_DATA_OUT) | 64 | #define V_SMB_DATA_OUT(x) _SB_MAKEVALUE(x, S_SMB_DATA_OUT) |
65 | 65 | ||
66 | #define M_SMB_DATA_DIR _SB_MAKEMASK1(5) | 66 | #define M_SMB_DATA_DIR _SB_MAKEMASK1(5) |
67 | #define M_SMB_DATA_DIR_OUTPUT M_SMB_DATA_DIR | 67 | #define M_SMB_DATA_DIR_OUTPUT M_SMB_DATA_DIR |
68 | #define M_SMB_CLK_OUT _SB_MAKEMASK1(6) | 68 | #define M_SMB_CLK_OUT _SB_MAKEMASK1(6) |
69 | #define M_SMB_DIRECT_ENABLE _SB_MAKEMASK1(7) | 69 | #define M_SMB_DIRECT_ENABLE _SB_MAKEMASK1(7) |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * SMBus status registers (Table 14-5) | 72 | * SMBus status registers (Table 14-5) |
73 | */ | 73 | */ |
74 | 74 | ||
75 | #define M_SMB_BUSY _SB_MAKEMASK1(0) | 75 | #define M_SMB_BUSY _SB_MAKEMASK1(0) |
76 | #define M_SMB_ERROR _SB_MAKEMASK1(1) | 76 | #define M_SMB_ERROR _SB_MAKEMASK1(1) |
77 | #define M_SMB_ERROR_TYPE _SB_MAKEMASK1(2) | 77 | #define M_SMB_ERROR_TYPE _SB_MAKEMASK1(2) |
78 | 78 | ||
79 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 79 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
80 | #define S_SMB_SCL_IN 5 | 80 | #define S_SMB_SCL_IN 5 |
81 | #define M_SMB_SCL_IN _SB_MAKEMASK1(S_SMB_SCL_IN) | 81 | #define M_SMB_SCL_IN _SB_MAKEMASK1(S_SMB_SCL_IN) |
82 | #define V_SMB_SCL_IN(x) _SB_MAKEVALUE(x, S_SMB_SCL_IN) | 82 | #define V_SMB_SCL_IN(x) _SB_MAKEVALUE(x, S_SMB_SCL_IN) |
83 | #define G_SMB_SCL_IN(x) _SB_GETVALUE(x, S_SMB_SCL_IN, M_SMB_SCL_IN) | 83 | #define G_SMB_SCL_IN(x) _SB_GETVALUE(x, S_SMB_SCL_IN, M_SMB_SCL_IN) |
84 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ | 84 | #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ |
85 | 85 | ||
86 | #define S_SMB_REF 6 | 86 | #define S_SMB_REF 6 |
87 | #define M_SMB_REF _SB_MAKEMASK1(S_SMB_REF) | 87 | #define M_SMB_REF _SB_MAKEMASK1(S_SMB_REF) |
88 | #define V_SMB_REF(x) _SB_MAKEVALUE(x, S_SMB_REF) | 88 | #define V_SMB_REF(x) _SB_MAKEVALUE(x, S_SMB_REF) |
89 | #define G_SMB_REF(x) _SB_GETVALUE(x, S_SMB_REF, M_SMB_REF) | 89 | #define G_SMB_REF(x) _SB_GETVALUE(x, S_SMB_REF, M_SMB_REF) |
90 | 90 | ||
91 | #define S_SMB_DATA_IN 7 | 91 | #define S_SMB_DATA_IN 7 |
92 | #define M_SMB_DATA_IN _SB_MAKEMASK1(S_SMB_DATA_IN) | 92 | #define M_SMB_DATA_IN _SB_MAKEMASK1(S_SMB_DATA_IN) |
93 | #define V_SMB_DATA_IN(x) _SB_MAKEVALUE(x, S_SMB_DATA_IN) | 93 | #define V_SMB_DATA_IN(x) _SB_MAKEVALUE(x, S_SMB_DATA_IN) |
94 | #define G_SMB_DATA_IN(x) _SB_GETVALUE(x, S_SMB_DATA_IN, M_SMB_DATA_IN) | 94 | #define G_SMB_DATA_IN(x) _SB_GETVALUE(x, S_SMB_DATA_IN, M_SMB_DATA_IN) |
95 | 95 | ||
96 | /* | 96 | /* |
97 | * SMBus Start/Command registers (Table 14-9) | 97 | * SMBus Start/Command registers (Table 14-9) |
98 | */ | 98 | */ |
99 | 99 | ||
100 | #define S_SMB_ADDR 0 | 100 | #define S_SMB_ADDR 0 |
101 | #define M_SMB_ADDR _SB_MAKEMASK(7, S_SMB_ADDR) | 101 | #define M_SMB_ADDR _SB_MAKEMASK(7, S_SMB_ADDR) |
102 | #define V_SMB_ADDR(x) _SB_MAKEVALUE(x, S_SMB_ADDR) | 102 | #define V_SMB_ADDR(x) _SB_MAKEVALUE(x, S_SMB_ADDR) |
103 | #define G_SMB_ADDR(x) _SB_GETVALUE(x, S_SMB_ADDR, M_SMB_ADDR) | 103 | #define G_SMB_ADDR(x) _SB_GETVALUE(x, S_SMB_ADDR, M_SMB_ADDR) |
104 | 104 | ||
105 | #define M_SMB_QDATA _SB_MAKEMASK1(7) | 105 | #define M_SMB_QDATA _SB_MAKEMASK1(7) |
106 | 106 | ||
107 | #define S_SMB_TT 8 | 107 | #define S_SMB_TT 8 |
108 | #define M_SMB_TT _SB_MAKEMASK(3, S_SMB_TT) | 108 | #define M_SMB_TT _SB_MAKEMASK(3, S_SMB_TT) |
109 | #define V_SMB_TT(x) _SB_MAKEVALUE(x, S_SMB_TT) | 109 | #define V_SMB_TT(x) _SB_MAKEVALUE(x, S_SMB_TT) |
110 | #define G_SMB_TT(x) _SB_GETVALUE(x, S_SMB_TT, M_SMB_TT) | 110 | #define G_SMB_TT(x) _SB_GETVALUE(x, S_SMB_TT, M_SMB_TT) |
111 | 111 | ||
112 | #define K_SMB_TT_WR1BYTE 0 | 112 | #define K_SMB_TT_WR1BYTE 0 |
113 | #define K_SMB_TT_WR2BYTE 1 | 113 | #define K_SMB_TT_WR2BYTE 1 |
114 | #define K_SMB_TT_WR3BYTE 2 | 114 | #define K_SMB_TT_WR3BYTE 2 |
115 | #define K_SMB_TT_CMD_RD1BYTE 3 | 115 | #define K_SMB_TT_CMD_RD1BYTE 3 |
116 | #define K_SMB_TT_CMD_RD2BYTE 4 | 116 | #define K_SMB_TT_CMD_RD2BYTE 4 |
117 | #define K_SMB_TT_RD1BYTE 5 | 117 | #define K_SMB_TT_RD1BYTE 5 |
118 | #define K_SMB_TT_QUICKCMD 6 | 118 | #define K_SMB_TT_QUICKCMD 6 |
119 | #define K_SMB_TT_EEPROMREAD 7 | 119 | #define K_SMB_TT_EEPROMREAD 7 |
120 | 120 | ||
121 | #define V_SMB_TT_WR1BYTE V_SMB_TT(K_SMB_TT_WR1BYTE) | 121 | #define V_SMB_TT_WR1BYTE V_SMB_TT(K_SMB_TT_WR1BYTE) |
122 | #define V_SMB_TT_WR2BYTE V_SMB_TT(K_SMB_TT_WR2BYTE) | 122 | #define V_SMB_TT_WR2BYTE V_SMB_TT(K_SMB_TT_WR2BYTE) |
@@ -127,51 +127,51 @@ | |||
127 | #define V_SMB_TT_QUICKCMD V_SMB_TT(K_SMB_TT_QUICKCMD) | 127 | #define V_SMB_TT_QUICKCMD V_SMB_TT(K_SMB_TT_QUICKCMD) |
128 | #define V_SMB_TT_EEPROMREAD V_SMB_TT(K_SMB_TT_EEPROMREAD) | 128 | #define V_SMB_TT_EEPROMREAD V_SMB_TT(K_SMB_TT_EEPROMREAD) |
129 | 129 | ||
130 | #define M_SMB_PEC _SB_MAKEMASK1(15) | 130 | #define M_SMB_PEC _SB_MAKEMASK1(15) |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * SMBus Data Register (Table 14-6) and SMBus Extra Register (Table 14-7) | 133 | * SMBus Data Register (Table 14-6) and SMBus Extra Register (Table 14-7) |
134 | */ | 134 | */ |
135 | 135 | ||
136 | #define S_SMB_LB 0 | 136 | #define S_SMB_LB 0 |
137 | #define M_SMB_LB _SB_MAKEMASK(8, S_SMB_LB) | 137 | #define M_SMB_LB _SB_MAKEMASK(8, S_SMB_LB) |
138 | #define V_SMB_LB(x) _SB_MAKEVALUE(x, S_SMB_LB) | 138 | #define V_SMB_LB(x) _SB_MAKEVALUE(x, S_SMB_LB) |
139 | 139 | ||
140 | #define S_SMB_MB 8 | 140 | #define S_SMB_MB 8 |
141 | #define M_SMB_MB _SB_MAKEMASK(8, S_SMB_MB) | 141 | #define M_SMB_MB _SB_MAKEMASK(8, S_SMB_MB) |
142 | #define V_SMB_MB(x) _SB_MAKEVALUE(x, S_SMB_MB) | 142 | #define V_SMB_MB(x) _SB_MAKEVALUE(x, S_SMB_MB) |
143 | 143 | ||
144 | 144 | ||
145 | /* | 145 | /* |
146 | * SMBus Packet Error Check register (Table 14-8) | 146 | * SMBus Packet Error Check register (Table 14-8) |
147 | */ | 147 | */ |
148 | 148 | ||
149 | #define S_SPEC_PEC 0 | 149 | #define S_SPEC_PEC 0 |
150 | #define M_SPEC_PEC _SB_MAKEMASK(8, S_SPEC_PEC) | 150 | #define M_SPEC_PEC _SB_MAKEMASK(8, S_SPEC_PEC) |
151 | #define V_SPEC_MB(x) _SB_MAKEVALUE(x, S_SPEC_PEC) | 151 | #define V_SPEC_MB(x) _SB_MAKEVALUE(x, S_SPEC_PEC) |
152 | 152 | ||
153 | 153 | ||
154 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) | 154 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
155 | 155 | ||
156 | #define S_SMB_CMDH 8 | 156 | #define S_SMB_CMDH 8 |
157 | #define M_SMB_CMDH _SB_MAKEMASK(8, S_SMB_CMDH) | 157 | #define M_SMB_CMDH _SB_MAKEMASK(8, S_SMB_CMDH) |
158 | #define V_SMB_CMDH(x) _SB_MAKEVALUE(x, S_SMB_CMDH) | 158 | #define V_SMB_CMDH(x) _SB_MAKEVALUE(x, S_SMB_CMDH) |
159 | 159 | ||
160 | #define M_SMB_EXTEND _SB_MAKEMASK1(14) | 160 | #define M_SMB_EXTEND _SB_MAKEMASK1(14) |
161 | 161 | ||
162 | #define S_SMB_DFMT 8 | 162 | #define S_SMB_DFMT 8 |
163 | #define M_SMB_DFMT _SB_MAKEMASK(3, S_SMB_DFMT) | 163 | #define M_SMB_DFMT _SB_MAKEMASK(3, S_SMB_DFMT) |
164 | #define V_SMB_DFMT(x) _SB_MAKEVALUE(x, S_SMB_DFMT) | 164 | #define V_SMB_DFMT(x) _SB_MAKEVALUE(x, S_SMB_DFMT) |
165 | #define G_SMB_DFMT(x) _SB_GETVALUE(x, S_SMB_DFMT, M_SMB_DFMT) | 165 | #define G_SMB_DFMT(x) _SB_GETVALUE(x, S_SMB_DFMT, M_SMB_DFMT) |
166 | 166 | ||
167 | #define K_SMB_DFMT_1BYTE 0 | 167 | #define K_SMB_DFMT_1BYTE 0 |
168 | #define K_SMB_DFMT_2BYTE 1 | 168 | #define K_SMB_DFMT_2BYTE 1 |
169 | #define K_SMB_DFMT_3BYTE 2 | 169 | #define K_SMB_DFMT_3BYTE 2 |
170 | #define K_SMB_DFMT_4BYTE 3 | 170 | #define K_SMB_DFMT_4BYTE 3 |
171 | #define K_SMB_DFMT_NODATA 4 | 171 | #define K_SMB_DFMT_NODATA 4 |
172 | #define K_SMB_DFMT_CMD4BYTE 5 | 172 | #define K_SMB_DFMT_CMD4BYTE 5 |
173 | #define K_SMB_DFMT_CMD5BYTE 6 | 173 | #define K_SMB_DFMT_CMD5BYTE 6 |
174 | #define K_SMB_DFMT_RESERVED 7 | 174 | #define K_SMB_DFMT_RESERVED 7 |
175 | 175 | ||
176 | #define V_SMB_DFMT_1BYTE V_SMB_DFMT(K_SMB_DFMT_1BYTE) | 176 | #define V_SMB_DFMT_1BYTE V_SMB_DFMT(K_SMB_DFMT_1BYTE) |
177 | #define V_SMB_DFMT_2BYTE V_SMB_DFMT(K_SMB_DFMT_2BYTE) | 177 | #define V_SMB_DFMT_2BYTE V_SMB_DFMT(K_SMB_DFMT_2BYTE) |
@@ -182,13 +182,13 @@ | |||
182 | #define V_SMB_DFMT_CMD5BYTE V_SMB_DFMT(K_SMB_DFMT_CMD5BYTE) | 182 | #define V_SMB_DFMT_CMD5BYTE V_SMB_DFMT(K_SMB_DFMT_CMD5BYTE) |
183 | #define V_SMB_DFMT_RESERVED V_SMB_DFMT(K_SMB_DFMT_RESERVED) | 183 | #define V_SMB_DFMT_RESERVED V_SMB_DFMT(K_SMB_DFMT_RESERVED) |
184 | 184 | ||
185 | #define S_SMB_AFMT 11 | 185 | #define S_SMB_AFMT 11 |
186 | #define M_SMB_AFMT _SB_MAKEMASK(2, S_SMB_AFMT) | 186 | #define M_SMB_AFMT _SB_MAKEMASK(2, S_SMB_AFMT) |
187 | #define V_SMB_AFMT(x) _SB_MAKEVALUE(x, S_SMB_AFMT) | 187 | #define V_SMB_AFMT(x) _SB_MAKEVALUE(x, S_SMB_AFMT) |
188 | #define G_SMB_AFMT(x) _SB_GETVALUE(x, S_SMB_AFMT, M_SMB_AFMT) | 188 | #define G_SMB_AFMT(x) _SB_GETVALUE(x, S_SMB_AFMT, M_SMB_AFMT) |
189 | 189 | ||
190 | #define K_SMB_AFMT_NONE 0 | 190 | #define K_SMB_AFMT_NONE 0 |
191 | #define K_SMB_AFMT_ADDR 1 | 191 | #define K_SMB_AFMT_ADDR 1 |
192 | #define K_SMB_AFMT_ADDR_CMD1BYTE 2 | 192 | #define K_SMB_AFMT_ADDR_CMD1BYTE 2 |
193 | #define K_SMB_AFMT_ADDR_CMD2BYTE 3 | 193 | #define K_SMB_AFMT_ADDR_CMD2BYTE 3 |
194 | 194 | ||
diff --git a/arch/mips/include/asm/sibyte/sb1250_syncser.h b/arch/mips/include/asm/sibyte/sb1250_syncser.h index 274e9179d326..b3acc75cf0f2 100644 --- a/arch/mips/include/asm/sibyte/sb1250_syncser.h +++ b/arch/mips/include/asm/sibyte/sb1250_syncser.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Synchronous Serial Constants File: sb1250_syncser.h | 4 | * Synchronous Serial Constants File: sb1250_syncser.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's Synchronous Serial | 7 | * manipulating the SB1250's Synchronous Serial |
@@ -39,108 +39,108 @@ | |||
39 | * Serial Mode Configuration Register | 39 | * Serial Mode Configuration Register |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define M_SYNCSER_CRC_MODE _SB_MAKEMASK1(0) | 42 | #define M_SYNCSER_CRC_MODE _SB_MAKEMASK1(0) |
43 | #define M_SYNCSER_MSB_FIRST _SB_MAKEMASK1(1) | 43 | #define M_SYNCSER_MSB_FIRST _SB_MAKEMASK1(1) |
44 | 44 | ||
45 | #define S_SYNCSER_FLAG_NUM 2 | 45 | #define S_SYNCSER_FLAG_NUM 2 |
46 | #define M_SYNCSER_FLAG_NUM _SB_MAKEMASK(4, S_SYNCSER_FLAG_NUM) | 46 | #define M_SYNCSER_FLAG_NUM _SB_MAKEMASK(4, S_SYNCSER_FLAG_NUM) |
47 | #define V_SYNCSER_FLAG_NUM _SB_MAKEVALUE(x, S_SYNCSER_FLAG_NUM) | 47 | #define V_SYNCSER_FLAG_NUM _SB_MAKEVALUE(x, S_SYNCSER_FLAG_NUM) |
48 | 48 | ||
49 | #define M_SYNCSER_FLAG_EN _SB_MAKEMASK1(6) | 49 | #define M_SYNCSER_FLAG_EN _SB_MAKEMASK1(6) |
50 | #define M_SYNCSER_HDLC_EN _SB_MAKEMASK1(7) | 50 | #define M_SYNCSER_HDLC_EN _SB_MAKEMASK1(7) |
51 | #define M_SYNCSER_LOOP_MODE _SB_MAKEMASK1(8) | 51 | #define M_SYNCSER_LOOP_MODE _SB_MAKEMASK1(8) |
52 | #define M_SYNCSER_LOOPBACK _SB_MAKEMASK1(9) | 52 | #define M_SYNCSER_LOOPBACK _SB_MAKEMASK1(9) |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Serial Clock Source and Line Interface Mode Register | 55 | * Serial Clock Source and Line Interface Mode Register |
56 | */ | 56 | */ |
57 | 57 | ||
58 | #define M_SYNCSER_RXCLK_INV _SB_MAKEMASK1(0) | 58 | #define M_SYNCSER_RXCLK_INV _SB_MAKEMASK1(0) |
59 | #define M_SYNCSER_RXCLK_EXT _SB_MAKEMASK1(1) | 59 | #define M_SYNCSER_RXCLK_EXT _SB_MAKEMASK1(1) |
60 | 60 | ||
61 | #define S_SYNCSER_RXSYNC_DLY 2 | 61 | #define S_SYNCSER_RXSYNC_DLY 2 |
62 | #define M_SYNCSER_RXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_RXSYNC_DLY) | 62 | #define M_SYNCSER_RXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_RXSYNC_DLY) |
63 | #define V_SYNCSER_RXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_RXSYNC_DLY) | 63 | #define V_SYNCSER_RXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_RXSYNC_DLY) |
64 | 64 | ||
65 | #define M_SYNCSER_RXSYNC_LOW _SB_MAKEMASK1(4) | 65 | #define M_SYNCSER_RXSYNC_LOW _SB_MAKEMASK1(4) |
66 | #define M_SYNCSER_RXSTRB_LOW _SB_MAKEMASK1(5) | 66 | #define M_SYNCSER_RXSTRB_LOW _SB_MAKEMASK1(5) |
67 | 67 | ||
68 | #define M_SYNCSER_RXSYNC_EDGE _SB_MAKEMASK1(6) | 68 | #define M_SYNCSER_RXSYNC_EDGE _SB_MAKEMASK1(6) |
69 | #define M_SYNCSER_RXSYNC_INT _SB_MAKEMASK1(7) | 69 | #define M_SYNCSER_RXSYNC_INT _SB_MAKEMASK1(7) |
70 | 70 | ||
71 | #define M_SYNCSER_TXCLK_INV _SB_MAKEMASK1(8) | 71 | #define M_SYNCSER_TXCLK_INV _SB_MAKEMASK1(8) |
72 | #define M_SYNCSER_TXCLK_EXT _SB_MAKEMASK1(9) | 72 | #define M_SYNCSER_TXCLK_EXT _SB_MAKEMASK1(9) |
73 | 73 | ||
74 | #define S_SYNCSER_TXSYNC_DLY 10 | 74 | #define S_SYNCSER_TXSYNC_DLY 10 |
75 | #define M_SYNCSER_TXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_TXSYNC_DLY) | 75 | #define M_SYNCSER_TXSYNC_DLY _SB_MAKEMASK(2, S_SYNCSER_TXSYNC_DLY) |
76 | #define V_SYNCSER_TXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_TXSYNC_DLY) | 76 | #define V_SYNCSER_TXSYNC_DLY(x) _SB_MAKEVALUE(x, S_SYNCSER_TXSYNC_DLY) |
77 | 77 | ||
78 | #define M_SYNCSER_TXSYNC_LOW _SB_MAKEMASK1(12) | 78 | #define M_SYNCSER_TXSYNC_LOW _SB_MAKEMASK1(12) |
79 | #define M_SYNCSER_TXSTRB_LOW _SB_MAKEMASK1(13) | 79 | #define M_SYNCSER_TXSTRB_LOW _SB_MAKEMASK1(13) |
80 | 80 | ||
81 | #define M_SYNCSER_TXSYNC_EDGE _SB_MAKEMASK1(14) | 81 | #define M_SYNCSER_TXSYNC_EDGE _SB_MAKEMASK1(14) |
82 | #define M_SYNCSER_TXSYNC_INT _SB_MAKEMASK1(15) | 82 | #define M_SYNCSER_TXSYNC_INT _SB_MAKEMASK1(15) |
83 | 83 | ||
84 | /* | 84 | /* |
85 | * Serial Command Register | 85 | * Serial Command Register |
86 | */ | 86 | */ |
87 | 87 | ||
88 | #define M_SYNCSER_CMD_RX_EN _SB_MAKEMASK1(0) | 88 | #define M_SYNCSER_CMD_RX_EN _SB_MAKEMASK1(0) |
89 | #define M_SYNCSER_CMD_TX_EN _SB_MAKEMASK1(1) | 89 | #define M_SYNCSER_CMD_TX_EN _SB_MAKEMASK1(1) |
90 | #define M_SYNCSER_CMD_RX_RESET _SB_MAKEMASK1(2) | 90 | #define M_SYNCSER_CMD_RX_RESET _SB_MAKEMASK1(2) |
91 | #define M_SYNCSER_CMD_TX_RESET _SB_MAKEMASK1(3) | 91 | #define M_SYNCSER_CMD_TX_RESET _SB_MAKEMASK1(3) |
92 | #define M_SYNCSER_CMD_TX_PAUSE _SB_MAKEMASK1(5) | 92 | #define M_SYNCSER_CMD_TX_PAUSE _SB_MAKEMASK1(5) |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Serial DMA Enable Register | 95 | * Serial DMA Enable Register |
96 | */ | 96 | */ |
97 | 97 | ||
98 | #define M_SYNCSER_DMA_RX_EN _SB_MAKEMASK1(0) | 98 | #define M_SYNCSER_DMA_RX_EN _SB_MAKEMASK1(0) |
99 | #define M_SYNCSER_DMA_TX_EN _SB_MAKEMASK1(4) | 99 | #define M_SYNCSER_DMA_TX_EN _SB_MAKEMASK1(4) |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * Serial Status Register | 102 | * Serial Status Register |
103 | */ | 103 | */ |
104 | 104 | ||
105 | #define M_SYNCSER_RX_CRCERR _SB_MAKEMASK1(0) | 105 | #define M_SYNCSER_RX_CRCERR _SB_MAKEMASK1(0) |
106 | #define M_SYNCSER_RX_ABORT _SB_MAKEMASK1(1) | 106 | #define M_SYNCSER_RX_ABORT _SB_MAKEMASK1(1) |
107 | #define M_SYNCSER_RX_OCTET _SB_MAKEMASK1(2) | 107 | #define M_SYNCSER_RX_OCTET _SB_MAKEMASK1(2) |
108 | #define M_SYNCSER_RX_LONGFRM _SB_MAKEMASK1(3) | 108 | #define M_SYNCSER_RX_LONGFRM _SB_MAKEMASK1(3) |
109 | #define M_SYNCSER_RX_SHORTFRM _SB_MAKEMASK1(4) | 109 | #define M_SYNCSER_RX_SHORTFRM _SB_MAKEMASK1(4) |
110 | #define M_SYNCSER_RX_OVERRUN _SB_MAKEMASK1(5) | 110 | #define M_SYNCSER_RX_OVERRUN _SB_MAKEMASK1(5) |
111 | #define M_SYNCSER_RX_SYNC_ERR _SB_MAKEMASK1(6) | 111 | #define M_SYNCSER_RX_SYNC_ERR _SB_MAKEMASK1(6) |
112 | #define M_SYNCSER_TX_CRCERR _SB_MAKEMASK1(8) | 112 | #define M_SYNCSER_TX_CRCERR _SB_MAKEMASK1(8) |
113 | #define M_SYNCSER_TX_UNDERRUN _SB_MAKEMASK1(9) | 113 | #define M_SYNCSER_TX_UNDERRUN _SB_MAKEMASK1(9) |
114 | #define M_SYNCSER_TX_SYNC_ERR _SB_MAKEMASK1(10) | 114 | #define M_SYNCSER_TX_SYNC_ERR _SB_MAKEMASK1(10) |
115 | #define M_SYNCSER_TX_PAUSE_COMPLETE _SB_MAKEMASK1(11) | 115 | #define M_SYNCSER_TX_PAUSE_COMPLETE _SB_MAKEMASK1(11) |
116 | #define M_SYNCSER_RX_EOP_COUNT _SB_MAKEMASK1(16) | 116 | #define M_SYNCSER_RX_EOP_COUNT _SB_MAKEMASK1(16) |
117 | #define M_SYNCSER_RX_EOP_TIMER _SB_MAKEMASK1(17) | 117 | #define M_SYNCSER_RX_EOP_TIMER _SB_MAKEMASK1(17) |
118 | #define M_SYNCSER_RX_EOP_SEEN _SB_MAKEMASK1(18) | 118 | #define M_SYNCSER_RX_EOP_SEEN _SB_MAKEMASK1(18) |
119 | #define M_SYNCSER_RX_HWM _SB_MAKEMASK1(19) | 119 | #define M_SYNCSER_RX_HWM _SB_MAKEMASK1(19) |
120 | #define M_SYNCSER_RX_LWM _SB_MAKEMASK1(20) | 120 | #define M_SYNCSER_RX_LWM _SB_MAKEMASK1(20) |
121 | #define M_SYNCSER_RX_DSCR _SB_MAKEMASK1(21) | 121 | #define M_SYNCSER_RX_DSCR _SB_MAKEMASK1(21) |
122 | #define M_SYNCSER_RX_DERR _SB_MAKEMASK1(22) | 122 | #define M_SYNCSER_RX_DERR _SB_MAKEMASK1(22) |
123 | #define M_SYNCSER_TX_EOP_COUNT _SB_MAKEMASK1(24) | 123 | #define M_SYNCSER_TX_EOP_COUNT _SB_MAKEMASK1(24) |
124 | #define M_SYNCSER_TX_EOP_TIMER _SB_MAKEMASK1(25) | 124 | #define M_SYNCSER_TX_EOP_TIMER _SB_MAKEMASK1(25) |
125 | #define M_SYNCSER_TX_EOP_SEEN _SB_MAKEMASK1(26) | 125 | #define M_SYNCSER_TX_EOP_SEEN _SB_MAKEMASK1(26) |
126 | #define M_SYNCSER_TX_HWM _SB_MAKEMASK1(27) | 126 | #define M_SYNCSER_TX_HWM _SB_MAKEMASK1(27) |
127 | #define M_SYNCSER_TX_LWM _SB_MAKEMASK1(28) | 127 | #define M_SYNCSER_TX_LWM _SB_MAKEMASK1(28) |
128 | #define M_SYNCSER_TX_DSCR _SB_MAKEMASK1(29) | 128 | #define M_SYNCSER_TX_DSCR _SB_MAKEMASK1(29) |
129 | #define M_SYNCSER_TX_DERR _SB_MAKEMASK1(30) | 129 | #define M_SYNCSER_TX_DERR _SB_MAKEMASK1(30) |
130 | #define M_SYNCSER_TX_DZERO _SB_MAKEMASK1(31) | 130 | #define M_SYNCSER_TX_DZERO _SB_MAKEMASK1(31) |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * Sequencer Table Entry format | 133 | * Sequencer Table Entry format |
134 | */ | 134 | */ |
135 | 135 | ||
136 | #define M_SYNCSER_SEQ_LAST _SB_MAKEMASK1(0) | 136 | #define M_SYNCSER_SEQ_LAST _SB_MAKEMASK1(0) |
137 | #define M_SYNCSER_SEQ_BYTE _SB_MAKEMASK1(1) | 137 | #define M_SYNCSER_SEQ_BYTE _SB_MAKEMASK1(1) |
138 | 138 | ||
139 | #define S_SYNCSER_SEQ_COUNT 2 | 139 | #define S_SYNCSER_SEQ_COUNT 2 |
140 | #define M_SYNCSER_SEQ_COUNT _SB_MAKEMASK(4, S_SYNCSER_SEQ_COUNT) | 140 | #define M_SYNCSER_SEQ_COUNT _SB_MAKEMASK(4, S_SYNCSER_SEQ_COUNT) |
141 | #define V_SYNCSER_SEQ_COUNT(x) _SB_MAKEVALUE(x, S_SYNCSER_SEQ_COUNT) | 141 | #define V_SYNCSER_SEQ_COUNT(x) _SB_MAKEVALUE(x, S_SYNCSER_SEQ_COUNT) |
142 | 142 | ||
143 | #define M_SYNCSER_SEQ_ENABLE _SB_MAKEMASK1(6) | 143 | #define M_SYNCSER_SEQ_ENABLE _SB_MAKEMASK1(6) |
144 | #define M_SYNCSER_SEQ_STROBE _SB_MAKEMASK1(7) | 144 | #define M_SYNCSER_SEQ_STROBE _SB_MAKEMASK1(7) |
145 | 145 | ||
146 | #endif | 146 | #endif |
diff --git a/arch/mips/include/asm/sibyte/sb1250_uart.h b/arch/mips/include/asm/sibyte/sb1250_uart.h index bb99ecac5817..a43dc1976286 100644 --- a/arch/mips/include/asm/sibyte/sb1250_uart.h +++ b/arch/mips/include/asm/sibyte/sb1250_uart.h | |||
@@ -45,33 +45,33 @@ | |||
45 | * Register: DUART_MODE_REG_1_B | 45 | * Register: DUART_MODE_REG_1_B |
46 | */ | 46 | */ |
47 | 47 | ||
48 | #define S_DUART_BITS_PER_CHAR 0 | 48 | #define S_DUART_BITS_PER_CHAR 0 |
49 | #define M_DUART_BITS_PER_CHAR _SB_MAKEMASK(2, S_DUART_BITS_PER_CHAR) | 49 | #define M_DUART_BITS_PER_CHAR _SB_MAKEMASK(2, S_DUART_BITS_PER_CHAR) |
50 | #define V_DUART_BITS_PER_CHAR(x) _SB_MAKEVALUE(x, S_DUART_BITS_PER_CHAR) | 50 | #define V_DUART_BITS_PER_CHAR(x) _SB_MAKEVALUE(x, S_DUART_BITS_PER_CHAR) |
51 | 51 | ||
52 | #define K_DUART_BITS_PER_CHAR_RSV0 0 | 52 | #define K_DUART_BITS_PER_CHAR_RSV0 0 |
53 | #define K_DUART_BITS_PER_CHAR_RSV1 1 | 53 | #define K_DUART_BITS_PER_CHAR_RSV1 1 |
54 | #define K_DUART_BITS_PER_CHAR_7 2 | 54 | #define K_DUART_BITS_PER_CHAR_7 2 |
55 | #define K_DUART_BITS_PER_CHAR_8 3 | 55 | #define K_DUART_BITS_PER_CHAR_8 3 |
56 | 56 | ||
57 | #define V_DUART_BITS_PER_CHAR_RSV0 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_RSV0) | 57 | #define V_DUART_BITS_PER_CHAR_RSV0 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_RSV0) |
58 | #define V_DUART_BITS_PER_CHAR_RSV1 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_RSV1) | 58 | #define V_DUART_BITS_PER_CHAR_RSV1 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_RSV1) |
59 | #define V_DUART_BITS_PER_CHAR_7 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_7) | 59 | #define V_DUART_BITS_PER_CHAR_7 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_7) |
60 | #define V_DUART_BITS_PER_CHAR_8 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_8) | 60 | #define V_DUART_BITS_PER_CHAR_8 V_DUART_BITS_PER_CHAR(K_DUART_BITS_PER_CHAR_8) |
61 | 61 | ||
62 | 62 | ||
63 | #define M_DUART_PARITY_TYPE_EVEN 0x00 | 63 | #define M_DUART_PARITY_TYPE_EVEN 0x00 |
64 | #define M_DUART_PARITY_TYPE_ODD _SB_MAKEMASK1(2) | 64 | #define M_DUART_PARITY_TYPE_ODD _SB_MAKEMASK1(2) |
65 | 65 | ||
66 | #define S_DUART_PARITY_MODE 3 | 66 | #define S_DUART_PARITY_MODE 3 |
67 | #define M_DUART_PARITY_MODE _SB_MAKEMASK(2, S_DUART_PARITY_MODE) | 67 | #define M_DUART_PARITY_MODE _SB_MAKEMASK(2, S_DUART_PARITY_MODE) |
68 | #define V_DUART_PARITY_MODE(x) _SB_MAKEVALUE(x, S_DUART_PARITY_MODE) | 68 | #define V_DUART_PARITY_MODE(x) _SB_MAKEVALUE(x, S_DUART_PARITY_MODE) |
69 | 69 | ||
70 | #define K_DUART_PARITY_MODE_ADD 0 | 70 | #define K_DUART_PARITY_MODE_ADD 0 |
71 | #define K_DUART_PARITY_MODE_ADD_FIXED 1 | 71 | #define K_DUART_PARITY_MODE_ADD_FIXED 1 |
72 | #define K_DUART_PARITY_MODE_NONE 2 | 72 | #define K_DUART_PARITY_MODE_NONE 2 |
73 | 73 | ||
74 | #define V_DUART_PARITY_MODE_ADD V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_ADD) | 74 | #define V_DUART_PARITY_MODE_ADD V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_ADD) |
75 | #define V_DUART_PARITY_MODE_ADD_FIXED V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_ADD_FIXED) | 75 | #define V_DUART_PARITY_MODE_ADD_FIXED V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_ADD_FIXED) |
76 | #define V_DUART_PARITY_MODE_NONE V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_NONE) | 76 | #define V_DUART_PARITY_MODE_NONE V_DUART_PARITY_MODE(K_DUART_PARITY_MODE_NONE) |
77 | 77 | ||
@@ -81,7 +81,7 @@ | |||
81 | #define M_DUART_RX_IRQ_SEL_RXRDY 0 | 81 | #define M_DUART_RX_IRQ_SEL_RXRDY 0 |
82 | #define M_DUART_RX_IRQ_SEL_RXFULL _SB_MAKEMASK1(6) | 82 | #define M_DUART_RX_IRQ_SEL_RXFULL _SB_MAKEMASK1(6) |
83 | 83 | ||
84 | #define M_DUART_RX_RTS_ENA _SB_MAKEMASK1(7) | 84 | #define M_DUART_RX_RTS_ENA _SB_MAKEMASK1(7) |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * DUART Mode Register #2 (Table 10-4) | 87 | * DUART Mode Register #2 (Table 10-4) |
@@ -89,18 +89,18 @@ | |||
89 | * Register: DUART_MODE_REG_2_B | 89 | * Register: DUART_MODE_REG_2_B |
90 | */ | 90 | */ |
91 | 91 | ||
92 | #define M_DUART_MODE_RESERVED1 _SB_MAKEMASK(3, 0) /* ignored */ | 92 | #define M_DUART_MODE_RESERVED1 _SB_MAKEMASK(3, 0) /* ignored */ |
93 | 93 | ||
94 | #define M_DUART_STOP_BIT_LEN_2 _SB_MAKEMASK1(3) | 94 | #define M_DUART_STOP_BIT_LEN_2 _SB_MAKEMASK1(3) |
95 | #define M_DUART_STOP_BIT_LEN_1 0 | 95 | #define M_DUART_STOP_BIT_LEN_1 0 |
96 | 96 | ||
97 | #define M_DUART_TX_CTS_ENA _SB_MAKEMASK1(4) | 97 | #define M_DUART_TX_CTS_ENA _SB_MAKEMASK1(4) |
98 | 98 | ||
99 | 99 | ||
100 | #define M_DUART_MODE_RESERVED2 _SB_MAKEMASK1(5) /* must be zero */ | 100 | #define M_DUART_MODE_RESERVED2 _SB_MAKEMASK1(5) /* must be zero */ |
101 | 101 | ||
102 | #define S_DUART_CHAN_MODE 6 | 102 | #define S_DUART_CHAN_MODE 6 |
103 | #define M_DUART_CHAN_MODE _SB_MAKEMASK(2, S_DUART_CHAN_MODE) | 103 | #define M_DUART_CHAN_MODE _SB_MAKEMASK(2, S_DUART_CHAN_MODE) |
104 | #define V_DUART_CHAN_MODE(x) _SB_MAKEVALUE(x, S_DUART_CHAN_MODE) | 104 | #define V_DUART_CHAN_MODE(x) _SB_MAKEVALUE(x, S_DUART_CHAN_MODE) |
105 | 105 | ||
106 | #define K_DUART_CHAN_MODE_NORMAL 0 | 106 | #define K_DUART_CHAN_MODE_NORMAL 0 |
@@ -117,34 +117,34 @@ | |||
117 | * Register: DUART_CMD_B | 117 | * Register: DUART_CMD_B |
118 | */ | 118 | */ |
119 | 119 | ||
120 | #define M_DUART_RX_EN _SB_MAKEMASK1(0) | 120 | #define M_DUART_RX_EN _SB_MAKEMASK1(0) |
121 | #define M_DUART_RX_DIS _SB_MAKEMASK1(1) | 121 | #define M_DUART_RX_DIS _SB_MAKEMASK1(1) |
122 | #define M_DUART_TX_EN _SB_MAKEMASK1(2) | 122 | #define M_DUART_TX_EN _SB_MAKEMASK1(2) |
123 | #define M_DUART_TX_DIS _SB_MAKEMASK1(3) | 123 | #define M_DUART_TX_DIS _SB_MAKEMASK1(3) |
124 | 124 | ||
125 | #define S_DUART_MISC_CMD 4 | 125 | #define S_DUART_MISC_CMD 4 |
126 | #define M_DUART_MISC_CMD _SB_MAKEMASK(3, S_DUART_MISC_CMD) | 126 | #define M_DUART_MISC_CMD _SB_MAKEMASK(3, S_DUART_MISC_CMD) |
127 | #define V_DUART_MISC_CMD(x) _SB_MAKEVALUE(x, S_DUART_MISC_CMD) | 127 | #define V_DUART_MISC_CMD(x) _SB_MAKEVALUE(x, S_DUART_MISC_CMD) |
128 | 128 | ||
129 | #define K_DUART_MISC_CMD_NOACTION0 0 | 129 | #define K_DUART_MISC_CMD_NOACTION0 0 |
130 | #define K_DUART_MISC_CMD_NOACTION1 1 | 130 | #define K_DUART_MISC_CMD_NOACTION1 1 |
131 | #define K_DUART_MISC_CMD_RESET_RX 2 | 131 | #define K_DUART_MISC_CMD_RESET_RX 2 |
132 | #define K_DUART_MISC_CMD_RESET_TX 3 | 132 | #define K_DUART_MISC_CMD_RESET_TX 3 |
133 | #define K_DUART_MISC_CMD_NOACTION4 4 | 133 | #define K_DUART_MISC_CMD_NOACTION4 4 |
134 | #define K_DUART_MISC_CMD_RESET_BREAK_INT 5 | 134 | #define K_DUART_MISC_CMD_RESET_BREAK_INT 5 |
135 | #define K_DUART_MISC_CMD_START_BREAK 6 | 135 | #define K_DUART_MISC_CMD_START_BREAK 6 |
136 | #define K_DUART_MISC_CMD_STOP_BREAK 7 | 136 | #define K_DUART_MISC_CMD_STOP_BREAK 7 |
137 | 137 | ||
138 | #define V_DUART_MISC_CMD_NOACTION0 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION0) | 138 | #define V_DUART_MISC_CMD_NOACTION0 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION0) |
139 | #define V_DUART_MISC_CMD_NOACTION1 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION1) | 139 | #define V_DUART_MISC_CMD_NOACTION1 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION1) |
140 | #define V_DUART_MISC_CMD_RESET_RX V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_RX) | 140 | #define V_DUART_MISC_CMD_RESET_RX V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_RX) |
141 | #define V_DUART_MISC_CMD_RESET_TX V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_TX) | 141 | #define V_DUART_MISC_CMD_RESET_TX V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_TX) |
142 | #define V_DUART_MISC_CMD_NOACTION4 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION4) | 142 | #define V_DUART_MISC_CMD_NOACTION4 V_DUART_MISC_CMD(K_DUART_MISC_CMD_NOACTION4) |
143 | #define V_DUART_MISC_CMD_RESET_BREAK_INT V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_BREAK_INT) | 143 | #define V_DUART_MISC_CMD_RESET_BREAK_INT V_DUART_MISC_CMD(K_DUART_MISC_CMD_RESET_BREAK_INT) |
144 | #define V_DUART_MISC_CMD_START_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_START_BREAK) | 144 | #define V_DUART_MISC_CMD_START_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_START_BREAK) |
145 | #define V_DUART_MISC_CMD_STOP_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_STOP_BREAK) | 145 | #define V_DUART_MISC_CMD_STOP_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_STOP_BREAK) |
146 | 146 | ||
147 | #define M_DUART_CMD_RESERVED _SB_MAKEMASK1(7) | 147 | #define M_DUART_CMD_RESERVED _SB_MAKEMASK1(7) |
148 | 148 | ||
149 | /* | 149 | /* |
150 | * DUART Status Register (Table 10-6) | 150 | * DUART Status Register (Table 10-6) |
@@ -153,14 +153,14 @@ | |||
153 | * READ-ONLY | 153 | * READ-ONLY |
154 | */ | 154 | */ |
155 | 155 | ||
156 | #define M_DUART_RX_RDY _SB_MAKEMASK1(0) | 156 | #define M_DUART_RX_RDY _SB_MAKEMASK1(0) |
157 | #define M_DUART_RX_FFUL _SB_MAKEMASK1(1) | 157 | #define M_DUART_RX_FFUL _SB_MAKEMASK1(1) |
158 | #define M_DUART_TX_RDY _SB_MAKEMASK1(2) | 158 | #define M_DUART_TX_RDY _SB_MAKEMASK1(2) |
159 | #define M_DUART_TX_EMT _SB_MAKEMASK1(3) | 159 | #define M_DUART_TX_EMT _SB_MAKEMASK1(3) |
160 | #define M_DUART_OVRUN_ERR _SB_MAKEMASK1(4) | 160 | #define M_DUART_OVRUN_ERR _SB_MAKEMASK1(4) |
161 | #define M_DUART_PARITY_ERR _SB_MAKEMASK1(5) | 161 | #define M_DUART_PARITY_ERR _SB_MAKEMASK1(5) |
162 | #define M_DUART_FRM_ERR _SB_MAKEMASK1(6) | 162 | #define M_DUART_FRM_ERR _SB_MAKEMASK1(6) |
163 | #define M_DUART_RCVD_BRK _SB_MAKEMASK1(7) | 163 | #define M_DUART_RCVD_BRK _SB_MAKEMASK1(7) |
164 | 164 | ||
165 | /* | 165 | /* |
166 | * DUART Baud Rate Register (Table 10-7) | 166 | * DUART Baud Rate Register (Table 10-7) |
@@ -168,8 +168,8 @@ | |||
168 | * Register: DUART_CLK_SEL_B | 168 | * Register: DUART_CLK_SEL_B |
169 | */ | 169 | */ |
170 | 170 | ||
171 | #define M_DUART_CLK_COUNTER _SB_MAKEMASK(12, 0) | 171 | #define M_DUART_CLK_COUNTER _SB_MAKEMASK(12, 0) |
172 | #define V_DUART_BAUD_RATE(x) (100000000/((x)*20)-1) | 172 | #define V_DUART_BAUD_RATE(x) (100000000/((x)*20)-1) |
173 | 173 | ||
174 | /* | 174 | /* |
175 | * DUART Data Registers (Table 10-8 and 10-9) | 175 | * DUART Data Registers (Table 10-8 and 10-9) |
@@ -179,33 +179,33 @@ | |||
179 | * Register: DUART_TX_HOLD_B | 179 | * Register: DUART_TX_HOLD_B |
180 | */ | 180 | */ |
181 | 181 | ||
182 | #define M_DUART_RX_DATA _SB_MAKEMASK(8, 0) | 182 | #define M_DUART_RX_DATA _SB_MAKEMASK(8, 0) |
183 | #define M_DUART_TX_DATA _SB_MAKEMASK(8, 0) | 183 | #define M_DUART_TX_DATA _SB_MAKEMASK(8, 0) |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * DUART Input Port Register (Table 10-10) | 186 | * DUART Input Port Register (Table 10-10) |
187 | * Register: DUART_IN_PORT | 187 | * Register: DUART_IN_PORT |
188 | */ | 188 | */ |
189 | 189 | ||
190 | #define M_DUART_IN_PIN0_VAL _SB_MAKEMASK1(0) | 190 | #define M_DUART_IN_PIN0_VAL _SB_MAKEMASK1(0) |
191 | #define M_DUART_IN_PIN1_VAL _SB_MAKEMASK1(1) | 191 | #define M_DUART_IN_PIN1_VAL _SB_MAKEMASK1(1) |
192 | #define M_DUART_IN_PIN2_VAL _SB_MAKEMASK1(2) | 192 | #define M_DUART_IN_PIN2_VAL _SB_MAKEMASK1(2) |
193 | #define M_DUART_IN_PIN3_VAL _SB_MAKEMASK1(3) | 193 | #define M_DUART_IN_PIN3_VAL _SB_MAKEMASK1(3) |
194 | #define M_DUART_IN_PIN4_VAL _SB_MAKEMASK1(4) | 194 | #define M_DUART_IN_PIN4_VAL _SB_MAKEMASK1(4) |
195 | #define M_DUART_IN_PIN5_VAL _SB_MAKEMASK1(5) | 195 | #define M_DUART_IN_PIN5_VAL _SB_MAKEMASK1(5) |
196 | #define M_DUART_RIN0_PIN _SB_MAKEMASK1(6) | 196 | #define M_DUART_RIN0_PIN _SB_MAKEMASK1(6) |
197 | #define M_DUART_RIN1_PIN _SB_MAKEMASK1(7) | 197 | #define M_DUART_RIN1_PIN _SB_MAKEMASK1(7) |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * DUART Input Port Change Status Register (Tables 10-11, 10-12, and 10-13) | 200 | * DUART Input Port Change Status Register (Tables 10-11, 10-12, and 10-13) |
201 | * Register: DUART_INPORT_CHNG | 201 | * Register: DUART_INPORT_CHNG |
202 | */ | 202 | */ |
203 | 203 | ||
204 | #define S_DUART_IN_PIN_VAL 0 | 204 | #define S_DUART_IN_PIN_VAL 0 |
205 | #define M_DUART_IN_PIN_VAL _SB_MAKEMASK(4, S_DUART_IN_PIN_VAL) | 205 | #define M_DUART_IN_PIN_VAL _SB_MAKEMASK(4, S_DUART_IN_PIN_VAL) |
206 | 206 | ||
207 | #define S_DUART_IN_PIN_CHNG 4 | 207 | #define S_DUART_IN_PIN_CHNG 4 |
208 | #define M_DUART_IN_PIN_CHNG _SB_MAKEMASK(4, S_DUART_IN_PIN_CHNG) | 208 | #define M_DUART_IN_PIN_CHNG _SB_MAKEMASK(4, S_DUART_IN_PIN_CHNG) |
209 | 209 | ||
210 | 210 | ||
211 | /* | 211 | /* |
@@ -213,46 +213,46 @@ | |||
213 | * Register: DUART_OPCR | 213 | * Register: DUART_OPCR |
214 | */ | 214 | */ |
215 | 215 | ||
216 | #define M_DUART_OPCR_RESERVED0 _SB_MAKEMASK1(0) /* must be zero */ | 216 | #define M_DUART_OPCR_RESERVED0 _SB_MAKEMASK1(0) /* must be zero */ |
217 | #define M_DUART_OPC2_SEL _SB_MAKEMASK1(1) | 217 | #define M_DUART_OPC2_SEL _SB_MAKEMASK1(1) |
218 | #define M_DUART_OPCR_RESERVED1 _SB_MAKEMASK1(2) /* must be zero */ | 218 | #define M_DUART_OPCR_RESERVED1 _SB_MAKEMASK1(2) /* must be zero */ |
219 | #define M_DUART_OPC3_SEL _SB_MAKEMASK1(3) | 219 | #define M_DUART_OPC3_SEL _SB_MAKEMASK1(3) |
220 | #define M_DUART_OPCR_RESERVED2 _SB_MAKEMASK(4, 4) /* must be zero */ | 220 | #define M_DUART_OPCR_RESERVED2 _SB_MAKEMASK(4, 4) /* must be zero */ |
221 | 221 | ||
222 | /* | 222 | /* |
223 | * DUART Aux Control Register (Table 10-15) | 223 | * DUART Aux Control Register (Table 10-15) |
224 | * Register: DUART_AUX_CTRL | 224 | * Register: DUART_AUX_CTRL |
225 | */ | 225 | */ |
226 | 226 | ||
227 | #define M_DUART_IP0_CHNG_ENA _SB_MAKEMASK1(0) | 227 | #define M_DUART_IP0_CHNG_ENA _SB_MAKEMASK1(0) |
228 | #define M_DUART_IP1_CHNG_ENA _SB_MAKEMASK1(1) | 228 | #define M_DUART_IP1_CHNG_ENA _SB_MAKEMASK1(1) |
229 | #define M_DUART_IP2_CHNG_ENA _SB_MAKEMASK1(2) | 229 | #define M_DUART_IP2_CHNG_ENA _SB_MAKEMASK1(2) |
230 | #define M_DUART_IP3_CHNG_ENA _SB_MAKEMASK1(3) | 230 | #define M_DUART_IP3_CHNG_ENA _SB_MAKEMASK1(3) |
231 | #define M_DUART_ACR_RESERVED _SB_MAKEMASK(4, 4) | 231 | #define M_DUART_ACR_RESERVED _SB_MAKEMASK(4, 4) |
232 | 232 | ||
233 | #define M_DUART_CTS_CHNG_ENA _SB_MAKEMASK1(0) | 233 | #define M_DUART_CTS_CHNG_ENA _SB_MAKEMASK1(0) |
234 | #define M_DUART_CIN_CHNG_ENA _SB_MAKEMASK1(2) | 234 | #define M_DUART_CIN_CHNG_ENA _SB_MAKEMASK1(2) |
235 | 235 | ||
236 | /* | 236 | /* |
237 | * DUART Interrupt Status Register (Table 10-16) | 237 | * DUART Interrupt Status Register (Table 10-16) |
238 | * Register: DUART_ISR | 238 | * Register: DUART_ISR |
239 | */ | 239 | */ |
240 | 240 | ||
241 | #define M_DUART_ISR_TX_A _SB_MAKEMASK1(0) | 241 | #define M_DUART_ISR_TX_A _SB_MAKEMASK1(0) |
242 | 242 | ||
243 | #define S_DUART_ISR_RX_A 1 | 243 | #define S_DUART_ISR_RX_A 1 |
244 | #define M_DUART_ISR_RX_A _SB_MAKEMASK1(S_DUART_ISR_RX_A) | 244 | #define M_DUART_ISR_RX_A _SB_MAKEMASK1(S_DUART_ISR_RX_A) |
245 | #define V_DUART_ISR_RX_A(x) _SB_MAKEVALUE(x, S_DUART_ISR_RX_A) | 245 | #define V_DUART_ISR_RX_A(x) _SB_MAKEVALUE(x, S_DUART_ISR_RX_A) |
246 | #define G_DUART_ISR_RX_A(x) _SB_GETVALUE(x, S_DUART_ISR_RX_A, M_DUART_ISR_RX_A) | 246 | #define G_DUART_ISR_RX_A(x) _SB_GETVALUE(x, S_DUART_ISR_RX_A, M_DUART_ISR_RX_A) |
247 | 247 | ||
248 | #define M_DUART_ISR_BRK_A _SB_MAKEMASK1(2) | 248 | #define M_DUART_ISR_BRK_A _SB_MAKEMASK1(2) |
249 | #define M_DUART_ISR_IN_A _SB_MAKEMASK1(3) | 249 | #define M_DUART_ISR_IN_A _SB_MAKEMASK1(3) |
250 | #define M_DUART_ISR_ALL_A _SB_MAKEMASK(4, 0) | 250 | #define M_DUART_ISR_ALL_A _SB_MAKEMASK(4, 0) |
251 | 251 | ||
252 | #define M_DUART_ISR_TX_B _SB_MAKEMASK1(4) | 252 | #define M_DUART_ISR_TX_B _SB_MAKEMASK1(4) |
253 | #define M_DUART_ISR_RX_B _SB_MAKEMASK1(5) | 253 | #define M_DUART_ISR_RX_B _SB_MAKEMASK1(5) |
254 | #define M_DUART_ISR_BRK_B _SB_MAKEMASK1(6) | 254 | #define M_DUART_ISR_BRK_B _SB_MAKEMASK1(6) |
255 | #define M_DUART_ISR_IN_B _SB_MAKEMASK1(7) | 255 | #define M_DUART_ISR_IN_B _SB_MAKEMASK1(7) |
256 | #define M_DUART_ISR_ALL_B _SB_MAKEMASK(4, 4) | 256 | #define M_DUART_ISR_ALL_B _SB_MAKEMASK(4, 4) |
257 | 257 | ||
258 | /* | 258 | /* |
@@ -262,29 +262,29 @@ | |||
262 | * Register: DUART_ISR_B | 262 | * Register: DUART_ISR_B |
263 | */ | 263 | */ |
264 | 264 | ||
265 | #define M_DUART_ISR_TX _SB_MAKEMASK1(0) | 265 | #define M_DUART_ISR_TX _SB_MAKEMASK1(0) |
266 | #define M_DUART_ISR_RX _SB_MAKEMASK1(1) | 266 | #define M_DUART_ISR_RX _SB_MAKEMASK1(1) |
267 | #define M_DUART_ISR_BRK _SB_MAKEMASK1(2) | 267 | #define M_DUART_ISR_BRK _SB_MAKEMASK1(2) |
268 | #define M_DUART_ISR_IN _SB_MAKEMASK1(3) | 268 | #define M_DUART_ISR_IN _SB_MAKEMASK1(3) |
269 | #define M_DUART_ISR_ALL _SB_MAKEMASK(4, 0) | 269 | #define M_DUART_ISR_ALL _SB_MAKEMASK(4, 0) |
270 | #define M_DUART_ISR_RESERVED _SB_MAKEMASK(4, 4) | 270 | #define M_DUART_ISR_RESERVED _SB_MAKEMASK(4, 4) |
271 | 271 | ||
272 | /* | 272 | /* |
273 | * DUART Interrupt Mask Register (Table 10-19) | 273 | * DUART Interrupt Mask Register (Table 10-19) |
274 | * Register: DUART_IMR | 274 | * Register: DUART_IMR |
275 | */ | 275 | */ |
276 | 276 | ||
277 | #define M_DUART_IMR_TX_A _SB_MAKEMASK1(0) | 277 | #define M_DUART_IMR_TX_A _SB_MAKEMASK1(0) |
278 | #define M_DUART_IMR_RX_A _SB_MAKEMASK1(1) | 278 | #define M_DUART_IMR_RX_A _SB_MAKEMASK1(1) |
279 | #define M_DUART_IMR_BRK_A _SB_MAKEMASK1(2) | 279 | #define M_DUART_IMR_BRK_A _SB_MAKEMASK1(2) |
280 | #define M_DUART_IMR_IN_A _SB_MAKEMASK1(3) | 280 | #define M_DUART_IMR_IN_A _SB_MAKEMASK1(3) |
281 | #define M_DUART_IMR_ALL_A _SB_MAKEMASK(4, 0) | 281 | #define M_DUART_IMR_ALL_A _SB_MAKEMASK(4, 0) |
282 | 282 | ||
283 | #define M_DUART_IMR_TX_B _SB_MAKEMASK1(4) | 283 | #define M_DUART_IMR_TX_B _SB_MAKEMASK1(4) |
284 | #define M_DUART_IMR_RX_B _SB_MAKEMASK1(5) | 284 | #define M_DUART_IMR_RX_B _SB_MAKEMASK1(5) |
285 | #define M_DUART_IMR_BRK_B _SB_MAKEMASK1(6) | 285 | #define M_DUART_IMR_BRK_B _SB_MAKEMASK1(6) |
286 | #define M_DUART_IMR_IN_B _SB_MAKEMASK1(7) | 286 | #define M_DUART_IMR_IN_B _SB_MAKEMASK1(7) |
287 | #define M_DUART_IMR_ALL_B _SB_MAKEMASK(4, 4) | 287 | #define M_DUART_IMR_ALL_B _SB_MAKEMASK(4, 4) |
288 | 288 | ||
289 | /* | 289 | /* |
290 | * DUART Channel A Interrupt Mask Register (Table 10-20) | 290 | * DUART Channel A Interrupt Mask Register (Table 10-20) |
@@ -293,12 +293,12 @@ | |||
293 | * Register: DUART_IMR_B | 293 | * Register: DUART_IMR_B |
294 | */ | 294 | */ |
295 | 295 | ||
296 | #define M_DUART_IMR_TX _SB_MAKEMASK1(0) | 296 | #define M_DUART_IMR_TX _SB_MAKEMASK1(0) |
297 | #define M_DUART_IMR_RX _SB_MAKEMASK1(1) | 297 | #define M_DUART_IMR_RX _SB_MAKEMASK1(1) |
298 | #define M_DUART_IMR_BRK _SB_MAKEMASK1(2) | 298 | #define M_DUART_IMR_BRK _SB_MAKEMASK1(2) |
299 | #define M_DUART_IMR_IN _SB_MAKEMASK1(3) | 299 | #define M_DUART_IMR_IN _SB_MAKEMASK1(3) |
300 | #define M_DUART_IMR_ALL _SB_MAKEMASK(4, 0) | 300 | #define M_DUART_IMR_ALL _SB_MAKEMASK(4, 0) |
301 | #define M_DUART_IMR_RESERVED _SB_MAKEMASK(4, 4) | 301 | #define M_DUART_IMR_RESERVED _SB_MAKEMASK(4, 4) |
302 | 302 | ||
303 | 303 | ||
304 | /* | 304 | /* |
@@ -306,33 +306,33 @@ | |||
306 | * Register: DUART_SET_OPR | 306 | * Register: DUART_SET_OPR |
307 | */ | 307 | */ |
308 | 308 | ||
309 | #define M_DUART_SET_OPR0 _SB_MAKEMASK1(0) | 309 | #define M_DUART_SET_OPR0 _SB_MAKEMASK1(0) |
310 | #define M_DUART_SET_OPR1 _SB_MAKEMASK1(1) | 310 | #define M_DUART_SET_OPR1 _SB_MAKEMASK1(1) |
311 | #define M_DUART_SET_OPR2 _SB_MAKEMASK1(2) | 311 | #define M_DUART_SET_OPR2 _SB_MAKEMASK1(2) |
312 | #define M_DUART_SET_OPR3 _SB_MAKEMASK1(3) | 312 | #define M_DUART_SET_OPR3 _SB_MAKEMASK1(3) |
313 | #define M_DUART_OPSR_RESERVED _SB_MAKEMASK(4, 4) | 313 | #define M_DUART_OPSR_RESERVED _SB_MAKEMASK(4, 4) |
314 | 314 | ||
315 | /* | 315 | /* |
316 | * DUART Output Port Clear Register (Table 10-23) | 316 | * DUART Output Port Clear Register (Table 10-23) |
317 | * Register: DUART_CLEAR_OPR | 317 | * Register: DUART_CLEAR_OPR |
318 | */ | 318 | */ |
319 | 319 | ||
320 | #define M_DUART_CLR_OPR0 _SB_MAKEMASK1(0) | 320 | #define M_DUART_CLR_OPR0 _SB_MAKEMASK1(0) |
321 | #define M_DUART_CLR_OPR1 _SB_MAKEMASK1(1) | 321 | #define M_DUART_CLR_OPR1 _SB_MAKEMASK1(1) |
322 | #define M_DUART_CLR_OPR2 _SB_MAKEMASK1(2) | 322 | #define M_DUART_CLR_OPR2 _SB_MAKEMASK1(2) |
323 | #define M_DUART_CLR_OPR3 _SB_MAKEMASK1(3) | 323 | #define M_DUART_CLR_OPR3 _SB_MAKEMASK1(3) |
324 | #define M_DUART_OPCR_RESERVED _SB_MAKEMASK(4, 4) | 324 | #define M_DUART_OPCR_RESERVED _SB_MAKEMASK(4, 4) |
325 | 325 | ||
326 | /* | 326 | /* |
327 | * DUART Output Port RTS Register (Table 10-24) | 327 | * DUART Output Port RTS Register (Table 10-24) |
328 | * Register: DUART_OUT_PORT | 328 | * Register: DUART_OUT_PORT |
329 | */ | 329 | */ |
330 | 330 | ||
331 | #define M_DUART_OUT_PIN_SET0 _SB_MAKEMASK1(0) | 331 | #define M_DUART_OUT_PIN_SET0 _SB_MAKEMASK1(0) |
332 | #define M_DUART_OUT_PIN_SET1 _SB_MAKEMASK1(1) | 332 | #define M_DUART_OUT_PIN_SET1 _SB_MAKEMASK1(1) |
333 | #define M_DUART_OUT_PIN_CLR0 _SB_MAKEMASK1(2) | 333 | #define M_DUART_OUT_PIN_CLR0 _SB_MAKEMASK1(2) |
334 | #define M_DUART_OUT_PIN_CLR1 _SB_MAKEMASK1(3) | 334 | #define M_DUART_OUT_PIN_CLR1 _SB_MAKEMASK1(3) |
335 | #define M_DUART_OPRR_RESERVED _SB_MAKEMASK(4, 4) | 335 | #define M_DUART_OPRR_RESERVED _SB_MAKEMASK(4, 4) |
336 | 336 | ||
337 | #define M_DUART_OUT_PIN_SET(chan) \ | 337 | #define M_DUART_OUT_PIN_SET(chan) \ |
338 | (chan == 0 ? M_DUART_OUT_PIN_SET0 : M_DUART_OUT_PIN_SET1) | 338 | (chan == 0 ? M_DUART_OUT_PIN_SET0 : M_DUART_OUT_PIN_SET1) |
@@ -344,15 +344,15 @@ | |||
344 | * Full Interrupt Control Register | 344 | * Full Interrupt Control Register |
345 | */ | 345 | */ |
346 | 346 | ||
347 | #define S_DUART_SIG_FULL _SB_MAKE64(0) | 347 | #define S_DUART_SIG_FULL _SB_MAKE64(0) |
348 | #define M_DUART_SIG_FULL _SB_MAKEMASK(4, S_DUART_SIG_FULL) | 348 | #define M_DUART_SIG_FULL _SB_MAKEMASK(4, S_DUART_SIG_FULL) |
349 | #define V_DUART_SIG_FULL(x) _SB_MAKEVALUE(x, S_DUART_SIG_FULL) | 349 | #define V_DUART_SIG_FULL(x) _SB_MAKEVALUE(x, S_DUART_SIG_FULL) |
350 | #define G_DUART_SIG_FULL(x) _SB_GETVALUE(x, S_DUART_SIG_FULL, M_DUART_SIG_FULL) | 350 | #define G_DUART_SIG_FULL(x) _SB_GETVALUE(x, S_DUART_SIG_FULL, M_DUART_SIG_FULL) |
351 | 351 | ||
352 | #define S_DUART_INT_TIME _SB_MAKE64(4) | 352 | #define S_DUART_INT_TIME _SB_MAKE64(4) |
353 | #define M_DUART_INT_TIME _SB_MAKEMASK(4, S_DUART_INT_TIME) | 353 | #define M_DUART_INT_TIME _SB_MAKEMASK(4, S_DUART_INT_TIME) |
354 | #define V_DUART_INT_TIME(x) _SB_MAKEVALUE(x, S_DUART_INT_TIME) | 354 | #define V_DUART_INT_TIME(x) _SB_MAKEVALUE(x, S_DUART_INT_TIME) |
355 | #define G_DUART_INT_TIME(x) _SB_GETVALUE(x, S_DUART_INT_TIME, M_DUART_INT_TIME) | 355 | #define G_DUART_INT_TIME(x) _SB_GETVALUE(x, S_DUART_INT_TIME, M_DUART_INT_TIME) |
356 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ | 356 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
357 | 357 | ||
358 | 358 | ||
diff --git a/arch/mips/include/asm/sibyte/sentosa.h b/arch/mips/include/asm/sibyte/sentosa.h index 64c47874f32d..0351a46eebbd 100644 --- a/arch/mips/include/asm/sibyte/sentosa.h +++ b/arch/mips/include/asm/sibyte/sentosa.h | |||
@@ -30,11 +30,11 @@ | |||
30 | 30 | ||
31 | /* Generic bus chip selects */ | 31 | /* Generic bus chip selects */ |
32 | #ifdef CONFIG_SIBYTE_RHONE | 32 | #ifdef CONFIG_SIBYTE_RHONE |
33 | #define LEDS_CS 6 | 33 | #define LEDS_CS 6 |
34 | #define LEDS_PHYS 0x1d0a0000 | 34 | #define LEDS_PHYS 0x1d0a0000 |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* GPIOs */ | 37 | /* GPIOs */ |
38 | #define K_GPIO_DBG_LED 0 | 38 | #define K_GPIO_DBG_LED 0 |
39 | 39 | ||
40 | #endif /* __ASM_SIBYTE_SENTOSA_H */ | 40 | #endif /* __ASM_SIBYTE_SENTOSA_H */ |
diff --git a/arch/mips/include/asm/sibyte/swarm.h b/arch/mips/include/asm/sibyte/swarm.h index 114d9d29ca9d..187cfb1f67cb 100644 --- a/arch/mips/include/asm/sibyte/swarm.h +++ b/arch/mips/include/asm/sibyte/swarm.h | |||
@@ -24,41 +24,41 @@ | |||
24 | #ifdef CONFIG_SIBYTE_SWARM | 24 | #ifdef CONFIG_SIBYTE_SWARM |
25 | #define SIBYTE_BOARD_NAME "BCM91250A (SWARM)" | 25 | #define SIBYTE_BOARD_NAME "BCM91250A (SWARM)" |
26 | #define SIBYTE_HAVE_PCMCIA 1 | 26 | #define SIBYTE_HAVE_PCMCIA 1 |
27 | #define SIBYTE_HAVE_IDE 1 | 27 | #define SIBYTE_HAVE_IDE 1 |
28 | #endif | 28 | #endif |
29 | #ifdef CONFIG_SIBYTE_LITTLESUR | 29 | #ifdef CONFIG_SIBYTE_LITTLESUR |
30 | #define SIBYTE_BOARD_NAME "BCM91250C2 (LittleSur)" | 30 | #define SIBYTE_BOARD_NAME "BCM91250C2 (LittleSur)" |
31 | #define SIBYTE_HAVE_PCMCIA 0 | 31 | #define SIBYTE_HAVE_PCMCIA 0 |
32 | #define SIBYTE_HAVE_IDE 1 | 32 | #define SIBYTE_HAVE_IDE 1 |
33 | #define SIBYTE_DEFAULT_CONSOLE "cfe0" | 33 | #define SIBYTE_DEFAULT_CONSOLE "cfe0" |
34 | #endif | 34 | #endif |
35 | #ifdef CONFIG_SIBYTE_CRHONE | 35 | #ifdef CONFIG_SIBYTE_CRHONE |
36 | #define SIBYTE_BOARD_NAME "BCM91125C (CRhone)" | 36 | #define SIBYTE_BOARD_NAME "BCM91125C (CRhone)" |
37 | #define SIBYTE_HAVE_PCMCIA 0 | 37 | #define SIBYTE_HAVE_PCMCIA 0 |
38 | #define SIBYTE_HAVE_IDE 0 | 38 | #define SIBYTE_HAVE_IDE 0 |
39 | #endif | 39 | #endif |
40 | #ifdef CONFIG_SIBYTE_CRHINE | 40 | #ifdef CONFIG_SIBYTE_CRHINE |
41 | #define SIBYTE_BOARD_NAME "BCM91120C (CRhine)" | 41 | #define SIBYTE_BOARD_NAME "BCM91120C (CRhine)" |
42 | #define SIBYTE_HAVE_PCMCIA 0 | 42 | #define SIBYTE_HAVE_PCMCIA 0 |
43 | #define SIBYTE_HAVE_IDE 0 | 43 | #define SIBYTE_HAVE_IDE 0 |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | /* Generic bus chip selects */ | 46 | /* Generic bus chip selects */ |
47 | #define LEDS_CS 3 | 47 | #define LEDS_CS 3 |
48 | #define LEDS_PHYS 0x100a0000 | 48 | #define LEDS_PHYS 0x100a0000 |
49 | 49 | ||
50 | #ifdef SIBYTE_HAVE_IDE | 50 | #ifdef SIBYTE_HAVE_IDE |
51 | #define IDE_CS 4 | 51 | #define IDE_CS 4 |
52 | #define IDE_PHYS 0x100b0000 | 52 | #define IDE_PHYS 0x100b0000 |
53 | #define K_GPIO_GB_IDE 4 | 53 | #define K_GPIO_GB_IDE 4 |
54 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) | 54 | #define K_INT_GB_IDE (K_INT_GPIO_0 + K_GPIO_GB_IDE) |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #ifdef SIBYTE_HAVE_PCMCIA | 57 | #ifdef SIBYTE_HAVE_PCMCIA |
58 | #define PCMCIA_CS 6 | 58 | #define PCMCIA_CS 6 |
59 | #define PCMCIA_PHYS 0x11000000 | 59 | #define PCMCIA_PHYS 0x11000000 |
60 | #define K_GPIO_PC_READY 9 | 60 | #define K_GPIO_PC_READY 9 |
61 | #define K_INT_PC_READY (K_INT_GPIO_0 + K_GPIO_PC_READY) | 61 | #define K_INT_PC_READY (K_INT_GPIO_0 + K_GPIO_PC_READY) |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #endif /* __ASM_SIBYTE_SWARM_H */ | 64 | #endif /* __ASM_SIBYTE_SWARM_H */ |
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm/smp.h index f33b5fd6972b..eb6008758484 100644 --- a/arch/mips/include/asm/smp.h +++ b/arch/mips/include/asm/smp.h | |||
@@ -26,7 +26,7 @@ extern cpumask_t cpu_sibling_map[]; | |||
26 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 26 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
27 | 27 | ||
28 | /* Map from cpu id to sequential logical cpu number. This will only | 28 | /* Map from cpu id to sequential logical cpu number. This will only |
29 | not be idempotent when cpus failed to come on-line. */ | 29 | not be idempotent when cpus failed to come on-line. */ |
30 | extern int __cpu_number_map[NR_CPUS]; | 30 | extern int __cpu_number_map[NR_CPUS]; |
31 | #define cpu_number_map(cpu) __cpu_number_map[cpu] | 31 | #define cpu_number_map(cpu) __cpu_number_map[cpu] |
32 | 32 | ||
@@ -36,7 +36,7 @@ extern int __cpu_logical_map[NR_CPUS]; | |||
36 | 36 | ||
37 | #define NO_PROC_ID (-1) | 37 | #define NO_PROC_ID (-1) |
38 | 38 | ||
39 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ | 39 | #define SMP_RESCHEDULE_YOURSELF 0x1 /* XXX braindead */ |
40 | #define SMP_CALL_FUNCTION 0x2 | 40 | #define SMP_CALL_FUNCTION 0x2 |
41 | /* Octeon - Tell another core to flush its icache */ | 41 | /* Octeon - Tell another core to flush its icache */ |
42 | #define SMP_ICACHE_FLUSH 0x4 | 42 | #define SMP_ICACHE_FLUSH 0x4 |
@@ -62,14 +62,14 @@ static inline void smp_send_reschedule(int cpu) | |||
62 | #ifdef CONFIG_HOTPLUG_CPU | 62 | #ifdef CONFIG_HOTPLUG_CPU |
63 | static inline int __cpu_disable(void) | 63 | static inline int __cpu_disable(void) |
64 | { | 64 | { |
65 | extern struct plat_smp_ops *mp_ops; /* private */ | 65 | extern struct plat_smp_ops *mp_ops; /* private */ |
66 | 66 | ||
67 | return mp_ops->cpu_disable(); | 67 | return mp_ops->cpu_disable(); |
68 | } | 68 | } |
69 | 69 | ||
70 | static inline void __cpu_die(unsigned int cpu) | 70 | static inline void __cpu_die(unsigned int cpu) |
71 | { | 71 | { |
72 | extern struct plat_smp_ops *mp_ops; /* private */ | 72 | extern struct plat_smp_ops *mp_ops; /* private */ |
73 | 73 | ||
74 | mp_ops->cpu_die(cpu); | 74 | mp_ops->cpu_die(cpu); |
75 | } | 75 | } |
@@ -81,14 +81,14 @@ extern asmlinkage void smp_call_function_interrupt(void); | |||
81 | 81 | ||
82 | static inline void arch_send_call_function_single_ipi(int cpu) | 82 | static inline void arch_send_call_function_single_ipi(int cpu) |
83 | { | 83 | { |
84 | extern struct plat_smp_ops *mp_ops; /* private */ | 84 | extern struct plat_smp_ops *mp_ops; /* private */ |
85 | 85 | ||
86 | mp_ops->send_ipi_mask(&cpumask_of_cpu(cpu), SMP_CALL_FUNCTION); | 86 | mp_ops->send_ipi_mask(&cpumask_of_cpu(cpu), SMP_CALL_FUNCTION); |
87 | } | 87 | } |
88 | 88 | ||
89 | static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask) | 89 | static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask) |
90 | { | 90 | { |
91 | extern struct plat_smp_ops *mp_ops; /* private */ | 91 | extern struct plat_smp_ops *mp_ops; /* private */ |
92 | 92 | ||
93 | mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION); | 93 | mp_ops->send_ipi_mask(mask, SMP_CALL_FUNCTION); |
94 | } | 94 | } |
diff --git a/arch/mips/include/asm/smtc.h b/arch/mips/include/asm/smtc.h index 8935426a56ab..e56b439b7871 100644 --- a/arch/mips/include/asm/smtc.h +++ b/arch/mips/include/asm/smtc.h | |||
@@ -14,8 +14,8 @@ | |||
14 | 14 | ||
15 | extern unsigned int smtc_status; | 15 | extern unsigned int smtc_status; |
16 | 16 | ||
17 | #define SMTC_TLB_SHARED 0x00000001 | 17 | #define SMTC_TLB_SHARED 0x00000001 |
18 | #define SMTC_MTC_ACTIVE 0x00000002 | 18 | #define SMTC_MTC_ACTIVE 0x00000002 |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * TLB/ASID Management information | 21 | * TLB/ASID Management information |
diff --git a/arch/mips/include/asm/sn/addrs.h b/arch/mips/include/asm/sn/addrs.h index 2367b56dcdef..66814f8ba8e8 100644 --- a/arch/mips/include/asm/sn/addrs.h +++ b/arch/mips/include/asm/sn/addrs.h | |||
@@ -88,8 +88,8 @@ | |||
88 | 88 | ||
89 | #define SWIN_SIZE_BITS 24 | 89 | #define SWIN_SIZE_BITS 24 |
90 | #define SWIN_SIZE (UINT64_CAST 1 << 24) | 90 | #define SWIN_SIZE (UINT64_CAST 1 << 24) |
91 | #define SWIN_SIZEMASK (SWIN_SIZE - 1) | 91 | #define SWIN_SIZEMASK (SWIN_SIZE - 1) |
92 | #define SWIN_WIDGET_MASK 0xF | 92 | #define SWIN_WIDGET_MASK 0xF |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Convert smallwindow address to xtalk address. | 95 | * Convert smallwindow address to xtalk address. |
@@ -97,8 +97,8 @@ | |||
97 | * 'addr' can be physical or virtual address, but will be converted | 97 | * 'addr' can be physical or virtual address, but will be converted |
98 | * to Xtalk address in the range 0 -> SWINZ_SIZEMASK | 98 | * to Xtalk address in the range 0 -> SWINZ_SIZEMASK |
99 | */ | 99 | */ |
100 | #define SWIN_WIDGETADDR(addr) ((addr) & SWIN_SIZEMASK) | 100 | #define SWIN_WIDGETADDR(addr) ((addr) & SWIN_SIZEMASK) |
101 | #define SWIN_WIDGETNUM(addr) (((addr) >> SWIN_SIZE_BITS) & SWIN_WIDGET_MASK) | 101 | #define SWIN_WIDGETNUM(addr) (((addr) >> SWIN_SIZE_BITS) & SWIN_WIDGET_MASK) |
102 | /* | 102 | /* |
103 | * Verify if addr belongs to small window address on node with "nasid" | 103 | * Verify if addr belongs to small window address on node with "nasid" |
104 | * | 104 | * |
@@ -108,7 +108,7 @@ | |||
108 | * | 108 | * |
109 | * | 109 | * |
110 | */ | 110 | */ |
111 | #define NODE_SWIN_ADDR(nasid, addr) \ | 111 | #define NODE_SWIN_ADDR(nasid, addr) \ |
112 | (((addr) >= NODE_SWIN_BASE(nasid, 0)) && \ | 112 | (((addr) >= NODE_SWIN_BASE(nasid, 0)) && \ |
113 | ((addr) < (NODE_SWIN_BASE(nasid, HUB_NUM_WIDGET) + SWIN_SIZE)\ | 113 | ((addr) < (NODE_SWIN_BASE(nasid, HUB_NUM_WIDGET) + SWIN_SIZE)\ |
114 | )) | 114 | )) |
@@ -150,7 +150,7 @@ | |||
150 | 150 | ||
151 | #endif | 151 | #endif |
152 | 152 | ||
153 | #define HUB_REGISTER_WIDGET 1 | 153 | #define HUB_REGISTER_WIDGET 1 |
154 | #define IALIAS_BASE NODE_SWIN_BASE(0, HUB_REGISTER_WIDGET) | 154 | #define IALIAS_BASE NODE_SWIN_BASE(0, HUB_REGISTER_WIDGET) |
155 | #define IALIAS_SIZE 0x800000 /* 8 Megabytes */ | 155 | #define IALIAS_SIZE 0x800000 /* 8 Megabytes */ |
156 | #define IS_IALIAS(_a) (((_a) >= IALIAS_BASE) && \ | 156 | #define IS_IALIAS(_a) (((_a) >= IALIAS_BASE) && \ |
@@ -174,16 +174,16 @@ | |||
174 | * WARNING: They won't work in assembler. | 174 | * WARNING: They won't work in assembler. |
175 | * | 175 | * |
176 | * BDDIR_ENTRY_LO returns the address of the low double-word of the dir | 176 | * BDDIR_ENTRY_LO returns the address of the low double-word of the dir |
177 | * entry corresponding to a physical (Cac or Uncac) address. | 177 | * entry corresponding to a physical (Cac or Uncac) address. |
178 | * BDDIR_ENTRY_HI returns the address of the high double-word of the entry. | 178 | * BDDIR_ENTRY_HI returns the address of the high double-word of the entry. |
179 | * BDPRT_ENTRY returns the address of the double-word protection entry | 179 | * BDPRT_ENTRY returns the address of the double-word protection entry |
180 | * corresponding to the page containing the physical address. | 180 | * corresponding to the page containing the physical address. |
181 | * BDPRT_ENTRY_S Stores the value into the protection entry. | 181 | * BDPRT_ENTRY_S Stores the value into the protection entry. |
182 | * BDPRT_ENTRY_L Load the value from the protection entry. | 182 | * BDPRT_ENTRY_L Load the value from the protection entry. |
183 | * BDECC_ENTRY returns the address of the ECC byte corresponding to a | 183 | * BDECC_ENTRY returns the address of the ECC byte corresponding to a |
184 | * double-word at a specified physical address. | 184 | * double-word at a specified physical address. |
185 | * BDECC_ENTRY_H returns the address of the two ECC bytes corresponding to a | 185 | * BDECC_ENTRY_H returns the address of the two ECC bytes corresponding to a |
186 | * quad-word at a specified physical address. | 186 | * quad-word at a specified physical address. |
187 | */ | 187 | */ |
188 | #define NODE_BDOOR_BASE(_n) (NODE_HSPEC_BASE(_n) + (NODE_ADDRSPACE_SIZE/2)) | 188 | #define NODE_BDOOR_BASE(_n) (NODE_HSPEC_BASE(_n) + (NODE_ADDRSPACE_SIZE/2)) |
189 | 189 | ||
@@ -226,11 +226,11 @@ | |||
226 | #define BDADDR_IS_DIR(_ba) ((UINT64_CAST (_ba) & 0x200) != 0) | 226 | #define BDADDR_IS_DIR(_ba) ((UINT64_CAST (_ba) & 0x200) != 0) |
227 | #define BDADDR_IS_PRT(_ba) ((UINT64_CAST (_ba) & 0x200) == 0) | 227 | #define BDADDR_IS_PRT(_ba) ((UINT64_CAST (_ba) & 0x200) == 0) |
228 | 228 | ||
229 | #define BDDIR_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ | 229 | #define BDDIR_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ |
230 | (UINT64_CAST(_ba) & BDDIR_UPPER_MASK)<<2 | \ | 230 | (UINT64_CAST(_ba) & BDDIR_UPPER_MASK)<<2 | \ |
231 | (UINT64_CAST(_ba) & 0x1f << 4) << 3) | 231 | (UINT64_CAST(_ba) & 0x1f << 4) << 3) |
232 | 232 | ||
233 | #define BDPRT_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ | 233 | #define BDPRT_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ |
234 | (UINT64_CAST(_ba) & BDDIR_UPPER_MASK)<<2) | 234 | (UINT64_CAST(_ba) & BDDIR_UPPER_MASK)<<2) |
235 | 235 | ||
236 | #define BDECC_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ | 236 | #define BDECC_TO_MEM(_ba) (UINT64_CAST (_ba) & NASID_MASK | \ |
@@ -251,23 +251,23 @@ | |||
251 | /* | 251 | /* |
252 | * WARNING: | 252 | * WARNING: |
253 | * When certain Hub chip workaround are defined, it's not sufficient | 253 | * When certain Hub chip workaround are defined, it's not sufficient |
254 | * to dereference the *_HUB_ADDR() macros. You should instead use | 254 | * to dereference the *_HUB_ADDR() macros. You should instead use |
255 | * HUB_L() and HUB_S() if you must deal with pointers to hub registers. | 255 | * HUB_L() and HUB_S() if you must deal with pointers to hub registers. |
256 | * Otherwise, the recommended approach is to use *_HUB_L() and *_HUB_S(). | 256 | * Otherwise, the recommended approach is to use *_HUB_L() and *_HUB_S(). |
257 | * They're always safe. | 257 | * They're always safe. |
258 | */ | 258 | */ |
259 | #define LOCAL_HUB_ADDR(_x) (HUBREG_CAST (IALIAS_BASE + (_x))) | 259 | #define LOCAL_HUB_ADDR(_x) (HUBREG_CAST (IALIAS_BASE + (_x))) |
260 | #define REMOTE_HUB_ADDR(_n, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \ | 260 | #define REMOTE_HUB_ADDR(_n, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \ |
261 | 0x800000 + (_x))) | 261 | 0x800000 + (_x))) |
262 | #ifdef CONFIG_SGI_IP27 | 262 | #ifdef CONFIG_SGI_IP27 |
263 | #define REMOTE_HUB_PI_ADDR(_n, _sn, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \ | 263 | #define REMOTE_HUB_PI_ADDR(_n, _sn, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \ |
264 | 0x800000 + (_x))) | 264 | 0x800000 + (_x))) |
265 | #endif /* CONFIG_SGI_IP27 */ | 265 | #endif /* CONFIG_SGI_IP27 */ |
266 | 266 | ||
267 | #ifndef __ASSEMBLY__ | 267 | #ifndef __ASSEMBLY__ |
268 | 268 | ||
269 | #define HUB_L(_a) *(_a) | 269 | #define HUB_L(_a) *(_a) |
270 | #define HUB_S(_a, _d) *(_a) = (_d) | 270 | #define HUB_S(_a, _d) *(_a) = (_d) |
271 | 271 | ||
272 | #define LOCAL_HUB_L(_r) HUB_L(LOCAL_HUB_ADDR(_r)) | 272 | #define LOCAL_HUB_L(_r) HUB_L(LOCAL_HUB_ADDR(_r)) |
273 | #define LOCAL_HUB_S(_r, _d) HUB_S(LOCAL_HUB_ADDR(_r), (_d)) | 273 | #define LOCAL_HUB_S(_r, _d) HUB_S(LOCAL_HUB_ADDR(_r), (_d)) |
@@ -330,14 +330,14 @@ | |||
330 | 330 | ||
331 | #define KLI_LAUNCH 0 /* Dir. entries */ | 331 | #define KLI_LAUNCH 0 /* Dir. entries */ |
332 | #define KLI_KLCONFIG 1 | 332 | #define KLI_KLCONFIG 1 |
333 | #define KLI_NMI 2 | 333 | #define KLI_NMI 2 |
334 | #define KLI_GDA 3 | 334 | #define KLI_GDA 3 |
335 | #define KLI_FREEMEM 4 | 335 | #define KLI_FREEMEM 4 |
336 | #define KLI_SYMMON_STK 5 | 336 | #define KLI_SYMMON_STK 5 |
337 | #define KLI_PI_ERROR 6 | 337 | #define KLI_PI_ERROR 6 |
338 | #define KLI_KERN_VARS 7 | 338 | #define KLI_KERN_VARS 7 |
339 | #define KLI_KERN_XP 8 | 339 | #define KLI_KERN_XP 8 |
340 | #define KLI_KERN_PARTID 9 | 340 | #define KLI_KERN_PARTID 9 |
341 | 341 | ||
342 | #ifndef __ASSEMBLY__ | 342 | #ifndef __ASSEMBLY__ |
343 | 343 | ||
@@ -350,8 +350,8 @@ | |||
350 | #define KLD_SYMMON_STK(nasid) (KLD_BASE(nasid) + KLI_SYMMON_STK) | 350 | #define KLD_SYMMON_STK(nasid) (KLD_BASE(nasid) + KLI_SYMMON_STK) |
351 | #define KLD_FREEMEM(nasid) (KLD_BASE(nasid) + KLI_FREEMEM) | 351 | #define KLD_FREEMEM(nasid) (KLD_BASE(nasid) + KLI_FREEMEM) |
352 | #define KLD_KERN_VARS(nasid) (KLD_BASE(nasid) + KLI_KERN_VARS) | 352 | #define KLD_KERN_VARS(nasid) (KLD_BASE(nasid) + KLI_KERN_VARS) |
353 | #define KLD_KERN_XP(nasid) (KLD_BASE(nasid) + KLI_KERN_XP) | 353 | #define KLD_KERN_XP(nasid) (KLD_BASE(nasid) + KLI_KERN_XP) |
354 | #define KLD_KERN_PARTID(nasid) (KLD_BASE(nasid) + KLI_KERN_PARTID) | 354 | #define KLD_KERN_PARTID(nasid) (KLD_BASE(nasid) + KLI_KERN_PARTID) |
355 | 355 | ||
356 | #define LAUNCH_OFFSET(nasid, slice) \ | 356 | #define LAUNCH_OFFSET(nasid, slice) \ |
357 | (KLD_LAUNCH(nasid)->offset + \ | 357 | (KLD_LAUNCH(nasid)->offset + \ |
@@ -365,7 +365,7 @@ | |||
365 | KLD_NMI(nasid)->stride * (slice)) | 365 | KLD_NMI(nasid)->stride * (slice)) |
366 | #define NMI_ADDR(nasid, slice) \ | 366 | #define NMI_ADDR(nasid, slice) \ |
367 | TO_NODE_UNCAC((nasid), SN_NMI_OFFSET(nasid, slice)) | 367 | TO_NODE_UNCAC((nasid), SN_NMI_OFFSET(nasid, slice)) |
368 | #define NMI_SIZE(nasid) KLD_NMI(nasid)->size | 368 | #define NMI_SIZE(nasid) KLD_NMI(nasid)->size |
369 | 369 | ||
370 | #define KLCONFIG_OFFSET(nasid) KLD_KLCONFIG(nasid)->offset | 370 | #define KLCONFIG_OFFSET(nasid) KLD_KLCONFIG(nasid)->offset |
371 | #define KLCONFIG_ADDR(nasid) \ | 371 | #define KLCONFIG_ADDR(nasid) \ |
@@ -390,8 +390,8 @@ | |||
390 | /* loading symmon 4k below UNIX. the arcs loader needs the topaddr for a | 390 | /* loading symmon 4k below UNIX. the arcs loader needs the topaddr for a |
391 | * relocatable program | 391 | * relocatable program |
392 | */ | 392 | */ |
393 | #define UNIX_DEBUG_LOADADDR 0x300000 | 393 | #define UNIX_DEBUG_LOADADDR 0x300000 |
394 | #define SYMMON_LOADADDR(nasid) \ | 394 | #define SYMMON_LOADADDR(nasid) \ |
395 | TO_NODE(nasid, PHYS_TO_K0(UNIX_DEBUG_LOADADDR - 0x1000)) | 395 | TO_NODE(nasid, PHYS_TO_K0(UNIX_DEBUG_LOADADDR - 0x1000)) |
396 | 396 | ||
397 | #define FREEMEM_OFFSET(nasid) KLD_FREEMEM(nasid)->offset | 397 | #define FREEMEM_OFFSET(nasid) KLD_FREEMEM(nasid)->offset |
@@ -420,8 +420,8 @@ | |||
420 | #define KERN_VARS_ADDR(nasid) KLD_KERN_VARS(nasid)->pointer | 420 | #define KERN_VARS_ADDR(nasid) KLD_KERN_VARS(nasid)->pointer |
421 | #define KERN_VARS_SIZE(nasid) KLD_KERN_VARS(nasid)->size | 421 | #define KERN_VARS_SIZE(nasid) KLD_KERN_VARS(nasid)->size |
422 | 422 | ||
423 | #define KERN_XP_ADDR(nasid) KLD_KERN_XP(nasid)->pointer | 423 | #define KERN_XP_ADDR(nasid) KLD_KERN_XP(nasid)->pointer |
424 | #define KERN_XP_SIZE(nasid) KLD_KERN_XP(nasid)->size | 424 | #define KERN_XP_SIZE(nasid) KLD_KERN_XP(nasid)->size |
425 | 425 | ||
426 | #define GPDA_ADDR(nasid) TO_NODE_CAC(nasid, GPDA_OFFSET) | 426 | #define GPDA_ADDR(nasid) TO_NODE_CAC(nasid, GPDA_OFFSET) |
427 | 427 | ||
diff --git a/arch/mips/include/asm/sn/agent.h b/arch/mips/include/asm/sn/agent.h index dc81114d4742..e33d09293019 100644 --- a/arch/mips/include/asm/sn/agent.h +++ b/arch/mips/include/asm/sn/agent.h | |||
@@ -25,21 +25,21 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #if defined(CONFIG_SGI_IP27) | 27 | #if defined(CONFIG_SGI_IP27) |
28 | #define HUB_NIC_ADDR(_cpuid) \ | 28 | #define HUB_NIC_ADDR(_cpuid) \ |
29 | REMOTE_HUB_ADDR(COMPACT_TO_NASID_NODEID(cpu_to_node(_cpuid)), \ | 29 | REMOTE_HUB_ADDR(COMPACT_TO_NASID_NODEID(cpu_to_node(_cpuid)), \ |
30 | MD_MLAN_CTL) | 30 | MD_MLAN_CTL) |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #define SET_HUB_NIC(_my_cpuid, _val) \ | 33 | #define SET_HUB_NIC(_my_cpuid, _val) \ |
34 | (HUB_S(HUB_NIC_ADDR(_my_cpuid), (_val))) | 34 | (HUB_S(HUB_NIC_ADDR(_my_cpuid), (_val))) |
35 | 35 | ||
36 | #define SET_MY_HUB_NIC(_v) \ | 36 | #define SET_MY_HUB_NIC(_v) \ |
37 | SET_HUB_NIC(cpuid(), (_v)) | 37 | SET_HUB_NIC(cpuid(), (_v)) |
38 | 38 | ||
39 | #define GET_HUB_NIC(_my_cpuid) \ | 39 | #define GET_HUB_NIC(_my_cpuid) \ |
40 | (HUB_L(HUB_NIC_ADDR(_my_cpuid))) | 40 | (HUB_L(HUB_NIC_ADDR(_my_cpuid))) |
41 | 41 | ||
42 | #define GET_MY_HUB_NIC() \ | 42 | #define GET_MY_HUB_NIC() \ |
43 | GET_HUB_NIC(cpuid()) | 43 | GET_HUB_NIC(cpuid()) |
44 | 44 | ||
45 | #endif /* _ASM_SGI_SN_AGENT_H */ | 45 | #endif /* _ASM_SGI_SN_AGENT_H */ |
diff --git a/arch/mips/include/asm/sn/arch.h b/arch/mips/include/asm/sn/arch.h index bd75945e10ff..471e6870d876 100644 --- a/arch/mips/include/asm/sn/arch.h +++ b/arch/mips/include/asm/sn/arch.h | |||
@@ -28,14 +28,14 @@ typedef u64 hubreg_t; | |||
28 | #define INVALID_CNODEID (cnodeid_t)-1 | 28 | #define INVALID_CNODEID (cnodeid_t)-1 |
29 | #define INVALID_PNODEID (pnodeid_t)-1 | 29 | #define INVALID_PNODEID (pnodeid_t)-1 |
30 | #define INVALID_MODULE (moduleid_t)-1 | 30 | #define INVALID_MODULE (moduleid_t)-1 |
31 | #define INVALID_PARTID (partid_t)-1 | 31 | #define INVALID_PARTID (partid_t)-1 |
32 | 32 | ||
33 | extern nasid_t get_nasid(void); | 33 | extern nasid_t get_nasid(void); |
34 | extern cnodeid_t get_cpu_cnode(cpuid_t); | 34 | extern cnodeid_t get_cpu_cnode(cpuid_t); |
35 | extern int get_cpu_slice(cpuid_t); | 35 | extern int get_cpu_slice(cpuid_t); |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * NO ONE should access these arrays directly. The only reason we refer to | 38 | * NO ONE should access these arrays directly. The only reason we refer to |
39 | * them here is to avoid the procedure call that would be required in the | 39 | * them here is to avoid the procedure call that would be required in the |
40 | * macros below. (Really want private data members here :-) | 40 | * macros below. (Really want private data members here :-) |
41 | */ | 41 | */ |
@@ -44,12 +44,12 @@ extern nasid_t compact_to_nasid_node[MAX_COMPACT_NODES]; | |||
44 | 44 | ||
45 | /* | 45 | /* |
46 | * These macros are used by various parts of the kernel to convert | 46 | * These macros are used by various parts of the kernel to convert |
47 | * between the three different kinds of node numbering. At least some | 47 | * between the three different kinds of node numbering. At least some |
48 | * of them may change to procedure calls in the future, but the macros | 48 | * of them may change to procedure calls in the future, but the macros |
49 | * will continue to work. Don't use the arrays above directly. | 49 | * will continue to work. Don't use the arrays above directly. |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #define NASID_TO_REGION(nnode) \ | 52 | #define NASID_TO_REGION(nnode) \ |
53 | ((nnode) >> \ | 53 | ((nnode) >> \ |
54 | (is_fine_dirmode() ? NASID_TO_FINEREG_SHFT : NASID_TO_COARSEREG_SHFT)) | 54 | (is_fine_dirmode() ? NASID_TO_FINEREG_SHFT : NASID_TO_COARSEREG_SHFT)) |
55 | 55 | ||
diff --git a/arch/mips/include/asm/sn/fru.h b/arch/mips/include/asm/sn/fru.h index b3e3606723b7..bbb83257c8e2 100644 --- a/arch/mips/include/asm/sn/fru.h +++ b/arch/mips/include/asm/sn/fru.h | |||
@@ -21,24 +21,24 @@ typedef struct kf_mem_s { | |||
21 | * is this necessary ? | 21 | * is this necessary ? |
22 | */ | 22 | */ |
23 | confidence_t km_dimm[MAX_DIMMS]; | 23 | confidence_t km_dimm[MAX_DIMMS]; |
24 | /* confidence level that dimm[i] is bad | 24 | /* confidence level that dimm[i] is bad |
25 | *I think this is the right number | 25 | *I think this is the right number |
26 | */ | 26 | */ |
27 | 27 | ||
28 | } kf_mem_t; | 28 | } kf_mem_t; |
29 | 29 | ||
30 | typedef struct kf_cpu_s { | 30 | typedef struct kf_cpu_s { |
31 | confidence_t kc_confidence; /* confidence level that cpu is bad */ | 31 | confidence_t kc_confidence; /* confidence level that cpu is bad */ |
32 | confidence_t kc_icache; /* confidence level that instr. cache is bad */ | 32 | confidence_t kc_icache; /* confidence level that instr. cache is bad */ |
33 | confidence_t kc_dcache; /* confidence level that data cache is bad */ | 33 | confidence_t kc_dcache; /* confidence level that data cache is bad */ |
34 | confidence_t kc_scache; /* confidence level that sec. cache is bad */ | 34 | confidence_t kc_scache; /* confidence level that sec. cache is bad */ |
35 | confidence_t kc_sysbus; /* confidence level that sysad/cmd/state bus is bad */ | 35 | confidence_t kc_sysbus; /* confidence level that sysad/cmd/state bus is bad */ |
36 | } kf_cpu_t; | 36 | } kf_cpu_t; |
37 | 37 | ||
38 | typedef struct kf_pci_bus_s { | 38 | typedef struct kf_pci_bus_s { |
39 | confidence_t kpb_belief; /* confidence level that the pci bus is bad */ | 39 | confidence_t kpb_belief; /* confidence level that the pci bus is bad */ |
40 | confidence_t kpb_pcidev_belief[MAX_PCIDEV]; | 40 | confidence_t kpb_pcidev_belief[MAX_PCIDEV]; |
41 | /* confidence level that the pci dev is bad */ | 41 | /* confidence level that the pci dev is bad */ |
42 | } kf_pci_bus_t; | 42 | } kf_pci_bus_t; |
43 | 43 | ||
44 | #endif /* __ASM_SN_FRU_H */ | 44 | #endif /* __ASM_SN_FRU_H */ |
diff --git a/arch/mips/include/asm/sn/gda.h b/arch/mips/include/asm/sn/gda.h index 9cb6ff770915..85fa1b5f639d 100644 --- a/arch/mips/include/asm/sn/gda.h +++ b/arch/mips/include/asm/sn/gda.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc. |
9 | * | 9 | * |
10 | * gda.h -- Contains the data structure for the global data area, | 10 | * gda.h -- Contains the data structure for the global data area, |
11 | * The GDA contains information communicated between the | 11 | * The GDA contains information communicated between the |
12 | * PROM, SYMMON, and the kernel. | 12 | * PROM, SYMMON, and the kernel. |
13 | */ | 13 | */ |
14 | #ifndef _ASM_SN_GDA_H | 14 | #ifndef _ASM_SN_GDA_H |
@@ -23,8 +23,8 @@ | |||
23 | * | 23 | * |
24 | * Version # | Change | 24 | * Version # | Change |
25 | * -------------+------------------------------------------------------- | 25 | * -------------+------------------------------------------------------- |
26 | * 1 | Initial SN0 version | 26 | * 1 | Initial SN0 version |
27 | * 2 | Prom sets g_partid field to the partition number. 0 IS | 27 | * 2 | Prom sets g_partid field to the partition number. 0 IS |
28 | * | a valid partition #. | 28 | * | a valid partition #. |
29 | */ | 29 | */ |
30 | 30 | ||
@@ -60,7 +60,7 @@ typedef struct gda { | |||
60 | /* Pointer to a mask of nodes with copies | 60 | /* Pointer to a mask of nodes with copies |
61 | * of the kernel. */ | 61 | * of the kernel. */ |
62 | char g_padding[56]; /* pad out to 128 bytes */ | 62 | char g_padding[56]; /* pad out to 128 bytes */ |
63 | nasid_t g_nasidtable[MAX_COMPACT_NODES]; /* NASID of each node, | 63 | nasid_t g_nasidtable[MAX_COMPACT_NODES]; /* NASID of each node, |
64 | * indexed by cnodeid. | 64 | * indexed by cnodeid. |
65 | */ | 65 | */ |
66 | } gda_t; | 66 | } gda_t; |
@@ -74,7 +74,7 @@ typedef struct gda { | |||
74 | * revisions assume GDA is NOT set up, and read partition | 74 | * revisions assume GDA is NOT set up, and read partition |
75 | * information from the board info. | 75 | * information from the board info. |
76 | */ | 76 | */ |
77 | #define PART_GDA_VERSION 2 | 77 | #define PART_GDA_VERSION 2 |
78 | 78 | ||
79 | /* | 79 | /* |
80 | * The following requests can be sent to the PROM during startup. | 80 | * The following requests can be sent to the PROM during startup. |
@@ -83,17 +83,17 @@ typedef struct gda { | |||
83 | #define PROMOP_MAGIC 0x0ead0000 | 83 | #define PROMOP_MAGIC 0x0ead0000 |
84 | #define PROMOP_MAGIC_MASK 0x0fff0000 | 84 | #define PROMOP_MAGIC_MASK 0x0fff0000 |
85 | 85 | ||
86 | #define PROMOP_BIST_SHIFT 11 | 86 | #define PROMOP_BIST_SHIFT 11 |
87 | #define PROMOP_BIST_MASK (0x3 << 11) | 87 | #define PROMOP_BIST_MASK (0x3 << 11) |
88 | 88 | ||
89 | #define PROMOP_REG PI_ERR_STACK_ADDR_A | 89 | #define PROMOP_REG PI_ERR_STACK_ADDR_A |
90 | 90 | ||
91 | #define PROMOP_INVALID (PROMOP_MAGIC | 0x00) | 91 | #define PROMOP_INVALID (PROMOP_MAGIC | 0x00) |
92 | #define PROMOP_HALT (PROMOP_MAGIC | 0x10) | 92 | #define PROMOP_HALT (PROMOP_MAGIC | 0x10) |
93 | #define PROMOP_POWERDOWN (PROMOP_MAGIC | 0x20) | 93 | #define PROMOP_POWERDOWN (PROMOP_MAGIC | 0x20) |
94 | #define PROMOP_RESTART (PROMOP_MAGIC | 0x30) | 94 | #define PROMOP_RESTART (PROMOP_MAGIC | 0x30) |
95 | #define PROMOP_REBOOT (PROMOP_MAGIC | 0x40) | 95 | #define PROMOP_REBOOT (PROMOP_MAGIC | 0x40) |
96 | #define PROMOP_IMODE (PROMOP_MAGIC | 0x50) | 96 | #define PROMOP_IMODE (PROMOP_MAGIC | 0x50) |
97 | 97 | ||
98 | #define PROMOP_CMD_MASK 0x00f0 | 98 | #define PROMOP_CMD_MASK 0x00f0 |
99 | #define PROMOP_OPTIONS_MASK 0xfff0 | 99 | #define PROMOP_OPTIONS_MASK 0xfff0 |
diff --git a/arch/mips/include/asm/sn/intr.h b/arch/mips/include/asm/sn/intr.h index 6718b644b970..fc1348193957 100644 --- a/arch/mips/include/asm/sn/intr.h +++ b/arch/mips/include/asm/sn/intr.h | |||
@@ -14,8 +14,8 @@ | |||
14 | #define INT_PEND0_BASELVL 0 | 14 | #define INT_PEND0_BASELVL 0 |
15 | #define INT_PEND1_BASELVL 64 | 15 | #define INT_PEND1_BASELVL 64 |
16 | 16 | ||
17 | #define N_INTPENDJUNK_BITS 8 | 17 | #define N_INTPENDJUNK_BITS 8 |
18 | #define INTPENDJUNK_CLRBIT 0x80 | 18 | #define INTPENDJUNK_CLRBIT 0x80 |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Macros to manipulate the interrupt register on the calling hub chip. | 21 | * Macros to manipulate the interrupt register on the calling hub chip. |
@@ -32,7 +32,7 @@ | |||
32 | * We do an uncached load of the int_pend0 register to ensure this. | 32 | * We do an uncached load of the int_pend0 register to ensure this. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #define LOCAL_HUB_CLR_INTR(level) \ | 35 | #define LOCAL_HUB_CLR_INTR(level) \ |
36 | do { \ | 36 | do { \ |
37 | LOCAL_HUB_S(PI_INT_PEND_MOD, (level)); \ | 37 | LOCAL_HUB_S(PI_INT_PEND_MOD, (level)); \ |
38 | LOCAL_HUB_L(PI_INT_PEND0); \ | 38 | LOCAL_HUB_L(PI_INT_PEND0); \ |
@@ -40,7 +40,7 @@ do { \ | |||
40 | 40 | ||
41 | #define REMOTE_HUB_CLR_INTR(hub, level) \ | 41 | #define REMOTE_HUB_CLR_INTR(hub, level) \ |
42 | do { \ | 42 | do { \ |
43 | nasid_t __hub = (hub); \ | 43 | nasid_t __hub = (hub); \ |
44 | \ | 44 | \ |
45 | REMOTE_HUB_S(__hub, PI_INT_PEND_MOD, (level)); \ | 45 | REMOTE_HUB_S(__hub, PI_INT_PEND_MOD, (level)); \ |
46 | REMOTE_HUB_L(__hub, PI_INT_PEND0); \ | 46 | REMOTE_HUB_L(__hub, PI_INT_PEND0); \ |
@@ -102,8 +102,8 @@ do { \ | |||
102 | #define LLP_PFAIL_INTR_A 41 /* see ml/SN/SN0/sysctlr.c */ | 102 | #define LLP_PFAIL_INTR_A 41 /* see ml/SN/SN0/sysctlr.c */ |
103 | #define LLP_PFAIL_INTR_B 42 | 103 | #define LLP_PFAIL_INTR_B 42 |
104 | 104 | ||
105 | #define TLB_INTR_A 43 /* used for tlb flush random */ | 105 | #define TLB_INTR_A 43 /* used for tlb flush random */ |
106 | #define TLB_INTR_B 44 | 106 | #define TLB_INTR_B 44 |
107 | 107 | ||
108 | #define IP27_INTR_0 45 /* Reserved for PROM use */ | 108 | #define IP27_INTR_0 45 /* Reserved for PROM use */ |
109 | #define IP27_INTR_1 46 /* do not use in Kernel */ | 109 | #define IP27_INTR_1 46 /* do not use in Kernel */ |
@@ -116,8 +116,8 @@ do { \ | |||
116 | 116 | ||
117 | #define BRIDGE_ERROR_INTR 53 /* Setup by PROM to catch */ | 117 | #define BRIDGE_ERROR_INTR 53 /* Setup by PROM to catch */ |
118 | /* Bridge Errors */ | 118 | /* Bridge Errors */ |
119 | #define DEBUG_INTR_A 54 | 119 | #define DEBUG_INTR_A 54 |
120 | #define DEBUG_INTR_B 55 /* Used by symmon to stop all cpus */ | 120 | #define DEBUG_INTR_B 55 /* Used by symmon to stop all cpus */ |
121 | #define IO_ERROR_INTR 57 /* Setup by PROM */ | 121 | #define IO_ERROR_INTR 57 /* Setup by PROM */ |
122 | #define CLK_ERR_INTR 58 | 122 | #define CLK_ERR_INTR 58 |
123 | #define COR_ERR_INTR_A 59 | 123 | #define COR_ERR_INTR_A 59 |
diff --git a/arch/mips/include/asm/sn/io.h b/arch/mips/include/asm/sn/io.h index 24c6775fbb0f..d5174d04538c 100644 --- a/arch/mips/include/asm/sn/io.h +++ b/arch/mips/include/asm/sn/io.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #define HUB_PIO_MAP_TO_MEM 0 | 31 | #define HUB_PIO_MAP_TO_MEM 0 |
32 | #define HUB_PIO_MAP_TO_IO 1 | 32 | #define HUB_PIO_MAP_TO_IO 1 |
33 | 33 | ||
34 | #define IIO_ITTE_INVALID_WIDGET 3 /* an invalid widget */ | 34 | #define IIO_ITTE_INVALID_WIDGET 3 /* an invalid widget */ |
35 | 35 | ||
36 | #define IIO_ITTE_PUT(nasid, bigwin, io_or_mem, widget, addr) \ | 36 | #define IIO_ITTE_PUT(nasid, bigwin, io_or_mem, widget, addr) \ |
37 | REMOTE_HUB_S((nasid), IIO_ITTE(bigwin), \ | 37 | REMOTE_HUB_S((nasid), IIO_ITTE(bigwin), \ |
@@ -52,7 +52,7 @@ | |||
52 | * value _x is expected to be a widget number in the range | 52 | * value _x is expected to be a widget number in the range |
53 | * 0, 8 - 0xF | 53 | * 0, 8 - 0xF |
54 | */ | 54 | */ |
55 | #define IIO_IOPRB(_x) (IIO_IOPRB_0 + ( ( (_x) < HUB_WIDGET_ID_MIN ? \ | 55 | #define IIO_IOPRB(_x) (IIO_IOPRB_0 + ( ( (_x) < HUB_WIDGET_ID_MIN ? \ |
56 | (_x) : \ | 56 | (_x) : \ |
57 | (_x) - (HUB_WIDGET_ID_MIN-1)) << 3) ) | 57 | (_x) - (HUB_WIDGET_ID_MIN-1)) << 3) ) |
58 | 58 | ||
diff --git a/arch/mips/include/asm/sn/ioc3.h b/arch/mips/include/asm/sn/ioc3.h index 099677774d71..e33f0363235b 100644 --- a/arch/mips/include/asm/sn/ioc3.h +++ b/arch/mips/include/asm/sn/ioc3.h | |||
@@ -62,8 +62,8 @@ struct ioc3_sioregs { | |||
62 | 62 | ||
63 | volatile u8 fill3[0x170 - 0x169 - 1]; | 63 | volatile u8 fill3[0x170 - 0x169 - 1]; |
64 | 64 | ||
65 | struct ioc3_uartregs uartb; /* 0x20170 */ | 65 | struct ioc3_uartregs uartb; /* 0x20170 */ |
66 | struct ioc3_uartregs uarta; /* 0x20178 */ | 66 | struct ioc3_uartregs uarta; /* 0x20178 */ |
67 | }; | 67 | }; |
68 | 68 | ||
69 | /* Register layout of IOC3 in configuration space. */ | 69 | /* Register layout of IOC3 in configuration space. */ |
@@ -106,7 +106,7 @@ struct ioc3 { | |||
106 | volatile u32 ppbr_l_b; /* 0x00094 */ | 106 | volatile u32 ppbr_l_b; /* 0x00094 */ |
107 | volatile u32 ppcr_b; /* 0x00098 */ | 107 | volatile u32 ppcr_b; /* 0x00098 */ |
108 | 108 | ||
109 | /* Keyboard and Mouse Registers */ | 109 | /* Keyboard and Mouse Registers */ |
110 | volatile u32 km_csr; /* 0x0009c */ | 110 | volatile u32 km_csr; /* 0x0009c */ |
111 | volatile u32 k_rd; /* 0x000a0 */ | 111 | volatile u32 k_rd; /* 0x000a0 */ |
112 | volatile u32 m_rd; /* 0x000a4 */ | 112 | volatile u32 m_rd; /* 0x000a4 */ |
@@ -208,7 +208,7 @@ struct ioc3_erxbuf { | |||
208 | /* | 208 | /* |
209 | * Ethernet TX Descriptor | 209 | * Ethernet TX Descriptor |
210 | */ | 210 | */ |
211 | #define ETXD_DATALEN 104 | 211 | #define ETXD_DATALEN 104 |
212 | struct ioc3_etxd { | 212 | struct ioc3_etxd { |
213 | u32 cmd; /* command field */ | 213 | u32 cmd; /* command field */ |
214 | u32 bufcnt; /* buffer counts field */ | 214 | u32 bufcnt; /* buffer counts field */ |
diff --git a/arch/mips/include/asm/sn/klconfig.h b/arch/mips/include/asm/sn/klconfig.h index fe02900b930d..467c313d5767 100644 --- a/arch/mips/include/asm/sn/klconfig.h +++ b/arch/mips/include/asm/sn/klconfig.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 1992 - 1997, 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 1999, 2000 Silicon Graphics, Inc. |
9 | * Copyright (C) 1999, 2000 by Ralf Baechle | 9 | * Copyright (C) 1999, 2000 by Ralf Baechle |
10 | */ | 10 | */ |
11 | #ifndef _ASM_SN_KLCONFIG_H | 11 | #ifndef _ASM_SN_KLCONFIG_H |
12 | #define _ASM_SN_KLCONFIG_H | 12 | #define _ASM_SN_KLCONFIG_H |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * The KLCONFIG structures store info about the various BOARDs found | 15 | * The KLCONFIG structures store info about the various BOARDs found |
@@ -20,11 +20,11 @@ | |||
20 | /* | 20 | /* |
21 | * WARNING: | 21 | * WARNING: |
22 | * Certain assembly language routines (notably xxxxx.s) in the IP27PROM | 22 | * Certain assembly language routines (notably xxxxx.s) in the IP27PROM |
23 | * will depend on the format of the data structures in this file. In | 23 | * will depend on the format of the data structures in this file. In |
24 | * most cases, rearranging the fields can seriously break things. | 24 | * most cases, rearranging the fields can seriously break things. |
25 | * Adding fields in the beginning or middle can also break things. | 25 | * Adding fields in the beginning or middle can also break things. |
26 | * Add fields if necessary, to the end of a struct in such a way | 26 | * Add fields if necessary, to the end of a struct in such a way |
27 | * that offsets of existing fields do not change. | 27 | * that offsets of existing fields do not change. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
@@ -35,7 +35,7 @@ | |||
35 | #include <asm/sn/sn0/addrs.h> | 35 | #include <asm/sn/sn0/addrs.h> |
36 | //#include <sys/SN/router.h> | 36 | //#include <sys/SN/router.h> |
37 | // XXX Stolen from <sys/SN/router.h>: | 37 | // XXX Stolen from <sys/SN/router.h>: |
38 | #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */ | 38 | #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */ |
39 | #include <asm/sn/fru.h> | 39 | #include <asm/sn/fru.h> |
40 | //#include <sys/graph.h> | 40 | //#include <sys/graph.h> |
41 | //#include <sys/xtalk/xbow.h> | 41 | //#include <sys/xtalk/xbow.h> |
@@ -63,14 +63,14 @@ | |||
63 | 63 | ||
64 | typedef u64 nic_t; | 64 | typedef u64 nic_t; |
65 | 65 | ||
66 | #define KLCFGINFO_MAGIC 0xbeedbabe | 66 | #define KLCFGINFO_MAGIC 0xbeedbabe |
67 | 67 | ||
68 | typedef s32 klconf_off_t; | 68 | typedef s32 klconf_off_t; |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * Some IMPORTANT OFFSETS. These are the offsets on all NODES. | 71 | * Some IMPORTANT OFFSETS. These are the offsets on all NODES. |
72 | */ | 72 | */ |
73 | #define MAX_MODULE_ID 255 | 73 | #define MAX_MODULE_ID 255 |
74 | #define SIZE_PAD 4096 /* 4k padding for structures */ | 74 | #define SIZE_PAD 4096 /* 4k padding for structures */ |
75 | /* | 75 | /* |
76 | * 1 NODE brd, 2 Router brd (1 8p, 1 meta), 6 Widgets, | 76 | * 1 NODE brd, 2 Router brd (1 8p, 1 meta), 6 Widgets, |
@@ -86,25 +86,25 @@ typedef s32 klconf_off_t; | |||
86 | /* All bits in this field are currently used. Try the pad fields if | 86 | /* All bits in this field are currently used. Try the pad fields if |
87 | you need more flag bits */ | 87 | you need more flag bits */ |
88 | 88 | ||
89 | #define ENABLE_BOARD 0x01 | 89 | #define ENABLE_BOARD 0x01 |
90 | #define FAILED_BOARD 0x02 | 90 | #define FAILED_BOARD 0x02 |
91 | #define DUPLICATE_BOARD 0x04 /* Boards like midplanes/routers which | 91 | #define DUPLICATE_BOARD 0x04 /* Boards like midplanes/routers which |
92 | are discovered twice. Use one of them */ | 92 | are discovered twice. Use one of them */ |
93 | #define VISITED_BOARD 0x08 /* Used for compact hub numbering. */ | 93 | #define VISITED_BOARD 0x08 /* Used for compact hub numbering. */ |
94 | #define LOCAL_MASTER_IO6 0x10 /* master io6 for that node */ | 94 | #define LOCAL_MASTER_IO6 0x10 /* master io6 for that node */ |
95 | #define GLOBAL_MASTER_IO6 0x20 | 95 | #define GLOBAL_MASTER_IO6 0x20 |
96 | #define THIRD_NIC_PRESENT 0x40 /* for future use */ | 96 | #define THIRD_NIC_PRESENT 0x40 /* for future use */ |
97 | #define SECOND_NIC_PRESENT 0x80 /* addons like MIO are present */ | 97 | #define SECOND_NIC_PRESENT 0x80 /* addons like MIO are present */ |
98 | 98 | ||
99 | /* klinfo->flags fields */ | 99 | /* klinfo->flags fields */ |
100 | 100 | ||
101 | #define KLINFO_ENABLE 0x01 /* This component is enabled */ | 101 | #define KLINFO_ENABLE 0x01 /* This component is enabled */ |
102 | #define KLINFO_FAILED 0x02 /* This component failed */ | 102 | #define KLINFO_FAILED 0x02 /* This component failed */ |
103 | #define KLINFO_DEVICE 0x04 /* This component is a device */ | 103 | #define KLINFO_DEVICE 0x04 /* This component is a device */ |
104 | #define KLINFO_VISITED 0x08 /* This component has been visited */ | 104 | #define KLINFO_VISITED 0x08 /* This component has been visited */ |
105 | #define KLINFO_CONTROLLER 0x10 /* This component is a device controller */ | 105 | #define KLINFO_CONTROLLER 0x10 /* This component is a device controller */ |
106 | #define KLINFO_INSTALL 0x20 /* Install a driver */ | 106 | #define KLINFO_INSTALL 0x20 /* Install a driver */ |
107 | #define KLINFO_HEADLESS 0x40 /* Headless (or hubless) component */ | 107 | #define KLINFO_HEADLESS 0x40 /* Headless (or hubless) component */ |
108 | #define IS_CONSOLE_IOC3(i) ((((klinfo_t *)i)->flags) & KLINFO_INSTALL) | 108 | #define IS_CONSOLE_IOC3(i) ((((klinfo_t *)i)->flags) & KLINFO_INSTALL) |
109 | 109 | ||
110 | #define GB2 0x80000000 | 110 | #define GB2 0x80000000 |
@@ -116,30 +116,30 @@ typedef s32 klconf_off_t; | |||
116 | is used in the code to allocate various areas. | 116 | is used in the code to allocate various areas. |
117 | */ | 117 | */ |
118 | 118 | ||
119 | #define BOARD_STRUCT 0 | 119 | #define BOARD_STRUCT 0 |
120 | #define COMPONENT_STRUCT 1 | 120 | #define COMPONENT_STRUCT 1 |
121 | #define ERRINFO_STRUCT 2 | 121 | #define ERRINFO_STRUCT 2 |
122 | #define KLMALLOC_TYPE_MAX (ERRINFO_STRUCT + 1) | 122 | #define KLMALLOC_TYPE_MAX (ERRINFO_STRUCT + 1) |
123 | #define DEVICE_STRUCT 3 | 123 | #define DEVICE_STRUCT 3 |
124 | 124 | ||
125 | 125 | ||
126 | typedef struct console_s { | 126 | typedef struct console_s { |
127 | unsigned long uart_base; | 127 | unsigned long uart_base; |
128 | unsigned long config_base; | 128 | unsigned long config_base; |
129 | unsigned long memory_base; | 129 | unsigned long memory_base; |
130 | short baud; | 130 | short baud; |
131 | short flag; | 131 | short flag; |
132 | int type; | 132 | int type; |
133 | nasid_t nasid; | 133 | nasid_t nasid; |
134 | char wid; | 134 | char wid; |
135 | char npci; | 135 | char npci; |
136 | nic_t baseio_nic; | 136 | nic_t baseio_nic; |
137 | } console_t; | 137 | } console_t; |
138 | 138 | ||
139 | typedef struct klc_malloc_hdr { | 139 | typedef struct klc_malloc_hdr { |
140 | klconf_off_t km_base; | 140 | klconf_off_t km_base; |
141 | klconf_off_t km_limit; | 141 | klconf_off_t km_limit; |
142 | klconf_off_t km_current; | 142 | klconf_off_t km_current; |
143 | } klc_malloc_hdr_t; | 143 | } klc_malloc_hdr_t; |
144 | 144 | ||
145 | /* Functions/macros needed to use this structure */ | 145 | /* Functions/macros needed to use this structure */ |
@@ -148,7 +148,7 @@ typedef struct kl_config_hdr { | |||
148 | u64 ch_magic; /* set this to KLCFGINFO_MAGIC */ | 148 | u64 ch_magic; /* set this to KLCFGINFO_MAGIC */ |
149 | u32 ch_version; /* structure version number */ | 149 | u32 ch_version; /* structure version number */ |
150 | klconf_off_t ch_malloc_hdr_off; /* offset of ch_malloc_hdr */ | 150 | klconf_off_t ch_malloc_hdr_off; /* offset of ch_malloc_hdr */ |
151 | klconf_off_t ch_cons_off; /* offset of ch_cons */ | 151 | klconf_off_t ch_cons_off; /* offset of ch_cons */ |
152 | klconf_off_t ch_board_info; /* the link list of boards */ | 152 | klconf_off_t ch_board_info; /* the link list of boards */ |
153 | console_t ch_cons_info; /* address info of the console */ | 153 | console_t ch_cons_info; /* address info of the console */ |
154 | klc_malloc_hdr_t ch_malloc_hdr[KLMALLOC_TYPE_MAX]; | 154 | klc_malloc_hdr_t ch_malloc_hdr[KLMALLOC_TYPE_MAX]; |
@@ -157,27 +157,27 @@ typedef struct kl_config_hdr { | |||
157 | } kl_config_hdr_t; | 157 | } kl_config_hdr_t; |
158 | 158 | ||
159 | 159 | ||
160 | #define KL_CONFIG_HDR(_nasid) ((kl_config_hdr_t *)(KLCONFIG_ADDR(_nasid))) | 160 | #define KL_CONFIG_HDR(_nasid) ((kl_config_hdr_t *)(KLCONFIG_ADDR(_nasid))) |
161 | #define KL_CONFIG_INFO_OFFSET(_nasid) \ | 161 | #define KL_CONFIG_INFO_OFFSET(_nasid) \ |
162 | (KL_CONFIG_HDR(_nasid)->ch_board_info) | 162 | (KL_CONFIG_HDR(_nasid)->ch_board_info) |
163 | #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \ | 163 | #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \ |
164 | (KL_CONFIG_HDR(_nasid)->ch_board_info = (_off)) | 164 | (KL_CONFIG_HDR(_nasid)->ch_board_info = (_off)) |
165 | 165 | ||
166 | #define KL_CONFIG_INFO(_nasid) \ | 166 | #define KL_CONFIG_INFO(_nasid) \ |
167 | (lboard_t *)((KL_CONFIG_HDR(_nasid)->ch_board_info) ? \ | 167 | (lboard_t *)((KL_CONFIG_HDR(_nasid)->ch_board_info) ? \ |
168 | NODE_OFFSET_TO_K1((_nasid), KL_CONFIG_HDR(_nasid)->ch_board_info) : \ | 168 | NODE_OFFSET_TO_K1((_nasid), KL_CONFIG_HDR(_nasid)->ch_board_info) : \ |
169 | 0) | 169 | 0) |
170 | #define KL_CONFIG_MAGIC(_nasid) (KL_CONFIG_HDR(_nasid)->ch_magic) | 170 | #define KL_CONFIG_MAGIC(_nasid) (KL_CONFIG_HDR(_nasid)->ch_magic) |
171 | 171 | ||
172 | #define KL_CONFIG_CHECK_MAGIC(_nasid) \ | 172 | #define KL_CONFIG_CHECK_MAGIC(_nasid) \ |
173 | (KL_CONFIG_HDR(_nasid)->ch_magic == KLCFGINFO_MAGIC) | 173 | (KL_CONFIG_HDR(_nasid)->ch_magic == KLCFGINFO_MAGIC) |
174 | 174 | ||
175 | #define KL_CONFIG_HDR_INIT_MAGIC(_nasid) \ | 175 | #define KL_CONFIG_HDR_INIT_MAGIC(_nasid) \ |
176 | (KL_CONFIG_HDR(_nasid)->ch_magic = KLCFGINFO_MAGIC) | 176 | (KL_CONFIG_HDR(_nasid)->ch_magic = KLCFGINFO_MAGIC) |
177 | 177 | ||
178 | /* --- New Macros for the changed kl_config_hdr_t structure --- */ | 178 | /* --- New Macros for the changed kl_config_hdr_t structure --- */ |
179 | 179 | ||
180 | #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ | 180 | #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ |
181 | ((unsigned long)_k + (_k->ch_malloc_hdr_off))) | 181 | ((unsigned long)_k + (_k->ch_malloc_hdr_off))) |
182 | 182 | ||
183 | #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) | 183 | #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) |
@@ -190,29 +190,29 @@ typedef struct kl_config_hdr { | |||
190 | /* ------------------------------------------------------------- */ | 190 | /* ------------------------------------------------------------- */ |
191 | 191 | ||
192 | #define KL_CONFIG_INFO_START(_nasid) \ | 192 | #define KL_CONFIG_INFO_START(_nasid) \ |
193 | (klconf_off_t)(KLCONFIG_OFFSET(_nasid) + sizeof(kl_config_hdr_t)) | 193 | (klconf_off_t)(KLCONFIG_OFFSET(_nasid) + sizeof(kl_config_hdr_t)) |
194 | 194 | ||
195 | #define KL_CONFIG_BOARD_NASID(_brd) ((_brd)->brd_nasid) | 195 | #define KL_CONFIG_BOARD_NASID(_brd) ((_brd)->brd_nasid) |
196 | #define KL_CONFIG_BOARD_SET_NEXT(_brd, _off) ((_brd)->brd_next = (_off)) | 196 | #define KL_CONFIG_BOARD_SET_NEXT(_brd, _off) ((_brd)->brd_next = (_off)) |
197 | 197 | ||
198 | #define KL_CONFIG_DUPLICATE_BOARD(_brd) ((_brd)->brd_flags & DUPLICATE_BOARD) | 198 | #define KL_CONFIG_DUPLICATE_BOARD(_brd) ((_brd)->brd_flags & DUPLICATE_BOARD) |
199 | 199 | ||
200 | #define XBOW_PORT_TYPE_HUB(_xbowp, _link) \ | 200 | #define XBOW_PORT_TYPE_HUB(_xbowp, _link) \ |
201 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_HUB) | 201 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_HUB) |
202 | #define XBOW_PORT_TYPE_IO(_xbowp, _link) \ | 202 | #define XBOW_PORT_TYPE_IO(_xbowp, _link) \ |
203 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_IO) | 203 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_IO) |
204 | 204 | ||
205 | #define XBOW_PORT_IS_ENABLED(_xbowp, _link) \ | 205 | #define XBOW_PORT_IS_ENABLED(_xbowp, _link) \ |
206 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_ENABLE) | 206 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_flag & XBOW_PORT_ENABLE) |
207 | #define XBOW_PORT_NASID(_xbowp, _link) \ | 207 | #define XBOW_PORT_NASID(_xbowp, _link) \ |
208 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_nasid) | 208 | ((_xbowp)->xbow_port_info[(_link) - BASE_XBOW_PORT].port_nasid) |
209 | 209 | ||
210 | #define XBOW_PORT_IO 0x1 | 210 | #define XBOW_PORT_IO 0x1 |
211 | #define XBOW_PORT_HUB 0x2 | 211 | #define XBOW_PORT_HUB 0x2 |
212 | #define XBOW_PORT_ENABLE 0x4 | 212 | #define XBOW_PORT_ENABLE 0x4 |
213 | 213 | ||
214 | #define SN0_PORT_FENCE_SHFT 0 | 214 | #define SN0_PORT_FENCE_SHFT 0 |
215 | #define SN0_PORT_FENCE_MASK (1 << SN0_PORT_FENCE_SHFT) | 215 | #define SN0_PORT_FENCE_MASK (1 << SN0_PORT_FENCE_SHFT) |
216 | 216 | ||
217 | /* | 217 | /* |
218 | * The KLCONFIG area is organized as a LINKED LIST of BOARDs. A BOARD | 218 | * The KLCONFIG area is organized as a LINKED LIST of BOARDs. A BOARD |
@@ -242,28 +242,28 @@ typedef struct kl_config_hdr { | |||
242 | * | 242 | * |
243 | KLCONFIG | 243 | KLCONFIG |
244 | 244 | ||
245 | +------------+ +------------+ +------------+ +------------+ | 245 | +------------+ +------------+ +------------+ +------------+ |
246 | | lboard | +-->| lboard | +-->| rboard | +-->| lboard | | 246 | | lboard | +-->| lboard | +-->| rboard | +-->| lboard | |
247 | +------------+ | +------------+ | +------------+ | +------------+ | 247 | +------------+ | +------------+ | +------------+ | +------------+ |
248 | | board info | | | board info | | |errinfo,bptr| | | board info | | 248 | | board info | | | board info | | |errinfo,bptr| | | board info | |
249 | +------------+ | +------------+ | +------------+ | +------------+ | 249 | +------------+ | +------------+ | +------------+ | +------------+ |
250 | | offset |--+ | offset |--+ | offset |--+ |offset=NULL | | 250 | | offset |--+ | offset |--+ | offset |--+ |offset=NULL | |
251 | +------------+ +------------+ +------------+ +------------+ | 251 | +------------+ +------------+ +------------+ +------------+ |
252 | 252 | ||
253 | 253 | ||
254 | +------------+ | 254 | +------------+ |
255 | | board info | | 255 | | board info | |
256 | +------------+ +--------------------------------+ | 256 | +------------+ +--------------------------------+ |
257 | | compt 1 |------>| type, rev, diaginfo, size ... | (CPU) | 257 | | compt 1 |------>| type, rev, diaginfo, size ... | (CPU) |
258 | +------------+ +--------------------------------+ | 258 | +------------+ +--------------------------------+ |
259 | | compt 2 |--+ | 259 | | compt 2 |--+ |
260 | +------------+ | +--------------------------------+ | 260 | +------------+ | +--------------------------------+ |
261 | | ... | +--->| type, rev, diaginfo, size ... | (MEM_BANK) | 261 | | ... | +--->| type, rev, diaginfo, size ... | (MEM_BANK) |
262 | +------------+ +--------------------------------+ | 262 | +------------+ +--------------------------------+ |
263 | | errinfo |--+ | 263 | | errinfo |--+ |
264 | +------------+ | +--------------------------------+ | 264 | +------------+ | +--------------------------------+ |
265 | +--->|r/l brd errinfo,compt err flags | | 265 | +--->|r/l brd errinfo,compt err flags | |
266 | +--------------------------------+ | 266 | +--------------------------------+ |
267 | 267 | ||
268 | * | 268 | * |
269 | * Each BOARD consists of COMPONENTs and the BOARD structure has | 269 | * Each BOARD consists of COMPONENTs and the BOARD structure has |
@@ -311,7 +311,7 @@ typedef struct kl_config_hdr { | |||
311 | */ | 311 | */ |
312 | #define KL_CPU_R4000 0x1 /* Standard R4000 */ | 312 | #define KL_CPU_R4000 0x1 /* Standard R4000 */ |
313 | #define KL_CPU_TFP 0x2 /* TFP processor */ | 313 | #define KL_CPU_TFP 0x2 /* TFP processor */ |
314 | #define KL_CPU_R10000 0x3 /* R10000 (T5) */ | 314 | #define KL_CPU_R10000 0x3 /* R10000 (T5) */ |
315 | #define KL_CPU_NONE (-1) /* no cpu present in slot */ | 315 | #define KL_CPU_NONE (-1) /* no cpu present in slot */ |
316 | 316 | ||
317 | /* | 317 | /* |
@@ -320,13 +320,13 @@ typedef struct kl_config_hdr { | |||
320 | 320 | ||
321 | #define KLCLASS_MASK 0xf0 | 321 | #define KLCLASS_MASK 0xf0 |
322 | #define KLCLASS_NONE 0x00 | 322 | #define KLCLASS_NONE 0x00 |
323 | #define KLCLASS_NODE 0x10 /* CPU, Memory and HUB board */ | 323 | #define KLCLASS_NODE 0x10 /* CPU, Memory and HUB board */ |
324 | #define KLCLASS_CPU KLCLASS_NODE | 324 | #define KLCLASS_CPU KLCLASS_NODE |
325 | #define KLCLASS_IO 0x20 /* BaseIO, 4 ch SCSI, ethernet, FDDI | 325 | #define KLCLASS_IO 0x20 /* BaseIO, 4 ch SCSI, ethernet, FDDI |
326 | and the non-graphics widget boards */ | 326 | and the non-graphics widget boards */ |
327 | #define KLCLASS_ROUTER 0x30 /* Router board */ | 327 | #define KLCLASS_ROUTER 0x30 /* Router board */ |
328 | #define KLCLASS_MIDPLANE 0x40 /* We need to treat this as a board | 328 | #define KLCLASS_MIDPLANE 0x40 /* We need to treat this as a board |
329 | so that we can record error info */ | 329 | so that we can record error info */ |
330 | #define KLCLASS_GFX 0x50 /* graphics boards */ | 330 | #define KLCLASS_GFX 0x50 /* graphics boards */ |
331 | 331 | ||
332 | #define KLCLASS_PSEUDO_GFX 0x60 /* HDTV type cards that use a gfx | 332 | #define KLCLASS_PSEUDO_GFX 0x60 /* HDTV type cards that use a gfx |
@@ -336,7 +336,7 @@ typedef struct kl_config_hdr { | |||
336 | #define KLCLASS_MAX 7 /* Bump this if a new CLASS is added */ | 336 | #define KLCLASS_MAX 7 /* Bump this if a new CLASS is added */ |
337 | #define KLTYPE_MAX 10 /* Bump this if a new CLASS is added */ | 337 | #define KLTYPE_MAX 10 /* Bump this if a new CLASS is added */ |
338 | 338 | ||
339 | #define KLCLASS_UNKNOWN 0xf0 | 339 | #define KLCLASS_UNKNOWN 0xf0 |
340 | 340 | ||
341 | #define KLCLASS(_x) ((_x) & KLCLASS_MASK) | 341 | #define KLCLASS(_x) ((_x) & KLCLASS_MASK) |
342 | 342 | ||
@@ -353,36 +353,36 @@ typedef struct kl_config_hdr { | |||
353 | 353 | ||
354 | #define KLTYPE_WEIRDIO (KLCLASS_IO | 0x0) | 354 | #define KLTYPE_WEIRDIO (KLCLASS_IO | 0x0) |
355 | #define KLTYPE_BASEIO (KLCLASS_IO | 0x1) /* IOC3, SuperIO, Bridge, SCSI */ | 355 | #define KLTYPE_BASEIO (KLCLASS_IO | 0x1) /* IOC3, SuperIO, Bridge, SCSI */ |
356 | #define KLTYPE_IO6 KLTYPE_BASEIO /* Additional name */ | 356 | #define KLTYPE_IO6 KLTYPE_BASEIO /* Additional name */ |
357 | #define KLTYPE_4CHSCSI (KLCLASS_IO | 0x2) | 357 | #define KLTYPE_4CHSCSI (KLCLASS_IO | 0x2) |
358 | #define KLTYPE_MSCSI KLTYPE_4CHSCSI /* Additional name */ | 358 | #define KLTYPE_MSCSI KLTYPE_4CHSCSI /* Additional name */ |
359 | #define KLTYPE_ETHERNET (KLCLASS_IO | 0x3) | 359 | #define KLTYPE_ETHERNET (KLCLASS_IO | 0x3) |
360 | #define KLTYPE_MENET KLTYPE_ETHERNET /* Additional name */ | 360 | #define KLTYPE_MENET KLTYPE_ETHERNET /* Additional name */ |
361 | #define KLTYPE_FDDI (KLCLASS_IO | 0x4) | 361 | #define KLTYPE_FDDI (KLCLASS_IO | 0x4) |
362 | #define KLTYPE_UNUSED (KLCLASS_IO | 0x5) /* XXX UNUSED */ | 362 | #define KLTYPE_UNUSED (KLCLASS_IO | 0x5) /* XXX UNUSED */ |
363 | #define KLTYPE_HAROLD (KLCLASS_IO | 0x6) /* PCI SHOE BOX */ | 363 | #define KLTYPE_HAROLD (KLCLASS_IO | 0x6) /* PCI SHOE BOX */ |
364 | #define KLTYPE_PCI KLTYPE_HAROLD | 364 | #define KLTYPE_PCI KLTYPE_HAROLD |
365 | #define KLTYPE_VME (KLCLASS_IO | 0x7) /* Any 3rd party VME card */ | 365 | #define KLTYPE_VME (KLCLASS_IO | 0x7) /* Any 3rd party VME card */ |
366 | #define KLTYPE_MIO (KLCLASS_IO | 0x8) | 366 | #define KLTYPE_MIO (KLCLASS_IO | 0x8) |
367 | #define KLTYPE_FC (KLCLASS_IO | 0x9) | 367 | #define KLTYPE_FC (KLCLASS_IO | 0x9) |
368 | #define KLTYPE_LINC (KLCLASS_IO | 0xA) | 368 | #define KLTYPE_LINC (KLCLASS_IO | 0xA) |
369 | #define KLTYPE_TPU (KLCLASS_IO | 0xB) /* Tensor Processing Unit */ | 369 | #define KLTYPE_TPU (KLCLASS_IO | 0xB) /* Tensor Processing Unit */ |
370 | #define KLTYPE_GSN_A (KLCLASS_IO | 0xC) /* Main GSN board */ | 370 | #define KLTYPE_GSN_A (KLCLASS_IO | 0xC) /* Main GSN board */ |
371 | #define KLTYPE_GSN_B (KLCLASS_IO | 0xD) /* Auxiliary GSN board */ | 371 | #define KLTYPE_GSN_B (KLCLASS_IO | 0xD) /* Auxiliary GSN board */ |
372 | 372 | ||
373 | #define KLTYPE_GFX (KLCLASS_GFX | 0x0) /* unknown graphics type */ | 373 | #define KLTYPE_GFX (KLCLASS_GFX | 0x0) /* unknown graphics type */ |
374 | #define KLTYPE_GFX_KONA (KLCLASS_GFX | 0x1) /* KONA graphics on IP27 */ | 374 | #define KLTYPE_GFX_KONA (KLCLASS_GFX | 0x1) /* KONA graphics on IP27 */ |
375 | #define KLTYPE_GFX_MGRA (KLCLASS_GFX | 0x3) /* MGRAS graphics on IP27 */ | 375 | #define KLTYPE_GFX_MGRA (KLCLASS_GFX | 0x3) /* MGRAS graphics on IP27 */ |
376 | 376 | ||
377 | #define KLTYPE_WEIRDROUTER (KLCLASS_ROUTER | 0x0) | 377 | #define KLTYPE_WEIRDROUTER (KLCLASS_ROUTER | 0x0) |
378 | #define KLTYPE_ROUTER (KLCLASS_ROUTER | 0x1) | 378 | #define KLTYPE_ROUTER (KLCLASS_ROUTER | 0x1) |
379 | #define KLTYPE_ROUTER2 KLTYPE_ROUTER /* Obsolete! */ | 379 | #define KLTYPE_ROUTER2 KLTYPE_ROUTER /* Obsolete! */ |
380 | #define KLTYPE_NULL_ROUTER (KLCLASS_ROUTER | 0x2) | 380 | #define KLTYPE_NULL_ROUTER (KLCLASS_ROUTER | 0x2) |
381 | #define KLTYPE_META_ROUTER (KLCLASS_ROUTER | 0x3) | 381 | #define KLTYPE_META_ROUTER (KLCLASS_ROUTER | 0x3) |
382 | 382 | ||
383 | #define KLTYPE_WEIRDMIDPLANE (KLCLASS_MIDPLANE | 0x0) | 383 | #define KLTYPE_WEIRDMIDPLANE (KLCLASS_MIDPLANE | 0x0) |
384 | #define KLTYPE_MIDPLANE8 (KLCLASS_MIDPLANE | 0x1) /* 8 slot backplane */ | 384 | #define KLTYPE_MIDPLANE8 (KLCLASS_MIDPLANE | 0x1) /* 8 slot backplane */ |
385 | #define KLTYPE_MIDPLANE KLTYPE_MIDPLANE8 | 385 | #define KLTYPE_MIDPLANE KLTYPE_MIDPLANE8 |
386 | #define KLTYPE_PBRICK_XBOW (KLCLASS_MIDPLANE | 0x2) | 386 | #define KLTYPE_PBRICK_XBOW (KLCLASS_MIDPLANE | 0x2) |
387 | 387 | ||
388 | #define KLTYPE_IOBRICK (KLCLASS_IOBRICK | 0x0) | 388 | #define KLTYPE_IOBRICK (KLCLASS_IOBRICK | 0x0) |
@@ -398,11 +398,11 @@ typedef struct kl_config_hdr { | |||
398 | * When bringup started nic names had not standardized and so we | 398 | * When bringup started nic names had not standardized and so we |
399 | * had to hard code. (For people interested in history.) | 399 | * had to hard code. (For people interested in history.) |
400 | */ | 400 | */ |
401 | #define KLTYPE_XTHD (KLCLASS_PSEUDO_GFX | 0x9) | 401 | #define KLTYPE_XTHD (KLCLASS_PSEUDO_GFX | 0x9) |
402 | 402 | ||
403 | #define KLTYPE_UNKNOWN (KLCLASS_UNKNOWN | 0xf) | 403 | #define KLTYPE_UNKNOWN (KLCLASS_UNKNOWN | 0xf) |
404 | 404 | ||
405 | #define KLTYPE(_x) ((_x) & KLTYPE_MASK) | 405 | #define KLTYPE(_x) ((_x) & KLTYPE_MASK) |
406 | #define IS_MIO_PRESENT(l) ((l->brd_type == KLTYPE_BASEIO) && \ | 406 | #define IS_MIO_PRESENT(l) ((l->brd_type == KLTYPE_BASEIO) && \ |
407 | (l->brd_flags & SECOND_NIC_PRESENT)) | 407 | (l->brd_flags & SECOND_NIC_PRESENT)) |
408 | #define IS_MIO_IOC3(l, n) (IS_MIO_PRESENT(l) && (n > 2)) | 408 | #define IS_MIO_IOC3(l, n) (IS_MIO_PRESENT(l) && (n > 2)) |
@@ -416,33 +416,33 @@ typedef struct kl_config_hdr { | |||
416 | #define LOCAL_BOARD 1 | 416 | #define LOCAL_BOARD 1 |
417 | #define REMOTE_BOARD 2 | 417 | #define REMOTE_BOARD 2 |
418 | 418 | ||
419 | #define LBOARD_STRUCT_VERSION 2 | 419 | #define LBOARD_STRUCT_VERSION 2 |
420 | 420 | ||
421 | typedef struct lboard_s { | 421 | typedef struct lboard_s { |
422 | klconf_off_t brd_next; /* Next BOARD */ | 422 | klconf_off_t brd_next; /* Next BOARD */ |
423 | unsigned char struct_type; /* type of structure, local or remote */ | 423 | unsigned char struct_type; /* type of structure, local or remote */ |
424 | unsigned char brd_type; /* type+class */ | 424 | unsigned char brd_type; /* type+class */ |
425 | unsigned char brd_sversion; /* version of this structure */ | 425 | unsigned char brd_sversion; /* version of this structure */ |
426 | unsigned char brd_brevision; /* board revision */ | 426 | unsigned char brd_brevision; /* board revision */ |
427 | unsigned char brd_promver; /* board prom version, if any */ | 427 | unsigned char brd_promver; /* board prom version, if any */ |
428 | unsigned char brd_flags; /* Enabled, Disabled etc */ | 428 | unsigned char brd_flags; /* Enabled, Disabled etc */ |
429 | unsigned char brd_slot; /* slot number */ | 429 | unsigned char brd_slot; /* slot number */ |
430 | unsigned short brd_debugsw; /* Debug switches */ | 430 | unsigned short brd_debugsw; /* Debug switches */ |
431 | moduleid_t brd_module; /* module to which it belongs */ | 431 | moduleid_t brd_module; /* module to which it belongs */ |
432 | partid_t brd_partition; /* Partition number */ | 432 | partid_t brd_partition; /* Partition number */ |
433 | unsigned short brd_diagval; /* diagnostic value */ | 433 | unsigned short brd_diagval; /* diagnostic value */ |
434 | unsigned short brd_diagparm; /* diagnostic parameter */ | 434 | unsigned short brd_diagparm; /* diagnostic parameter */ |
435 | unsigned char brd_inventory; /* inventory history */ | 435 | unsigned char brd_inventory; /* inventory history */ |
436 | unsigned char brd_numcompts; /* Number of components */ | 436 | unsigned char brd_numcompts; /* Number of components */ |
437 | nic_t brd_nic; /* Number in CAN */ | 437 | nic_t brd_nic; /* Number in CAN */ |
438 | nasid_t brd_nasid; /* passed parameter */ | 438 | nasid_t brd_nasid; /* passed parameter */ |
439 | klconf_off_t brd_compts[MAX_COMPTS_PER_BRD]; /* pointers to COMPONENTS */ | 439 | klconf_off_t brd_compts[MAX_COMPTS_PER_BRD]; /* pointers to COMPONENTS */ |
440 | klconf_off_t brd_errinfo; /* Board's error information */ | 440 | klconf_off_t brd_errinfo; /* Board's error information */ |
441 | struct lboard_s *brd_parent; /* Logical parent for this brd */ | 441 | struct lboard_s *brd_parent; /* Logical parent for this brd */ |
442 | vertex_hdl_t brd_graph_link; /* vertex hdl to connect extern compts */ | 442 | vertex_hdl_t brd_graph_link; /* vertex hdl to connect extern compts */ |
443 | confidence_t brd_confidence; /* confidence that the board is bad */ | 443 | confidence_t brd_confidence; /* confidence that the board is bad */ |
444 | nasid_t brd_owner; /* who owns this board */ | 444 | nasid_t brd_owner; /* who owns this board */ |
445 | unsigned char brd_nic_flags; /* To handle 8 more NICs */ | 445 | unsigned char brd_nic_flags; /* To handle 8 more NICs */ |
446 | char brd_name[32]; | 446 | char brd_name[32]; |
447 | } lboard_t; | 447 | } lboard_t; |
448 | 448 | ||
@@ -456,23 +456,23 @@ typedef struct lboard_s { | |||
456 | 456 | ||
457 | #define KLCF_CLASS(_brd) KLCLASS((_brd)->brd_type) | 457 | #define KLCF_CLASS(_brd) KLCLASS((_brd)->brd_type) |
458 | #define KLCF_TYPE(_brd) KLTYPE((_brd)->brd_type) | 458 | #define KLCF_TYPE(_brd) KLTYPE((_brd)->brd_type) |
459 | #define KLCF_REMOTE(_brd) (((_brd)->struct_type & LOCAL_BOARD) ? 0 : 1) | 459 | #define KLCF_REMOTE(_brd) (((_brd)->struct_type & LOCAL_BOARD) ? 0 : 1) |
460 | #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) | 460 | #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) |
461 | #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module) | 461 | #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module) |
462 | 462 | ||
463 | #define KLCF_NEXT(_brd) \ | 463 | #define KLCF_NEXT(_brd) \ |
464 | ((_brd)->brd_next ? \ | 464 | ((_brd)->brd_next ? \ |
465 | (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\ | 465 | (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\ |
466 | NULL) | 466 | NULL) |
467 | #define KLCF_COMP(_brd, _ndx) \ | 467 | #define KLCF_COMP(_brd, _ndx) \ |
468 | (klinfo_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), \ | 468 | (klinfo_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), \ |
469 | (_brd)->brd_compts[(_ndx)])) | 469 | (_brd)->brd_compts[(_ndx)])) |
470 | 470 | ||
471 | #define KLCF_COMP_ERROR(_brd, _comp) \ | 471 | #define KLCF_COMP_ERROR(_brd, _comp) \ |
472 | (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo)) | 472 | (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo)) |
473 | 473 | ||
474 | #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type) | 474 | #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type) |
475 | #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */ | 475 | #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */ |
476 | 476 | ||
477 | 477 | ||
478 | 478 | ||
@@ -481,73 +481,73 @@ typedef struct lboard_s { | |||
481 | * component. | 481 | * component. |
482 | */ | 482 | */ |
483 | 483 | ||
484 | typedef struct klinfo_s { /* Generic info */ | 484 | typedef struct klinfo_s { /* Generic info */ |
485 | unsigned char struct_type; /* type of this structure */ | 485 | unsigned char struct_type; /* type of this structure */ |
486 | unsigned char struct_version; /* version of this structure */ | 486 | unsigned char struct_version; /* version of this structure */ |
487 | unsigned char flags; /* Enabled, disabled etc */ | 487 | unsigned char flags; /* Enabled, disabled etc */ |
488 | unsigned char revision; /* component revision */ | 488 | unsigned char revision; /* component revision */ |
489 | unsigned short diagval; /* result of diagnostics */ | 489 | unsigned short diagval; /* result of diagnostics */ |
490 | unsigned short diagparm; /* diagnostic parameter */ | 490 | unsigned short diagparm; /* diagnostic parameter */ |
491 | unsigned char inventory; /* previous inventory status */ | 491 | unsigned char inventory; /* previous inventory status */ |
492 | nic_t nic; /* MUst be aligned properly */ | 492 | nic_t nic; /* MUst be aligned properly */ |
493 | unsigned char physid; /* physical id of component */ | 493 | unsigned char physid; /* physical id of component */ |
494 | unsigned int virtid; /* virtual id as seen by system */ | 494 | unsigned int virtid; /* virtual id as seen by system */ |
495 | unsigned char widid; /* Widget id - if applicable */ | 495 | unsigned char widid; /* Widget id - if applicable */ |
496 | nasid_t nasid; /* node number - from parent */ | 496 | nasid_t nasid; /* node number - from parent */ |
497 | char pad1; /* pad out structure. */ | 497 | char pad1; /* pad out structure. */ |
498 | char pad2; /* pad out structure. */ | 498 | char pad2; /* pad out structure. */ |
499 | COMPONENT *arcs_compt; /* ptr to the arcs struct for ease*/ | 499 | COMPONENT *arcs_compt; /* ptr to the arcs struct for ease*/ |
500 | klconf_off_t errinfo; /* component specific errors */ | 500 | klconf_off_t errinfo; /* component specific errors */ |
501 | unsigned short pad3; /* pci fields have moved over to */ | 501 | unsigned short pad3; /* pci fields have moved over to */ |
502 | unsigned short pad4; /* klbri_t */ | 502 | unsigned short pad4; /* klbri_t */ |
503 | } klinfo_t ; | 503 | } klinfo_t ; |
504 | 504 | ||
505 | #define KLCONFIG_INFO_ENABLED(_i) ((_i)->flags & KLINFO_ENABLE) | 505 | #define KLCONFIG_INFO_ENABLED(_i) ((_i)->flags & KLINFO_ENABLE) |
506 | /* | 506 | /* |
507 | * Component structures. | 507 | * Component structures. |
508 | * Following are the currently identified components: | 508 | * Following are the currently identified components: |
509 | * CPU, HUB, MEM_BANK, | 509 | * CPU, HUB, MEM_BANK, |
510 | * XBOW(consists of 16 WIDGETs, each of which can be HUB or GRAPHICS or BRIDGE) | 510 | * XBOW(consists of 16 WIDGETs, each of which can be HUB or GRAPHICS or BRIDGE) |
511 | * BRIDGE, IOC3, SuperIO, SCSI, FDDI | 511 | * BRIDGE, IOC3, SuperIO, SCSI, FDDI |
512 | * ROUTER | 512 | * ROUTER |
513 | * GRAPHICS | 513 | * GRAPHICS |
514 | */ | 514 | */ |
515 | #define KLSTRUCT_UNKNOWN 0 | 515 | #define KLSTRUCT_UNKNOWN 0 |
516 | #define KLSTRUCT_CPU 1 | 516 | #define KLSTRUCT_CPU 1 |
517 | #define KLSTRUCT_HUB 2 | 517 | #define KLSTRUCT_HUB 2 |
518 | #define KLSTRUCT_MEMBNK 3 | 518 | #define KLSTRUCT_MEMBNK 3 |
519 | #define KLSTRUCT_XBOW 4 | 519 | #define KLSTRUCT_XBOW 4 |
520 | #define KLSTRUCT_BRI 5 | 520 | #define KLSTRUCT_BRI 5 |
521 | #define KLSTRUCT_IOC3 6 | 521 | #define KLSTRUCT_IOC3 6 |
522 | #define KLSTRUCT_PCI 7 | 522 | #define KLSTRUCT_PCI 7 |
523 | #define KLSTRUCT_VME 8 | 523 | #define KLSTRUCT_VME 8 |
524 | #define KLSTRUCT_ROU 9 | 524 | #define KLSTRUCT_ROU 9 |
525 | #define KLSTRUCT_GFX 10 | 525 | #define KLSTRUCT_GFX 10 |
526 | #define KLSTRUCT_SCSI 11 | 526 | #define KLSTRUCT_SCSI 11 |
527 | #define KLSTRUCT_FDDI 12 | 527 | #define KLSTRUCT_FDDI 12 |
528 | #define KLSTRUCT_MIO 13 | 528 | #define KLSTRUCT_MIO 13 |
529 | #define KLSTRUCT_DISK 14 | 529 | #define KLSTRUCT_DISK 14 |
530 | #define KLSTRUCT_TAPE 15 | 530 | #define KLSTRUCT_TAPE 15 |
531 | #define KLSTRUCT_CDROM 16 | 531 | #define KLSTRUCT_CDROM 16 |
532 | #define KLSTRUCT_HUB_UART 17 | 532 | #define KLSTRUCT_HUB_UART 17 |
533 | #define KLSTRUCT_IOC3ENET 18 | 533 | #define KLSTRUCT_IOC3ENET 18 |
534 | #define KLSTRUCT_IOC3UART 19 | 534 | #define KLSTRUCT_IOC3UART 19 |
535 | #define KLSTRUCT_UNUSED 20 /* XXX UNUSED */ | 535 | #define KLSTRUCT_UNUSED 20 /* XXX UNUSED */ |
536 | #define KLSTRUCT_IOC3PCKM 21 | 536 | #define KLSTRUCT_IOC3PCKM 21 |
537 | #define KLSTRUCT_RAD 22 | 537 | #define KLSTRUCT_RAD 22 |
538 | #define KLSTRUCT_HUB_TTY 23 | 538 | #define KLSTRUCT_HUB_TTY 23 |
539 | #define KLSTRUCT_IOC3_TTY 24 | 539 | #define KLSTRUCT_IOC3_TTY 24 |
540 | 540 | ||
541 | /* Early Access IO proms are compatible | 541 | /* Early Access IO proms are compatible |
542 | only with KLSTRUCT values up to 24. */ | 542 | only with KLSTRUCT values up to 24. */ |
543 | 543 | ||
544 | #define KLSTRUCT_FIBERCHANNEL 25 | 544 | #define KLSTRUCT_FIBERCHANNEL 25 |
545 | #define KLSTRUCT_MOD_SERIAL_NUM 26 | 545 | #define KLSTRUCT_MOD_SERIAL_NUM 26 |
546 | #define KLSTRUCT_IOC3MS 27 | 546 | #define KLSTRUCT_IOC3MS 27 |
547 | #define KLSTRUCT_TPU 28 | 547 | #define KLSTRUCT_TPU 28 |
548 | #define KLSTRUCT_GSN_A 29 | 548 | #define KLSTRUCT_GSN_A 29 |
549 | #define KLSTRUCT_GSN_B 30 | 549 | #define KLSTRUCT_GSN_B 30 |
550 | #define KLSTRUCT_XTHD 31 | 550 | #define KLSTRUCT_XTHD 31 |
551 | 551 | ||
552 | /* | 552 | /* |
553 | * These are the indices of various components within a lboard structure. | 553 | * These are the indices of various components within a lboard structure. |
@@ -583,7 +583,7 @@ typedef u64 *router_t; | |||
583 | * The port info in ip27_cfg area translates to a lboart_t in the | 583 | * The port info in ip27_cfg area translates to a lboart_t in the |
584 | * KLCONFIG area. But since KLCONFIG does not use pointers, lboart_t | 584 | * KLCONFIG area. But since KLCONFIG does not use pointers, lboart_t |
585 | * is stored in terms of a nasid and a offset from start of KLCONFIG | 585 | * is stored in terms of a nasid and a offset from start of KLCONFIG |
586 | * area on that nasid. | 586 | * area on that nasid. |
587 | */ | 587 | */ |
588 | typedef struct klport_s { | 588 | typedef struct klport_s { |
589 | nasid_t port_nasid; | 589 | nasid_t port_nasid; |
@@ -591,20 +591,20 @@ typedef struct klport_s { | |||
591 | klconf_off_t port_offset; | 591 | klconf_off_t port_offset; |
592 | } klport_t; | 592 | } klport_t; |
593 | 593 | ||
594 | typedef struct klcpu_s { /* CPU */ | 594 | typedef struct klcpu_s { /* CPU */ |
595 | klinfo_t cpu_info; | 595 | klinfo_t cpu_info; |
596 | unsigned short cpu_prid; /* Processor PRID value */ | 596 | unsigned short cpu_prid; /* Processor PRID value */ |
597 | unsigned short cpu_fpirr; /* FPU IRR value */ | 597 | unsigned short cpu_fpirr; /* FPU IRR value */ |
598 | unsigned short cpu_speed; /* Speed in MHZ */ | 598 | unsigned short cpu_speed; /* Speed in MHZ */ |
599 | unsigned short cpu_scachesz; /* secondary cache size in MB */ | 599 | unsigned short cpu_scachesz; /* secondary cache size in MB */ |
600 | unsigned short cpu_scachespeed;/* secondary cache speed in MHz */ | 600 | unsigned short cpu_scachespeed;/* secondary cache speed in MHz */ |
601 | } klcpu_t ; | 601 | } klcpu_t ; |
602 | 602 | ||
603 | #define CPU_STRUCT_VERSION 2 | 603 | #define CPU_STRUCT_VERSION 2 |
604 | 604 | ||
605 | typedef struct klhub_s { /* HUB */ | 605 | typedef struct klhub_s { /* HUB */ |
606 | klinfo_t hub_info; | 606 | klinfo_t hub_info; |
607 | unsigned int hub_flags; /* PCFG_HUB_xxx flags */ | 607 | unsigned int hub_flags; /* PCFG_HUB_xxx flags */ |
608 | klport_t hub_port; /* hub is connected to this */ | 608 | klport_t hub_port; /* hub is connected to this */ |
609 | nic_t hub_box_nic; /* nic of containing box */ | 609 | nic_t hub_box_nic; /* nic of containing box */ |
610 | klconf_off_t hub_mfg_nic; /* MFG NIC string */ | 610 | klconf_off_t hub_mfg_nic; /* MFG NIC string */ |
@@ -612,36 +612,36 @@ typedef struct klhub_s { /* HUB */ | |||
612 | } klhub_t ; | 612 | } klhub_t ; |
613 | 613 | ||
614 | typedef struct klhub_uart_s { /* HUB */ | 614 | typedef struct klhub_uart_s { /* HUB */ |
615 | klinfo_t hubuart_info; | 615 | klinfo_t hubuart_info; |
616 | unsigned int hubuart_flags; /* PCFG_HUB_xxx flags */ | 616 | unsigned int hubuart_flags; /* PCFG_HUB_xxx flags */ |
617 | nic_t hubuart_box_nic; /* nic of containing box */ | 617 | nic_t hubuart_box_nic; /* nic of containing box */ |
618 | } klhub_uart_t ; | 618 | } klhub_uart_t ; |
619 | 619 | ||
620 | #define MEMORY_STRUCT_VERSION 2 | 620 | #define MEMORY_STRUCT_VERSION 2 |
621 | 621 | ||
622 | typedef struct klmembnk_s { /* MEMORY BANK */ | 622 | typedef struct klmembnk_s { /* MEMORY BANK */ |
623 | klinfo_t membnk_info; | 623 | klinfo_t membnk_info; |
624 | short membnk_memsz; /* Total memory in megabytes */ | 624 | short membnk_memsz; /* Total memory in megabytes */ |
625 | short membnk_dimm_select; /* bank to physical addr mapping*/ | 625 | short membnk_dimm_select; /* bank to physical addr mapping*/ |
626 | short membnk_bnksz[MD_MEM_BANKS]; /* Memory bank sizes */ | 626 | short membnk_bnksz[MD_MEM_BANKS]; /* Memory bank sizes */ |
627 | short membnk_attr; | 627 | short membnk_attr; |
628 | } klmembnk_t ; | 628 | } klmembnk_t ; |
629 | 629 | ||
630 | #define KLCONFIG_MEMBNK_SIZE(_info, _bank) \ | 630 | #define KLCONFIG_MEMBNK_SIZE(_info, _bank) \ |
631 | ((_info)->membnk_bnksz[(_bank)]) | 631 | ((_info)->membnk_bnksz[(_bank)]) |
632 | 632 | ||
633 | 633 | ||
634 | #define MEMBNK_PREMIUM 1 | 634 | #define MEMBNK_PREMIUM 1 |
635 | #define KLCONFIG_MEMBNK_PREMIUM(_info, _bank) \ | 635 | #define KLCONFIG_MEMBNK_PREMIUM(_info, _bank) \ |
636 | ((_info)->membnk_attr & (MEMBNK_PREMIUM << (_bank))) | 636 | ((_info)->membnk_attr & (MEMBNK_PREMIUM << (_bank))) |
637 | 637 | ||
638 | #define MAX_SERIAL_NUM_SIZE 10 | 638 | #define MAX_SERIAL_NUM_SIZE 10 |
639 | 639 | ||
640 | typedef struct klmod_serial_num_s { | 640 | typedef struct klmod_serial_num_s { |
641 | klinfo_t snum_info; | 641 | klinfo_t snum_info; |
642 | union { | 642 | union { |
643 | char snum_str[MAX_SERIAL_NUM_SIZE]; | 643 | char snum_str[MAX_SERIAL_NUM_SIZE]; |
644 | unsigned long long snum_int; | 644 | unsigned long long snum_int; |
645 | } snum; | 645 | } snum; |
646 | } klmod_serial_num_t; | 646 | } klmod_serial_num_t; |
647 | 647 | ||
@@ -650,43 +650,43 @@ typedef struct klmod_serial_num_s { | |||
650 | serial number struct as a component without losing compatibility | 650 | serial number struct as a component without losing compatibility |
651 | between prom versions. */ | 651 | between prom versions. */ |
652 | 652 | ||
653 | #define GET_SNUM_COMP(_l) ((klmod_serial_num_t *)\ | 653 | #define GET_SNUM_COMP(_l) ((klmod_serial_num_t *)\ |
654 | KLCF_COMP(_l, _l->brd_numcompts)) | 654 | KLCF_COMP(_l, _l->brd_numcompts)) |
655 | 655 | ||
656 | #define MAX_XBOW_LINKS 16 | 656 | #define MAX_XBOW_LINKS 16 |
657 | 657 | ||
658 | typedef struct klxbow_s { /* XBOW */ | 658 | typedef struct klxbow_s { /* XBOW */ |
659 | klinfo_t xbow_info ; | 659 | klinfo_t xbow_info ; |
660 | klport_t xbow_port_info[MAX_XBOW_LINKS] ; /* Module number */ | 660 | klport_t xbow_port_info[MAX_XBOW_LINKS] ; /* Module number */ |
661 | int xbow_master_hub_link; | 661 | int xbow_master_hub_link; |
662 | /* type of brd connected+component struct ptr+flags */ | 662 | /* type of brd connected+component struct ptr+flags */ |
663 | } klxbow_t ; | 663 | } klxbow_t ; |
664 | 664 | ||
665 | #define MAX_PCI_SLOTS 8 | 665 | #define MAX_PCI_SLOTS 8 |
666 | 666 | ||
667 | typedef struct klpci_device_s { | 667 | typedef struct klpci_device_s { |
668 | s32 pci_device_id; /* 32 bits of vendor/device ID. */ | 668 | s32 pci_device_id; /* 32 bits of vendor/device ID. */ |
669 | s32 pci_device_pad; /* 32 bits of padding. */ | 669 | s32 pci_device_pad; /* 32 bits of padding. */ |
670 | } klpci_device_t; | 670 | } klpci_device_t; |
671 | 671 | ||
672 | #define BRIDGE_STRUCT_VERSION 2 | 672 | #define BRIDGE_STRUCT_VERSION 2 |
673 | 673 | ||
674 | typedef struct klbri_s { /* BRIDGE */ | 674 | typedef struct klbri_s { /* BRIDGE */ |
675 | klinfo_t bri_info ; | 675 | klinfo_t bri_info ; |
676 | unsigned char bri_eprominfo ; /* IO6prom connected to bridge */ | 676 | unsigned char bri_eprominfo ; /* IO6prom connected to bridge */ |
677 | unsigned char bri_bustype ; /* PCI/VME BUS bridge/GIO */ | 677 | unsigned char bri_bustype ; /* PCI/VME BUS bridge/GIO */ |
678 | pci_t pci_specific ; /* PCI Board config info */ | 678 | pci_t pci_specific ; /* PCI Board config info */ |
679 | klpci_device_t bri_devices[MAX_PCI_DEVS] ; /* PCI IDs */ | 679 | klpci_device_t bri_devices[MAX_PCI_DEVS] ; /* PCI IDs */ |
680 | klconf_off_t bri_mfg_nic ; | 680 | klconf_off_t bri_mfg_nic ; |
681 | } klbri_t ; | 681 | } klbri_t ; |
682 | 682 | ||
683 | #define MAX_IOC3_TTY 2 | 683 | #define MAX_IOC3_TTY 2 |
684 | 684 | ||
685 | typedef struct klioc3_s { /* IOC3 */ | 685 | typedef struct klioc3_s { /* IOC3 */ |
686 | klinfo_t ioc3_info ; | 686 | klinfo_t ioc3_info ; |
687 | unsigned char ioc3_ssram ; /* Info about ssram */ | 687 | unsigned char ioc3_ssram ; /* Info about ssram */ |
688 | unsigned char ioc3_nvram ; /* Info about nvram */ | 688 | unsigned char ioc3_nvram ; /* Info about nvram */ |
689 | klinfo_t ioc3_superio ; /* Info about superio */ | 689 | klinfo_t ioc3_superio ; /* Info about superio */ |
690 | klconf_off_t ioc3_tty_off ; | 690 | klconf_off_t ioc3_tty_off ; |
691 | klinfo_t ioc3_enet ; | 691 | klinfo_t ioc3_enet ; |
692 | klconf_off_t ioc3_enet_off ; | 692 | klconf_off_t ioc3_enet_off ; |
@@ -695,27 +695,27 @@ typedef struct klioc3_s { /* IOC3 */ | |||
695 | 695 | ||
696 | #define MAX_VME_SLOTS 8 | 696 | #define MAX_VME_SLOTS 8 |
697 | 697 | ||
698 | typedef struct klvmeb_s { /* VME BRIDGE - PCI CTLR */ | 698 | typedef struct klvmeb_s { /* VME BRIDGE - PCI CTLR */ |
699 | klinfo_t vmeb_info ; | 699 | klinfo_t vmeb_info ; |
700 | vmeb_t vmeb_specific ; | 700 | vmeb_t vmeb_specific ; |
701 | klconf_off_t vmeb_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */ | 701 | klconf_off_t vmeb_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */ |
702 | } klvmeb_t ; | 702 | } klvmeb_t ; |
703 | 703 | ||
704 | typedef struct klvmed_s { /* VME DEVICE - VME BOARD */ | 704 | typedef struct klvmed_s { /* VME DEVICE - VME BOARD */ |
705 | klinfo_t vmed_info ; | 705 | klinfo_t vmed_info ; |
706 | vmed_t vmed_specific ; | 706 | vmed_t vmed_specific ; |
707 | klconf_off_t vmed_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */ | 707 | klconf_off_t vmed_brdinfo[MAX_VME_SLOTS] ; /* VME Board config info */ |
708 | } klvmed_t ; | 708 | } klvmed_t ; |
709 | 709 | ||
710 | #define ROUTER_VECTOR_VERS 2 | 710 | #define ROUTER_VECTOR_VERS 2 |
711 | 711 | ||
712 | /* XXX - Don't we need the number of ports here?!? */ | 712 | /* XXX - Don't we need the number of ports here?!? */ |
713 | typedef struct klrou_s { /* ROUTER */ | 713 | typedef struct klrou_s { /* ROUTER */ |
714 | klinfo_t rou_info ; | 714 | klinfo_t rou_info ; |
715 | unsigned int rou_flags ; /* PCFG_ROUTER_xxx flags */ | 715 | unsigned int rou_flags ; /* PCFG_ROUTER_xxx flags */ |
716 | nic_t rou_box_nic ; /* nic of the containing module */ | 716 | nic_t rou_box_nic ; /* nic of the containing module */ |
717 | klport_t rou_port[MAX_ROUTER_PORTS + 1] ; /* array index 1 to 6 */ | 717 | klport_t rou_port[MAX_ROUTER_PORTS + 1] ; /* array index 1 to 6 */ |
718 | klconf_off_t rou_mfg_nic ; /* MFG NIC string */ | 718 | klconf_off_t rou_mfg_nic ; /* MFG NIC string */ |
719 | u64 rou_vector; /* vector from master node */ | 719 | u64 rou_vector; /* vector from master node */ |
720 | } klrou_t ; | 720 | } klrou_t ; |
721 | 721 | ||
@@ -732,30 +732,30 @@ typedef struct klrou_s { /* ROUTER */ | |||
732 | #define KLGFX_COOKIE 0x0c0de000 | 732 | #define KLGFX_COOKIE 0x0c0de000 |
733 | 733 | ||
734 | typedef struct klgfx_s { /* GRAPHICS Device */ | 734 | typedef struct klgfx_s { /* GRAPHICS Device */ |
735 | klinfo_t gfx_info; | 735 | klinfo_t gfx_info; |
736 | klconf_off_t old_gndevs; /* for compatibility with older proms */ | 736 | klconf_off_t old_gndevs; /* for compatibility with older proms */ |
737 | klconf_off_t old_gdoff0; /* for compatibility with older proms */ | 737 | klconf_off_t old_gdoff0; /* for compatibility with older proms */ |
738 | unsigned int cookie; /* for compatibility with older proms */ | 738 | unsigned int cookie; /* for compatibility with older proms */ |
739 | unsigned int moduleslot; | 739 | unsigned int moduleslot; |
740 | struct klgfx_s *gfx_next_pipe; | 740 | struct klgfx_s *gfx_next_pipe; |
741 | graphics_t gfx_specific; | 741 | graphics_t gfx_specific; |
742 | klconf_off_t pad0; /* for compatibility with older proms */ | 742 | klconf_off_t pad0; /* for compatibility with older proms */ |
743 | klconf_off_t gfx_mfg_nic; | 743 | klconf_off_t gfx_mfg_nic; |
744 | } klgfx_t; | 744 | } klgfx_t; |
745 | 745 | ||
746 | typedef struct klxthd_s { | 746 | typedef struct klxthd_s { |
747 | klinfo_t xthd_info ; | 747 | klinfo_t xthd_info ; |
748 | klconf_off_t xthd_mfg_nic ; /* MFG NIC string */ | 748 | klconf_off_t xthd_mfg_nic ; /* MFG NIC string */ |
749 | } klxthd_t ; | 749 | } klxthd_t ; |
750 | 750 | ||
751 | typedef struct kltpu_s { /* TPU board */ | 751 | typedef struct kltpu_s { /* TPU board */ |
752 | klinfo_t tpu_info ; | 752 | klinfo_t tpu_info ; |
753 | klconf_off_t tpu_mfg_nic ; /* MFG NIC string */ | 753 | klconf_off_t tpu_mfg_nic ; /* MFG NIC string */ |
754 | } kltpu_t ; | 754 | } kltpu_t ; |
755 | 755 | ||
756 | typedef struct klgsn_s { /* GSN board */ | 756 | typedef struct klgsn_s { /* GSN board */ |
757 | klinfo_t gsn_info ; | 757 | klinfo_t gsn_info ; |
758 | klconf_off_t gsn_mfg_nic ; /* MFG NIC string */ | 758 | klconf_off_t gsn_mfg_nic ; /* MFG NIC string */ |
759 | } klgsn_t ; | 759 | } klgsn_t ; |
760 | 760 | ||
761 | #define MAX_SCSI_DEVS 16 | 761 | #define MAX_SCSI_DEVS 16 |
@@ -767,57 +767,57 @@ typedef struct klgsn_s { /* GSN board */ | |||
767 | * that as the size to be klmalloced. | 767 | * that as the size to be klmalloced. |
768 | */ | 768 | */ |
769 | 769 | ||
770 | typedef struct klscsi_s { /* SCSI Controller */ | 770 | typedef struct klscsi_s { /* SCSI Controller */ |
771 | klinfo_t scsi_info ; | 771 | klinfo_t scsi_info ; |
772 | scsi_t scsi_specific ; | 772 | scsi_t scsi_specific ; |
773 | unsigned char scsi_numdevs ; | 773 | unsigned char scsi_numdevs ; |
774 | klconf_off_t scsi_devinfo[MAX_SCSI_DEVS] ; | 774 | klconf_off_t scsi_devinfo[MAX_SCSI_DEVS] ; |
775 | } klscsi_t ; | 775 | } klscsi_t ; |
776 | 776 | ||
777 | typedef struct klscdev_s { /* SCSI device */ | 777 | typedef struct klscdev_s { /* SCSI device */ |
778 | klinfo_t scdev_info ; | 778 | klinfo_t scdev_info ; |
779 | struct scsidisk_data *scdev_cfg ; /* driver fills up this */ | 779 | struct scsidisk_data *scdev_cfg ; /* driver fills up this */ |
780 | } klscdev_t ; | 780 | } klscdev_t ; |
781 | 781 | ||
782 | typedef struct klttydev_s { /* TTY device */ | 782 | typedef struct klttydev_s { /* TTY device */ |
783 | klinfo_t ttydev_info ; | 783 | klinfo_t ttydev_info ; |
784 | struct terminal_data *ttydev_cfg ; /* driver fills up this */ | 784 | struct terminal_data *ttydev_cfg ; /* driver fills up this */ |
785 | } klttydev_t ; | 785 | } klttydev_t ; |
786 | 786 | ||
787 | typedef struct klenetdev_s { /* ENET device */ | 787 | typedef struct klenetdev_s { /* ENET device */ |
788 | klinfo_t enetdev_info ; | 788 | klinfo_t enetdev_info ; |
789 | struct net_data *enetdev_cfg ; /* driver fills up this */ | 789 | struct net_data *enetdev_cfg ; /* driver fills up this */ |
790 | } klenetdev_t ; | 790 | } klenetdev_t ; |
791 | 791 | ||
792 | typedef struct klkbddev_s { /* KBD device */ | 792 | typedef struct klkbddev_s { /* KBD device */ |
793 | klinfo_t kbddev_info ; | 793 | klinfo_t kbddev_info ; |
794 | struct keyboard_data *kbddev_cfg ; /* driver fills up this */ | 794 | struct keyboard_data *kbddev_cfg ; /* driver fills up this */ |
795 | } klkbddev_t ; | 795 | } klkbddev_t ; |
796 | 796 | ||
797 | typedef struct klmsdev_s { /* mouse device */ | 797 | typedef struct klmsdev_s { /* mouse device */ |
798 | klinfo_t msdev_info ; | 798 | klinfo_t msdev_info ; |
799 | void *msdev_cfg ; | 799 | void *msdev_cfg ; |
800 | } klmsdev_t ; | 800 | } klmsdev_t ; |
801 | 801 | ||
802 | #define MAX_FDDI_DEVS 10 /* XXX Is this true */ | 802 | #define MAX_FDDI_DEVS 10 /* XXX Is this true */ |
803 | 803 | ||
804 | typedef struct klfddi_s { /* FDDI */ | 804 | typedef struct klfddi_s { /* FDDI */ |
805 | klinfo_t fddi_info ; | 805 | klinfo_t fddi_info ; |
806 | fddi_t fddi_specific ; | 806 | fddi_t fddi_specific ; |
807 | klconf_off_t fddi_devinfo[MAX_FDDI_DEVS] ; | 807 | klconf_off_t fddi_devinfo[MAX_FDDI_DEVS] ; |
808 | } klfddi_t ; | 808 | } klfddi_t ; |
809 | 809 | ||
810 | typedef struct klmio_s { /* MIO */ | 810 | typedef struct klmio_s { /* MIO */ |
811 | klinfo_t mio_info ; | 811 | klinfo_t mio_info ; |
812 | mio_t mio_specific ; | 812 | mio_t mio_specific ; |
813 | } klmio_t ; | 813 | } klmio_t ; |
814 | 814 | ||
815 | 815 | ||
816 | typedef union klcomp_s { | 816 | typedef union klcomp_s { |
817 | klcpu_t kc_cpu; | 817 | klcpu_t kc_cpu; |
818 | klhub_t kc_hub; | 818 | klhub_t kc_hub; |
819 | klmembnk_t kc_mem; | 819 | klmembnk_t kc_mem; |
820 | klxbow_t kc_xbow; | 820 | klxbow_t kc_xbow; |
821 | klbri_t kc_bri; | 821 | klbri_t kc_bri; |
822 | klioc3_t kc_ioc3; | 822 | klioc3_t kc_ioc3; |
823 | klvmeb_t kc_vmeb; | 823 | klvmeb_t kc_vmeb; |
@@ -831,11 +831,11 @@ typedef union klcomp_s { | |||
831 | klmod_serial_num_t kc_snum ; | 831 | klmod_serial_num_t kc_snum ; |
832 | } klcomp_t; | 832 | } klcomp_t; |
833 | 833 | ||
834 | typedef union kldev_s { /* for device structure allocation */ | 834 | typedef union kldev_s { /* for device structure allocation */ |
835 | klscdev_t kc_scsi_dev ; | 835 | klscdev_t kc_scsi_dev ; |
836 | klttydev_t kc_tty_dev ; | 836 | klttydev_t kc_tty_dev ; |
837 | klenetdev_t kc_enet_dev ; | 837 | klenetdev_t kc_enet_dev ; |
838 | klkbddev_t kc_kbd_dev ; | 838 | klkbddev_t kc_kbd_dev ; |
839 | } kldev_t ; | 839 | } kldev_t ; |
840 | 840 | ||
841 | /* Data structure interface routines. TBD */ | 841 | /* Data structure interface routines. TBD */ |
diff --git a/arch/mips/include/asm/sn/kldir.h b/arch/mips/include/asm/sn/kldir.h index 1327e12e9645..bfb3aec94539 100644 --- a/arch/mips/include/asm/sn/kldir.h +++ b/arch/mips/include/asm/sn/kldir.h | |||
@@ -16,8 +16,8 @@ | |||
16 | * The kldir memory area resides at a fixed place in each node's memory and | 16 | * The kldir memory area resides at a fixed place in each node's memory and |
17 | * provides pointers to most other IP27 memory areas. This allows us to | 17 | * provides pointers to most other IP27 memory areas. This allows us to |
18 | * resize and/or relocate memory areas at a later time without breaking all | 18 | * resize and/or relocate memory areas at a later time without breaking all |
19 | * firmware and kernels that use them. Indices in the array are | 19 | * firmware and kernels that use them. Indices in the array are |
20 | * permanently dedicated to areas listed below. Some memory areas (marked | 20 | * permanently dedicated to areas listed below. Some memory areas (marked |
21 | * below) reside at a permanently fixed location, but are included in the | 21 | * below) reside at a permanently fixed location, but are included in the |
22 | * directory for completeness. | 22 | * directory for completeness. |
23 | */ | 23 | */ |
@@ -28,98 +28,98 @@ | |||
28 | * The upper portion of the memory map applies during boot | 28 | * The upper portion of the memory map applies during boot |
29 | * only and is overwritten by IRIX/SYMMON. | 29 | * only and is overwritten by IRIX/SYMMON. |
30 | * | 30 | * |
31 | * MEMORY MAP PER NODE | 31 | * MEMORY MAP PER NODE |
32 | * | 32 | * |
33 | * 0x2000000 (32M) +-----------------------------------------+ | 33 | * 0x2000000 (32M) +-----------------------------------------+ |
34 | * | IO6 BUFFERS FOR FLASH ENET IOC3 | | 34 | * | IO6 BUFFERS FOR FLASH ENET IOC3 | |
35 | * 0x1F80000 (31.5M) +-----------------------------------------+ | 35 | * 0x1F80000 (31.5M) +-----------------------------------------+ |
36 | * | IO6 TEXT/DATA/BSS/stack | | 36 | * | IO6 TEXT/DATA/BSS/stack | |
37 | * 0x1C00000 (30M) +-----------------------------------------+ | 37 | * 0x1C00000 (30M) +-----------------------------------------+ |
38 | * | IO6 PROM DEBUG TEXT/DATA/BSS/stack | | 38 | * | IO6 PROM DEBUG TEXT/DATA/BSS/stack | |
39 | * 0x0800000 (28M) +-----------------------------------------+ | 39 | * 0x0800000 (28M) +-----------------------------------------+ |
40 | * | IP27 PROM TEXT/DATA/BSS/stack | | 40 | * | IP27 PROM TEXT/DATA/BSS/stack | |
41 | * 0x1B00000 (27M) +-----------------------------------------+ | 41 | * 0x1B00000 (27M) +-----------------------------------------+ |
42 | * | IP27 CFG | | 42 | * | IP27 CFG | |
43 | * 0x1A00000 (26M) +-----------------------------------------+ | 43 | * 0x1A00000 (26M) +-----------------------------------------+ |
44 | * | Graphics PROM | | 44 | * | Graphics PROM | |
45 | * 0x1800000 (24M) +-----------------------------------------+ | 45 | * 0x1800000 (24M) +-----------------------------------------+ |
46 | * | 3rd Party PROM drivers | | 46 | * | 3rd Party PROM drivers | |
47 | * 0x1600000 (22M) +-----------------------------------------+ | 47 | * 0x1600000 (22M) +-----------------------------------------+ |
48 | * | | | 48 | * | | |
49 | * | Free | | 49 | * | Free | |
50 | * | | | 50 | * | | |
51 | * +-----------------------------------------+ | 51 | * +-----------------------------------------+ |
52 | * | UNIX DEBUG Version | | 52 | * | UNIX DEBUG Version | |
53 | * 0x190000 (2M--) +-----------------------------------------+ | 53 | * 0x190000 (2M--) +-----------------------------------------+ |
54 | * | SYMMON | | 54 | * | SYMMON | |
55 | * | (For UNIX Debug only) | | 55 | * | (For UNIX Debug only) | |
56 | * 0x34000 (208K) +-----------------------------------------+ | 56 | * 0x34000 (208K) +-----------------------------------------+ |
57 | * | SYMMON STACK [NUM_CPU_PER_NODE] | | 57 | * | SYMMON STACK [NUM_CPU_PER_NODE] | |
58 | * | (For UNIX Debug only) | | 58 | * | (For UNIX Debug only) | |
59 | * 0x25000 (148K) +-----------------------------------------+ | 59 | * 0x25000 (148K) +-----------------------------------------+ |
60 | * | KLCONFIG - II (temp) | | 60 | * | KLCONFIG - II (temp) | |
61 | * | | | 61 | * | | |
62 | * | ---------------------------- | | 62 | * | ---------------------------- | |
63 | * | | | 63 | * | | |
64 | * | UNIX NON-DEBUG Version | | 64 | * | UNIX NON-DEBUG Version | |
65 | * 0x19000 (100K) +-----------------------------------------+ | 65 | * 0x19000 (100K) +-----------------------------------------+ |
66 | * | 66 | * |
67 | * | 67 | * |
68 | * The lower portion of the memory map contains information that is | 68 | * The lower portion of the memory map contains information that is |
69 | * permanent and is used by the IP27PROM, IO6PROM and IRIX. | 69 | * permanent and is used by the IP27PROM, IO6PROM and IRIX. |
70 | * | 70 | * |
71 | * 0x19000 (100K) +-----------------------------------------+ | 71 | * 0x19000 (100K) +-----------------------------------------+ |
72 | * | | | 72 | * | | |
73 | * | PI Error Spools (32K) | | 73 | * | PI Error Spools (32K) | |
74 | * | | | 74 | * | | |
75 | * 0x12000 (72K) +-----------------------------------------+ | 75 | * 0x12000 (72K) +-----------------------------------------+ |
76 | * | Unused | | 76 | * | Unused | |
77 | * 0x11c00 (71K) +-----------------------------------------+ | 77 | * 0x11c00 (71K) +-----------------------------------------+ |
78 | * | CPU 1 NMI Eframe area | | 78 | * | CPU 1 NMI Eframe area | |
79 | * 0x11a00 (70.5K) +-----------------------------------------+ | 79 | * 0x11a00 (70.5K) +-----------------------------------------+ |
80 | * | CPU 0 NMI Eframe area | | 80 | * | CPU 0 NMI Eframe area | |
81 | * 0x11800 (70K) +-----------------------------------------+ | 81 | * 0x11800 (70K) +-----------------------------------------+ |
82 | * | CPU 1 NMI Register save area | | 82 | * | CPU 1 NMI Register save area | |
83 | * 0x11600 (69.5K) +-----------------------------------------+ | 83 | * 0x11600 (69.5K) +-----------------------------------------+ |
84 | * | CPU 0 NMI Register save area | | 84 | * | CPU 0 NMI Register save area | |
85 | * 0x11400 (69K) +-----------------------------------------+ | 85 | * 0x11400 (69K) +-----------------------------------------+ |
86 | * | GDA (1k) | | 86 | * | GDA (1k) | |
87 | * 0x11000 (68K) +-----------------------------------------+ | 87 | * 0x11000 (68K) +-----------------------------------------+ |
88 | * | Early cache Exception stack | | 88 | * | Early cache Exception stack | |
89 | * | and/or | | 89 | * | and/or | |
90 | * | kernel/io6prom nmi registers | | 90 | * | kernel/io6prom nmi registers | |
91 | * 0x10800 (66k) +-----------------------------------------+ | 91 | * 0x10800 (66k) +-----------------------------------------+ |
92 | * | cache error eframe | | 92 | * | cache error eframe | |
93 | * 0x10400 (65K) +-----------------------------------------+ | 93 | * 0x10400 (65K) +-----------------------------------------+ |
94 | * | Exception Handlers (UALIAS copy) | | 94 | * | Exception Handlers (UALIAS copy) | |
95 | * 0x10000 (64K) +-----------------------------------------+ | 95 | * 0x10000 (64K) +-----------------------------------------+ |
96 | * | | | 96 | * | | |
97 | * | | | 97 | * | | |
98 | * | KLCONFIG - I (permanent) (48K) | | 98 | * | KLCONFIG - I (permanent) (48K) | |
99 | * | | | 99 | * | | |
100 | * | | | 100 | * | | |
101 | * | | | 101 | * | | |
102 | * 0x4000 (16K) +-----------------------------------------+ | 102 | * 0x4000 (16K) +-----------------------------------------+ |
103 | * | NMI Handler (Protected Page) | | 103 | * | NMI Handler (Protected Page) | |
104 | * 0x3000 (12K) +-----------------------------------------+ | 104 | * 0x3000 (12K) +-----------------------------------------+ |
105 | * | ARCS PVECTORS (master node only) | | 105 | * | ARCS PVECTORS (master node only) | |
106 | * 0x2c00 (11K) +-----------------------------------------+ | 106 | * 0x2c00 (11K) +-----------------------------------------+ |
107 | * | ARCS TVECTORS (master node only) | | 107 | * | ARCS TVECTORS (master node only) | |
108 | * 0x2800 (10K) +-----------------------------------------+ | 108 | * 0x2800 (10K) +-----------------------------------------+ |
109 | * | LAUNCH [NUM_CPU] | | 109 | * | LAUNCH [NUM_CPU] | |
110 | * 0x2400 (9K) +-----------------------------------------+ | 110 | * 0x2400 (9K) +-----------------------------------------+ |
111 | * | Low memory directory (KLDIR) | | 111 | * | Low memory directory (KLDIR) | |
112 | * 0x2000 (8K) +-----------------------------------------+ | 112 | * 0x2000 (8K) +-----------------------------------------+ |
113 | * | ARCS SPB (1K) | | 113 | * | ARCS SPB (1K) | |
114 | * 0x1000 (4K) +-----------------------------------------+ | 114 | * 0x1000 (4K) +-----------------------------------------+ |
115 | * | Early cache Exception stack | | 115 | * | Early cache Exception stack | |
116 | * | and/or | | 116 | * | and/or | |
117 | * | kernel/io6prom nmi registers | | 117 | * | kernel/io6prom nmi registers | |
118 | * 0x800 (2k) +-----------------------------------------+ | 118 | * 0x800 (2k) +-----------------------------------------+ |
119 | * | cache error eframe | | 119 | * | cache error eframe | |
120 | * 0x400 (1K) +-----------------------------------------+ | 120 | * 0x400 (1K) +-----------------------------------------+ |
121 | * | Exception Handlers | | 121 | * | Exception Handlers | |
122 | * 0x0 (0K) +-----------------------------------------+ | 122 | * 0x0 (0K) +-----------------------------------------+ |
123 | */ | 123 | */ |
124 | 124 | ||
125 | #ifdef __ASSEMBLY__ | 125 | #ifdef __ASSEMBLY__ |
@@ -202,13 +202,13 @@ | |||
202 | 202 | ||
203 | #ifndef __ASSEMBLY__ | 203 | #ifndef __ASSEMBLY__ |
204 | typedef struct kldir_ent_s { | 204 | typedef struct kldir_ent_s { |
205 | u64 magic; /* Indicates validity of entry */ | 205 | u64 magic; /* Indicates validity of entry */ |
206 | off_t offset; /* Offset from start of node space */ | 206 | off_t offset; /* Offset from start of node space */ |
207 | unsigned long pointer; /* Pointer to area in some cases */ | 207 | unsigned long pointer; /* Pointer to area in some cases */ |
208 | size_t size; /* Size in bytes */ | 208 | size_t size; /* Size in bytes */ |
209 | u64 count; /* Repeat count if array, 1 if not */ | 209 | u64 count; /* Repeat count if array, 1 if not */ |
210 | size_t stride; /* Stride if array, 0 if not */ | 210 | size_t stride; /* Stride if array, 0 if not */ |
211 | char rsvd[16]; /* Pad entry to 0x40 bytes */ | 211 | char rsvd[16]; /* Pad entry to 0x40 bytes */ |
212 | /* NOTE: These 16 bytes are used in the Partition KLDIR | 212 | /* NOTE: These 16 bytes are used in the Partition KLDIR |
213 | entry to store partition info. Refer to klpart.h for this. */ | 213 | entry to store partition info. Refer to klpart.h for this. */ |
214 | } kldir_ent_t; | 214 | } kldir_ent_t; |
diff --git a/arch/mips/include/asm/sn/launch.h b/arch/mips/include/asm/sn/launch.h index b7c2226312c6..04226d8d30c4 100644 --- a/arch/mips/include/asm/sn/launch.h +++ b/arch/mips/include/asm/sn/launch.h | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | * The master stores launch parameters in the launch structure | 20 | * The master stores launch parameters in the launch structure |
21 | * corresponding to a target processor that is in a slave loop, then sends | 21 | * corresponding to a target processor that is in a slave loop, then sends |
22 | * an interrupt to the slave processor. The slave calls the desired | 22 | * an interrupt to the slave processor. The slave calls the desired |
23 | * function, then returns to the slave loop. The master may poll or wait | 23 | * function, then returns to the slave loop. The master may poll or wait |
24 | * for the slaves to finish. | 24 | * for the slaves to finish. |
25 | * | 25 | * |
@@ -33,7 +33,7 @@ | |||
33 | #define LAUNCH_PADSZ 0xa0 | 33 | #define LAUNCH_PADSZ 0xa0 |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #define LAUNCH_OFF_MAGIC 0x00 /* Struct offsets for assembly */ | 36 | #define LAUNCH_OFF_MAGIC 0x00 /* Struct offsets for assembly */ |
37 | #define LAUNCH_OFF_BUSY 0x08 | 37 | #define LAUNCH_OFF_BUSY 0x08 |
38 | #define LAUNCH_OFF_CALL 0x10 | 38 | #define LAUNCH_OFF_CALL 0x10 |
39 | #define LAUNCH_OFF_CALLC 0x18 | 39 | #define LAUNCH_OFF_CALLC 0x18 |
@@ -44,7 +44,7 @@ | |||
44 | #define LAUNCH_OFF_BEVNORMAL 0x40 | 44 | #define LAUNCH_OFF_BEVNORMAL 0x40 |
45 | #define LAUNCH_OFF_BEVECC 0x48 | 45 | #define LAUNCH_OFF_BEVECC 0x48 |
46 | 46 | ||
47 | #define LAUNCH_STATE_DONE 0 /* Return value of LAUNCH_POLL */ | 47 | #define LAUNCH_STATE_DONE 0 /* Return value of LAUNCH_POLL */ |
48 | #define LAUNCH_STATE_SENT 1 | 48 | #define LAUNCH_STATE_SENT 1 |
49 | #define LAUNCH_STATE_RECD 2 | 49 | #define LAUNCH_STATE_RECD 2 |
50 | 50 | ||
@@ -65,16 +65,16 @@ typedef int launch_state_t; | |||
65 | typedef void (*launch_proc_t)(u64 call_parm); | 65 | typedef void (*launch_proc_t)(u64 call_parm); |
66 | 66 | ||
67 | typedef struct launch_s { | 67 | typedef struct launch_s { |
68 | volatile u64 magic; /* Magic number */ | 68 | volatile u64 magic; /* Magic number */ |
69 | volatile u64 busy; /* Slave currently active */ | 69 | volatile u64 busy; /* Slave currently active */ |
70 | volatile launch_proc_t call_addr; /* Func. for slave to call */ | 70 | volatile launch_proc_t call_addr; /* Func. for slave to call */ |
71 | volatile u64 call_addr_c; /* 1's complement of call_addr*/ | 71 | volatile u64 call_addr_c; /* 1's complement of call_addr*/ |
72 | volatile u64 call_parm; /* Single parm passed to call*/ | 72 | volatile u64 call_parm; /* Single parm passed to call*/ |
73 | volatile void *stack_addr; /* Stack pointer for slave function */ | 73 | volatile void *stack_addr; /* Stack pointer for slave function */ |
74 | volatile void *gp_addr; /* Global pointer for slave func. */ | 74 | volatile void *gp_addr; /* Global pointer for slave func. */ |
75 | volatile char *bevutlb;/* Address of bev utlb ex handler */ | 75 | volatile char *bevutlb;/* Address of bev utlb ex handler */ |
76 | volatile char *bevnormal;/*Address of bev normal ex handler */ | 76 | volatile char *bevnormal;/*Address of bev normal ex handler */ |
77 | volatile char *bevecc;/* Address of bev cache err handler */ | 77 | volatile char *bevecc;/* Address of bev cache err handler */ |
78 | volatile char pad[160]; /* Pad to LAUNCH_SIZEOF */ | 78 | volatile char pad[160]; /* Pad to LAUNCH_SIZEOF */ |
79 | } launch_t; | 79 | } launch_t; |
80 | 80 | ||
diff --git a/arch/mips/include/asm/sn/mapped_kernel.h b/arch/mips/include/asm/sn/mapped_kernel.h index 721496a0bb92..401f3b0eee17 100644 --- a/arch/mips/include/asm/sn/mapped_kernel.h +++ b/arch/mips/include/asm/sn/mapped_kernel.h | |||
@@ -48,7 +48,7 @@ | |||
48 | 48 | ||
49 | #endif /* CONFIG_MAPPED_KERNEL */ | 49 | #endif /* CONFIG_MAPPED_KERNEL */ |
50 | 50 | ||
51 | #define MAPPED_KERN_RO_TO_K0(x) PHYS_TO_K0(MAPPED_KERN_RO_TO_PHYS(x)) | 51 | #define MAPPED_KERN_RO_TO_K0(x) PHYS_TO_K0(MAPPED_KERN_RO_TO_PHYS(x)) |
52 | #define MAPPED_KERN_RW_TO_K0(x) PHYS_TO_K0(MAPPED_KERN_RW_TO_PHYS(x)) | 52 | #define MAPPED_KERN_RW_TO_K0(x) PHYS_TO_K0(MAPPED_KERN_RW_TO_PHYS(x)) |
53 | 53 | ||
54 | #endif /* __ASM_SN_MAPPED_KERNEL_H */ | 54 | #endif /* __ASM_SN_MAPPED_KERNEL_H */ |
diff --git a/arch/mips/include/asm/sn/nmi.h b/arch/mips/include/asm/sn/nmi.h index 1af49897d4e1..12ac210f12a1 100644 --- a/arch/mips/include/asm/sn/nmi.h +++ b/arch/mips/include/asm/sn/nmi.h | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | * The master stores launch parameters in the launch structure | 20 | * The master stores launch parameters in the launch structure |
21 | * corresponding to a target processor that is in a slave loop, then sends | 21 | * corresponding to a target processor that is in a slave loop, then sends |
22 | * an interrupt to the slave processor. The slave calls the desired | 22 | * an interrupt to the slave processor. The slave calls the desired |
23 | * function, followed by an optional rendezvous function, then returns to | 23 | * function, followed by an optional rendezvous function, then returns to |
24 | * the slave loop. The master does not wait for the slaves before | 24 | * the slave loop. The master does not wait for the slaves before |
25 | * returning. | 25 | * returning. |
@@ -31,7 +31,7 @@ | |||
31 | #define NMI_MAGIC 0x48414d4d455201 | 31 | #define NMI_MAGIC 0x48414d4d455201 |
32 | #define NMI_SIZEOF 0x40 | 32 | #define NMI_SIZEOF 0x40 |
33 | 33 | ||
34 | #define NMI_OFF_MAGIC 0x00 /* Struct offsets for assembly */ | 34 | #define NMI_OFF_MAGIC 0x00 /* Struct offsets for assembly */ |
35 | #define NMI_OFF_FLAGS 0x08 | 35 | #define NMI_OFF_FLAGS 0x08 |
36 | #define NMI_OFF_CALL 0x10 | 36 | #define NMI_OFF_CALL 0x10 |
37 | #define NMI_OFF_CALLC 0x18 | 37 | #define NMI_OFF_CALLC 0x18 |
@@ -53,8 +53,8 @@ | |||
53 | typedef struct nmi_s { | 53 | typedef struct nmi_s { |
54 | volatile unsigned long magic; /* Magic number */ | 54 | volatile unsigned long magic; /* Magic number */ |
55 | volatile unsigned long flags; /* Combination of flags above */ | 55 | volatile unsigned long flags; /* Combination of flags above */ |
56 | volatile void *call_addr; /* Routine for slave to call */ | 56 | volatile void *call_addr; /* Routine for slave to call */ |
57 | volatile void *call_addr_c; /* 1's complement of address */ | 57 | volatile void *call_addr_c; /* 1's complement of address */ |
58 | volatile void *call_parm; /* Single parm passed to call */ | 58 | volatile void *call_parm; /* Single parm passed to call */ |
59 | volatile unsigned long gmaster; /* Flag true only on global master*/ | 59 | volatile unsigned long gmaster; /* Flag true only on global master*/ |
60 | } nmi_t; | 60 | } nmi_t; |
diff --git a/arch/mips/include/asm/sn/sn0/addrs.h b/arch/mips/include/asm/sn/sn0/addrs.h index b06190093bbc..6b53070f400f 100644 --- a/arch/mips/include/asm/sn/sn0/addrs.h +++ b/arch/mips/include/asm/sn/sn0/addrs.h | |||
@@ -29,7 +29,7 @@ | |||
29 | * chapter of the Hub specification. | 29 | * chapter of the Hub specification. |
30 | * | 30 | * |
31 | * NOTE: This header file is included both by C and by assembler source | 31 | * NOTE: This header file is included both by C and by assembler source |
32 | * files. Please bracket any language-dependent definitions | 32 | * files. Please bracket any language-dependent definitions |
33 | * appropriately. | 33 | * appropriately. |
34 | */ | 34 | */ |
35 | 35 | ||
@@ -102,14 +102,14 @@ | |||
102 | 102 | ||
103 | #define BWIN_INDEX_BITS 3 | 103 | #define BWIN_INDEX_BITS 3 |
104 | #define BWIN_SIZE (UINT64_CAST 1 << BWIN_SIZE_BITS) | 104 | #define BWIN_SIZE (UINT64_CAST 1 << BWIN_SIZE_BITS) |
105 | #define BWIN_SIZEMASK (BWIN_SIZE - 1) | 105 | #define BWIN_SIZEMASK (BWIN_SIZE - 1) |
106 | #define BWIN_WIDGET_MASK 0x7 | 106 | #define BWIN_WIDGET_MASK 0x7 |
107 | #define NODE_BWIN_BASE0(nasid) (NODE_IO_BASE(nasid) + BWIN_SIZE) | 107 | #define NODE_BWIN_BASE0(nasid) (NODE_IO_BASE(nasid) + BWIN_SIZE) |
108 | #define NODE_BWIN_BASE(nasid, bigwin) (NODE_BWIN_BASE0(nasid) + \ | 108 | #define NODE_BWIN_BASE(nasid, bigwin) (NODE_BWIN_BASE0(nasid) + \ |
109 | (UINT64_CAST(bigwin) << BWIN_SIZE_BITS)) | 109 | (UINT64_CAST(bigwin) << BWIN_SIZE_BITS)) |
110 | 110 | ||
111 | #define BWIN_WIDGETADDR(addr) ((addr) & BWIN_SIZEMASK) | 111 | #define BWIN_WIDGETADDR(addr) ((addr) & BWIN_SIZEMASK) |
112 | #define BWIN_WINDOWNUM(addr) (((addr) >> BWIN_SIZE_BITS) & BWIN_WIDGET_MASK) | 112 | #define BWIN_WINDOWNUM(addr) (((addr) >> BWIN_SIZE_BITS) & BWIN_WIDGET_MASK) |
113 | /* | 113 | /* |
114 | * Verify if addr belongs to large window address of node with "nasid" | 114 | * Verify if addr belongs to large window address of node with "nasid" |
115 | * | 115 | * |
@@ -120,7 +120,7 @@ | |||
120 | * | 120 | * |
121 | */ | 121 | */ |
122 | 122 | ||
123 | #define NODE_BWIN_ADDR(nasid, addr) \ | 123 | #define NODE_BWIN_ADDR(nasid, addr) \ |
124 | (((addr) >= NODE_BWIN_BASE0(nasid)) && \ | 124 | (((addr) >= NODE_BWIN_BASE0(nasid)) && \ |
125 | ((addr) < (NODE_BWIN_BASE(nasid, HUB_NUM_BIG_WINDOW) + \ | 125 | ((addr) < (NODE_BWIN_BASE(nasid, HUB_NUM_BIG_WINDOW) + \ |
126 | BWIN_SIZE))) | 126 | BWIN_SIZE))) |
@@ -129,7 +129,7 @@ | |||
129 | * The following define the major position-independent aliases used | 129 | * The following define the major position-independent aliases used |
130 | * in SN0. | 130 | * in SN0. |
131 | * CALIAS -- Varies in size, points to the first n bytes of memory | 131 | * CALIAS -- Varies in size, points to the first n bytes of memory |
132 | * on the reader's node. | 132 | * on the reader's node. |
133 | */ | 133 | */ |
134 | 134 | ||
135 | #define CALIAS_BASE CAC_BASE | 135 | #define CALIAS_BASE CAC_BASE |
@@ -146,7 +146,7 @@ | |||
146 | 146 | ||
147 | #ifndef __ASSEMBLY__ | 147 | #ifndef __ASSEMBLY__ |
148 | #define KERN_NMI_ADDR(nasid, slice) \ | 148 | #define KERN_NMI_ADDR(nasid, slice) \ |
149 | TO_NODE_UNCAC((nasid), IP27_NMI_KREGS_OFFSET + \ | 149 | TO_NODE_UNCAC((nasid), IP27_NMI_KREGS_OFFSET + \ |
150 | (IP27_NMI_KREGS_CPU_SIZE * (slice))) | 150 | (IP27_NMI_KREGS_CPU_SIZE * (slice))) |
151 | #endif /* !__ASSEMBLY__ */ | 151 | #endif /* !__ASSEMBLY__ */ |
152 | 152 | ||
@@ -203,7 +203,7 @@ | |||
203 | 203 | ||
204 | #define IO6PROM_BASE PHYS_TO_K0(0x01c00000) | 204 | #define IO6PROM_BASE PHYS_TO_K0(0x01c00000) |
205 | #define IO6PROM_SIZE 0x400000 | 205 | #define IO6PROM_SIZE 0x400000 |
206 | #define IO6PROM_BASE_MAPPED (UNCAC_BASE | 0x11c00000) | 206 | #define IO6PROM_BASE_MAPPED (UNCAC_BASE | 0x11c00000) |
207 | #define IO6DPROM_BASE PHYS_TO_K0(0x01c00000) | 207 | #define IO6DPROM_BASE PHYS_TO_K0(0x01c00000) |
208 | #define IO6DPROM_SIZE 0x200000 | 208 | #define IO6DPROM_SIZE 0x200000 |
209 | 209 | ||
diff --git a/arch/mips/include/asm/sn/sn0/arch.h b/arch/mips/include/asm/sn/sn0/arch.h index f734f2007f24..425a67e6a947 100644 --- a/arch/mips/include/asm/sn/sn0/arch.h +++ b/arch/mips/include/asm/sn/sn0/arch.h | |||
@@ -12,23 +12,23 @@ | |||
12 | #define _ASM_SN_SN0_ARCH_H | 12 | #define _ASM_SN_SN0_ARCH_H |
13 | 13 | ||
14 | 14 | ||
15 | #ifndef SN0XXL /* 128 cpu SMP max */ | 15 | #ifndef SN0XXL /* 128 cpu SMP max */ |
16 | /* | 16 | /* |
17 | * This is the maximum number of nodes that can be part of a kernel. | 17 | * This is the maximum number of nodes that can be part of a kernel. |
18 | * Effectively, it's the maximum number of compact node ids (cnodeid_t). | 18 | * Effectively, it's the maximum number of compact node ids (cnodeid_t). |
19 | */ | 19 | */ |
20 | #define MAX_COMPACT_NODES 64 | 20 | #define MAX_COMPACT_NODES 64 |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * MAXCPUS refers to the maximum number of CPUs in a single kernel. | 23 | * MAXCPUS refers to the maximum number of CPUs in a single kernel. |
24 | * This is not necessarily the same as MAXNODES * CPUS_PER_NODE | 24 | * This is not necessarily the same as MAXNODES * CPUS_PER_NODE |
25 | */ | 25 | */ |
26 | #define MAXCPUS 128 | 26 | #define MAXCPUS 128 |
27 | 27 | ||
28 | #else /* SN0XXL system */ | 28 | #else /* SN0XXL system */ |
29 | 29 | ||
30 | #define MAX_COMPACT_NODES 128 | 30 | #define MAX_COMPACT_NODES 128 |
31 | #define MAXCPUS 256 | 31 | #define MAXCPUS 256 |
32 | 32 | ||
33 | #endif /* SN0XXL */ | 33 | #endif /* SN0XXL */ |
34 | 34 | ||
@@ -41,9 +41,9 @@ | |||
41 | /* | 41 | /* |
42 | * MAX_REGIONS refers to the maximum number of hardware partitioned regions. | 42 | * MAX_REGIONS refers to the maximum number of hardware partitioned regions. |
43 | */ | 43 | */ |
44 | #define MAX_REGIONS 64 | 44 | #define MAX_REGIONS 64 |
45 | #define MAX_NONPREMIUM_REGIONS 16 | 45 | #define MAX_NONPREMIUM_REGIONS 16 |
46 | #define MAX_PREMIUM_REGIONS MAX_REGIONS | 46 | #define MAX_PREMIUM_REGIONS MAX_REGIONS |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * MAX_PARITIONS refers to the maximum number of logically defined | 49 | * MAX_PARITIONS refers to the maximum number of logically defined |
@@ -57,12 +57,12 @@ | |||
57 | * Slot constants for SN0 | 57 | * Slot constants for SN0 |
58 | */ | 58 | */ |
59 | #ifdef CONFIG_SGI_SN_N_MODE | 59 | #ifdef CONFIG_SGI_SN_N_MODE |
60 | #define MAX_MEM_SLOTS 16 /* max slots per node */ | 60 | #define MAX_MEM_SLOTS 16 /* max slots per node */ |
61 | #else /* !CONFIG_SGI_SN_N_MODE, assume CONFIG_SGI_SN_M_MODE */ | 61 | #else /* !CONFIG_SGI_SN_N_MODE, assume CONFIG_SGI_SN_M_MODE */ |
62 | #define MAX_MEM_SLOTS 32 /* max slots per node */ | 62 | #define MAX_MEM_SLOTS 32 /* max slots per node */ |
63 | #endif /* CONFIG_SGI_SN_M_MODE */ | 63 | #endif /* CONFIG_SGI_SN_M_MODE */ |
64 | 64 | ||
65 | #define SLOT_SHIFT (27) | 65 | #define SLOT_SHIFT (27) |
66 | #define SLOT_MIN_MEM_SIZE (32*1024*1024) | 66 | #define SLOT_MIN_MEM_SIZE (32*1024*1024) |
67 | 67 | ||
68 | #define CPUS_PER_NODE 2 /* CPUs on a single hub */ | 68 | #define CPUS_PER_NODE 2 /* CPUs on a single hub */ |
diff --git a/arch/mips/include/asm/sn/sn0/hub.h b/arch/mips/include/asm/sn/sn0/hub.h index 3e228f8e7969..d78dd76d5dcf 100644 --- a/arch/mips/include/asm/sn/sn0/hub.h +++ b/arch/mips/include/asm/sn/sn0/hub.h | |||
@@ -19,8 +19,8 @@ | |||
19 | #define HUB_REV_2_0 2 | 19 | #define HUB_REV_2_0 2 |
20 | #define HUB_REV_2_1 3 | 20 | #define HUB_REV_2_1 3 |
21 | #define HUB_REV_2_2 4 | 21 | #define HUB_REV_2_2 4 |
22 | #define HUB_REV_2_3 5 | 22 | #define HUB_REV_2_3 5 |
23 | #define HUB_REV_2_4 6 | 23 | #define HUB_REV_2_4 6 |
24 | 24 | ||
25 | #define MAX_HUB_PATH 80 | 25 | #define MAX_HUB_PATH 80 |
26 | 26 | ||
@@ -32,9 +32,9 @@ | |||
32 | //#include <asm/sn/sn0/hubcore.h> | 32 | //#include <asm/sn/sn0/hubcore.h> |
33 | 33 | ||
34 | /* Translation of uncached attributes */ | 34 | /* Translation of uncached attributes */ |
35 | #define UATTR_HSPEC 0 | 35 | #define UATTR_HSPEC 0 |
36 | #define UATTR_IO 1 | 36 | #define UATTR_IO 1 |
37 | #define UATTR_MSPEC 2 | 37 | #define UATTR_MSPEC 2 |
38 | #define UATTR_UNCAC 3 | 38 | #define UATTR_UNCAC 3 |
39 | 39 | ||
40 | #endif /* _ASM_SN_SN0_HUB_H */ | 40 | #endif /* _ASM_SN_SN0_HUB_H */ |
diff --git a/arch/mips/include/asm/sn/sn0/hubio.h b/arch/mips/include/asm/sn/sn0/hubio.h index 46286d8302a7..5998b13e9764 100644 --- a/arch/mips/include/asm/sn/sn0/hubio.h +++ b/arch/mips/include/asm/sn/sn0/hubio.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. |
9 | * Copyright (C) 1999 by Ralf Baechle | 9 | * Copyright (C) 1999 by Ralf Baechle |
10 | */ | 10 | */ |
11 | #ifndef _ASM_SGI_SN_SN0_HUBIO_H | 11 | #ifndef _ASM_SGI_SN_SN0_HUBIO_H |
12 | #define _ASM_SGI_SN_SN0_HUBIO_H | 12 | #define _ASM_SGI_SN_SN0_HUBIO_H |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * Hub I/O interface registers | 15 | * Hub I/O interface registers |
@@ -22,7 +22,7 @@ | |||
22 | * Slightly friendlier names for some common registers. | 22 | * Slightly friendlier names for some common registers. |
23 | * The hardware definitions follow. | 23 | * The hardware definitions follow. |
24 | */ | 24 | */ |
25 | #define IIO_WIDGET IIO_WID /* Widget identification */ | 25 | #define IIO_WIDGET IIO_WID /* Widget identification */ |
26 | #define IIO_WIDGET_STAT IIO_WSTAT /* Widget status register */ | 26 | #define IIO_WIDGET_STAT IIO_WSTAT /* Widget status register */ |
27 | #define IIO_WIDGET_CTRL IIO_WCR /* Widget control register */ | 27 | #define IIO_WIDGET_CTRL IIO_WCR /* Widget control register */ |
28 | #define IIO_WIDGET_TOUT IIO_WRTO /* Widget request timeout */ | 28 | #define IIO_WIDGET_TOUT IIO_WRTO /* Widget request timeout */ |
@@ -37,21 +37,21 @@ | |||
37 | #define IIO_XTALKCC_TOUT IIO_IXCC /* Xtalk credit count timeout*/ | 37 | #define IIO_XTALKCC_TOUT IIO_IXCC /* Xtalk credit count timeout*/ |
38 | #define IIO_XTALKTT_TOUT IIO_IXTT /* Xtalk tail timeout */ | 38 | #define IIO_XTALKTT_TOUT IIO_IXTT /* Xtalk tail timeout */ |
39 | #define IIO_IO_ERR_CLR IIO_IECLR /* IO error clear */ | 39 | #define IIO_IO_ERR_CLR IIO_IECLR /* IO error clear */ |
40 | #define IIO_BTE_CRB_CNT IIO_IBCN /* IO BTE CRB count */ | 40 | #define IIO_BTE_CRB_CNT IIO_IBCN /* IO BTE CRB count */ |
41 | 41 | ||
42 | #define IIO_LLP_CSR_IS_UP 0x00002000 | 42 | #define IIO_LLP_CSR_IS_UP 0x00002000 |
43 | #define IIO_LLP_CSR_LLP_STAT_MASK 0x00003000 | 43 | #define IIO_LLP_CSR_LLP_STAT_MASK 0x00003000 |
44 | #define IIO_LLP_CSR_LLP_STAT_SHFT 12 | 44 | #define IIO_LLP_CSR_LLP_STAT_SHFT 12 |
45 | 45 | ||
46 | /* key to IIO_PROTECT_OVRRD */ | 46 | /* key to IIO_PROTECT_OVRRD */ |
47 | #define IIO_PROTECT_OVRRD_KEY 0x53474972756c6573ull /* "SGIrules" */ | 47 | #define IIO_PROTECT_OVRRD_KEY 0x53474972756c6573ull /* "SGIrules" */ |
48 | 48 | ||
49 | /* BTE register names */ | 49 | /* BTE register names */ |
50 | #define IIO_BTE_STAT_0 IIO_IBLS_0 /* Also BTE length/status 0 */ | 50 | #define IIO_BTE_STAT_0 IIO_IBLS_0 /* Also BTE length/status 0 */ |
51 | #define IIO_BTE_SRC_0 IIO_IBSA_0 /* Also BTE source address 0 */ | 51 | #define IIO_BTE_SRC_0 IIO_IBSA_0 /* Also BTE source address 0 */ |
52 | #define IIO_BTE_DEST_0 IIO_IBDA_0 /* Also BTE dest. address 0 */ | 52 | #define IIO_BTE_DEST_0 IIO_IBDA_0 /* Also BTE dest. address 0 */ |
53 | #define IIO_BTE_CTRL_0 IIO_IBCT_0 /* Also BTE control/terminate 0 */ | 53 | #define IIO_BTE_CTRL_0 IIO_IBCT_0 /* Also BTE control/terminate 0 */ |
54 | #define IIO_BTE_NOTIFY_0 IIO_IBNA_0 /* Also BTE notification 0 */ | 54 | #define IIO_BTE_NOTIFY_0 IIO_IBNA_0 /* Also BTE notification 0 */ |
55 | #define IIO_BTE_INT_0 IIO_IBIA_0 /* Also BTE interrupt 0 */ | 55 | #define IIO_BTE_INT_0 IIO_IBIA_0 /* Also BTE interrupt 0 */ |
56 | #define IIO_BTE_OFF_0 0 /* Base offset from BTE 0 regs. */ | 56 | #define IIO_BTE_OFF_0 0 /* Base offset from BTE 0 regs. */ |
57 | #define IIO_BTE_OFF_1 IIO_IBLS_1 - IIO_IBLS_0 /* Offset from base to BTE 1 */ | 57 | #define IIO_BTE_OFF_1 IIO_IBLS_1 - IIO_IBLS_0 /* Offset from base to BTE 1 */ |
@@ -83,11 +83,11 @@ | |||
83 | #define IIO_WSTAT 0x400008 /* Widget status */ | 83 | #define IIO_WSTAT 0x400008 /* Widget status */ |
84 | #define IIO_WCR 0x400020 /* Widget control */ | 84 | #define IIO_WCR 0x400020 /* Widget control */ |
85 | 85 | ||
86 | #define IIO_WSTAT_ECRAZY (1ULL << 32) /* Hub gone crazy */ | 86 | #define IIO_WSTAT_ECRAZY (1ULL << 32) /* Hub gone crazy */ |
87 | #define IIO_WSTAT_TXRETRY (1ULL << 9) /* Hub Tx Retry timeout */ | 87 | #define IIO_WSTAT_TXRETRY (1ULL << 9) /* Hub Tx Retry timeout */ |
88 | #define IIO_WSTAT_TXRETRY_MASK (0x7F) | 88 | #define IIO_WSTAT_TXRETRY_MASK (0x7F) |
89 | #define IIO_WSTAT_TXRETRY_SHFT (16) | 89 | #define IIO_WSTAT_TXRETRY_SHFT (16) |
90 | #define IIO_WSTAT_TXRETRY_CNT(w) (((w) >> IIO_WSTAT_TXRETRY_SHFT) & \ | 90 | #define IIO_WSTAT_TXRETRY_CNT(w) (((w) >> IIO_WSTAT_TXRETRY_SHFT) & \ |
91 | IIO_WSTAT_TXRETRY_MASK) | 91 | IIO_WSTAT_TXRETRY_MASK) |
92 | 92 | ||
93 | #define IIO_ILAPR 0x400100 /* Local Access Protection */ | 93 | #define IIO_ILAPR 0x400100 /* Local Access Protection */ |
@@ -130,12 +130,12 @@ | |||
130 | #define IIO_IGFX_INIT(widget, node, cpu, valid) (\ | 130 | #define IIO_IGFX_INIT(widget, node, cpu, valid) (\ |
131 | (((widget) & IIO_IGFX_W_NUM_MASK) << IIO_IGFX_W_NUM_SHIFT) | \ | 131 | (((widget) & IIO_IGFX_W_NUM_MASK) << IIO_IGFX_W_NUM_SHIFT) | \ |
132 | (((node) & IIO_IGFX_N_NUM_MASK) << IIO_IGFX_N_NUM_SHIFT) | \ | 132 | (((node) & IIO_IGFX_N_NUM_MASK) << IIO_IGFX_N_NUM_SHIFT) | \ |
133 | (((cpu) & IIO_IGFX_P_NUM_MASK) << IIO_IGFX_P_NUM_SHIFT) | \ | 133 | (((cpu) & IIO_IGFX_P_NUM_MASK) << IIO_IGFX_P_NUM_SHIFT) | \ |
134 | (((valid) & IIO_IGFX_VLD_MASK) << IIO_IGFX_VLD_SHIFT) ) | 134 | (((valid) & IIO_IGFX_VLD_MASK) << IIO_IGFX_VLD_SHIFT) ) |
135 | 135 | ||
136 | /* Scratch registers (not all bits available) */ | 136 | /* Scratch registers (not all bits available) */ |
137 | #define IIO_SCRATCH_REG0 0x400150 | 137 | #define IIO_SCRATCH_REG0 0x400150 |
138 | #define IIO_SCRATCH_REG1 0x400158 | 138 | #define IIO_SCRATCH_REG1 0x400158 |
139 | #define IIO_SCRATCH_MASK 0x0000000f00f11fff | 139 | #define IIO_SCRATCH_MASK 0x0000000f00f11fff |
140 | 140 | ||
141 | #define IIO_SCRATCH_BIT0_0 0x0000000800000000 | 141 | #define IIO_SCRATCH_BIT0_0 0x0000000800000000 |
@@ -174,43 +174,43 @@ | |||
174 | typedef union hubii_wid_u { | 174 | typedef union hubii_wid_u { |
175 | u64 wid_reg_value; | 175 | u64 wid_reg_value; |
176 | struct { | 176 | struct { |
177 | u64 wid_rsvd: 32, /* unused */ | 177 | u64 wid_rsvd: 32, /* unused */ |
178 | wid_rev_num: 4, /* revision number */ | 178 | wid_rev_num: 4, /* revision number */ |
179 | wid_part_num: 16, /* the widget type: hub=c101 */ | 179 | wid_part_num: 16, /* the widget type: hub=c101 */ |
180 | wid_mfg_num: 11, /* Manufacturer id (IBM) */ | 180 | wid_mfg_num: 11, /* Manufacturer id (IBM) */ |
181 | wid_rsvd1: 1; /* Reserved */ | 181 | wid_rsvd1: 1; /* Reserved */ |
182 | } wid_fields_s; | 182 | } wid_fields_s; |
183 | } hubii_wid_t; | 183 | } hubii_wid_t; |
184 | 184 | ||
185 | 185 | ||
186 | typedef union hubii_wcr_u { | 186 | typedef union hubii_wcr_u { |
187 | u64 wcr_reg_value; | 187 | u64 wcr_reg_value; |
188 | struct { | 188 | struct { |
189 | u64 wcr_rsvd: 41, /* unused */ | 189 | u64 wcr_rsvd: 41, /* unused */ |
190 | wcr_e_thresh: 5, /* elasticity threshold */ | 190 | wcr_e_thresh: 5, /* elasticity threshold */ |
191 | wcr_dir_con: 1, /* widget direct connect */ | 191 | wcr_dir_con: 1, /* widget direct connect */ |
192 | wcr_f_bad_pkt: 1, /* Force bad llp pkt enable */ | 192 | wcr_f_bad_pkt: 1, /* Force bad llp pkt enable */ |
193 | wcr_xbar_crd: 3, /* LLP crossbar credit */ | 193 | wcr_xbar_crd: 3, /* LLP crossbar credit */ |
194 | wcr_rsvd1: 8, /* Reserved */ | 194 | wcr_rsvd1: 8, /* Reserved */ |
195 | wcr_tag_mode: 1, /* Tag mode */ | 195 | wcr_tag_mode: 1, /* Tag mode */ |
196 | wcr_widget_id: 4; /* LLP crossbar credit */ | 196 | wcr_widget_id: 4; /* LLP crossbar credit */ |
197 | } wcr_fields_s; | 197 | } wcr_fields_s; |
198 | } hubii_wcr_t; | 198 | } hubii_wcr_t; |
199 | 199 | ||
200 | #define iwcr_dir_con wcr_fields_s.wcr_dir_con | 200 | #define iwcr_dir_con wcr_fields_s.wcr_dir_con |
201 | 201 | ||
202 | typedef union hubii_wstat_u { | 202 | typedef union hubii_wstat_u { |
203 | u64 reg_value; | 203 | u64 reg_value; |
204 | struct { | 204 | struct { |
205 | u64 rsvd1: 31, | 205 | u64 rsvd1: 31, |
206 | crazy: 1, /* Crazy bit */ | 206 | crazy: 1, /* Crazy bit */ |
207 | rsvd2: 8, | 207 | rsvd2: 8, |
208 | llp_tx_cnt: 8, /* LLP Xmit retry counter */ | 208 | llp_tx_cnt: 8, /* LLP Xmit retry counter */ |
209 | rsvd3: 6, | 209 | rsvd3: 6, |
210 | tx_max_rtry: 1, /* LLP Retry Timeout Signal */ | 210 | tx_max_rtry: 1, /* LLP Retry Timeout Signal */ |
211 | rsvd4: 2, | 211 | rsvd4: 2, |
212 | xt_tail_to: 1, /* Xtalk Tail Timeout */ | 212 | xt_tail_to: 1, /* Xtalk Tail Timeout */ |
213 | xt_crd_to: 1, /* Xtalk Credit Timeout */ | 213 | xt_crd_to: 1, /* Xtalk Credit Timeout */ |
214 | pending: 4; /* Pending Requests */ | 214 | pending: 4; /* Pending Requests */ |
215 | } wstat_fields_s; | 215 | } wstat_fields_s; |
216 | } hubii_wstat_t; | 216 | } hubii_wstat_t; |
@@ -219,50 +219,50 @@ typedef union hubii_wstat_u { | |||
219 | typedef union hubii_ilcsr_u { | 219 | typedef union hubii_ilcsr_u { |
220 | u64 icsr_reg_value; | 220 | u64 icsr_reg_value; |
221 | struct { | 221 | struct { |
222 | u64 icsr_rsvd: 22, /* unused */ | 222 | u64 icsr_rsvd: 22, /* unused */ |
223 | icsr_max_burst: 10, /* max burst */ | 223 | icsr_max_burst: 10, /* max burst */ |
224 | icsr_rsvd4: 6, /* reserved */ | 224 | icsr_rsvd4: 6, /* reserved */ |
225 | icsr_max_retry: 10, /* max retry */ | 225 | icsr_max_retry: 10, /* max retry */ |
226 | icsr_rsvd3: 2, /* reserved */ | 226 | icsr_rsvd3: 2, /* reserved */ |
227 | icsr_lnk_stat: 2, /* link status */ | 227 | icsr_lnk_stat: 2, /* link status */ |
228 | icsr_bm8: 1, /* Bit mode 8 */ | 228 | icsr_bm8: 1, /* Bit mode 8 */ |
229 | icsr_llp_en: 1, /* LLP enable bit */ | 229 | icsr_llp_en: 1, /* LLP enable bit */ |
230 | icsr_rsvd2: 1, /* reserver */ | 230 | icsr_rsvd2: 1, /* reserver */ |
231 | icsr_wrm_reset: 1, /* Warm reset bit */ | 231 | icsr_wrm_reset: 1, /* Warm reset bit */ |
232 | icsr_rsvd1: 2, /* Data ready offset */ | 232 | icsr_rsvd1: 2, /* Data ready offset */ |
233 | icsr_null_to: 6; /* Null timeout */ | 233 | icsr_null_to: 6; /* Null timeout */ |
234 | 234 | ||
235 | } icsr_fields_s; | 235 | } icsr_fields_s; |
236 | } hubii_ilcsr_t; | 236 | } hubii_ilcsr_t; |
237 | 237 | ||
238 | 238 | ||
239 | typedef union hubii_iowa_u { | 239 | typedef union hubii_iowa_u { |
240 | u64 iowa_reg_value; | 240 | u64 iowa_reg_value; |
241 | struct { | 241 | struct { |
242 | u64 iowa_rsvd: 48, /* unused */ | 242 | u64 iowa_rsvd: 48, /* unused */ |
243 | iowa_wxoac: 8, /* xtalk widget access bits */ | 243 | iowa_wxoac: 8, /* xtalk widget access bits */ |
244 | iowa_rsvd1: 7, /* xtalk widget access bits */ | 244 | iowa_rsvd1: 7, /* xtalk widget access bits */ |
245 | iowa_w0oac: 1; /* xtalk widget access bits */ | 245 | iowa_w0oac: 1; /* xtalk widget access bits */ |
246 | } iowa_fields_s; | 246 | } iowa_fields_s; |
247 | } hubii_iowa_t; | 247 | } hubii_iowa_t; |
248 | 248 | ||
249 | typedef union hubii_iiwa_u { | 249 | typedef union hubii_iiwa_u { |
250 | u64 iiwa_reg_value; | 250 | u64 iiwa_reg_value; |
251 | struct { | 251 | struct { |
252 | u64 iiwa_rsvd: 48, /* unused */ | 252 | u64 iiwa_rsvd: 48, /* unused */ |
253 | iiwa_wxiac: 8, /* hub wid access bits */ | 253 | iiwa_wxiac: 8, /* hub wid access bits */ |
254 | iiwa_rsvd1: 7, /* reserved */ | 254 | iiwa_rsvd1: 7, /* reserved */ |
255 | iiwa_w0iac: 1; /* hub wid0 access */ | 255 | iiwa_w0iac: 1; /* hub wid0 access */ |
256 | } iiwa_fields_s; | 256 | } iiwa_fields_s; |
257 | } hubii_iiwa_t; | 257 | } hubii_iiwa_t; |
258 | 258 | ||
259 | typedef union hubii_illr_u { | 259 | typedef union hubii_illr_u { |
260 | u64 illr_reg_value; | 260 | u64 illr_reg_value; |
261 | struct { | 261 | struct { |
262 | u64 illr_rsvd: 32, /* unused */ | 262 | u64 illr_rsvd: 32, /* unused */ |
263 | illr_cb_cnt: 16, /* checkbit error count */ | 263 | illr_cb_cnt: 16, /* checkbit error count */ |
264 | illr_sn_cnt: 16; /* sequence number count */ | 264 | illr_sn_cnt: 16; /* sequence number count */ |
265 | } illr_fields_s; | 265 | } illr_fields_s; |
266 | } hubii_illr_t; | 266 | } hubii_illr_t; |
267 | 267 | ||
268 | /* The structures below are defined to extract and modify the ii | 268 | /* The structures below are defined to extract and modify the ii |
@@ -273,7 +273,7 @@ performance registers */ | |||
273 | typedef union io_perf_sel { | 273 | typedef union io_perf_sel { |
274 | u64 perf_sel_reg; | 274 | u64 perf_sel_reg; |
275 | struct { | 275 | struct { |
276 | u64 perf_rsvd : 48, | 276 | u64 perf_rsvd : 48, |
277 | perf_icct : 8, | 277 | perf_icct : 8, |
278 | perf_ippr1 : 4, | 278 | perf_ippr1 : 4, |
279 | perf_ippr0 : 4; | 279 | perf_ippr0 : 4; |
@@ -301,7 +301,7 @@ typedef union io_perf_cnt { | |||
301 | #define IIO_LLP_SN_MAX 0xffff | 301 | #define IIO_LLP_SN_MAX 0xffff |
302 | 302 | ||
303 | /* IO PRB Entries */ | 303 | /* IO PRB Entries */ |
304 | #define IIO_NUM_IPRBS (9) | 304 | #define IIO_NUM_IPRBS (9) |
305 | #define IIO_IOPRB_0 0x400198 /* PRB entry 0 */ | 305 | #define IIO_IOPRB_0 0x400198 /* PRB entry 0 */ |
306 | #define IIO_IOPRB_8 0x4001a0 /* PRB entry 8 */ | 306 | #define IIO_IOPRB_8 0x4001a0 /* PRB entry 8 */ |
307 | #define IIO_IOPRB_9 0x4001a8 /* PRB entry 9 */ | 307 | #define IIO_IOPRB_9 0x4001a8 /* PRB entry 9 */ |
@@ -318,21 +318,21 @@ typedef union io_perf_cnt { | |||
318 | #define IIO_IMEM 0x4001e8 /* Miscellaneous Enable Mask */ | 318 | #define IIO_IMEM 0x4001e8 /* Miscellaneous Enable Mask */ |
319 | #define IIO_IXTT 0x4001f0 /* Crosstalk tail timeout */ | 319 | #define IIO_IXTT 0x4001f0 /* Crosstalk tail timeout */ |
320 | #define IIO_IECLR 0x4001f8 /* IO error clear */ | 320 | #define IIO_IECLR 0x4001f8 /* IO error clear */ |
321 | #define IIO_IBCN 0x400200 /* IO BTE CRB count */ | 321 | #define IIO_IBCN 0x400200 /* IO BTE CRB count */ |
322 | 322 | ||
323 | /* | 323 | /* |
324 | * IIO_IMEM Register fields. | 324 | * IIO_IMEM Register fields. |
325 | */ | 325 | */ |
326 | #define IIO_IMEM_W0ESD 0x1 /* Widget 0 shut down due to error */ | 326 | #define IIO_IMEM_W0ESD 0x1 /* Widget 0 shut down due to error */ |
327 | #define IIO_IMEM_B0ESD (1 << 4) /* BTE 0 shut down due to error */ | 327 | #define IIO_IMEM_B0ESD (1 << 4) /* BTE 0 shut down due to error */ |
328 | #define IIO_IMEM_B1ESD (1 << 8) /* BTE 1 Shut down due to error */ | 328 | #define IIO_IMEM_B1ESD (1 << 8) /* BTE 1 Shut down due to error */ |
329 | 329 | ||
330 | /* PIO Read address Table Entries */ | 330 | /* PIO Read address Table Entries */ |
331 | #define IIO_IPCA 0x400300 /* PRB Counter adjust */ | 331 | #define IIO_IPCA 0x400300 /* PRB Counter adjust */ |
332 | #define IIO_NUM_PRTES 8 /* Total number of PRB table entries */ | 332 | #define IIO_NUM_PRTES 8 /* Total number of PRB table entries */ |
333 | #define IIO_PRTE_0 0x400308 /* PIO Read address table entry 0 */ | 333 | #define IIO_PRTE_0 0x400308 /* PIO Read address table entry 0 */ |
334 | #define IIO_PRTE(_x) (IIO_PRTE_0 + (8 * (_x))) | 334 | #define IIO_PRTE(_x) (IIO_PRTE_0 + (8 * (_x))) |
335 | #define IIO_WIDPRTE(x) IIO_PRTE(((x) - 8)) /* widget ID to its PRTE num */ | 335 | #define IIO_WIDPRTE(x) IIO_PRTE(((x) - 8)) /* widget ID to its PRTE num */ |
336 | #define IIO_IPDR 0x400388 /* PIO table entry deallocation */ | 336 | #define IIO_IPDR 0x400388 /* PIO table entry deallocation */ |
337 | #define IIO_ICDR 0x400390 /* CRB Entry Deallocation */ | 337 | #define IIO_ICDR 0x400390 /* CRB Entry Deallocation */ |
338 | #define IIO_IFDR 0x400398 /* IOQ FIFO Depth */ | 338 | #define IIO_IFDR 0x400398 /* IOQ FIFO Depth */ |
@@ -369,35 +369,35 @@ typedef union io_perf_cnt { | |||
369 | /* | 369 | /* |
370 | * IIO PIO Deallocation register field masks : (IIO_IPDR) | 370 | * IIO PIO Deallocation register field masks : (IIO_IPDR) |
371 | */ | 371 | */ |
372 | #define IIO_IPDR_PND (1 << 4) | 372 | #define IIO_IPDR_PND (1 << 4) |
373 | 373 | ||
374 | /* | 374 | /* |
375 | * IIO CRB deallocation register field masks: (IIO_ICDR) | 375 | * IIO CRB deallocation register field masks: (IIO_ICDR) |
376 | */ | 376 | */ |
377 | #define IIO_ICDR_PND (1 << 4) | 377 | #define IIO_ICDR_PND (1 << 4) |
378 | 378 | ||
379 | /* | 379 | /* |
380 | * IIO CRB control register Fields: IIO_ICCR | 380 | * IIO CRB control register Fields: IIO_ICCR |
381 | */ | 381 | */ |
382 | #define IIO_ICCR_PENDING (0x10000) | 382 | #define IIO_ICCR_PENDING (0x10000) |
383 | #define IIO_ICCR_CMD_MASK (0xFF) | 383 | #define IIO_ICCR_CMD_MASK (0xFF) |
384 | #define IIO_ICCR_CMD_SHFT (7) | 384 | #define IIO_ICCR_CMD_SHFT (7) |
385 | #define IIO_ICCR_CMD_NOP (0x0) /* No Op */ | 385 | #define IIO_ICCR_CMD_NOP (0x0) /* No Op */ |
386 | #define IIO_ICCR_CMD_WAKE (0x100) /* Reactivate CRB entry and process */ | 386 | #define IIO_ICCR_CMD_WAKE (0x100) /* Reactivate CRB entry and process */ |
387 | #define IIO_ICCR_CMD_TIMEOUT (0x200) /* Make CRB timeout & mark invalid */ | 387 | #define IIO_ICCR_CMD_TIMEOUT (0x200) /* Make CRB timeout & mark invalid */ |
388 | #define IIO_ICCR_CMD_EJECT (0x400) /* Contents of entry written to memory | 388 | #define IIO_ICCR_CMD_EJECT (0x400) /* Contents of entry written to memory |
389 | * via a WB | 389 | * via a WB |
390 | */ | 390 | */ |
391 | #define IIO_ICCR_CMD_FLUSH (0x800) | 391 | #define IIO_ICCR_CMD_FLUSH (0x800) |
392 | 392 | ||
393 | /* | 393 | /* |
394 | * CRB manipulation macros | 394 | * CRB manipulation macros |
395 | * The CRB macros are slightly complicated, since there are up to | 395 | * The CRB macros are slightly complicated, since there are up to |
396 | * four registers associated with each CRB entry. | 396 | * four registers associated with each CRB entry. |
397 | */ | 397 | */ |
398 | #define IIO_NUM_CRBS 15 /* Number of CRBs */ | 398 | #define IIO_NUM_CRBS 15 /* Number of CRBs */ |
399 | #define IIO_NUM_NORMAL_CRBS 12 /* Number of regular CRB entries */ | 399 | #define IIO_NUM_NORMAL_CRBS 12 /* Number of regular CRB entries */ |
400 | #define IIO_NUM_PC_CRBS 4 /* Number of partial cache CRBs */ | 400 | #define IIO_NUM_PC_CRBS 4 /* Number of partial cache CRBs */ |
401 | #define IIO_ICRB_OFFSET 8 | 401 | #define IIO_ICRB_OFFSET 8 |
402 | #define IIO_ICRB_0 0x400400 | 402 | #define IIO_ICRB_0 0x400400 |
403 | /* XXX - This is now tuneable: | 403 | /* XXX - This is now tuneable: |
@@ -405,9 +405,9 @@ typedef union io_perf_cnt { | |||
405 | */ | 405 | */ |
406 | 406 | ||
407 | #define IIO_ICRB_A(_x) (IIO_ICRB_0 + (4 * IIO_ICRB_OFFSET * (_x))) | 407 | #define IIO_ICRB_A(_x) (IIO_ICRB_0 + (4 * IIO_ICRB_OFFSET * (_x))) |
408 | #define IIO_ICRB_B(_x) (IIO_ICRB_A(_x) + 1*IIO_ICRB_OFFSET) | 408 | #define IIO_ICRB_B(_x) (IIO_ICRB_A(_x) + 1*IIO_ICRB_OFFSET) |
409 | #define IIO_ICRB_C(_x) (IIO_ICRB_A(_x) + 2*IIO_ICRB_OFFSET) | 409 | #define IIO_ICRB_C(_x) (IIO_ICRB_A(_x) + 2*IIO_ICRB_OFFSET) |
410 | #define IIO_ICRB_D(_x) (IIO_ICRB_A(_x) + 3*IIO_ICRB_OFFSET) | 410 | #define IIO_ICRB_D(_x) (IIO_ICRB_A(_x) + 3*IIO_ICRB_OFFSET) |
411 | 411 | ||
412 | /* XXX - IBUE register coming for Hub 2 */ | 412 | /* XXX - IBUE register coming for Hub 2 */ |
413 | 413 | ||
@@ -444,16 +444,16 @@ typedef union io_perf_cnt { | |||
444 | typedef union icrba_u { | 444 | typedef union icrba_u { |
445 | u64 reg_value; | 445 | u64 reg_value; |
446 | struct { | 446 | struct { |
447 | u64 resvd: 6, | 447 | u64 resvd: 6, |
448 | stall_bte0: 1, /* Stall BTE 0 */ | 448 | stall_bte0: 1, /* Stall BTE 0 */ |
449 | stall_bte1: 1, /* Stall BTE 1 */ | 449 | stall_bte1: 1, /* Stall BTE 1 */ |
450 | error: 1, /* CRB has an error */ | 450 | error: 1, /* CRB has an error */ |
451 | ecode: 3, /* Error Code */ | 451 | ecode: 3, /* Error Code */ |
452 | lnetuce: 1, /* SN0net Uncorrectable error */ | 452 | lnetuce: 1, /* SN0net Uncorrectable error */ |
453 | mark: 1, /* CRB Has been marked */ | 453 | mark: 1, /* CRB Has been marked */ |
454 | xerr: 1, /* Error bit set in xtalk header */ | 454 | xerr: 1, /* Error bit set in xtalk header */ |
455 | sidn: 4, /* SIDN field from xtalk */ | 455 | sidn: 4, /* SIDN field from xtalk */ |
456 | tnum: 5, /* TNUM field in xtalk */ | 456 | tnum: 5, /* TNUM field in xtalk */ |
457 | addr: 38, /* Address of request */ | 457 | addr: 38, /* Address of request */ |
458 | valid: 1, /* Valid status */ | 458 | valid: 1, /* Valid status */ |
459 | iow: 1; /* IO Write operation */ | 459 | iow: 1; /* IO Write operation */ |
@@ -467,15 +467,15 @@ typedef union h1_icrba_u { | |||
467 | u64 reg_value; | 467 | u64 reg_value; |
468 | 468 | ||
469 | struct { | 469 | struct { |
470 | u64 resvd: 6, | 470 | u64 resvd: 6, |
471 | unused: 1, /* Unused but RW!! */ | 471 | unused: 1, /* Unused but RW!! */ |
472 | error: 1, /* CRB has an error */ | 472 | error: 1, /* CRB has an error */ |
473 | ecode: 4, /* Error Code */ | 473 | ecode: 4, /* Error Code */ |
474 | lnetuce: 1, /* SN0net Uncorrectable error */ | 474 | lnetuce: 1, /* SN0net Uncorrectable error */ |
475 | mark: 1, /* CRB Has been marked */ | 475 | mark: 1, /* CRB Has been marked */ |
476 | xerr: 1, /* Error bit set in xtalk header */ | 476 | xerr: 1, /* Error bit set in xtalk header */ |
477 | sidn: 4, /* SIDN field from xtalk */ | 477 | sidn: 4, /* SIDN field from xtalk */ |
478 | tnum: 5, /* TNUM field in xtalk */ | 478 | tnum: 5, /* TNUM field in xtalk */ |
479 | addr: 38, /* Address of request */ | 479 | addr: 38, /* Address of request */ |
480 | valid: 1, /* Valid status */ | 480 | valid: 1, /* Valid status */ |
481 | iow: 1; /* IO Write operation */ | 481 | iow: 1; /* IO Write operation */ |
@@ -488,21 +488,21 @@ typedef union h1_icrba_u { | |||
488 | 488 | ||
489 | #endif /* !__ASSEMBLY__ */ | 489 | #endif /* !__ASSEMBLY__ */ |
490 | 490 | ||
491 | #define IIO_ICRB_ADDR_SHFT 2 /* Shift to get proper address */ | 491 | #define IIO_ICRB_ADDR_SHFT 2 /* Shift to get proper address */ |
492 | 492 | ||
493 | /* | 493 | /* |
494 | * values for "ecode" field | 494 | * values for "ecode" field |
495 | */ | 495 | */ |
496 | #define IIO_ICRB_ECODE_DERR 0 /* Directory error due to IIO access */ | 496 | #define IIO_ICRB_ECODE_DERR 0 /* Directory error due to IIO access */ |
497 | #define IIO_ICRB_ECODE_PERR 1 /* Poison error on IO access */ | 497 | #define IIO_ICRB_ECODE_PERR 1 /* Poison error on IO access */ |
498 | #define IIO_ICRB_ECODE_WERR 2 /* Write error by IIO access | 498 | #define IIO_ICRB_ECODE_WERR 2 /* Write error by IIO access |
499 | * e.g. WINV to a Read only line. | 499 | * e.g. WINV to a Read only line. |
500 | */ | 500 | */ |
501 | #define IIO_ICRB_ECODE_AERR 3 /* Access error caused by IIO access */ | 501 | #define IIO_ICRB_ECODE_AERR 3 /* Access error caused by IIO access */ |
502 | #define IIO_ICRB_ECODE_PWERR 4 /* Error on partial write */ | 502 | #define IIO_ICRB_ECODE_PWERR 4 /* Error on partial write */ |
503 | #define IIO_ICRB_ECODE_PRERR 5 /* Error on partial read */ | 503 | #define IIO_ICRB_ECODE_PRERR 5 /* Error on partial read */ |
504 | #define IIO_ICRB_ECODE_TOUT 6 /* CRB timeout before deallocating */ | 504 | #define IIO_ICRB_ECODE_TOUT 6 /* CRB timeout before deallocating */ |
505 | #define IIO_ICRB_ECODE_XTERR 7 /* Incoming xtalk pkt had error bit */ | 505 | #define IIO_ICRB_ECODE_XTERR 7 /* Incoming xtalk pkt had error bit */ |
506 | 506 | ||
507 | 507 | ||
508 | 508 | ||
@@ -513,10 +513,10 @@ typedef union h1_icrba_u { | |||
513 | typedef union icrbb_u { | 513 | typedef union icrbb_u { |
514 | u64 reg_value; | 514 | u64 reg_value; |
515 | struct { | 515 | struct { |
516 | u64 rsvd1: 5, | 516 | u64 rsvd1: 5, |
517 | btenum: 1, /* BTE to which entry belongs to */ | 517 | btenum: 1, /* BTE to which entry belongs to */ |
518 | cohtrans: 1, /* Coherent transaction */ | 518 | cohtrans: 1, /* Coherent transaction */ |
519 | xtsize: 2, /* Xtalk operation size | 519 | xtsize: 2, /* Xtalk operation size |
520 | * 0: Double Word | 520 | * 0: Double Word |
521 | * 1: 32 Bytes. | 521 | * 1: 32 Bytes. |
522 | * 2: 128 Bytes, | 522 | * 2: 128 Bytes, |
@@ -526,11 +526,11 @@ typedef union icrbb_u { | |||
526 | srcinit: 2, /* Source Initiator: | 526 | srcinit: 2, /* Source Initiator: |
527 | * See below for field values. | 527 | * See below for field values. |
528 | */ | 528 | */ |
529 | useold: 1, /* Use OLD command for processing */ | 529 | useold: 1, /* Use OLD command for processing */ |
530 | imsgtype: 2, /* Incoming message type | 530 | imsgtype: 2, /* Incoming message type |
531 | * see below for field values | 531 | * see below for field values |
532 | */ | 532 | */ |
533 | imsg: 8, /* Incoming message */ | 533 | imsg: 8, /* Incoming message */ |
534 | initator: 3, /* Initiator of original request | 534 | initator: 3, /* Initiator of original request |
535 | * See below for field values. | 535 | * See below for field values. |
536 | */ | 536 | */ |
@@ -538,12 +538,12 @@ typedef union icrbb_u { | |||
538 | * See below for field values. | 538 | * See below for field values. |
539 | */ | 539 | */ |
540 | rsvd2: 7, | 540 | rsvd2: 7, |
541 | ackcnt: 11, /* Invalidate ack count */ | 541 | ackcnt: 11, /* Invalidate ack count */ |
542 | resp: 1, /* data response given to processor */ | 542 | resp: 1, /* data response given to processor */ |
543 | ack: 1, /* indicates data ack received */ | 543 | ack: 1, /* indicates data ack received */ |
544 | hold: 1, /* entry is gathering inval acks */ | 544 | hold: 1, /* entry is gathering inval acks */ |
545 | wb_pend:1, /* waiting for writeback to complete */ | 545 | wb_pend:1, /* waiting for writeback to complete */ |
546 | intvn: 1, /* Intervention */ | 546 | intvn: 1, /* Intervention */ |
547 | stall_ib: 1, /* Stall Ibuf (from crosstalk) */ | 547 | stall_ib: 1, /* Stall Ibuf (from crosstalk) */ |
548 | stall_intr: 1; /* Stall internal interrupts */ | 548 | stall_intr: 1; /* Stall internal interrupts */ |
549 | } icrbb_field_s; | 549 | } icrbb_field_s; |
@@ -556,9 +556,9 @@ typedef union h1_icrbb_u { | |||
556 | u64 reg_value; | 556 | u64 reg_value; |
557 | struct { | 557 | struct { |
558 | u64 rsvd1: 5, | 558 | u64 rsvd1: 5, |
559 | btenum: 1, /* BTE to which entry belongs to */ | 559 | btenum: 1, /* BTE to which entry belongs to */ |
560 | cohtrans: 1, /* Coherent transaction */ | 560 | cohtrans: 1, /* Coherent transaction */ |
561 | xtsize: 2, /* Xtalk operation size | 561 | xtsize: 2, /* Xtalk operation size |
562 | * 0: Double Word | 562 | * 0: Double Word |
563 | * 1: 32 Bytes. | 563 | * 1: 32 Bytes. |
564 | * 2: 128 Bytes, | 564 | * 2: 128 Bytes, |
@@ -568,99 +568,99 @@ typedef union h1_icrbb_u { | |||
568 | srcinit: 2, /* Source Initiator: | 568 | srcinit: 2, /* Source Initiator: |
569 | * See below for field values. | 569 | * See below for field values. |
570 | */ | 570 | */ |
571 | useold: 1, /* Use OLD command for processing */ | 571 | useold: 1, /* Use OLD command for processing */ |
572 | imsgtype: 2, /* Incoming message type | 572 | imsgtype: 2, /* Incoming message type |
573 | * see below for field values | 573 | * see below for field values |
574 | */ | 574 | */ |
575 | imsg: 8, /* Incoming message */ | 575 | imsg: 8, /* Incoming message */ |
576 | initator: 3, /* Initiator of original request | 576 | initator: 3, /* Initiator of original request |
577 | * See below for field values. | 577 | * See below for field values. |
578 | */ | 578 | */ |
579 | rsvd2: 1, | 579 | rsvd2: 1, |
580 | pcache: 1, /* entry belongs to partial cache */ | 580 | pcache: 1, /* entry belongs to partial cache */ |
581 | reqtype: 5, /* Identifies type of request | 581 | reqtype: 5, /* Identifies type of request |
582 | * See below for field values. | 582 | * See below for field values. |
583 | */ | 583 | */ |
584 | stl_ib: 1, /* stall Ibus coming from xtalk */ | 584 | stl_ib: 1, /* stall Ibus coming from xtalk */ |
585 | stl_intr: 1, /* Stall internal interrupts */ | 585 | stl_intr: 1, /* Stall internal interrupts */ |
586 | stl_bte0: 1, /* Stall BTE 0 */ | 586 | stl_bte0: 1, /* Stall BTE 0 */ |
587 | stl_bte1: 1, /* Stall BTE 1 */ | 587 | stl_bte1: 1, /* Stall BTE 1 */ |
588 | intrvn: 1, /* Req was target of intervention */ | 588 | intrvn: 1, /* Req was target of intervention */ |
589 | ackcnt: 11, /* Invalidate ack count */ | 589 | ackcnt: 11, /* Invalidate ack count */ |
590 | resp: 1, /* data response given to processor */ | 590 | resp: 1, /* data response given to processor */ |
591 | ack: 1, /* indicates data ack received */ | 591 | ack: 1, /* indicates data ack received */ |
592 | hold: 1, /* entry is gathering inval acks */ | 592 | hold: 1, /* entry is gathering inval acks */ |
593 | wb_pend:1, /* waiting for writeback to complete */ | 593 | wb_pend:1, /* waiting for writeback to complete */ |
594 | sleep: 1, /* xtalk req sleeping till IO-sync */ | 594 | sleep: 1, /* xtalk req sleeping till IO-sync */ |
595 | pnd_reply: 1, /* replies not issed due to IOQ full */ | 595 | pnd_reply: 1, /* replies not issed due to IOQ full */ |
596 | pnd_req: 1; /* reqs not issued due to IOQ full */ | 596 | pnd_req: 1; /* reqs not issued due to IOQ full */ |
597 | } h1_icrbb_field_s; | 597 | } h1_icrbb_field_s; |
598 | } h1_icrbb_t; | 598 | } h1_icrbb_t; |
599 | 599 | ||
600 | 600 | ||
601 | #define b_imsgtype icrbb_field_s.imsgtype | 601 | #define b_imsgtype icrbb_field_s.imsgtype |
602 | #define b_btenum icrbb_field_s.btenum | 602 | #define b_btenum icrbb_field_s.btenum |
603 | #define b_cohtrans icrbb_field_s.cohtrans | 603 | #define b_cohtrans icrbb_field_s.cohtrans |
604 | #define b_xtsize icrbb_field_s.xtsize | 604 | #define b_xtsize icrbb_field_s.xtsize |
605 | #define b_srcnode icrbb_field_s.srcnode | 605 | #define b_srcnode icrbb_field_s.srcnode |
606 | #define b_srcinit icrbb_field_s.srcinit | 606 | #define b_srcinit icrbb_field_s.srcinit |
607 | #define b_imsgtype icrbb_field_s.imsgtype | 607 | #define b_imsgtype icrbb_field_s.imsgtype |
608 | #define b_imsg icrbb_field_s.imsg | 608 | #define b_imsg icrbb_field_s.imsg |
609 | #define b_initiator icrbb_field_s.initiator | 609 | #define b_initiator icrbb_field_s.initiator |
610 | 610 | ||
611 | #endif /* !__ASSEMBLY__ */ | 611 | #endif /* !__ASSEMBLY__ */ |
612 | 612 | ||
613 | /* | 613 | /* |
614 | * values for field xtsize | 614 | * values for field xtsize |
615 | */ | 615 | */ |
616 | #define IIO_ICRB_XTSIZE_DW 0 /* Xtalk operation size is 8 bytes */ | 616 | #define IIO_ICRB_XTSIZE_DW 0 /* Xtalk operation size is 8 bytes */ |
617 | #define IIO_ICRB_XTSIZE_32 1 /* Xtalk operation size is 32 bytes */ | 617 | #define IIO_ICRB_XTSIZE_32 1 /* Xtalk operation size is 32 bytes */ |
618 | #define IIO_ICRB_XTSIZE_128 2 /* Xtalk operation size is 128 bytes */ | 618 | #define IIO_ICRB_XTSIZE_128 2 /* Xtalk operation size is 128 bytes */ |
619 | 619 | ||
620 | /* | 620 | /* |
621 | * values for field srcinit | 621 | * values for field srcinit |
622 | */ | 622 | */ |
623 | #define IIO_ICRB_PROC0 0 /* Source of request is Proc 0 */ | 623 | #define IIO_ICRB_PROC0 0 /* Source of request is Proc 0 */ |
624 | #define IIO_ICRB_PROC1 1 /* Source of request is Proc 1 */ | 624 | #define IIO_ICRB_PROC1 1 /* Source of request is Proc 1 */ |
625 | #define IIO_ICRB_GB_REQ 2 /* Source is Guaranteed BW request */ | 625 | #define IIO_ICRB_GB_REQ 2 /* Source is Guaranteed BW request */ |
626 | #define IIO_ICRB_IO_REQ 3 /* Source is Normal IO request */ | 626 | #define IIO_ICRB_IO_REQ 3 /* Source is Normal IO request */ |
627 | 627 | ||
628 | /* | 628 | /* |
629 | * Values for field imsgtype | 629 | * Values for field imsgtype |
630 | */ | 630 | */ |
631 | #define IIO_ICRB_IMSGT_XTALK 0 /* Incoming Meessage from Xtalk */ | 631 | #define IIO_ICRB_IMSGT_XTALK 0 /* Incoming Meessage from Xtalk */ |
632 | #define IIO_ICRB_IMSGT_BTE 1 /* Incoming message from BTE */ | 632 | #define IIO_ICRB_IMSGT_BTE 1 /* Incoming message from BTE */ |
633 | #define IIO_ICRB_IMSGT_SN0NET 2 /* Incoming message from SN0 net */ | 633 | #define IIO_ICRB_IMSGT_SN0NET 2 /* Incoming message from SN0 net */ |
634 | #define IIO_ICRB_IMSGT_CRB 3 /* Incoming message from CRB ??? */ | 634 | #define IIO_ICRB_IMSGT_CRB 3 /* Incoming message from CRB ??? */ |
635 | 635 | ||
636 | /* | 636 | /* |
637 | * values for field initiator. | 637 | * values for field initiator. |
638 | */ | 638 | */ |
639 | #define IIO_ICRB_INIT_XTALK 0 /* Message originated in xtalk */ | 639 | #define IIO_ICRB_INIT_XTALK 0 /* Message originated in xtalk */ |
640 | #define IIO_ICRB_INIT_BTE0 0x1 /* Message originated in BTE 0 */ | 640 | #define IIO_ICRB_INIT_BTE0 0x1 /* Message originated in BTE 0 */ |
641 | #define IIO_ICRB_INIT_SN0NET 0x2 /* Message originated in SN0net */ | 641 | #define IIO_ICRB_INIT_SN0NET 0x2 /* Message originated in SN0net */ |
642 | #define IIO_ICRB_INIT_CRB 0x3 /* Message originated in CRB ? */ | 642 | #define IIO_ICRB_INIT_CRB 0x3 /* Message originated in CRB ? */ |
643 | #define IIO_ICRB_INIT_BTE1 0x5 /* MEssage originated in BTE 1 */ | 643 | #define IIO_ICRB_INIT_BTE1 0x5 /* MEssage originated in BTE 1 */ |
644 | 644 | ||
645 | /* | 645 | /* |
646 | * Values for field reqtype. | 646 | * Values for field reqtype. |
647 | */ | 647 | */ |
648 | /* XXX - Need to fix this for Hub 2 */ | 648 | /* XXX - Need to fix this for Hub 2 */ |
649 | #define IIO_ICRB_REQ_DWRD 0 /* Request type double word */ | 649 | #define IIO_ICRB_REQ_DWRD 0 /* Request type double word */ |
650 | #define IIO_ICRB_REQ_QCLRD 1 /* Request is Qrtr Caceh line Rd */ | 650 | #define IIO_ICRB_REQ_QCLRD 1 /* Request is Qrtr Caceh line Rd */ |
651 | #define IIO_ICRB_REQ_BLKRD 2 /* Request is block read */ | 651 | #define IIO_ICRB_REQ_BLKRD 2 /* Request is block read */ |
652 | #define IIO_ICRB_REQ_RSHU 6 /* Request is BTE block read */ | 652 | #define IIO_ICRB_REQ_RSHU 6 /* Request is BTE block read */ |
653 | #define IIO_ICRB_REQ_REXU 7 /* request is BTE Excl Read */ | 653 | #define IIO_ICRB_REQ_REXU 7 /* request is BTE Excl Read */ |
654 | #define IIO_ICRB_REQ_RDEX 8 /* Request is Read Exclusive */ | 654 | #define IIO_ICRB_REQ_RDEX 8 /* Request is Read Exclusive */ |
655 | #define IIO_ICRB_REQ_WINC 9 /* Request is Write Invalidate */ | 655 | #define IIO_ICRB_REQ_WINC 9 /* Request is Write Invalidate */ |
656 | #define IIO_ICRB_REQ_BWINV 10 /* Request is BTE Winv */ | 656 | #define IIO_ICRB_REQ_BWINV 10 /* Request is BTE Winv */ |
657 | #define IIO_ICRB_REQ_PIORD 11 /* Request is PIO read */ | 657 | #define IIO_ICRB_REQ_PIORD 11 /* Request is PIO read */ |
658 | #define IIO_ICRB_REQ_PIOWR 12 /* Request is PIO Write */ | 658 | #define IIO_ICRB_REQ_PIOWR 12 /* Request is PIO Write */ |
659 | #define IIO_ICRB_REQ_PRDM 13 /* Request is Fetch&Op */ | 659 | #define IIO_ICRB_REQ_PRDM 13 /* Request is Fetch&Op */ |
660 | #define IIO_ICRB_REQ_PWRM 14 /* Request is Store &Op */ | 660 | #define IIO_ICRB_REQ_PWRM 14 /* Request is Store &Op */ |
661 | #define IIO_ICRB_REQ_PTPWR 15 /* Request is Peer to peer */ | 661 | #define IIO_ICRB_REQ_PTPWR 15 /* Request is Peer to peer */ |
662 | #define IIO_ICRB_REQ_WB 16 /* Request is Write back */ | 662 | #define IIO_ICRB_REQ_WB 16 /* Request is Write back */ |
663 | #define IIO_ICRB_REQ_DEX 17 /* Retained DEX Cache line */ | 663 | #define IIO_ICRB_REQ_DEX 17 /* Retained DEX Cache line */ |
664 | 664 | ||
665 | /* | 665 | /* |
666 | * Fields in CRB Register C | 666 | * Fields in CRB Register C |
@@ -674,8 +674,8 @@ typedef union icrbc_s { | |||
674 | u64 rsvd: 6, | 674 | u64 rsvd: 6, |
675 | sleep: 1, | 675 | sleep: 1, |
676 | pricnt: 4, /* Priority count sent with Read req */ | 676 | pricnt: 4, /* Priority count sent with Read req */ |
677 | pripsc: 4, /* Priority Pre scalar */ | 677 | pripsc: 4, /* Priority Pre scalar */ |
678 | bteop: 1, /* BTE Operation */ | 678 | bteop: 1, /* BTE Operation */ |
679 | push_be: 34, /* Push address Byte enable | 679 | push_be: 34, /* Push address Byte enable |
680 | * Holds push addr, if CRB is for BTE | 680 | * Holds push addr, if CRB is for BTE |
681 | * If CRB belongs to Partial cache, | 681 | * If CRB belongs to Partial cache, |
@@ -684,20 +684,20 @@ typedef union icrbc_s { | |||
684 | */ | 684 | */ |
685 | suppl: 11, /* Supplemental field */ | 685 | suppl: 11, /* Supplemental field */ |
686 | barrop: 1, /* Barrier Op bit set in xtalk req */ | 686 | barrop: 1, /* Barrier Op bit set in xtalk req */ |
687 | doresp: 1, /* Xtalk req needs a response */ | 687 | doresp: 1, /* Xtalk req needs a response */ |
688 | gbr: 1; /* GBR bit set in xtalk packet */ | 688 | gbr: 1; /* GBR bit set in xtalk packet */ |
689 | } icrbc_field_s; | 689 | } icrbc_field_s; |
690 | } icrbc_t; | 690 | } icrbc_t; |
691 | 691 | ||
692 | #define c_pricnt icrbc_field_s.pricnt | 692 | #define c_pricnt icrbc_field_s.pricnt |
693 | #define c_pripsc icrbc_field_s.pripsc | 693 | #define c_pripsc icrbc_field_s.pripsc |
694 | #define c_bteop icrbc_field_s.bteop | 694 | #define c_bteop icrbc_field_s.bteop |
695 | #define c_bteaddr icrbc_field_s.push_be /* push_be field has 2 names */ | 695 | #define c_bteaddr icrbc_field_s.push_be /* push_be field has 2 names */ |
696 | #define c_benable icrbc_field_s.push_be /* push_be field has 2 names */ | 696 | #define c_benable icrbc_field_s.push_be /* push_be field has 2 names */ |
697 | #define c_suppl icrbc_field_s.suppl | 697 | #define c_suppl icrbc_field_s.suppl |
698 | #define c_barrop icrbc_field_s.barrop | 698 | #define c_barrop icrbc_field_s.barrop |
699 | #define c_doresp icrbc_field_s.doresp | 699 | #define c_doresp icrbc_field_s.doresp |
700 | #define c_gbr icrbc_field_s.gbr | 700 | #define c_gbr icrbc_field_s.gbr |
701 | #endif /* !__ASSEMBLY__ */ | 701 | #endif /* !__ASSEMBLY__ */ |
702 | 702 | ||
703 | /* | 703 | /* |
@@ -708,31 +708,31 @@ typedef union icrbc_s { | |||
708 | typedef union icrbd_s { | 708 | typedef union icrbd_s { |
709 | u64 reg_value; | 709 | u64 reg_value; |
710 | struct { | 710 | struct { |
711 | u64 rsvd: 38, | 711 | u64 rsvd: 38, |
712 | toutvld: 1, /* Timeout in progress for this CRB */ | 712 | toutvld: 1, /* Timeout in progress for this CRB */ |
713 | ctxtvld: 1, /* Context field below is valid */ | 713 | ctxtvld: 1, /* Context field below is valid */ |
714 | rsvd2: 1, | 714 | rsvd2: 1, |
715 | context: 15, /* Bit vector: | 715 | context: 15, /* Bit vector: |
716 | * Has a bit set for each CRB entry | 716 | * Has a bit set for each CRB entry |
717 | * which needs to be deallocated | 717 | * which needs to be deallocated |
718 | * before this CRB entry is processed. | 718 | * before this CRB entry is processed. |
719 | * Set only for barrier operations. | 719 | * Set only for barrier operations. |
720 | */ | 720 | */ |
721 | timeout: 8; /* Timeout Upper 8 bits */ | 721 | timeout: 8; /* Timeout Upper 8 bits */ |
722 | } icrbd_field_s; | 722 | } icrbd_field_s; |
723 | } icrbd_t; | 723 | } icrbd_t; |
724 | 724 | ||
725 | #define icrbd_toutvld icrbd_field_s.toutvld | 725 | #define icrbd_toutvld icrbd_field_s.toutvld |
726 | #define icrbd_ctxtvld icrbd_field_s.ctxtvld | 726 | #define icrbd_ctxtvld icrbd_field_s.ctxtvld |
727 | #define icrbd_context icrbd_field_s.context | 727 | #define icrbd_context icrbd_field_s.context |
728 | 728 | ||
729 | 729 | ||
730 | typedef union hubii_ifdr_u { | 730 | typedef union hubii_ifdr_u { |
731 | u64 hi_ifdr_value; | 731 | u64 hi_ifdr_value; |
732 | struct { | 732 | struct { |
733 | u64 ifdr_rsvd: 49, | 733 | u64 ifdr_rsvd: 49, |
734 | ifdr_maxrp: 7, | 734 | ifdr_maxrp: 7, |
735 | ifdr_rsvd1: 1, | 735 | ifdr_rsvd1: 1, |
736 | ifdr_maxrq: 7; | 736 | ifdr_maxrq: 7; |
737 | } hi_ifdr_fields; | 737 | } hi_ifdr_fields; |
738 | } hubii_ifdr_t; | 738 | } hubii_ifdr_t; |
@@ -789,26 +789,26 @@ typedef union hubii_ifdr_u { | |||
789 | typedef union iprte_a { | 789 | typedef union iprte_a { |
790 | u64 entry; | 790 | u64 entry; |
791 | struct { | 791 | struct { |
792 | u64 rsvd1 : 7, /* Reserved field */ | 792 | u64 rsvd1 : 7, /* Reserved field */ |
793 | valid : 1, /* Maps to a timeout entry */ | 793 | valid : 1, /* Maps to a timeout entry */ |
794 | rsvd2 : 1, | 794 | rsvd2 : 1, |
795 | srcnode : 9, /* Node which did this PIO */ | 795 | srcnode : 9, /* Node which did this PIO */ |
796 | initiator : 2, /* If T5A or T5B or IO */ | 796 | initiator : 2, /* If T5A or T5B or IO */ |
797 | rsvd3 : 3, | 797 | rsvd3 : 3, |
798 | addr : 38, /* Physical address of PIO */ | 798 | addr : 38, /* Physical address of PIO */ |
799 | rsvd4 : 3; | 799 | rsvd4 : 3; |
800 | } iprte_fields; | 800 | } iprte_fields; |
801 | } iprte_a_t; | 801 | } iprte_a_t; |
802 | 802 | ||
803 | #define iprte_valid iprte_fields.valid | 803 | #define iprte_valid iprte_fields.valid |
804 | #define iprte_timeout iprte_fields.timeout | 804 | #define iprte_timeout iprte_fields.timeout |
805 | #define iprte_srcnode iprte_fields.srcnode | 805 | #define iprte_srcnode iprte_fields.srcnode |
806 | #define iprte_init iprte_fields.initiator | 806 | #define iprte_init iprte_fields.initiator |
807 | #define iprte_addr iprte_fields.addr | 807 | #define iprte_addr iprte_fields.addr |
808 | 808 | ||
809 | #endif /* !__ASSEMBLY__ */ | 809 | #endif /* !__ASSEMBLY__ */ |
810 | 810 | ||
811 | #define IPRTE_ADDRSHFT 3 | 811 | #define IPRTE_ADDRSHFT 3 |
812 | 812 | ||
813 | /* | 813 | /* |
814 | * Hub IIO PRB Register format. | 814 | * Hub IIO PRB Register format. |
@@ -823,14 +823,14 @@ typedef union iprte_a { | |||
823 | typedef union iprb_u { | 823 | typedef union iprb_u { |
824 | u64 reg_value; | 824 | u64 reg_value; |
825 | struct { | 825 | struct { |
826 | u64 rsvd1: 15, | 826 | u64 rsvd1: 15, |
827 | error: 1, /* Widget rcvd wr resp pkt w/ error */ | 827 | error: 1, /* Widget rcvd wr resp pkt w/ error */ |
828 | ovflow: 5, /* Overflow count. perf measurement */ | 828 | ovflow: 5, /* Overflow count. perf measurement */ |
829 | fire_and_forget: 1, /* Launch Write without response */ | 829 | fire_and_forget: 1, /* Launch Write without response */ |
830 | mode: 2, /* Widget operation Mode */ | 830 | mode: 2, /* Widget operation Mode */ |
831 | rsvd2: 2, | 831 | rsvd2: 2, |
832 | bnakctr: 14, | 832 | bnakctr: 14, |
833 | rsvd3: 2, | 833 | rsvd3: 2, |
834 | anakctr: 14, | 834 | anakctr: 14, |
835 | xtalkctr: 8; | 835 | xtalkctr: 8; |
836 | } iprb_fields_s; | 836 | } iprb_fields_s; |
@@ -838,13 +838,13 @@ typedef union iprb_u { | |||
838 | 838 | ||
839 | #define iprb_regval reg_value | 839 | #define iprb_regval reg_value |
840 | 840 | ||
841 | #define iprb_error iprb_fields_s.error | 841 | #define iprb_error iprb_fields_s.error |
842 | #define iprb_ovflow iprb_fields_s.ovflow | 842 | #define iprb_ovflow iprb_fields_s.ovflow |
843 | #define iprb_ff iprb_fields_s.fire_and_forget | 843 | #define iprb_ff iprb_fields_s.fire_and_forget |
844 | #define iprb_mode iprb_fields_s.mode | 844 | #define iprb_mode iprb_fields_s.mode |
845 | #define iprb_bnakctr iprb_fields_s.bnakctr | 845 | #define iprb_bnakctr iprb_fields_s.bnakctr |
846 | #define iprb_anakctr iprb_fields_s.anakctr | 846 | #define iprb_anakctr iprb_fields_s.anakctr |
847 | #define iprb_xtalkctr iprb_fields_s.xtalkctr | 847 | #define iprb_xtalkctr iprb_fields_s.xtalkctr |
848 | 848 | ||
849 | #endif /* !__ASSEMBLY__ */ | 849 | #endif /* !__ASSEMBLY__ */ |
850 | 850 | ||
@@ -853,10 +853,10 @@ typedef union iprb_u { | |||
853 | * For details of the meanings of NAK and Accept, refer the PIO flow | 853 | * For details of the meanings of NAK and Accept, refer the PIO flow |
854 | * document | 854 | * document |
855 | */ | 855 | */ |
856 | #define IPRB_MODE_NORMAL (0) | 856 | #define IPRB_MODE_NORMAL (0) |
857 | #define IPRB_MODE_COLLECT_A (1) /* PRB in collect A mode */ | 857 | #define IPRB_MODE_COLLECT_A (1) /* PRB in collect A mode */ |
858 | #define IPRB_MODE_SERVICE_A (2) /* NAK B and Accept A */ | 858 | #define IPRB_MODE_SERVICE_A (2) /* NAK B and Accept A */ |
859 | #define IPRB_MODE_SERVICE_B (3) /* NAK A and Accept B */ | 859 | #define IPRB_MODE_SERVICE_B (3) /* NAK A and Accept B */ |
860 | 860 | ||
861 | /* | 861 | /* |
862 | * IO CRB entry C_A to E_A : Partial (cache) CRBS | 862 | * IO CRB entry C_A to E_A : Partial (cache) CRBS |
@@ -865,31 +865,31 @@ typedef union iprb_u { | |||
865 | typedef union icrbp_a { | 865 | typedef union icrbp_a { |
866 | u64 ip_reg; /* the entire register value */ | 866 | u64 ip_reg; /* the entire register value */ |
867 | struct { | 867 | struct { |
868 | u64 error: 1, /* 63, error occurred */ | 868 | u64 error: 1, /* 63, error occurred */ |
869 | ln_uce: 1, /* 62: uncorrectable memory */ | 869 | ln_uce: 1, /* 62: uncorrectable memory */ |
870 | ln_ae: 1, /* 61: protection violation */ | 870 | ln_ae: 1, /* 61: protection violation */ |
871 | ln_werr:1, /* 60: write access error */ | 871 | ln_werr:1, /* 60: write access error */ |
872 | ln_aerr:1, /* 59: sn0net: Address error */ | 872 | ln_aerr:1, /* 59: sn0net: Address error */ |
873 | ln_perr:1, /* 58: sn0net: poison error */ | 873 | ln_perr:1, /* 58: sn0net: poison error */ |
874 | timeout:1, /* 57: CRB timed out */ | 874 | timeout:1, /* 57: CRB timed out */ |
875 | l_bdpkt:1, /* 56: truncated pkt on sn0net */ | 875 | l_bdpkt:1, /* 56: truncated pkt on sn0net */ |
876 | c_bdpkt:1, /* 55: truncated pkt on xtalk */ | 876 | c_bdpkt:1, /* 55: truncated pkt on xtalk */ |
877 | c_err: 1, /* 54: incoming xtalk req, err set*/ | 877 | c_err: 1, /* 54: incoming xtalk req, err set*/ |
878 | rsvd1: 12, /* 53-42: reserved */ | 878 | rsvd1: 12, /* 53-42: reserved */ |
879 | valid: 1, /* 41: Valid status */ | 879 | valid: 1, /* 41: Valid status */ |
880 | sidn: 4, /* 40-37: SIDN field of xtalk rqst */ | 880 | sidn: 4, /* 40-37: SIDN field of xtalk rqst */ |
881 | tnum: 5, /* 36-32: TNUM of xtalk request */ | 881 | tnum: 5, /* 36-32: TNUM of xtalk request */ |
882 | bo: 1, /* 31: barrier op set in xtalk rqst*/ | 882 | bo: 1, /* 31: barrier op set in xtalk rqst*/ |
883 | resprqd:1, /* 30: xtalk rqst requires response*/ | 883 | resprqd:1, /* 30: xtalk rqst requires response*/ |
884 | gbr: 1, /* 29: gbr bit set in xtalk rqst */ | 884 | gbr: 1, /* 29: gbr bit set in xtalk rqst */ |
885 | size: 2, /* 28-27: size of xtalk request */ | 885 | size: 2, /* 28-27: size of xtalk request */ |
886 | excl: 4, /* 26-23: exclusive bit(s) */ | 886 | excl: 4, /* 26-23: exclusive bit(s) */ |
887 | stall: 3, /* 22-20: stall (xtalk, bte 0/1) */ | 887 | stall: 3, /* 22-20: stall (xtalk, bte 0/1) */ |
888 | intvn: 1, /* 19: rqst target of intervention*/ | 888 | intvn: 1, /* 19: rqst target of intervention*/ |
889 | resp: 1, /* 18: Data response given to t5 */ | 889 | resp: 1, /* 18: Data response given to t5 */ |
890 | ack: 1, /* 17: Data ack received. */ | 890 | ack: 1, /* 17: Data ack received. */ |
891 | hold: 1, /* 16: crb gathering invalidate acks*/ | 891 | hold: 1, /* 16: crb gathering invalidate acks*/ |
892 | wb: 1, /* 15: writeback pending. */ | 892 | wb: 1, /* 15: writeback pending. */ |
893 | ack_cnt:11, /* 14-04: counter of invalidate acks*/ | 893 | ack_cnt:11, /* 14-04: counter of invalidate acks*/ |
894 | tscaler:4; /* 03-00: Timeout prescaler */ | 894 | tscaler:4; /* 03-00: Timeout prescaler */ |
895 | } ip_fmt; | 895 | } ip_fmt; |
@@ -908,13 +908,13 @@ typedef union hubii_idsr { | |||
908 | u64 iin_reg; | 908 | u64 iin_reg; |
909 | struct { | 909 | struct { |
910 | u64 rsvd1 : 35, | 910 | u64 rsvd1 : 35, |
911 | isent : 1, | 911 | isent : 1, |
912 | rsvd2 : 3, | 912 | rsvd2 : 3, |
913 | ienable: 1, | 913 | ienable: 1, |
914 | rsvd : 7, | 914 | rsvd : 7, |
915 | node : 9, | 915 | node : 9, |
916 | rsvd4 : 1, | 916 | rsvd4 : 1, |
917 | level : 7; | 917 | level : 7; |
918 | } iin_fmt; | 918 | } iin_fmt; |
919 | } hubii_idsr_t; | 919 | } hubii_idsr_t; |
920 | #endif /* !__ASSEMBLY__ */ | 920 | #endif /* !__ASSEMBLY__ */ |
@@ -966,7 +966,7 @@ typedef union hubii_idsr { | |||
966 | * Value of 3 is required by Xbow 1.1 | 966 | * Value of 3 is required by Xbow 1.1 |
967 | * We may be able to increase this to 4 with Xbow 1.2. | 967 | * We may be able to increase this to 4 with Xbow 1.2. |
968 | */ | 968 | */ |
969 | #define HUBII_XBOW_CREDIT 3 | 969 | #define HUBII_XBOW_CREDIT 3 |
970 | #define HUBII_XBOW_REV2_CREDIT 4 | 970 | #define HUBII_XBOW_REV2_CREDIT 4 |
971 | 971 | ||
972 | #endif /* _ASM_SGI_SN_SN0_HUBIO_H */ | 972 | #endif /* _ASM_SGI_SN_SN0_HUBIO_H */ |
diff --git a/arch/mips/include/asm/sn/sn0/hubmd.h b/arch/mips/include/asm/sn/sn0/hubmd.h index 14c225d80664..305d002be182 100644 --- a/arch/mips/include/asm/sn/sn0/hubmd.h +++ b/arch/mips/include/asm/sn/sn0/hubmd.h | |||
@@ -8,16 +8,16 @@ | |||
8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. |
9 | * Copyright (C) 1999 by Ralf Baechle | 9 | * Copyright (C) 1999 by Ralf Baechle |
10 | */ | 10 | */ |
11 | #ifndef _ASM_SN_SN0_HUBMD_H | 11 | #ifndef _ASM_SN_SN0_HUBMD_H |
12 | #define _ASM_SN_SN0_HUBMD_H | 12 | #define _ASM_SN_SN0_HUBMD_H |
13 | 13 | ||
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Hub Memory/Directory interface registers | 16 | * Hub Memory/Directory interface registers |
17 | */ | 17 | */ |
18 | #define CACHE_SLINE_SIZE 128 /* Secondary cache line size on SN0 */ | 18 | #define CACHE_SLINE_SIZE 128 /* Secondary cache line size on SN0 */ |
19 | 19 | ||
20 | #define MAX_REGIONS 64 | 20 | #define MAX_REGIONS 64 |
21 | 21 | ||
22 | /* Hardware page size and shift */ | 22 | /* Hardware page size and shift */ |
23 | 23 | ||
@@ -34,62 +34,62 @@ | |||
34 | #define MD_IO_PROT_OVRRD 0x200008 /* Clear my bit in MD_IO_PROTECT */ | 34 | #define MD_IO_PROT_OVRRD 0x200008 /* Clear my bit in MD_IO_PROTECT */ |
35 | #define MD_HSPEC_PROTECT 0x200010 /* BDDIR, LBOOT, RBOOT protection */ | 35 | #define MD_HSPEC_PROTECT 0x200010 /* BDDIR, LBOOT, RBOOT protection */ |
36 | #define MD_MEMORY_CONFIG 0x200018 /* Memory/Directory DIMM control */ | 36 | #define MD_MEMORY_CONFIG 0x200018 /* Memory/Directory DIMM control */ |
37 | #define MD_REFRESH_CONTROL 0x200020 /* Memory/Directory refresh ctrl */ | 37 | #define MD_REFRESH_CONTROL 0x200020 /* Memory/Directory refresh ctrl */ |
38 | #define MD_FANDOP_CAC_STAT 0x200028 /* Fetch-and-op cache status */ | 38 | #define MD_FANDOP_CAC_STAT 0x200028 /* Fetch-and-op cache status */ |
39 | #define MD_MIG_DIFF_THRESH 0x200030 /* Page migr. count diff thresh. */ | 39 | #define MD_MIG_DIFF_THRESH 0x200030 /* Page migr. count diff thresh. */ |
40 | #define MD_MIG_VALUE_THRESH 0x200038 /* Page migr. count abs. thresh. */ | 40 | #define MD_MIG_VALUE_THRESH 0x200038 /* Page migr. count abs. thresh. */ |
41 | #define MD_MIG_CANDIDATE 0x200040 /* Latest page migration candidate */ | 41 | #define MD_MIG_CANDIDATE 0x200040 /* Latest page migration candidate */ |
42 | #define MD_MIG_CANDIDATE_CLR 0x200048 /* Clear page migration candidate */ | 42 | #define MD_MIG_CANDIDATE_CLR 0x200048 /* Clear page migration candidate */ |
43 | #define MD_DIR_ERROR 0x200050 /* Directory DIMM error */ | 43 | #define MD_DIR_ERROR 0x200050 /* Directory DIMM error */ |
44 | #define MD_DIR_ERROR_CLR 0x200058 /* Directory DIMM error clear */ | 44 | #define MD_DIR_ERROR_CLR 0x200058 /* Directory DIMM error clear */ |
45 | #define MD_PROTOCOL_ERROR 0x200060 /* Directory protocol error */ | 45 | #define MD_PROTOCOL_ERROR 0x200060 /* Directory protocol error */ |
46 | #define MD_PROTOCOL_ERROR_CLR 0x200068 /* Directory protocol error clear */ | 46 | #define MD_PROTOCOL_ERROR_CLR 0x200068 /* Directory protocol error clear */ |
47 | #define MD_MEM_ERROR 0x200070 /* Memory DIMM error */ | 47 | #define MD_MEM_ERROR 0x200070 /* Memory DIMM error */ |
48 | #define MD_MEM_ERROR_CLR 0x200078 /* Memory DIMM error clear */ | 48 | #define MD_MEM_ERROR_CLR 0x200078 /* Memory DIMM error clear */ |
49 | #define MD_MISC_ERROR 0x200080 /* Miscellaneous MD error */ | 49 | #define MD_MISC_ERROR 0x200080 /* Miscellaneous MD error */ |
50 | #define MD_MISC_ERROR_CLR 0x200088 /* Miscellaneous MD error clear */ | 50 | #define MD_MISC_ERROR_CLR 0x200088 /* Miscellaneous MD error clear */ |
51 | #define MD_MEM_DIMM_INIT 0x200090 /* Memory DIMM mode initization. */ | 51 | #define MD_MEM_DIMM_INIT 0x200090 /* Memory DIMM mode initization. */ |
52 | #define MD_DIR_DIMM_INIT 0x200098 /* Directory DIMM mode init. */ | 52 | #define MD_DIR_DIMM_INIT 0x200098 /* Directory DIMM mode init. */ |
53 | #define MD_MOQ_SIZE 0x2000a0 /* MD outgoing queue size */ | 53 | #define MD_MOQ_SIZE 0x2000a0 /* MD outgoing queue size */ |
54 | #define MD_MLAN_CTL 0x2000a8 /* NIC (Microlan) control register */ | 54 | #define MD_MLAN_CTL 0x2000a8 /* NIC (Microlan) control register */ |
55 | 55 | ||
56 | #define MD_PERF_SEL 0x210000 /* Select perf monitor events */ | 56 | #define MD_PERF_SEL 0x210000 /* Select perf monitor events */ |
57 | #define MD_PERF_CNT0 0x210010 /* Performance counter 0 */ | 57 | #define MD_PERF_CNT0 0x210010 /* Performance counter 0 */ |
58 | #define MD_PERF_CNT1 0x210018 /* Performance counter 1 */ | 58 | #define MD_PERF_CNT1 0x210018 /* Performance counter 1 */ |
59 | #define MD_PERF_CNT2 0x210020 /* Performance counter 2 */ | 59 | #define MD_PERF_CNT2 0x210020 /* Performance counter 2 */ |
60 | #define MD_PERF_CNT3 0x210028 /* Performance counter 3 */ | 60 | #define MD_PERF_CNT3 0x210028 /* Performance counter 3 */ |
61 | #define MD_PERF_CNT4 0x210030 /* Performance counter 4 */ | 61 | #define MD_PERF_CNT4 0x210030 /* Performance counter 4 */ |
62 | #define MD_PERF_CNT5 0x210038 /* Performance counter 5 */ | 62 | #define MD_PERF_CNT5 0x210038 /* Performance counter 5 */ |
63 | 63 | ||
64 | #define MD_UREG0_0 0x220000 /* uController/UART 0 register */ | 64 | #define MD_UREG0_0 0x220000 /* uController/UART 0 register */ |
65 | #define MD_UREG0_1 0x220008 /* uController/UART 0 register */ | 65 | #define MD_UREG0_1 0x220008 /* uController/UART 0 register */ |
66 | #define MD_UREG0_2 0x220010 /* uController/UART 0 register */ | 66 | #define MD_UREG0_2 0x220010 /* uController/UART 0 register */ |
67 | #define MD_UREG0_3 0x220018 /* uController/UART 0 register */ | 67 | #define MD_UREG0_3 0x220018 /* uController/UART 0 register */ |
68 | #define MD_UREG0_4 0x220020 /* uController/UART 0 register */ | 68 | #define MD_UREG0_4 0x220020 /* uController/UART 0 register */ |
69 | #define MD_UREG0_5 0x220028 /* uController/UART 0 register */ | 69 | #define MD_UREG0_5 0x220028 /* uController/UART 0 register */ |
70 | #define MD_UREG0_6 0x220030 /* uController/UART 0 register */ | 70 | #define MD_UREG0_6 0x220030 /* uController/UART 0 register */ |
71 | #define MD_UREG0_7 0x220038 /* uController/UART 0 register */ | 71 | #define MD_UREG0_7 0x220038 /* uController/UART 0 register */ |
72 | 72 | ||
73 | #define MD_SLOTID_USTAT 0x220048 /* Hub slot ID & UART/uCtlr status */ | 73 | #define MD_SLOTID_USTAT 0x220048 /* Hub slot ID & UART/uCtlr status */ |
74 | #define MD_LED0 0x220050 /* Eight-bit LED for CPU A */ | 74 | #define MD_LED0 0x220050 /* Eight-bit LED for CPU A */ |
75 | #define MD_LED1 0x220058 /* Eight-bit LED for CPU B */ | 75 | #define MD_LED1 0x220058 /* Eight-bit LED for CPU B */ |
76 | 76 | ||
77 | #define MD_UREG1_0 0x220080 /* uController/UART 1 register */ | 77 | #define MD_UREG1_0 0x220080 /* uController/UART 1 register */ |
78 | #define MD_UREG1_1 0x220088 /* uController/UART 1 register */ | 78 | #define MD_UREG1_1 0x220088 /* uController/UART 1 register */ |
79 | #define MD_UREG1_2 0x220090 /* uController/UART 1 register */ | 79 | #define MD_UREG1_2 0x220090 /* uController/UART 1 register */ |
80 | #define MD_UREG1_3 0x220098 /* uController/UART 1 register */ | 80 | #define MD_UREG1_3 0x220098 /* uController/UART 1 register */ |
81 | #define MD_UREG1_4 0x2200a0 /* uController/UART 1 register */ | 81 | #define MD_UREG1_4 0x2200a0 /* uController/UART 1 register */ |
82 | #define MD_UREG1_5 0x2200a8 /* uController/UART 1 register */ | 82 | #define MD_UREG1_5 0x2200a8 /* uController/UART 1 register */ |
83 | #define MD_UREG1_6 0x2200b0 /* uController/UART 1 register */ | 83 | #define MD_UREG1_6 0x2200b0 /* uController/UART 1 register */ |
84 | #define MD_UREG1_7 0x2200b8 /* uController/UART 1 register */ | 84 | #define MD_UREG1_7 0x2200b8 /* uController/UART 1 register */ |
85 | #define MD_UREG1_8 0x2200c0 /* uController/UART 1 register */ | 85 | #define MD_UREG1_8 0x2200c0 /* uController/UART 1 register */ |
86 | #define MD_UREG1_9 0x2200c8 /* uController/UART 1 register */ | 86 | #define MD_UREG1_9 0x2200c8 /* uController/UART 1 register */ |
87 | #define MD_UREG1_10 0x2200d0 /* uController/UART 1 register */ | 87 | #define MD_UREG1_10 0x2200d0 /* uController/UART 1 register */ |
88 | #define MD_UREG1_11 0x2200d8 /* uController/UART 1 register */ | 88 | #define MD_UREG1_11 0x2200d8 /* uController/UART 1 register */ |
89 | #define MD_UREG1_12 0x2200e0 /* uController/UART 1 register */ | 89 | #define MD_UREG1_12 0x2200e0 /* uController/UART 1 register */ |
90 | #define MD_UREG1_13 0x2200e8 /* uController/UART 1 register */ | 90 | #define MD_UREG1_13 0x2200e8 /* uController/UART 1 register */ |
91 | #define MD_UREG1_14 0x2200f0 /* uController/UART 1 register */ | 91 | #define MD_UREG1_14 0x2200f0 /* uController/UART 1 register */ |
92 | #define MD_UREG1_15 0x2200f8 /* uController/UART 1 register */ | 92 | #define MD_UREG1_15 0x2200f8 /* uController/UART 1 register */ |
93 | 93 | ||
94 | #ifdef CONFIG_SGI_SN_N_MODE | 94 | #ifdef CONFIG_SGI_SN_N_MODE |
95 | #define MD_MEM_BANKS 4 /* 4 banks of memory max in N mode */ | 95 | #define MD_MEM_BANKS 4 /* 4 banks of memory max in N mode */ |
@@ -106,14 +106,14 @@ | |||
106 | * Bits not used by the MD are used by software. | 106 | * Bits not used by the MD are used by software. |
107 | */ | 107 | */ |
108 | 108 | ||
109 | #define MD_SIZE_EMPTY 0 /* Valid in MEMORY_CONFIG */ | 109 | #define MD_SIZE_EMPTY 0 /* Valid in MEMORY_CONFIG */ |
110 | #define MD_SIZE_8MB 1 | 110 | #define MD_SIZE_8MB 1 |
111 | #define MD_SIZE_16MB 2 | 111 | #define MD_SIZE_16MB 2 |
112 | #define MD_SIZE_32MB 3 /* Broken in Hub 1 */ | 112 | #define MD_SIZE_32MB 3 /* Broken in Hub 1 */ |
113 | #define MD_SIZE_64MB 4 /* Valid in MEMORY_CONFIG */ | 113 | #define MD_SIZE_64MB 4 /* Valid in MEMORY_CONFIG */ |
114 | #define MD_SIZE_128MB 5 /* Valid in MEMORY_CONFIG */ | 114 | #define MD_SIZE_128MB 5 /* Valid in MEMORY_CONFIG */ |
115 | #define MD_SIZE_256MB 6 | 115 | #define MD_SIZE_256MB 6 |
116 | #define MD_SIZE_512MB 7 /* Valid in MEMORY_CONFIG */ | 116 | #define MD_SIZE_512MB 7 /* Valid in MEMORY_CONFIG */ |
117 | #define MD_SIZE_1GB 8 | 117 | #define MD_SIZE_1GB 8 |
118 | #define MD_SIZE_2GB 9 | 118 | #define MD_SIZE_2GB 9 |
119 | #define MD_SIZE_4GB 10 | 119 | #define MD_SIZE_4GB 10 |
@@ -207,16 +207,16 @@ | |||
207 | 207 | ||
208 | /* MD_SLOTID_USTAT bit definitions */ | 208 | /* MD_SLOTID_USTAT bit definitions */ |
209 | 209 | ||
210 | #define MSU_CORECLK_TST_SHFT 7 /* You don't wanna know */ | 210 | #define MSU_CORECLK_TST_SHFT 7 /* You don't wanna know */ |
211 | #define MSU_CORECLK_TST_MASK (UINT64_CAST 1 << 7) | 211 | #define MSU_CORECLK_TST_MASK (UINT64_CAST 1 << 7) |
212 | #define MSU_CORECLK_TST (UINT64_CAST 1 << 7) | 212 | #define MSU_CORECLK_TST (UINT64_CAST 1 << 7) |
213 | #define MSU_CORECLK_SHFT 6 /* You don't wanna know */ | 213 | #define MSU_CORECLK_SHFT 6 /* You don't wanna know */ |
214 | #define MSU_CORECLK_MASK (UINT64_CAST 1 << 6) | 214 | #define MSU_CORECLK_MASK (UINT64_CAST 1 << 6) |
215 | #define MSU_CORECLK (UINT64_CAST 1 << 6) | 215 | #define MSU_CORECLK (UINT64_CAST 1 << 6) |
216 | #define MSU_NETSYNC_SHFT 5 /* You don't wanna know */ | 216 | #define MSU_NETSYNC_SHFT 5 /* You don't wanna know */ |
217 | #define MSU_NETSYNC_MASK (UINT64_CAST 1 << 5) | 217 | #define MSU_NETSYNC_MASK (UINT64_CAST 1 << 5) |
218 | #define MSU_NETSYNC (UINT64_CAST 1 << 5) | 218 | #define MSU_NETSYNC (UINT64_CAST 1 << 5) |
219 | #define MSU_FPROMRDY_SHFT 4 /* Flash PROM ready bit */ | 219 | #define MSU_FPROMRDY_SHFT 4 /* Flash PROM ready bit */ |
220 | #define MSU_FPROMRDY_MASK (UINT64_CAST 1 << 4) | 220 | #define MSU_FPROMRDY_MASK (UINT64_CAST 1 << 4) |
221 | #define MSU_FPROMRDY (UINT64_CAST 1 << 4) | 221 | #define MSU_FPROMRDY (UINT64_CAST 1 << 4) |
222 | #define MSU_I2CINTR_SHFT 3 /* I2C interrupt bit */ | 222 | #define MSU_I2CINTR_SHFT 3 /* I2C interrupt bit */ |
@@ -228,8 +228,8 @@ | |||
228 | #define MSU_SN00_SLOTID_SHFT 7 | 228 | #define MSU_SN00_SLOTID_SHFT 7 |
229 | #define MSU_SN00_SLOTID_MASK (UINT64_CAST 0x80) | 229 | #define MSU_SN00_SLOTID_MASK (UINT64_CAST 0x80) |
230 | 230 | ||
231 | #define MSU_PIMM_PSC_SHFT 4 | 231 | #define MSU_PIMM_PSC_SHFT 4 |
232 | #define MSU_PIMM_PSC_MASK (0xf << MSU_PIMM_PSC_SHFT) | 232 | #define MSU_PIMM_PSC_MASK (0xf << MSU_PIMM_PSC_SHFT) |
233 | 233 | ||
234 | /* MD_MIG_DIFF_THRESH bit definitions */ | 234 | /* MD_MIG_DIFF_THRESH bit definitions */ |
235 | 235 | ||
@@ -260,7 +260,7 @@ | |||
260 | 260 | ||
261 | /* Other MD definitions */ | 261 | /* Other MD definitions */ |
262 | 262 | ||
263 | #define MD_BANK_SHFT 29 /* log2(512 MB) */ | 263 | #define MD_BANK_SHFT 29 /* log2(512 MB) */ |
264 | #define MD_BANK_MASK (UINT64_CAST 7 << 29) | 264 | #define MD_BANK_MASK (UINT64_CAST 7 << 29) |
265 | #define MD_BANK_SIZE (UINT64_CAST 1 << MD_BANK_SHFT) /* 512 MB */ | 265 | #define MD_BANK_SIZE (UINT64_CAST 1 << MD_BANK_SHFT) /* 512 MB */ |
266 | #define MD_BANK_OFFSET(_b) (UINT64_CAST (_b) << MD_BANK_SHFT) | 266 | #define MD_BANK_OFFSET(_b) (UINT64_CAST (_b) << MD_BANK_SHFT) |
@@ -300,32 +300,32 @@ | |||
300 | * Format C: STATE != shared (FINE must be 0) | 300 | * Format C: STATE != shared (FINE must be 0) |
301 | */ | 301 | */ |
302 | 302 | ||
303 | #define MD_PDIR_MASK 0xffffffffffff /* Whole entry */ | 303 | #define MD_PDIR_MASK 0xffffffffffff /* Whole entry */ |
304 | #define MD_PDIR_ECC_SHFT 0 /* ABC low or high */ | 304 | #define MD_PDIR_ECC_SHFT 0 /* ABC low or high */ |
305 | #define MD_PDIR_ECC_MASK 0x7f | 305 | #define MD_PDIR_ECC_MASK 0x7f |
306 | #define MD_PDIR_PRIO_SHFT 8 /* ABC low */ | 306 | #define MD_PDIR_PRIO_SHFT 8 /* ABC low */ |
307 | #define MD_PDIR_PRIO_MASK (0xf << 8) | 307 | #define MD_PDIR_PRIO_MASK (0xf << 8) |
308 | #define MD_PDIR_AX_SHFT 7 /* ABC low */ | 308 | #define MD_PDIR_AX_SHFT 7 /* ABC low */ |
309 | #define MD_PDIR_AX_MASK (1 << 7) | 309 | #define MD_PDIR_AX_MASK (1 << 7) |
310 | #define MD_PDIR_AX (1 << 7) | 310 | #define MD_PDIR_AX (1 << 7) |
311 | #define MD_PDIR_FINE_SHFT 12 /* ABC low */ | 311 | #define MD_PDIR_FINE_SHFT 12 /* ABC low */ |
312 | #define MD_PDIR_FINE_MASK (1 << 12) | 312 | #define MD_PDIR_FINE_MASK (1 << 12) |
313 | #define MD_PDIR_FINE (1 << 12) | 313 | #define MD_PDIR_FINE (1 << 12) |
314 | #define MD_PDIR_OCT_SHFT 13 /* A low */ | 314 | #define MD_PDIR_OCT_SHFT 13 /* A low */ |
315 | #define MD_PDIR_OCT_MASK (7 << 13) | 315 | #define MD_PDIR_OCT_MASK (7 << 13) |
316 | #define MD_PDIR_STATE_SHFT 13 /* BC low */ | 316 | #define MD_PDIR_STATE_SHFT 13 /* BC low */ |
317 | #define MD_PDIR_STATE_MASK (7 << 13) | 317 | #define MD_PDIR_STATE_MASK (7 << 13) |
318 | #define MD_PDIR_ONECNT_SHFT 16 /* BC low */ | 318 | #define MD_PDIR_ONECNT_SHFT 16 /* BC low */ |
319 | #define MD_PDIR_ONECNT_MASK (0x3f << 16) | 319 | #define MD_PDIR_ONECNT_MASK (0x3f << 16) |
320 | #define MD_PDIR_PTR_SHFT 22 /* C low */ | 320 | #define MD_PDIR_PTR_SHFT 22 /* C low */ |
321 | #define MD_PDIR_PTR_MASK (UINT64_CAST 0x7ff << 22) | 321 | #define MD_PDIR_PTR_MASK (UINT64_CAST 0x7ff << 22) |
322 | #define MD_PDIR_VECMSB_SHFT 22 /* AB low */ | 322 | #define MD_PDIR_VECMSB_SHFT 22 /* AB low */ |
323 | #define MD_PDIR_VECMSB_BITMASK 0x3ffffff | 323 | #define MD_PDIR_VECMSB_BITMASK 0x3ffffff |
324 | #define MD_PDIR_VECMSB_BITSHFT 27 | 324 | #define MD_PDIR_VECMSB_BITSHFT 27 |
325 | #define MD_PDIR_VECMSB_MASK (UINT64_CAST MD_PDIR_VECMSB_BITMASK << 22) | 325 | #define MD_PDIR_VECMSB_MASK (UINT64_CAST MD_PDIR_VECMSB_BITMASK << 22) |
326 | #define MD_PDIR_CWOFF_SHFT 7 /* C high */ | 326 | #define MD_PDIR_CWOFF_SHFT 7 /* C high */ |
327 | #define MD_PDIR_CWOFF_MASK (7 << 7) | 327 | #define MD_PDIR_CWOFF_MASK (7 << 7) |
328 | #define MD_PDIR_VECLSB_SHFT 10 /* AB high */ | 328 | #define MD_PDIR_VECLSB_SHFT 10 /* AB high */ |
329 | #define MD_PDIR_VECLSB_BITMASK (UINT64_CAST 0x3fffffffff) | 329 | #define MD_PDIR_VECLSB_BITMASK (UINT64_CAST 0x3fffffffff) |
330 | #define MD_PDIR_VECLSB_BITSHFT 0 | 330 | #define MD_PDIR_VECLSB_BITSHFT 0 |
331 | #define MD_PDIR_VECLSB_MASK (MD_PDIR_VECLSB_BITMASK << 10) | 331 | #define MD_PDIR_VECLSB_MASK (MD_PDIR_VECLSB_BITMASK << 10) |
@@ -349,25 +349,25 @@ | |||
349 | * Format C: STATE != shared | 349 | * Format C: STATE != shared |
350 | */ | 350 | */ |
351 | 351 | ||
352 | #define MD_SDIR_MASK 0xffff /* Whole entry */ | 352 | #define MD_SDIR_MASK 0xffff /* Whole entry */ |
353 | #define MD_SDIR_ECC_SHFT 0 /* AC low or high */ | 353 | #define MD_SDIR_ECC_SHFT 0 /* AC low or high */ |
354 | #define MD_SDIR_ECC_MASK 0x1f | 354 | #define MD_SDIR_ECC_MASK 0x1f |
355 | #define MD_SDIR_PRIO_SHFT 6 /* AC low */ | 355 | #define MD_SDIR_PRIO_SHFT 6 /* AC low */ |
356 | #define MD_SDIR_PRIO_MASK (1 << 6) | 356 | #define MD_SDIR_PRIO_MASK (1 << 6) |
357 | #define MD_SDIR_AX_SHFT 5 /* AC low */ | 357 | #define MD_SDIR_AX_SHFT 5 /* AC low */ |
358 | #define MD_SDIR_AX_MASK (1 << 5) | 358 | #define MD_SDIR_AX_MASK (1 << 5) |
359 | #define MD_SDIR_AX (1 << 5) | 359 | #define MD_SDIR_AX (1 << 5) |
360 | #define MD_SDIR_STATE_SHFT 7 /* AC low */ | 360 | #define MD_SDIR_STATE_SHFT 7 /* AC low */ |
361 | #define MD_SDIR_STATE_MASK (7 << 7) | 361 | #define MD_SDIR_STATE_MASK (7 << 7) |
362 | #define MD_SDIR_PTR_SHFT 10 /* C low */ | 362 | #define MD_SDIR_PTR_SHFT 10 /* C low */ |
363 | #define MD_SDIR_PTR_MASK (0x3f << 10) | 363 | #define MD_SDIR_PTR_MASK (0x3f << 10) |
364 | #define MD_SDIR_CWOFF_SHFT 5 /* C high */ | 364 | #define MD_SDIR_CWOFF_SHFT 5 /* C high */ |
365 | #define MD_SDIR_CWOFF_MASK (7 << 5) | 365 | #define MD_SDIR_CWOFF_MASK (7 << 5) |
366 | #define MD_SDIR_VECMSB_SHFT 11 /* A low */ | 366 | #define MD_SDIR_VECMSB_SHFT 11 /* A low */ |
367 | #define MD_SDIR_VECMSB_BITMASK 0x1f | 367 | #define MD_SDIR_VECMSB_BITMASK 0x1f |
368 | #define MD_SDIR_VECMSB_BITSHFT 7 | 368 | #define MD_SDIR_VECMSB_BITSHFT 7 |
369 | #define MD_SDIR_VECMSB_MASK (MD_SDIR_VECMSB_BITMASK << 11) | 369 | #define MD_SDIR_VECMSB_MASK (MD_SDIR_VECMSB_BITMASK << 11) |
370 | #define MD_SDIR_VECLSB_SHFT 5 /* A high */ | 370 | #define MD_SDIR_VECLSB_SHFT 5 /* A high */ |
371 | #define MD_SDIR_VECLSB_BITMASK 0x7ff | 371 | #define MD_SDIR_VECLSB_BITMASK 0x7ff |
372 | #define MD_SDIR_VECLSB_BITSHFT 0 | 372 | #define MD_SDIR_VECLSB_BITSHFT 0 |
373 | #define MD_SDIR_VECLSB_MASK (MD_SDIR_VECLSB_BITMASK << 5) | 373 | #define MD_SDIR_VECLSB_MASK (MD_SDIR_VECLSB_BITMASK << 5) |
@@ -390,7 +390,7 @@ | |||
390 | 390 | ||
391 | /* Premium SIMM protection entry shifts and masks. */ | 391 | /* Premium SIMM protection entry shifts and masks. */ |
392 | 392 | ||
393 | #define MD_PPROT_SHFT 0 /* Prot. field */ | 393 | #define MD_PPROT_SHFT 0 /* Prot. field */ |
394 | #define MD_PPROT_MASK 7 | 394 | #define MD_PPROT_MASK 7 |
395 | #define MD_PPROT_MIGMD_SHFT 3 /* Migration mode */ | 395 | #define MD_PPROT_MIGMD_SHFT 3 /* Migration mode */ |
396 | #define MD_PPROT_MIGMD_MASK (3 << 3) | 396 | #define MD_PPROT_MIGMD_MASK (3 << 3) |
@@ -403,7 +403,7 @@ | |||
403 | 403 | ||
404 | /* Standard SIMM protection entry shifts and masks. */ | 404 | /* Standard SIMM protection entry shifts and masks. */ |
405 | 405 | ||
406 | #define MD_SPROT_SHFT 0 /* Prot. field */ | 406 | #define MD_SPROT_SHFT 0 /* Prot. field */ |
407 | #define MD_SPROT_MASK 7 | 407 | #define MD_SPROT_MASK 7 |
408 | #define MD_SPROT_MIGMD_SHFT 3 /* Migration mode */ | 408 | #define MD_SPROT_MIGMD_SHFT 3 /* Migration mode */ |
409 | #define MD_SPROT_MIGMD_MASK (3 << 3) | 409 | #define MD_SPROT_MIGMD_MASK (3 << 3) |
@@ -431,13 +431,13 @@ | |||
431 | 431 | ||
432 | #define CPU_LED_ADDR(_nasid, _slice) \ | 432 | #define CPU_LED_ADDR(_nasid, _slice) \ |
433 | (private.p_sn00 ? \ | 433 | (private.p_sn00 ? \ |
434 | REMOTE_HUB_ADDR((_nasid), MD_UREG1_0 + ((_slice) << 5)) : \ | 434 | REMOTE_HUB_ADDR((_nasid), MD_UREG1_0 + ((_slice) << 5)) : \ |
435 | REMOTE_HUB_ADDR((_nasid), MD_LED0 + ((_slice) << 3))) | 435 | REMOTE_HUB_ADDR((_nasid), MD_LED0 + ((_slice) << 3))) |
436 | 436 | ||
437 | #define SET_CPU_LEDS(_nasid, _slice, _val) \ | 437 | #define SET_CPU_LEDS(_nasid, _slice, _val) \ |
438 | (HUB_S(CPU_LED_ADDR(_nasid, _slice), (_val))) | 438 | (HUB_S(CPU_LED_ADDR(_nasid, _slice), (_val))) |
439 | 439 | ||
440 | #define SET_MY_LEDS(_v) \ | 440 | #define SET_MY_LEDS(_v) \ |
441 | SET_CPU_LEDS(get_nasid(), get_slice(), (_v)) | 441 | SET_CPU_LEDS(get_nasid(), get_slice(), (_v)) |
442 | 442 | ||
443 | /* | 443 | /* |
@@ -541,7 +541,7 @@ | |||
541 | */ | 541 | */ |
542 | 542 | ||
543 | struct dir_error_reg { | 543 | struct dir_error_reg { |
544 | u64 uce_vld: 1, /* 63: valid directory uce */ | 544 | u64 uce_vld: 1, /* 63: valid directory uce */ |
545 | ae_vld: 1, /* 62: valid dir prot ecc error */ | 545 | ae_vld: 1, /* 62: valid dir prot ecc error */ |
546 | ce_vld: 1, /* 61: valid correctable ECC err*/ | 546 | ce_vld: 1, /* 61: valid correctable ECC err*/ |
547 | rsvd1: 19, /* 60-42: reserved */ | 547 | rsvd1: 19, /* 60-42: reserved */ |
@@ -555,13 +555,13 @@ struct dir_error_reg { | |||
555 | }; | 555 | }; |
556 | 556 | ||
557 | typedef union md_dir_error { | 557 | typedef union md_dir_error { |
558 | u64 derr_reg; /* the entire register */ | 558 | u64 derr_reg; /* the entire register */ |
559 | struct dir_error_reg derr_fmt; /* the register format */ | 559 | struct dir_error_reg derr_fmt; /* the register format */ |
560 | } md_dir_error_t; | 560 | } md_dir_error_t; |
561 | 561 | ||
562 | 562 | ||
563 | struct mem_error_reg { | 563 | struct mem_error_reg { |
564 | u64 uce_vld: 1, /* 63: valid memory uce */ | 564 | u64 uce_vld: 1, /* 63: valid memory uce */ |
565 | ce_vld: 1, /* 62: valid correctable ECC err*/ | 565 | ce_vld: 1, /* 62: valid correctable ECC err*/ |
566 | rsvd1: 22, /* 61-40: reserved */ | 566 | rsvd1: 22, /* 61-40: reserved */ |
567 | bad_syn: 8, /* 39-32: bad mem ecc syndrome */ | 567 | bad_syn: 8, /* 39-32: bad mem ecc syndrome */ |
@@ -573,8 +573,8 @@ struct mem_error_reg { | |||
573 | 573 | ||
574 | 574 | ||
575 | typedef union md_mem_error { | 575 | typedef union md_mem_error { |
576 | u64 merr_reg; /* the entire register */ | 576 | u64 merr_reg; /* the entire register */ |
577 | struct mem_error_reg merr_fmt; /* format of the mem_error reg */ | 577 | struct mem_error_reg merr_fmt; /* format of the mem_error reg */ |
578 | } md_mem_error_t; | 578 | } md_mem_error_t; |
579 | 579 | ||
580 | 580 | ||
@@ -594,7 +594,7 @@ struct proto_error_reg { | |||
594 | }; | 594 | }; |
595 | 595 | ||
596 | typedef union md_proto_error { | 596 | typedef union md_proto_error { |
597 | u64 perr_reg; /* the entire register */ | 597 | u64 perr_reg; /* the entire register */ |
598 | struct proto_error_reg perr_fmt; /* format of the register */ | 598 | struct proto_error_reg perr_fmt; /* format of the register */ |
599 | } md_proto_error_t; | 599 | } md_proto_error_t; |
600 | 600 | ||
@@ -695,33 +695,33 @@ typedef union md_pdir_loent { | |||
695 | * represent directory memory information. | 695 | * represent directory memory information. |
696 | */ | 696 | */ |
697 | 697 | ||
698 | typedef union md_dir_high { | 698 | typedef union md_dir_high { |
699 | md_sdir_high_t md_sdir_high; | 699 | md_sdir_high_t md_sdir_high; |
700 | md_pdir_high_t md_pdir_high; | 700 | md_pdir_high_t md_pdir_high; |
701 | } md_dir_high_t; | 701 | } md_dir_high_t; |
702 | 702 | ||
703 | typedef union md_dir_low { | 703 | typedef union md_dir_low { |
704 | md_sdir_low_t md_sdir_low; | 704 | md_sdir_low_t md_sdir_low; |
705 | md_pdir_low_t md_pdir_low; | 705 | md_pdir_low_t md_pdir_low; |
706 | } md_dir_low_t; | 706 | } md_dir_low_t; |
707 | 707 | ||
708 | typedef struct bddir_entry { | 708 | typedef struct bddir_entry { |
709 | md_dir_low_t md_dir_low; | 709 | md_dir_low_t md_dir_low; |
710 | md_dir_high_t md_dir_high; | 710 | md_dir_high_t md_dir_high; |
711 | } bddir_entry_t; | 711 | } bddir_entry_t; |
712 | 712 | ||
713 | typedef struct dir_mem_entry { | 713 | typedef struct dir_mem_entry { |
714 | u64 prcpf[MAX_REGIONS]; | 714 | u64 prcpf[MAX_REGIONS]; |
715 | bddir_entry_t directory_words[MD_PAGE_SIZE/CACHE_SLINE_SIZE]; | 715 | bddir_entry_t directory_words[MD_PAGE_SIZE/CACHE_SLINE_SIZE]; |
716 | } dir_mem_entry_t; | 716 | } dir_mem_entry_t; |
717 | 717 | ||
718 | 718 | ||
719 | 719 | ||
720 | typedef union md_perf_sel { | 720 | typedef union md_perf_sel { |
721 | u64 perf_sel_reg; | 721 | u64 perf_sel_reg; |
722 | struct { | 722 | struct { |
723 | u64 perf_rsvd : 60, | 723 | u64 perf_rsvd : 60, |
724 | perf_en : 1, | 724 | perf_en : 1, |
725 | perf_sel : 3; | 725 | perf_sel : 3; |
726 | } perf_sel_bits; | 726 | } perf_sel_bits; |
727 | } md_perf_sel_t; | 727 | } md_perf_sel_t; |
@@ -730,7 +730,7 @@ typedef union md_perf_cnt { | |||
730 | u64 perf_cnt; | 730 | u64 perf_cnt; |
731 | struct { | 731 | struct { |
732 | u64 perf_rsvd : 44, | 732 | u64 perf_rsvd : 44, |
733 | perf_cnt : 20; | 733 | perf_cnt : 20; |
734 | } perf_cnt_bits; | 734 | } perf_cnt_bits; |
735 | } md_perf_cnt_t; | 735 | } md_perf_cnt_t; |
736 | 736 | ||
diff --git a/arch/mips/include/asm/sn/sn0/hubni.h b/arch/mips/include/asm/sn/sn0/hubni.h index b40d3ef97a12..b73c4bee65f2 100644 --- a/arch/mips/include/asm/sn/sn0/hubni.h +++ b/arch/mips/include/asm/sn/sn0/hubni.h | |||
@@ -25,38 +25,38 @@ | |||
25 | #define NI_BASE_TABLES 0x630000 | 25 | #define NI_BASE_TABLES 0x630000 |
26 | 26 | ||
27 | #define NI_STATUS_REV_ID 0x600000 /* Hub network status, rev, and ID */ | 27 | #define NI_STATUS_REV_ID 0x600000 /* Hub network status, rev, and ID */ |
28 | #define NI_PORT_RESET 0x600008 /* Reset the network interface */ | 28 | #define NI_PORT_RESET 0x600008 /* Reset the network interface */ |
29 | #define NI_PROTECTION 0x600010 /* NI register access permissions */ | 29 | #define NI_PROTECTION 0x600010 /* NI register access permissions */ |
30 | #define NI_GLOBAL_PARMS 0x600018 /* LLP parameters */ | 30 | #define NI_GLOBAL_PARMS 0x600018 /* LLP parameters */ |
31 | #define NI_SCRATCH_REG0 0x600100 /* Scratch register 0 (64 bits) */ | 31 | #define NI_SCRATCH_REG0 0x600100 /* Scratch register 0 (64 bits) */ |
32 | #define NI_SCRATCH_REG1 0x600108 /* Scratch register 1 (64 bits) */ | 32 | #define NI_SCRATCH_REG1 0x600108 /* Scratch register 1 (64 bits) */ |
33 | #define NI_DIAG_PARMS 0x600110 /* Parameters for diags */ | 33 | #define NI_DIAG_PARMS 0x600110 /* Parameters for diags */ |
34 | 34 | ||
35 | #define NI_VECTOR_PARMS 0x600200 /* Vector PIO routing parameters */ | 35 | #define NI_VECTOR_PARMS 0x600200 /* Vector PIO routing parameters */ |
36 | #define NI_VECTOR 0x600208 /* Vector PIO route */ | 36 | #define NI_VECTOR 0x600208 /* Vector PIO route */ |
37 | #define NI_VECTOR_DATA 0x600210 /* Vector PIO data */ | 37 | #define NI_VECTOR_DATA 0x600210 /* Vector PIO data */ |
38 | #define NI_VECTOR_STATUS 0x600300 /* Vector PIO return status */ | 38 | #define NI_VECTOR_STATUS 0x600300 /* Vector PIO return status */ |
39 | #define NI_RETURN_VECTOR 0x600308 /* Vector PIO return vector */ | 39 | #define NI_RETURN_VECTOR 0x600308 /* Vector PIO return vector */ |
40 | #define NI_VECTOR_READ_DATA 0x600310 /* Vector PIO read data */ | 40 | #define NI_VECTOR_READ_DATA 0x600310 /* Vector PIO read data */ |
41 | #define NI_VECTOR_CLEAR 0x600380 /* Vector PIO read & clear status */ | 41 | #define NI_VECTOR_CLEAR 0x600380 /* Vector PIO read & clear status */ |
42 | 42 | ||
43 | #define NI_IO_PROTECT 0x600400 /* PIO protection bits */ | 43 | #define NI_IO_PROTECT 0x600400 /* PIO protection bits */ |
44 | #define NI_IO_PROT_OVRRD 0x600408 /* PIO protection bit override */ | 44 | #define NI_IO_PROT_OVRRD 0x600408 /* PIO protection bit override */ |
45 | 45 | ||
46 | #define NI_AGE_CPU0_MEMORY 0x600500 /* CPU 0 memory age control */ | 46 | #define NI_AGE_CPU0_MEMORY 0x600500 /* CPU 0 memory age control */ |
47 | #define NI_AGE_CPU0_PIO 0x600508 /* CPU 0 PIO age control */ | 47 | #define NI_AGE_CPU0_PIO 0x600508 /* CPU 0 PIO age control */ |
48 | #define NI_AGE_CPU1_MEMORY 0x600510 /* CPU 1 memory age control */ | 48 | #define NI_AGE_CPU1_MEMORY 0x600510 /* CPU 1 memory age control */ |
49 | #define NI_AGE_CPU1_PIO 0x600518 /* CPU 1 PIO age control */ | 49 | #define NI_AGE_CPU1_PIO 0x600518 /* CPU 1 PIO age control */ |
50 | #define NI_AGE_GBR_MEMORY 0x600520 /* GBR memory age control */ | 50 | #define NI_AGE_GBR_MEMORY 0x600520 /* GBR memory age control */ |
51 | #define NI_AGE_GBR_PIO 0x600528 /* GBR PIO age control */ | 51 | #define NI_AGE_GBR_PIO 0x600528 /* GBR PIO age control */ |
52 | #define NI_AGE_IO_MEMORY 0x600530 /* IO memory age control */ | 52 | #define NI_AGE_IO_MEMORY 0x600530 /* IO memory age control */ |
53 | #define NI_AGE_IO_PIO 0x600538 /* IO PIO age control */ | 53 | #define NI_AGE_IO_PIO 0x600538 /* IO PIO age control */ |
54 | #define NI_AGE_REG_MIN NI_AGE_CPU0_MEMORY | 54 | #define NI_AGE_REG_MIN NI_AGE_CPU0_MEMORY |
55 | #define NI_AGE_REG_MAX NI_AGE_IO_PIO | 55 | #define NI_AGE_REG_MAX NI_AGE_IO_PIO |
56 | 56 | ||
57 | #define NI_PORT_PARMS 0x608000 /* LLP Parameters */ | 57 | #define NI_PORT_PARMS 0x608000 /* LLP Parameters */ |
58 | #define NI_PORT_ERROR 0x608008 /* LLP Errors */ | 58 | #define NI_PORT_ERROR 0x608008 /* LLP Errors */ |
59 | #define NI_PORT_ERROR_CLEAR 0x608088 /* Clear the error bits */ | 59 | #define NI_PORT_ERROR_CLEAR 0x608088 /* Clear the error bits */ |
60 | 60 | ||
61 | #define NI_META_TABLE0 0x638000 /* First meta routing table entry */ | 61 | #define NI_META_TABLE0 0x638000 /* First meta routing table entry */ |
62 | #define NI_META_TABLE(_x) (NI_META_TABLE0 + (8 * (_x))) | 62 | #define NI_META_TABLE(_x) (NI_META_TABLE0 + (8 * (_x))) |
@@ -76,13 +76,13 @@ | |||
76 | #define NSRI_LINKUP_SHFT 29 | 76 | #define NSRI_LINKUP_SHFT 29 |
77 | #define NSRI_LINKUP_MASK (UINT64_CAST 0x1 << 29) | 77 | #define NSRI_LINKUP_MASK (UINT64_CAST 0x1 << 29) |
78 | #define NSRI_DOWNREASON_SHFT 28 /* 0=failed, 1=never came */ | 78 | #define NSRI_DOWNREASON_SHFT 28 /* 0=failed, 1=never came */ |
79 | #define NSRI_DOWNREASON_MASK (UINT64_CAST 0x1 << 28) /* out of reset. */ | 79 | #define NSRI_DOWNREASON_MASK (UINT64_CAST 0x1 << 28) /* out of reset. */ |
80 | #define NSRI_MORENODES_SHFT 18 | 80 | #define NSRI_MORENODES_SHFT 18 |
81 | #define NSRI_MORENODES_MASK (UINT64_CAST 1 << 18) /* Max. # of nodes */ | 81 | #define NSRI_MORENODES_MASK (UINT64_CAST 1 << 18) /* Max. # of nodes */ |
82 | #define MORE_MEMORY 0 | 82 | #define MORE_MEMORY 0 |
83 | #define MORE_NODES 1 | 83 | #define MORE_NODES 1 |
84 | #define NSRI_REGIONSIZE_SHFT 17 | 84 | #define NSRI_REGIONSIZE_SHFT 17 |
85 | #define NSRI_REGIONSIZE_MASK (UINT64_CAST 1 << 17) /* Granularity */ | 85 | #define NSRI_REGIONSIZE_MASK (UINT64_CAST 1 << 17) /* Granularity */ |
86 | #define REGIONSIZE_FINE 1 | 86 | #define REGIONSIZE_FINE 1 |
87 | #define REGIONSIZE_COARSE 0 | 87 | #define REGIONSIZE_COARSE 0 |
88 | #define NSRI_NODEID_SHFT 8 | 88 | #define NSRI_NODEID_SHFT 8 |
@@ -90,14 +90,14 @@ | |||
90 | #define NSRI_REV_SHFT 4 | 90 | #define NSRI_REV_SHFT 4 |
91 | #define NSRI_REV_MASK (UINT64_CAST 0xf << 4) /* Chip Revision */ | 91 | #define NSRI_REV_MASK (UINT64_CAST 0xf << 4) /* Chip Revision */ |
92 | #define NSRI_CHIPID_SHFT 0 | 92 | #define NSRI_CHIPID_SHFT 0 |
93 | #define NSRI_CHIPID_MASK (UINT64_CAST 0xf) /* Chip type ID */ | 93 | #define NSRI_CHIPID_MASK (UINT64_CAST 0xf) /* Chip type ID */ |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * In fine mode, each node is a region. In coarse mode, there are | 96 | * In fine mode, each node is a region. In coarse mode, there are |
97 | * eight nodes per region. | 97 | * eight nodes per region. |
98 | */ | 98 | */ |
99 | #define NASID_TO_FINEREG_SHFT 0 | 99 | #define NASID_TO_FINEREG_SHFT 0 |
100 | #define NASID_TO_COARSEREG_SHFT 3 | 100 | #define NASID_TO_COARSEREG_SHFT 3 |
101 | 101 | ||
102 | /* NI_PORT_RESET mask definitions */ | 102 | /* NI_PORT_RESET mask definitions */ |
103 | 103 | ||
@@ -111,21 +111,21 @@ | |||
111 | 111 | ||
112 | /* NI_GLOBAL_PARMS mask and shift definitions */ | 112 | /* NI_GLOBAL_PARMS mask and shift definitions */ |
113 | 113 | ||
114 | #define NGP_MAXRETRY_SHFT 48 /* Maximum retries */ | 114 | #define NGP_MAXRETRY_SHFT 48 /* Maximum retries */ |
115 | #define NGP_MAXRETRY_MASK (UINT64_CAST 0x3ff << 48) | 115 | #define NGP_MAXRETRY_MASK (UINT64_CAST 0x3ff << 48) |
116 | #define NGP_TAILTOWRAP_SHFT 32 /* Tail timeout wrap */ | 116 | #define NGP_TAILTOWRAP_SHFT 32 /* Tail timeout wrap */ |
117 | #define NGP_TAILTOWRAP_MASK (UINT64_CAST 0xffff << 32) | 117 | #define NGP_TAILTOWRAP_MASK (UINT64_CAST 0xffff << 32) |
118 | 118 | ||
119 | #define NGP_CREDITTOVAL_SHFT 16 /* Tail timeout wrap */ | 119 | #define NGP_CREDITTOVAL_SHFT 16 /* Tail timeout wrap */ |
120 | #define NGP_CREDITTOVAL_MASK (UINT64_CAST 0xf << 16) | 120 | #define NGP_CREDITTOVAL_MASK (UINT64_CAST 0xf << 16) |
121 | #define NGP_TAILTOVAL_SHFT 4 /* Tail timeout value */ | 121 | #define NGP_TAILTOVAL_SHFT 4 /* Tail timeout value */ |
122 | #define NGP_TAILTOVAL_MASK (UINT64_CAST 0xf << 4) | 122 | #define NGP_TAILTOVAL_MASK (UINT64_CAST 0xf << 4) |
123 | 123 | ||
124 | /* NI_DIAG_PARMS mask and shift definitions */ | 124 | /* NI_DIAG_PARMS mask and shift definitions */ |
125 | 125 | ||
126 | #define NDP_PORTTORESET (UINT64_CAST 1 << 18) /* Port tmout reset */ | 126 | #define NDP_PORTTORESET (UINT64_CAST 1 << 18) /* Port tmout reset */ |
127 | #define NDP_LLP8BITMODE (UINT64_CAST 1 << 12) /* LLP 8-bit mode */ | 127 | #define NDP_LLP8BITMODE (UINT64_CAST 1 << 12) /* LLP 8-bit mode */ |
128 | #define NDP_PORTDISABLE (UINT64_CAST 1 << 6) /* Port disable */ | 128 | #define NDP_PORTDISABLE (UINT64_CAST 1 << 6) /* Port disable */ |
129 | #define NDP_SENDERROR (UINT64_CAST 1) /* Send data error */ | 129 | #define NDP_SENDERROR (UINT64_CAST 1) /* Send data error */ |
130 | 130 | ||
131 | /* | 131 | /* |
@@ -137,7 +137,7 @@ | |||
137 | #define NVP_PIOID_MASK (UINT64_CAST 0x3ff << 40) | 137 | #define NVP_PIOID_MASK (UINT64_CAST 0x3ff << 40) |
138 | #define NVP_WRITEID_SHFT 32 | 138 | #define NVP_WRITEID_SHFT 32 |
139 | #define NVP_WRITEID_MASK (UINT64_CAST 0xff << 32) | 139 | #define NVP_WRITEID_MASK (UINT64_CAST 0xff << 32) |
140 | #define NVP_ADDRESS_MASK (UINT64_CAST 0xffff8) /* Bits 19:3 */ | 140 | #define NVP_ADDRESS_MASK (UINT64_CAST 0xffff8) /* Bits 19:3 */ |
141 | #define NVP_TYPE_SHFT 0 | 141 | #define NVP_TYPE_SHFT 0 |
142 | #define NVP_TYPE_MASK (UINT64_CAST 0x3) | 142 | #define NVP_TYPE_MASK (UINT64_CAST 0x3) |
143 | 143 | ||
@@ -151,7 +151,7 @@ | |||
151 | #define NVS_PIOID_MASK (UINT64_CAST 0x3ff << 40) | 151 | #define NVS_PIOID_MASK (UINT64_CAST 0x3ff << 40) |
152 | #define NVS_WRITEID_SHFT 32 | 152 | #define NVS_WRITEID_SHFT 32 |
153 | #define NVS_WRITEID_MASK (UINT64_CAST 0xff << 32) | 153 | #define NVS_WRITEID_MASK (UINT64_CAST 0xff << 32) |
154 | #define NVS_ADDRESS_MASK (UINT64_CAST 0xfffffff8) /* Bits 31:3 */ | 154 | #define NVS_ADDRESS_MASK (UINT64_CAST 0xfffffff8) /* Bits 31:3 */ |
155 | #define NVS_TYPE_SHFT 0 | 155 | #define NVS_TYPE_SHFT 0 |
156 | #define NVS_TYPE_MASK (UINT64_CAST 0x7) | 156 | #define NVS_TYPE_MASK (UINT64_CAST 0x7) |
157 | #define NVS_ERROR_MASK (UINT64_CAST 0x4) /* bit set means error */ | 157 | #define NVS_ERROR_MASK (UINT64_CAST 0x4) /* bit set means error */ |
@@ -161,10 +161,10 @@ | |||
161 | #define PIOTYPE_WRITE 1 /* VECTOR_PARMS and VECTOR_STATUS */ | 161 | #define PIOTYPE_WRITE 1 /* VECTOR_PARMS and VECTOR_STATUS */ |
162 | #define PIOTYPE_UNDEFINED 2 /* VECTOR_PARMS and VECTOR_STATUS */ | 162 | #define PIOTYPE_UNDEFINED 2 /* VECTOR_PARMS and VECTOR_STATUS */ |
163 | #define PIOTYPE_EXCHANGE 3 /* VECTOR_PARMS and VECTOR_STATUS */ | 163 | #define PIOTYPE_EXCHANGE 3 /* VECTOR_PARMS and VECTOR_STATUS */ |
164 | #define PIOTYPE_ADDR_ERR 4 /* VECTOR_STATUS only */ | 164 | #define PIOTYPE_ADDR_ERR 4 /* VECTOR_STATUS only */ |
165 | #define PIOTYPE_CMD_ERR 5 /* VECTOR_STATUS only */ | 165 | #define PIOTYPE_CMD_ERR 5 /* VECTOR_STATUS only */ |
166 | #define PIOTYPE_PROT_ERR 6 /* VECTOR_STATUS only */ | 166 | #define PIOTYPE_PROT_ERR 6 /* VECTOR_STATUS only */ |
167 | #define PIOTYPE_UNKNOWN 7 /* VECTOR_STATUS only */ | 167 | #define PIOTYPE_UNKNOWN 7 /* VECTOR_STATUS only */ |
168 | 168 | ||
169 | /* NI_AGE_XXX mask and shift definitions */ | 169 | /* NI_AGE_XXX mask and shift definitions */ |
170 | 170 | ||
@@ -215,7 +215,7 @@ | |||
215 | 215 | ||
216 | #define NPE_FATAL_ERRORS (NPE_LINKRESET | NPE_INTERNALERROR | \ | 216 | #define NPE_FATAL_ERRORS (NPE_LINKRESET | NPE_INTERNALERROR | \ |
217 | NPE_BADMESSAGE | NPE_BADDEST | \ | 217 | NPE_BADMESSAGE | NPE_BADDEST | \ |
218 | NPE_FIFOOVERFLOW | NPE_CREDITTO_MASK | \ | 218 | NPE_FIFOOVERFLOW | NPE_CREDITTO_MASK | \ |
219 | NPE_TAILTO_MASK) | 219 | NPE_TAILTO_MASK) |
220 | 220 | ||
221 | /* NI_META_TABLE mask and shift definitions */ | 221 | /* NI_META_TABLE mask and shift definitions */ |
@@ -231,7 +231,7 @@ | |||
231 | typedef union hubni_port_error_u { | 231 | typedef union hubni_port_error_u { |
232 | u64 nipe_reg_value; | 232 | u64 nipe_reg_value; |
233 | struct { | 233 | struct { |
234 | u64 nipe_rsvd: 26, /* unused */ | 234 | u64 nipe_rsvd: 26, /* unused */ |
235 | nipe_lnk_reset: 1, /* link reset */ | 235 | nipe_lnk_reset: 1, /* link reset */ |
236 | nipe_intl_err: 1, /* internal error */ | 236 | nipe_intl_err: 1, /* internal error */ |
237 | nipe_bad_msg: 1, /* bad message */ | 237 | nipe_bad_msg: 1, /* bad message */ |
diff --git a/arch/mips/include/asm/sn/sn0/hubpi.h b/arch/mips/include/asm/sn/sn0/hubpi.h index e39f5f9da040..7b83655913c5 100644 --- a/arch/mips/include/asm/sn/sn0/hubpi.h +++ b/arch/mips/include/asm/sn/sn0/hubpi.h | |||
@@ -8,8 +8,8 @@ | |||
8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. | 8 | * Copyright (C) 1992 - 1997, 1999 Silicon Graphics, Inc. |
9 | * Copyright (C) 1999 by Ralf Baechle | 9 | * Copyright (C) 1999 by Ralf Baechle |
10 | */ | 10 | */ |
11 | #ifndef _ASM_SN_SN0_HUBPI_H | 11 | #ifndef _ASM_SN_SN0_HUBPI_H |
12 | #define _ASM_SN_SN0_HUBPI_H | 12 | #define _ASM_SN_SN0_HUBPI_H |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | 15 | ||
@@ -25,13 +25,13 @@ | |||
25 | 25 | ||
26 | /* General protection and control registers */ | 26 | /* General protection and control registers */ |
27 | 27 | ||
28 | #define PI_CPU_PROTECT 0x000000 /* CPU Protection */ | 28 | #define PI_CPU_PROTECT 0x000000 /* CPU Protection */ |
29 | #define PI_PROT_OVERRD 0x000008 /* Clear CPU Protection bit */ | 29 | #define PI_PROT_OVERRD 0x000008 /* Clear CPU Protection bit */ |
30 | #define PI_IO_PROTECT 0x000010 /* Interrupt Pending Protection */ | 30 | #define PI_IO_PROTECT 0x000010 /* Interrupt Pending Protection */ |
31 | #define PI_REGION_PRESENT 0x000018 /* Indicates whether region exists */ | 31 | #define PI_REGION_PRESENT 0x000018 /* Indicates whether region exists */ |
32 | #define PI_CPU_NUM 0x000020 /* CPU Number ID */ | 32 | #define PI_CPU_NUM 0x000020 /* CPU Number ID */ |
33 | #define PI_CALIAS_SIZE 0x000028 /* Cached Alias Size */ | 33 | #define PI_CALIAS_SIZE 0x000028 /* Cached Alias Size */ |
34 | #define PI_MAX_CRB_TIMEOUT 0x000030 /* Maximum Timeout for CRB */ | 34 | #define PI_MAX_CRB_TIMEOUT 0x000030 /* Maximum Timeout for CRB */ |
35 | #define PI_CRB_SFACTOR 0x000038 /* Scale factor for CRB timeout */ | 35 | #define PI_CRB_SFACTOR 0x000038 /* Scale factor for CRB timeout */ |
36 | 36 | ||
37 | /* CALIAS values */ | 37 | /* CALIAS values */ |
@@ -54,28 +54,28 @@ | |||
54 | 54 | ||
55 | /* Processor control and status checking */ | 55 | /* Processor control and status checking */ |
56 | 56 | ||
57 | #define PI_CPU_PRESENT_A 0x000040 /* CPU Present A */ | 57 | #define PI_CPU_PRESENT_A 0x000040 /* CPU Present A */ |
58 | #define PI_CPU_PRESENT_B 0x000048 /* CPU Present B */ | 58 | #define PI_CPU_PRESENT_B 0x000048 /* CPU Present B */ |
59 | #define PI_CPU_ENABLE_A 0x000050 /* CPU Enable A */ | 59 | #define PI_CPU_ENABLE_A 0x000050 /* CPU Enable A */ |
60 | #define PI_CPU_ENABLE_B 0x000058 /* CPU Enable B */ | 60 | #define PI_CPU_ENABLE_B 0x000058 /* CPU Enable B */ |
61 | #define PI_REPLY_LEVEL 0x000060 /* Reply Level */ | 61 | #define PI_REPLY_LEVEL 0x000060 /* Reply Level */ |
62 | #define PI_HARDRESET_BIT 0x020068 /* Bit cleared by s/w on SR */ | 62 | #define PI_HARDRESET_BIT 0x020068 /* Bit cleared by s/w on SR */ |
63 | #define PI_NMI_A 0x000070 /* NMI to CPU A */ | 63 | #define PI_NMI_A 0x000070 /* NMI to CPU A */ |
64 | #define PI_NMI_B 0x000078 /* NMI to CPU B */ | 64 | #define PI_NMI_B 0x000078 /* NMI to CPU B */ |
65 | #define PI_NMI_OFFSET (PI_NMI_B - PI_NMI_A) | 65 | #define PI_NMI_OFFSET (PI_NMI_B - PI_NMI_A) |
66 | #define PI_SOFTRESET 0x000080 /* Softreset (to both CPUs) */ | 66 | #define PI_SOFTRESET 0x000080 /* Softreset (to both CPUs) */ |
67 | 67 | ||
68 | /* Regular Interrupt register checking. */ | 68 | /* Regular Interrupt register checking. */ |
69 | 69 | ||
70 | #define PI_INT_PEND_MOD 0x000090 /* Write to set pending ints */ | 70 | #define PI_INT_PEND_MOD 0x000090 /* Write to set pending ints */ |
71 | #define PI_INT_PEND0 0x000098 /* Read to get pending ints */ | 71 | #define PI_INT_PEND0 0x000098 /* Read to get pending ints */ |
72 | #define PI_INT_PEND1 0x0000a0 /* Read to get pending ints */ | 72 | #define PI_INT_PEND1 0x0000a0 /* Read to get pending ints */ |
73 | #define PI_INT_MASK0_A 0x0000a8 /* Interrupt Mask 0 for CPU A */ | 73 | #define PI_INT_MASK0_A 0x0000a8 /* Interrupt Mask 0 for CPU A */ |
74 | #define PI_INT_MASK1_A 0x0000b0 /* Interrupt Mask 1 for CPU A */ | 74 | #define PI_INT_MASK1_A 0x0000b0 /* Interrupt Mask 1 for CPU A */ |
75 | #define PI_INT_MASK0_B 0x0000b8 /* Interrupt Mask 0 for CPU B */ | 75 | #define PI_INT_MASK0_B 0x0000b8 /* Interrupt Mask 0 for CPU B */ |
76 | #define PI_INT_MASK1_B 0x0000c0 /* Interrupt Mask 1 for CPU B */ | 76 | #define PI_INT_MASK1_B 0x0000c0 /* Interrupt Mask 1 for CPU B */ |
77 | 77 | ||
78 | #define PI_INT_MASK_OFFSET 0x10 /* Offset from A to B */ | 78 | #define PI_INT_MASK_OFFSET 0x10 /* Offset from A to B */ |
79 | 79 | ||
80 | /* Crosscall interrupts */ | 80 | /* Crosscall interrupts */ |
81 | 81 | ||
@@ -83,49 +83,49 @@ | |||
83 | #define PI_CC_PEND_SET_B 0x0000d0 /* CC Interrupt Pending Set, CPU B */ | 83 | #define PI_CC_PEND_SET_B 0x0000d0 /* CC Interrupt Pending Set, CPU B */ |
84 | #define PI_CC_PEND_CLR_A 0x0000d8 /* CC Interrupt Pending Clr, CPU A */ | 84 | #define PI_CC_PEND_CLR_A 0x0000d8 /* CC Interrupt Pending Clr, CPU A */ |
85 | #define PI_CC_PEND_CLR_B 0x0000e0 /* CC Interrupt Pending Clr, CPU B */ | 85 | #define PI_CC_PEND_CLR_B 0x0000e0 /* CC Interrupt Pending Clr, CPU B */ |
86 | #define PI_CC_MASK 0x0000e8 /* CC Interrupt mask */ | 86 | #define PI_CC_MASK 0x0000e8 /* CC Interrupt mask */ |
87 | 87 | ||
88 | #define PI_INT_SET_OFFSET 0x08 /* Offset from A to B */ | 88 | #define PI_INT_SET_OFFSET 0x08 /* Offset from A to B */ |
89 | 89 | ||
90 | /* Realtime Counter and Profiler control registers */ | 90 | /* Realtime Counter and Profiler control registers */ |
91 | 91 | ||
92 | #define PI_RT_COUNT 0x030100 /* Real Time Counter */ | 92 | #define PI_RT_COUNT 0x030100 /* Real Time Counter */ |
93 | #define PI_RT_COMPARE_A 0x000108 /* Real Time Compare A */ | 93 | #define PI_RT_COMPARE_A 0x000108 /* Real Time Compare A */ |
94 | #define PI_RT_COMPARE_B 0x000110 /* Real Time Compare B */ | 94 | #define PI_RT_COMPARE_B 0x000110 /* Real Time Compare B */ |
95 | #define PI_PROFILE_COMPARE 0x000118 /* L5 int to both cpus when == RTC */ | 95 | #define PI_PROFILE_COMPARE 0x000118 /* L5 int to both cpus when == RTC */ |
96 | #define PI_RT_PEND_A 0x000120 /* Set if RT int for A pending */ | 96 | #define PI_RT_PEND_A 0x000120 /* Set if RT int for A pending */ |
97 | #define PI_RT_PEND_B 0x000128 /* Set if RT int for B pending */ | 97 | #define PI_RT_PEND_B 0x000128 /* Set if RT int for B pending */ |
98 | #define PI_PROF_PEND_A 0x000130 /* Set if Prof int for A pending */ | 98 | #define PI_PROF_PEND_A 0x000130 /* Set if Prof int for A pending */ |
99 | #define PI_PROF_PEND_B 0x000138 /* Set if Prof int for B pending */ | 99 | #define PI_PROF_PEND_B 0x000138 /* Set if Prof int for B pending */ |
100 | #define PI_RT_EN_A 0x000140 /* RT int for CPU A enable */ | 100 | #define PI_RT_EN_A 0x000140 /* RT int for CPU A enable */ |
101 | #define PI_RT_EN_B 0x000148 /* RT int for CPU B enable */ | 101 | #define PI_RT_EN_B 0x000148 /* RT int for CPU B enable */ |
102 | #define PI_PROF_EN_A 0x000150 /* PROF int for CPU A enable */ | 102 | #define PI_PROF_EN_A 0x000150 /* PROF int for CPU A enable */ |
103 | #define PI_PROF_EN_B 0x000158 /* PROF int for CPU B enable */ | 103 | #define PI_PROF_EN_B 0x000158 /* PROF int for CPU B enable */ |
104 | #define PI_RT_LOCAL_CTRL 0x000160 /* RT control register */ | 104 | #define PI_RT_LOCAL_CTRL 0x000160 /* RT control register */ |
105 | #define PI_RT_FILTER_CTRL 0x000168 /* GCLK Filter control register */ | 105 | #define PI_RT_FILTER_CTRL 0x000168 /* GCLK Filter control register */ |
106 | 106 | ||
107 | #define PI_COUNT_OFFSET 0x08 /* A to B offset for all counts */ | 107 | #define PI_COUNT_OFFSET 0x08 /* A to B offset for all counts */ |
108 | 108 | ||
109 | /* Built-In Self Test support */ | 109 | /* Built-In Self Test support */ |
110 | 110 | ||
111 | #define PI_BIST_WRITE_DATA 0x000200 /* BIST write data */ | 111 | #define PI_BIST_WRITE_DATA 0x000200 /* BIST write data */ |
112 | #define PI_BIST_READ_DATA 0x000208 /* BIST read data */ | 112 | #define PI_BIST_READ_DATA 0x000208 /* BIST read data */ |
113 | #define PI_BIST_COUNT_TARG 0x000210 /* BIST Count and Target */ | 113 | #define PI_BIST_COUNT_TARG 0x000210 /* BIST Count and Target */ |
114 | #define PI_BIST_READY 0x000218 /* BIST Ready indicator */ | 114 | #define PI_BIST_READY 0x000218 /* BIST Ready indicator */ |
115 | #define PI_BIST_SHIFT_LOAD 0x000220 /* BIST control */ | 115 | #define PI_BIST_SHIFT_LOAD 0x000220 /* BIST control */ |
116 | #define PI_BIST_SHIFT_UNLOAD 0x000228 /* BIST control */ | 116 | #define PI_BIST_SHIFT_UNLOAD 0x000228 /* BIST control */ |
117 | #define PI_BIST_ENTER_RUN 0x000230 /* BIST control */ | 117 | #define PI_BIST_ENTER_RUN 0x000230 /* BIST control */ |
118 | 118 | ||
119 | /* Graphics control registers */ | 119 | /* Graphics control registers */ |
120 | 120 | ||
121 | #define PI_GFX_PAGE_A 0x000300 /* Graphics page A */ | 121 | #define PI_GFX_PAGE_A 0x000300 /* Graphics page A */ |
122 | #define PI_GFX_CREDIT_CNTR_A 0x000308 /* Graphics credit counter A */ | 122 | #define PI_GFX_CREDIT_CNTR_A 0x000308 /* Graphics credit counter A */ |
123 | #define PI_GFX_BIAS_A 0x000310 /* Graphics bias A */ | 123 | #define PI_GFX_BIAS_A 0x000310 /* Graphics bias A */ |
124 | #define PI_GFX_INT_CNTR_A 0x000318 /* Graphics interrupt counter A */ | 124 | #define PI_GFX_INT_CNTR_A 0x000318 /* Graphics interrupt counter A */ |
125 | #define PI_GFX_INT_CMP_A 0x000320 /* Graphics interrupt comparator A */ | 125 | #define PI_GFX_INT_CMP_A 0x000320 /* Graphics interrupt comparator A */ |
126 | #define PI_GFX_PAGE_B 0x000328 /* Graphics page B */ | 126 | #define PI_GFX_PAGE_B 0x000328 /* Graphics page B */ |
127 | #define PI_GFX_CREDIT_CNTR_B 0x000330 /* Graphics credit counter B */ | 127 | #define PI_GFX_CREDIT_CNTR_B 0x000330 /* Graphics credit counter B */ |
128 | #define PI_GFX_BIAS_B 0x000338 /* Graphics bias B */ | 128 | #define PI_GFX_BIAS_B 0x000338 /* Graphics bias B */ |
129 | #define PI_GFX_INT_CNTR_B 0x000340 /* Graphics interrupt counter B */ | 129 | #define PI_GFX_INT_CNTR_B 0x000340 /* Graphics interrupt counter B */ |
130 | #define PI_GFX_INT_CMP_B 0x000348 /* Graphics interrupt comparator B */ | 130 | #define PI_GFX_INT_CMP_B 0x000348 /* Graphics interrupt comparator B */ |
131 | 131 | ||
@@ -138,24 +138,24 @@ | |||
138 | #define PI_ERR_INT_MASK_B 0x000410 /* Error Interrupt mask for CPU B */ | 138 | #define PI_ERR_INT_MASK_B 0x000410 /* Error Interrupt mask for CPU B */ |
139 | #define PI_ERR_STACK_ADDR_A 0x000418 /* Error stack address for CPU A */ | 139 | #define PI_ERR_STACK_ADDR_A 0x000418 /* Error stack address for CPU A */ |
140 | #define PI_ERR_STACK_ADDR_B 0x000420 /* Error stack address for CPU B */ | 140 | #define PI_ERR_STACK_ADDR_B 0x000420 /* Error stack address for CPU B */ |
141 | #define PI_ERR_STACK_SIZE 0x000428 /* Error Stack Size */ | 141 | #define PI_ERR_STACK_SIZE 0x000428 /* Error Stack Size */ |
142 | #define PI_ERR_STATUS0_A 0x000430 /* Error Status 0A */ | 142 | #define PI_ERR_STATUS0_A 0x000430 /* Error Status 0A */ |
143 | #define PI_ERR_STATUS0_A_RCLR 0x000438 /* Error Status 0A clear on read */ | 143 | #define PI_ERR_STATUS0_A_RCLR 0x000438 /* Error Status 0A clear on read */ |
144 | #define PI_ERR_STATUS1_A 0x000440 /* Error Status 1A */ | 144 | #define PI_ERR_STATUS1_A 0x000440 /* Error Status 1A */ |
145 | #define PI_ERR_STATUS1_A_RCLR 0x000448 /* Error Status 1A clear on read */ | 145 | #define PI_ERR_STATUS1_A_RCLR 0x000448 /* Error Status 1A clear on read */ |
146 | #define PI_ERR_STATUS0_B 0x000450 /* Error Status 0B */ | 146 | #define PI_ERR_STATUS0_B 0x000450 /* Error Status 0B */ |
147 | #define PI_ERR_STATUS0_B_RCLR 0x000458 /* Error Status 0B clear on read */ | 147 | #define PI_ERR_STATUS0_B_RCLR 0x000458 /* Error Status 0B clear on read */ |
148 | #define PI_ERR_STATUS1_B 0x000460 /* Error Status 1B */ | 148 | #define PI_ERR_STATUS1_B 0x000460 /* Error Status 1B */ |
149 | #define PI_ERR_STATUS1_B_RCLR 0x000468 /* Error Status 1B clear on read */ | 149 | #define PI_ERR_STATUS1_B_RCLR 0x000468 /* Error Status 1B clear on read */ |
150 | #define PI_SPOOL_CMP_A 0x000470 /* Spool compare for CPU A */ | 150 | #define PI_SPOOL_CMP_A 0x000470 /* Spool compare for CPU A */ |
151 | #define PI_SPOOL_CMP_B 0x000478 /* Spool compare for CPU B */ | 151 | #define PI_SPOOL_CMP_B 0x000478 /* Spool compare for CPU B */ |
152 | #define PI_CRB_TIMEOUT_A 0x000480 /* Timed out CRB entries for A */ | 152 | #define PI_CRB_TIMEOUT_A 0x000480 /* Timed out CRB entries for A */ |
153 | #define PI_CRB_TIMEOUT_B 0x000488 /* Timed out CRB entries for B */ | 153 | #define PI_CRB_TIMEOUT_B 0x000488 /* Timed out CRB entries for B */ |
154 | #define PI_SYSAD_ERRCHK_EN 0x000490 /* Enables SYSAD error checking */ | 154 | #define PI_SYSAD_ERRCHK_EN 0x000490 /* Enables SYSAD error checking */ |
155 | #define PI_BAD_CHECK_BIT_A 0x000498 /* Force SYSAD check bit error */ | 155 | #define PI_BAD_CHECK_BIT_A 0x000498 /* Force SYSAD check bit error */ |
156 | #define PI_BAD_CHECK_BIT_B 0x0004a0 /* Force SYSAD check bit error */ | 156 | #define PI_BAD_CHECK_BIT_B 0x0004a0 /* Force SYSAD check bit error */ |
157 | #define PI_NACK_CNT_A 0x0004a8 /* Consecutive NACK counter */ | 157 | #define PI_NACK_CNT_A 0x0004a8 /* Consecutive NACK counter */ |
158 | #define PI_NACK_CNT_B 0x0004b0 /* " " for CPU B */ | 158 | #define PI_NACK_CNT_B 0x0004b0 /* " " for CPU B */ |
159 | #define PI_NACK_CMP 0x0004b8 /* NACK count compare */ | 159 | #define PI_NACK_CMP 0x0004b8 /* NACK count compare */ |
160 | #define PI_STACKADDR_OFFSET (PI_ERR_STACK_ADDR_B - PI_ERR_STACK_ADDR_A) | 160 | #define PI_STACKADDR_OFFSET (PI_ERR_STACK_ADDR_B - PI_ERR_STACK_ADDR_A) |
161 | #define PI_ERRSTAT_OFFSET (PI_ERR_STATUS0_B - PI_ERR_STATUS0_A) | 161 | #define PI_ERRSTAT_OFFSET (PI_ERR_STATUS0_B - PI_ERR_STATUS0_A) |
@@ -168,7 +168,7 @@ | |||
168 | #define PI_ERR_SPUR_MSG_A 0x00000008 | 168 | #define PI_ERR_SPUR_MSG_A 0x00000008 |
169 | #define PI_ERR_WRB_TERR_B 0x00000010 /* WRB TERR */ | 169 | #define PI_ERR_WRB_TERR_B 0x00000010 /* WRB TERR */ |
170 | #define PI_ERR_WRB_TERR_A 0x00000020 | 170 | #define PI_ERR_WRB_TERR_A 0x00000020 |
171 | #define PI_ERR_WRB_WERR_B 0x00000040 /* WRB WERR */ | 171 | #define PI_ERR_WRB_WERR_B 0x00000040 /* WRB WERR */ |
172 | #define PI_ERR_WRB_WERR_A 0x00000080 | 172 | #define PI_ERR_WRB_WERR_A 0x00000080 |
173 | #define PI_ERR_SYSSTATE_B 0x00000100 /* SysState parity error */ | 173 | #define PI_ERR_SYSSTATE_B 0x00000100 /* SysState parity error */ |
174 | #define PI_ERR_SYSSTATE_A 0x00000200 | 174 | #define PI_ERR_SYSSTATE_A 0x00000200 |
@@ -196,32 +196,32 @@ | |||
196 | * The following three macros define all possible error int pends. | 196 | * The following three macros define all possible error int pends. |
197 | */ | 197 | */ |
198 | 198 | ||
199 | #define PI_FATAL_ERR_CPU_A (PI_ERR_SYSSTATE_TAG_A | \ | 199 | #define PI_FATAL_ERR_CPU_A (PI_ERR_SYSSTATE_TAG_A | \ |
200 | PI_ERR_BAD_SPOOL_A | \ | 200 | PI_ERR_BAD_SPOOL_A | \ |
201 | PI_ERR_SYSCMD_ADDR_A | \ | 201 | PI_ERR_SYSCMD_ADDR_A | \ |
202 | PI_ERR_SYSCMD_DATA_A | \ | 202 | PI_ERR_SYSCMD_DATA_A | \ |
203 | PI_ERR_SYSAD_ADDR_A | \ | 203 | PI_ERR_SYSAD_ADDR_A | \ |
204 | PI_ERR_SYSAD_DATA_A | \ | 204 | PI_ERR_SYSAD_DATA_A | \ |
205 | PI_ERR_SYSSTATE_A) | 205 | PI_ERR_SYSSTATE_A) |
206 | 206 | ||
207 | #define PI_MISC_ERR_CPU_A (PI_ERR_UNCAC_UNCORR_A | \ | 207 | #define PI_MISC_ERR_CPU_A (PI_ERR_UNCAC_UNCORR_A | \ |
208 | PI_ERR_WRB_WERR_A | \ | 208 | PI_ERR_WRB_WERR_A | \ |
209 | PI_ERR_WRB_TERR_A | \ | 209 | PI_ERR_WRB_TERR_A | \ |
210 | PI_ERR_SPUR_MSG_A | \ | 210 | PI_ERR_SPUR_MSG_A | \ |
211 | PI_ERR_SPOOL_CMP_A) | 211 | PI_ERR_SPOOL_CMP_A) |
212 | 212 | ||
213 | #define PI_FATAL_ERR_CPU_B (PI_ERR_SYSSTATE_TAG_B | \ | 213 | #define PI_FATAL_ERR_CPU_B (PI_ERR_SYSSTATE_TAG_B | \ |
214 | PI_ERR_BAD_SPOOL_B | \ | 214 | PI_ERR_BAD_SPOOL_B | \ |
215 | PI_ERR_SYSCMD_ADDR_B | \ | 215 | PI_ERR_SYSCMD_ADDR_B | \ |
216 | PI_ERR_SYSCMD_DATA_B | \ | 216 | PI_ERR_SYSCMD_DATA_B | \ |
217 | PI_ERR_SYSAD_ADDR_B | \ | 217 | PI_ERR_SYSAD_ADDR_B | \ |
218 | PI_ERR_SYSAD_DATA_B | \ | 218 | PI_ERR_SYSAD_DATA_B | \ |
219 | PI_ERR_SYSSTATE_B) | 219 | PI_ERR_SYSSTATE_B) |
220 | 220 | ||
221 | #define PI_MISC_ERR_CPU_B (PI_ERR_UNCAC_UNCORR_B | \ | 221 | #define PI_MISC_ERR_CPU_B (PI_ERR_UNCAC_UNCORR_B | \ |
222 | PI_ERR_WRB_WERR_B | \ | 222 | PI_ERR_WRB_WERR_B | \ |
223 | PI_ERR_WRB_TERR_B | \ | 223 | PI_ERR_WRB_TERR_B | \ |
224 | PI_ERR_SPUR_MSG_B | \ | 224 | PI_ERR_SPUR_MSG_B | \ |
225 | PI_ERR_SPOOL_CMP_B) | 225 | PI_ERR_SPOOL_CMP_B) |
226 | 226 | ||
227 | #define PI_ERR_GENERIC (PI_ERR_MD_UNCORR) | 227 | #define PI_ERR_GENERIC (PI_ERR_MD_UNCORR) |
@@ -242,24 +242,24 @@ | |||
242 | #define PI_ERR_ST0_CMD_SHFT 17 | 242 | #define PI_ERR_ST0_CMD_SHFT 17 |
243 | #define PI_ERR_ST0_ADDR_MASK 0x3ffffffffe000000 | 243 | #define PI_ERR_ST0_ADDR_MASK 0x3ffffffffe000000 |
244 | #define PI_ERR_ST0_ADDR_SHFT 25 | 244 | #define PI_ERR_ST0_ADDR_SHFT 25 |
245 | #define PI_ERR_ST0_OVERRUN_MASK 0x4000000000000000 | 245 | #define PI_ERR_ST0_OVERRUN_MASK 0x4000000000000000 |
246 | #define PI_ERR_ST0_OVERRUN_SHFT 62 | 246 | #define PI_ERR_ST0_OVERRUN_SHFT 62 |
247 | #define PI_ERR_ST0_VALID_MASK 0x8000000000000000 | 247 | #define PI_ERR_ST0_VALID_MASK 0x8000000000000000 |
248 | #define PI_ERR_ST0_VALID_SHFT 63 | 248 | #define PI_ERR_ST0_VALID_SHFT 63 |
249 | 249 | ||
250 | /* Fields in PI_ERR_STATUS1_[AB] */ | 250 | /* Fields in PI_ERR_STATUS1_[AB] */ |
251 | #define PI_ERR_ST1_SPOOL_MASK 0x00000000001fffff | 251 | #define PI_ERR_ST1_SPOOL_MASK 0x00000000001fffff |
252 | #define PI_ERR_ST1_SPOOL_SHFT 0 | 252 | #define PI_ERR_ST1_SPOOL_SHFT 0 |
253 | #define PI_ERR_ST1_TOUTCNT_MASK 0x000000001fe00000 | 253 | #define PI_ERR_ST1_TOUTCNT_MASK 0x000000001fe00000 |
254 | #define PI_ERR_ST1_TOUTCNT_SHFT 21 | 254 | #define PI_ERR_ST1_TOUTCNT_SHFT 21 |
255 | #define PI_ERR_ST1_INVCNT_MASK 0x0000007fe0000000 | 255 | #define PI_ERR_ST1_INVCNT_MASK 0x0000007fe0000000 |
256 | #define PI_ERR_ST1_INVCNT_SHFT 29 | 256 | #define PI_ERR_ST1_INVCNT_SHFT 29 |
257 | #define PI_ERR_ST1_CRBNUM_MASK 0x0000038000000000 | 257 | #define PI_ERR_ST1_CRBNUM_MASK 0x0000038000000000 |
258 | #define PI_ERR_ST1_CRBNUM_SHFT 39 | 258 | #define PI_ERR_ST1_CRBNUM_SHFT 39 |
259 | #define PI_ERR_ST1_WRBRRB_MASK 0x0000040000000000 | 259 | #define PI_ERR_ST1_WRBRRB_MASK 0x0000040000000000 |
260 | #define PI_ERR_ST1_WRBRRB_SHFT 42 | 260 | #define PI_ERR_ST1_WRBRRB_SHFT 42 |
261 | #define PI_ERR_ST1_CRBSTAT_MASK 0x001ff80000000000 | 261 | #define PI_ERR_ST1_CRBSTAT_MASK 0x001ff80000000000 |
262 | #define PI_ERR_ST1_CRBSTAT_SHFT 43 | 262 | #define PI_ERR_ST1_CRBSTAT_SHFT 43 |
263 | #define PI_ERR_ST1_MSGSRC_MASK 0xffe0000000000000 | 263 | #define PI_ERR_ST1_MSGSRC_MASK 0xffe0000000000000 |
264 | #define PI_ERR_ST1_MSGSRC_SHFT 53 | 264 | #define PI_ERR_ST1_MSGSRC_SHFT 53 |
265 | 265 | ||
@@ -274,8 +274,8 @@ | |||
274 | #define PI_ERR_STK_CRBNUM_SHFT 9 | 274 | #define PI_ERR_STK_CRBNUM_SHFT 9 |
275 | #define PI_ERR_STK_WRBRRB_MASK 0x0000000000001000 | 275 | #define PI_ERR_STK_WRBRRB_MASK 0x0000000000001000 |
276 | #define PI_ERR_STK_WRBRRB_SHFT 12 | 276 | #define PI_ERR_STK_WRBRRB_SHFT 12 |
277 | #define PI_ERR_STK_CRBSTAT_MASK 0x00000000007fe000 | 277 | #define PI_ERR_STK_CRBSTAT_MASK 0x00000000007fe000 |
278 | #define PI_ERR_STK_CRBSTAT_SHFT 13 | 278 | #define PI_ERR_STK_CRBSTAT_SHFT 13 |
279 | #define PI_ERR_STK_CMD_MASK 0x000000007f800000 | 279 | #define PI_ERR_STK_CMD_MASK 0x000000007f800000 |
280 | #define PI_ERR_STK_CMD_SHFT 23 | 280 | #define PI_ERR_STK_CMD_SHFT 23 |
281 | #define PI_ERR_STK_ADDR_MASK 0xffffffff80000000 | 281 | #define PI_ERR_STK_ADDR_MASK 0xffffffff80000000 |
@@ -364,11 +364,11 @@ typedef u64 rtc_time_t; | |||
364 | 364 | ||
365 | /* Bits in PI_SYSAD_ERRCHK_EN */ | 365 | /* Bits in PI_SYSAD_ERRCHK_EN */ |
366 | #define PI_SYSAD_ERRCHK_ECCGEN 0x01 /* Enable ECC generation */ | 366 | #define PI_SYSAD_ERRCHK_ECCGEN 0x01 /* Enable ECC generation */ |
367 | #define PI_SYSAD_ERRCHK_QUALGEN 0x02 /* Enable data quality signal gen. */ | 367 | #define PI_SYSAD_ERRCHK_QUALGEN 0x02 /* Enable data quality signal gen. */ |
368 | #define PI_SYSAD_ERRCHK_SADP 0x04 /* Enable SysAD parity checking */ | 368 | #define PI_SYSAD_ERRCHK_SADP 0x04 /* Enable SysAD parity checking */ |
369 | #define PI_SYSAD_ERRCHK_CMDP 0x08 /* Enable SysCmd parity checking */ | 369 | #define PI_SYSAD_ERRCHK_CMDP 0x08 /* Enable SysCmd parity checking */ |
370 | #define PI_SYSAD_ERRCHK_STATE 0x10 /* Enable SysState parity checking */ | 370 | #define PI_SYSAD_ERRCHK_STATE 0x10 /* Enable SysState parity checking */ |
371 | #define PI_SYSAD_ERRCHK_QUAL 0x20 /* Enable data quality checking */ | 371 | #define PI_SYSAD_ERRCHK_QUAL 0x20 /* Enable data quality checking */ |
372 | #define PI_SYSAD_CHECK_ALL 0x3f /* Generate and check all signals. */ | 372 | #define PI_SYSAD_CHECK_ALL 0x3f /* Generate and check all signals. */ |
373 | 373 | ||
374 | /* Interrupt pending bits on R10000 */ | 374 | /* Interrupt pending bits on R10000 */ |
diff --git a/arch/mips/include/asm/sn/sn0/ip27.h b/arch/mips/include/asm/sn/sn0/ip27.h index 3c97e0855c8d..3b5efeefcc3f 100644 --- a/arch/mips/include/asm/sn/sn0/ip27.h +++ b/arch/mips/include/asm/sn/sn0/ip27.h | |||
@@ -21,14 +21,14 @@ | |||
21 | 21 | ||
22 | #ifndef __ASSEMBLY__ | 22 | #ifndef __ASSEMBLY__ |
23 | 23 | ||
24 | #define CAUSE_BERRINTR IE_IRQ5 | 24 | #define CAUSE_BERRINTR IE_IRQ5 |
25 | 25 | ||
26 | #define ECCF_CACHE_ERR 0 | 26 | #define ECCF_CACHE_ERR 0 |
27 | #define ECCF_TAGLO 1 | 27 | #define ECCF_TAGLO 1 |
28 | #define ECCF_ECC 2 | 28 | #define ECCF_ECC 2 |
29 | #define ECCF_ERROREPC 3 | 29 | #define ECCF_ERROREPC 3 |
30 | #define ECCF_PADDR 4 | 30 | #define ECCF_PADDR 4 |
31 | #define ECCF_SIZE (5 * sizeof(long)) | 31 | #define ECCF_SIZE (5 * sizeof(long)) |
32 | 32 | ||
33 | #endif /* !__ASSEMBLY__ */ | 33 | #endif /* !__ASSEMBLY__ */ |
34 | 34 | ||
@@ -39,8 +39,8 @@ | |||
39 | * the processor number of the calling processor. The proc parameters | 39 | * the processor number of the calling processor. The proc parameters |
40 | * must be a register. | 40 | * must be a register. |
41 | */ | 41 | */ |
42 | #define KL_GET_CPUNUM(proc) \ | 42 | #define KL_GET_CPUNUM(proc) \ |
43 | dli proc, LOCAL_HUB(0); \ | 43 | dli proc, LOCAL_HUB(0); \ |
44 | ld proc, PI_CPU_NUM(proc) | 44 | ld proc, PI_CPU_NUM(proc) |
45 | 45 | ||
46 | #endif /* __ASSEMBLY__ */ | 46 | #endif /* __ASSEMBLY__ */ |
@@ -71,15 +71,15 @@ | |||
71 | 71 | ||
72 | #define NUM_CAUSE_INTRS 8 | 72 | #define NUM_CAUSE_INTRS 8 |
73 | 73 | ||
74 | #define SCACHE_LINESIZE 128 | 74 | #define SCACHE_LINESIZE 128 |
75 | #define SCACHE_LINEMASK (SCACHE_LINESIZE - 1) | 75 | #define SCACHE_LINEMASK (SCACHE_LINESIZE - 1) |
76 | 76 | ||
77 | #include <asm/sn/addrs.h> | 77 | #include <asm/sn/addrs.h> |
78 | 78 | ||
79 | #define LED_CYCLE_MASK 0x0f | 79 | #define LED_CYCLE_MASK 0x0f |
80 | #define LED_CYCLE_SHFT 4 | 80 | #define LED_CYCLE_SHFT 4 |
81 | 81 | ||
82 | #define SEND_NMI(_nasid, _slice) \ | 82 | #define SEND_NMI(_nasid, _slice) \ |
83 | REMOTE_HUB_S((_nasid), (PI_NMI_A + ((_slice) * PI_NMI_OFFSET)), 1) | 83 | REMOTE_HUB_S((_nasid), (PI_NMI_A + ((_slice) * PI_NMI_OFFSET)), 1) |
84 | 84 | ||
85 | #endif /* _ASM_SN_SN0_IP27_H */ | 85 | #endif /* _ASM_SN_SN0_IP27_H */ |
diff --git a/arch/mips/include/asm/sn/types.h b/arch/mips/include/asm/sn/types.h index 74d0bb260b86..c4813d67aec3 100644 --- a/arch/mips/include/asm/sn/types.h +++ b/arch/mips/include/asm/sn/types.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | 13 | ||
14 | typedef unsigned long cpuid_t; | 14 | typedef unsigned long cpuid_t; |
15 | typedef unsigned long cnodemask_t; | 15 | typedef unsigned long cnodemask_t; |
16 | typedef signed short nasid_t; /* node id in numa-as-id space */ | 16 | typedef signed short nasid_t; /* node id in numa-as-id space */ |
17 | typedef signed short cnodeid_t; /* node id in compact-id space */ | 17 | typedef signed short cnodeid_t; /* node id in compact-id space */ |
@@ -19,7 +19,7 @@ typedef signed char partid_t; /* partition ID type */ | |||
19 | typedef signed short moduleid_t; /* user-visible module number type */ | 19 | typedef signed short moduleid_t; /* user-visible module number type */ |
20 | typedef signed short cmoduleid_t; /* kernel compact module id type */ | 20 | typedef signed short cmoduleid_t; /* kernel compact module id type */ |
21 | typedef unsigned char clusterid_t; /* Clusterid of the cell */ | 21 | typedef unsigned char clusterid_t; /* Clusterid of the cell */ |
22 | typedef unsigned long pfn_t; | 22 | typedef unsigned long pfn_t; |
23 | 23 | ||
24 | typedef dev_t vertex_hdl_t; /* hardware graph vertex handle */ | 24 | typedef dev_t vertex_hdl_t; /* hardware graph vertex handle */ |
25 | 25 | ||
diff --git a/arch/mips/include/asm/sni.h b/arch/mips/include/asm/sni.h index 8c1eb02c6d16..a107201a2e1e 100644 --- a/arch/mips/include/asm/sni.h +++ b/arch/mips/include/asm/sni.h | |||
@@ -13,27 +13,27 @@ | |||
13 | 13 | ||
14 | extern unsigned int sni_brd_type; | 14 | extern unsigned int sni_brd_type; |
15 | 15 | ||
16 | #define SNI_BRD_10 2 | 16 | #define SNI_BRD_10 2 |
17 | #define SNI_BRD_10NEW 3 | 17 | #define SNI_BRD_10NEW 3 |
18 | #define SNI_BRD_TOWER_OASIC 4 | 18 | #define SNI_BRD_TOWER_OASIC 4 |
19 | #define SNI_BRD_MINITOWER 5 | 19 | #define SNI_BRD_MINITOWER 5 |
20 | #define SNI_BRD_PCI_TOWER 6 | 20 | #define SNI_BRD_PCI_TOWER 6 |
21 | #define SNI_BRD_RM200 7 | 21 | #define SNI_BRD_RM200 7 |
22 | #define SNI_BRD_PCI_MTOWER 8 | 22 | #define SNI_BRD_PCI_MTOWER 8 |
23 | #define SNI_BRD_PCI_DESKTOP 9 | 23 | #define SNI_BRD_PCI_DESKTOP 9 |
24 | #define SNI_BRD_PCI_TOWER_CPLUS 10 | 24 | #define SNI_BRD_PCI_TOWER_CPLUS 10 |
25 | #define SNI_BRD_PCI_MTOWER_CPLUS 11 | 25 | #define SNI_BRD_PCI_MTOWER_CPLUS 11 |
26 | 26 | ||
27 | /* RM400 cpu types */ | 27 | /* RM400 cpu types */ |
28 | #define SNI_CPU_M8021 0x01 | 28 | #define SNI_CPU_M8021 0x01 |
29 | #define SNI_CPU_M8030 0x04 | 29 | #define SNI_CPU_M8030 0x04 |
30 | #define SNI_CPU_M8031 0x06 | 30 | #define SNI_CPU_M8031 0x06 |
31 | #define SNI_CPU_M8034 0x0f | 31 | #define SNI_CPU_M8034 0x0f |
32 | #define SNI_CPU_M8037 0x07 | 32 | #define SNI_CPU_M8037 0x07 |
33 | #define SNI_CPU_M8040 0x05 | 33 | #define SNI_CPU_M8040 0x05 |
34 | #define SNI_CPU_M8043 0x09 | 34 | #define SNI_CPU_M8043 0x09 |
35 | #define SNI_CPU_M8050 0x0b | 35 | #define SNI_CPU_M8050 0x0b |
36 | #define SNI_CPU_M8053 0x0d | 36 | #define SNI_CPU_M8053 0x0d |
37 | 37 | ||
38 | #define SNI_PORT_BASE CKSEG1ADDR(0xb4000000) | 38 | #define SNI_PORT_BASE CKSEG1ADDR(0xb4000000) |
39 | 39 | ||
@@ -52,14 +52,14 @@ extern unsigned int sni_brd_type; | |||
52 | #define PCIMT_ERRADDR CKSEG1ADDR(0xbfff0044) | 52 | #define PCIMT_ERRADDR CKSEG1ADDR(0xbfff0044) |
53 | #define PCIMT_SYNDROME CKSEG1ADDR(0xbfff004c) | 53 | #define PCIMT_SYNDROME CKSEG1ADDR(0xbfff004c) |
54 | #define PCIMT_ITPEND CKSEG1ADDR(0xbfff0054) | 54 | #define PCIMT_ITPEND CKSEG1ADDR(0xbfff0054) |
55 | #define IT_INT2 0x01 | 55 | #define IT_INT2 0x01 |
56 | #define IT_INTD 0x02 | 56 | #define IT_INTD 0x02 |
57 | #define IT_INTC 0x04 | 57 | #define IT_INTC 0x04 |
58 | #define IT_INTB 0x08 | 58 | #define IT_INTB 0x08 |
59 | #define IT_INTA 0x10 | 59 | #define IT_INTA 0x10 |
60 | #define IT_EISA 0x20 | 60 | #define IT_EISA 0x20 |
61 | #define IT_SCSI 0x40 | 61 | #define IT_SCSI 0x40 |
62 | #define IT_ETH 0x80 | 62 | #define IT_ETH 0x80 |
63 | #define PCIMT_IRQSEL CKSEG1ADDR(0xbfff005c) | 63 | #define PCIMT_IRQSEL CKSEG1ADDR(0xbfff005c) |
64 | #define PCIMT_TESTMEM CKSEG1ADDR(0xbfff0064) | 64 | #define PCIMT_TESTMEM CKSEG1ADDR(0xbfff0064) |
65 | #define PCIMT_ECCREG CKSEG1ADDR(0xbfff006c) | 65 | #define PCIMT_ECCREG CKSEG1ADDR(0xbfff006c) |
@@ -86,14 +86,14 @@ extern unsigned int sni_brd_type; | |||
86 | #define PCIMT_ERRADDR CKSEG1ADDR(0xbfff0040) | 86 | #define PCIMT_ERRADDR CKSEG1ADDR(0xbfff0040) |
87 | #define PCIMT_SYNDROME CKSEG1ADDR(0xbfff0048) | 87 | #define PCIMT_SYNDROME CKSEG1ADDR(0xbfff0048) |
88 | #define PCIMT_ITPEND CKSEG1ADDR(0xbfff0050) | 88 | #define PCIMT_ITPEND CKSEG1ADDR(0xbfff0050) |
89 | #define IT_INT2 0x01 | 89 | #define IT_INT2 0x01 |
90 | #define IT_INTD 0x02 | 90 | #define IT_INTD 0x02 |
91 | #define IT_INTC 0x04 | 91 | #define IT_INTC 0x04 |
92 | #define IT_INTB 0x08 | 92 | #define IT_INTB 0x08 |
93 | #define IT_INTA 0x10 | 93 | #define IT_INTA 0x10 |
94 | #define IT_EISA 0x20 | 94 | #define IT_EISA 0x20 |
95 | #define IT_SCSI 0x40 | 95 | #define IT_SCSI 0x40 |
96 | #define IT_ETH 0x80 | 96 | #define IT_ETH 0x80 |
97 | #define PCIMT_IRQSEL CKSEG1ADDR(0xbfff0058) | 97 | #define PCIMT_IRQSEL CKSEG1ADDR(0xbfff0058) |
98 | #define PCIMT_TESTMEM CKSEG1ADDR(0xbfff0060) | 98 | #define PCIMT_TESTMEM CKSEG1ADDR(0xbfff0060) |
99 | #define PCIMT_ECCREG CKSEG1ADDR(0xbfff0068) | 99 | #define PCIMT_ECCREG CKSEG1ADDR(0xbfff0068) |
@@ -137,29 +137,29 @@ extern unsigned int sni_brd_type; | |||
137 | /* | 137 | /* |
138 | * A20R based boards | 138 | * A20R based boards |
139 | */ | 139 | */ |
140 | #define A20R_PT_CLOCK_BASE CKSEG1ADDR(0xbc040000) | 140 | #define A20R_PT_CLOCK_BASE CKSEG1ADDR(0xbc040000) |
141 | #define A20R_PT_TIM0_ACK CKSEG1ADDR(0xbc050000) | 141 | #define A20R_PT_TIM0_ACK CKSEG1ADDR(0xbc050000) |
142 | #define A20R_PT_TIM1_ACK CKSEG1ADDR(0xbc060000) | 142 | #define A20R_PT_TIM1_ACK CKSEG1ADDR(0xbc060000) |
143 | 143 | ||
144 | #define SNI_A20R_IRQ_BASE MIPS_CPU_IRQ_BASE | 144 | #define SNI_A20R_IRQ_BASE MIPS_CPU_IRQ_BASE |
145 | #define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5) | 145 | #define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5) |
146 | 146 | ||
147 | #define SNI_PCIT_INT_REG CKSEG1ADDR(0xbfff000c) | 147 | #define SNI_PCIT_INT_REG CKSEG1ADDR(0xbfff000c) |
148 | 148 | ||
149 | #define SNI_PCIT_INT_START 24 | 149 | #define SNI_PCIT_INT_START 24 |
150 | #define SNI_PCIT_INT_END 30 | 150 | #define SNI_PCIT_INT_END 30 |
151 | 151 | ||
152 | #define PCIT_IRQ_ETHERNET (MIPS_CPU_IRQ_BASE + 5) | 152 | #define PCIT_IRQ_ETHERNET (MIPS_CPU_IRQ_BASE + 5) |
153 | #define PCIT_IRQ_INTA (SNI_PCIT_INT_START + 0) | 153 | #define PCIT_IRQ_INTA (SNI_PCIT_INT_START + 0) |
154 | #define PCIT_IRQ_INTB (SNI_PCIT_INT_START + 1) | 154 | #define PCIT_IRQ_INTB (SNI_PCIT_INT_START + 1) |
155 | #define PCIT_IRQ_INTC (SNI_PCIT_INT_START + 2) | 155 | #define PCIT_IRQ_INTC (SNI_PCIT_INT_START + 2) |
156 | #define PCIT_IRQ_INTD (SNI_PCIT_INT_START + 3) | 156 | #define PCIT_IRQ_INTD (SNI_PCIT_INT_START + 3) |
157 | #define PCIT_IRQ_SCSI0 (SNI_PCIT_INT_START + 4) | 157 | #define PCIT_IRQ_SCSI0 (SNI_PCIT_INT_START + 4) |
158 | #define PCIT_IRQ_SCSI1 (SNI_PCIT_INT_START + 5) | 158 | #define PCIT_IRQ_SCSI1 (SNI_PCIT_INT_START + 5) |
159 | 159 | ||
160 | 160 | ||
161 | /* | 161 | /* |
162 | * Interrupt 0-16 are EISA interrupts. Interrupts from 16 on are assigned | 162 | * Interrupt 0-16 are EISA interrupts. Interrupts from 16 on are assigned |
163 | * to the other interrupts generated by ASIC PCI. | 163 | * to the other interrupts generated by ASIC PCI. |
164 | * | 164 | * |
165 | * INT2 is a wired-or of the push button interrupt, high temperature interrupt | 165 | * INT2 is a wired-or of the push button interrupt, high temperature interrupt |
@@ -204,12 +204,12 @@ extern unsigned int sni_brd_type; | |||
204 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 204 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
205 | #define __SNI_END 3 | 205 | #define __SNI_END 3 |
206 | #endif | 206 | #endif |
207 | #define SNI_IDPROM_BASE CKSEG1ADDR(0x1ff00000) | 207 | #define SNI_IDPROM_BASE CKSEG1ADDR(0x1ff00000) |
208 | #define SNI_IDPROM_MEMSIZE (SNI_IDPROM_BASE + (0x28 ^ __SNI_END)) | 208 | #define SNI_IDPROM_MEMSIZE (SNI_IDPROM_BASE + (0x28 ^ __SNI_END)) |
209 | #define SNI_IDPROM_BRDTYPE (SNI_IDPROM_BASE + (0x29 ^ __SNI_END)) | 209 | #define SNI_IDPROM_BRDTYPE (SNI_IDPROM_BASE + (0x29 ^ __SNI_END)) |
210 | #define SNI_IDPROM_CPUTYPE (SNI_IDPROM_BASE + (0x30 ^ __SNI_END)) | 210 | #define SNI_IDPROM_CPUTYPE (SNI_IDPROM_BASE + (0x30 ^ __SNI_END)) |
211 | 211 | ||
212 | #define SNI_IDPROM_SIZE 0x1000 | 212 | #define SNI_IDPROM_SIZE 0x1000 |
213 | 213 | ||
214 | /* board specific init functions */ | 214 | /* board specific init functions */ |
215 | extern void sni_a20r_init(void); | 215 | extern void sni_a20r_init(void); |
diff --git a/arch/mips/include/asm/sparsemem.h b/arch/mips/include/asm/sparsemem.h index 65900dab3ad3..d2da53c2c2f8 100644 --- a/arch/mips/include/asm/sparsemem.h +++ b/arch/mips/include/asm/sparsemem.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #else | 11 | #else |
12 | # define SECTION_SIZE_BITS 28 | 12 | # define SECTION_SIZE_BITS 28 |
13 | #endif | 13 | #endif |
14 | #define MAX_PHYSMEM_BITS 35 | 14 | #define MAX_PHYSMEM_BITS 35 |
15 | 15 | ||
16 | #endif /* CONFIG_SPARSEMEM */ | 16 | #endif /* CONFIG_SPARSEMEM */ |
17 | #endif /* _MIPS_SPARSEMEM_H */ | 17 | #endif /* _MIPS_SPARSEMEM_H */ |
diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h index ca61e846ab0f..5130c88d6420 100644 --- a/arch/mips/include/asm/spinlock.h +++ b/arch/mips/include/asm/spinlock.h | |||
@@ -17,7 +17,7 @@ | |||
17 | /* | 17 | /* |
18 | * Your basic SMP spinlocks, allowing only a single CPU anywhere | 18 | * Your basic SMP spinlocks, allowing only a single CPU anywhere |
19 | * | 19 | * |
20 | * Simple spin lock operations. There are two variants, one clears IRQ's | 20 | * Simple spin lock operations. There are two variants, one clears IRQ's |
21 | * on the local processor, one does not. | 21 | * on the local processor, one does not. |
22 | * | 22 | * |
23 | * These are fair FIFO ticket locks | 23 | * These are fair FIFO ticket locks |
@@ -222,7 +222,7 @@ static inline unsigned int arch_spin_trylock(arch_spinlock_t *lock) | |||
222 | * write_can_lock - would write_trylock() succeed? | 222 | * write_can_lock - would write_trylock() succeed? |
223 | * @lock: the rwlock in question. | 223 | * @lock: the rwlock in question. |
224 | */ | 224 | */ |
225 | #define arch_write_can_lock(rw) (!(rw)->lock) | 225 | #define arch_write_can_lock(rw) (!(rw)->lock) |
226 | 226 | ||
227 | static inline void arch_read_lock(arch_rwlock_t *rw) | 227 | static inline void arch_read_lock(arch_rwlock_t *rw) |
228 | { | 228 | { |
diff --git a/arch/mips/include/asm/spinlock_types.h b/arch/mips/include/asm/spinlock_types.h index c52f36013a9d..9b2528e612c0 100644 --- a/arch/mips/include/asm/spinlock_types.h +++ b/arch/mips/include/asm/spinlock_types.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | typedef union { | 12 | typedef union { |
13 | /* | 13 | /* |
14 | * bits 0..15 : serving_now | 14 | * bits 0..15 : serving_now |
15 | * bits 16..31 : ticket | 15 | * bits 16..31 : ticket |
16 | */ | 16 | */ |
17 | u32 lock; | 17 | u32 lock; |
diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h index cb41af5f3406..c99384018161 100644 --- a/arch/mips/include/asm/stackframe.h +++ b/arch/mips/include/asm/stackframe.h | |||
@@ -218,17 +218,17 @@ | |||
218 | ori $28, sp, _THREAD_MASK | 218 | ori $28, sp, _THREAD_MASK |
219 | xori $28, _THREAD_MASK | 219 | xori $28, _THREAD_MASK |
220 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | 220 | #ifdef CONFIG_CPU_CAVIUM_OCTEON |
221 | .set mips64 | 221 | .set mips64 |
222 | pref 0, 0($28) /* Prefetch the current pointer */ | 222 | pref 0, 0($28) /* Prefetch the current pointer */ |
223 | pref 0, PT_R31(sp) /* Prefetch the $31(ra) */ | 223 | pref 0, PT_R31(sp) /* Prefetch the $31(ra) */ |
224 | /* The Octeon multiplier state is affected by general multiply | 224 | /* The Octeon multiplier state is affected by general multiply |
225 | instructions. It must be saved before and kernel code might | 225 | instructions. It must be saved before and kernel code might |
226 | corrupt it */ | 226 | corrupt it */ |
227 | jal octeon_mult_save | 227 | jal octeon_mult_save |
228 | LONG_L v1, 0($28) /* Load the current pointer */ | 228 | LONG_L v1, 0($28) /* Load the current pointer */ |
229 | /* Restore $31(ra) that was changed by the jal */ | 229 | /* Restore $31(ra) that was changed by the jal */ |
230 | LONG_L ra, PT_R31(sp) | 230 | LONG_L ra, PT_R31(sp) |
231 | pref 0, 0(v1) /* Prefetch the current thread */ | 231 | pref 0, 0(v1) /* Prefetch the current thread */ |
232 | #endif | 232 | #endif |
233 | .set pop | 233 | .set pop |
234 | .endm | 234 | .endm |
diff --git a/arch/mips/include/asm/string.h b/arch/mips/include/asm/string.h index 436e3ad352d9..29030cb398ee 100644 --- a/arch/mips/include/asm/string.h +++ b/arch/mips/include/asm/string.h | |||
@@ -35,7 +35,7 @@ static __inline__ char *strcpy(char *__dest, __const__ char *__src) | |||
35 | ".set\tat\n\t" | 35 | ".set\tat\n\t" |
36 | ".set\treorder" | 36 | ".set\treorder" |
37 | : "=r" (__dest), "=r" (__src) | 37 | : "=r" (__dest), "=r" (__src) |
38 | : "0" (__dest), "1" (__src) | 38 | : "0" (__dest), "1" (__src) |
39 | : "memory"); | 39 | : "memory"); |
40 | 40 | ||
41 | return __xdest; | 41 | return __xdest; |
@@ -62,9 +62,9 @@ static __inline__ char *strncpy(char *__dest, __const__ char *__src, size_t __n) | |||
62 | "2:\n\t" | 62 | "2:\n\t" |
63 | ".set\tat\n\t" | 63 | ".set\tat\n\t" |
64 | ".set\treorder" | 64 | ".set\treorder" |
65 | : "=r" (__dest), "=r" (__src), "=r" (__n) | 65 | : "=r" (__dest), "=r" (__src), "=r" (__n) |
66 | : "0" (__dest), "1" (__src), "2" (__n) | 66 | : "0" (__dest), "1" (__src), "2" (__n) |
67 | : "memory"); | 67 | : "memory"); |
68 | 68 | ||
69 | return __xdest; | 69 | return __xdest; |
70 | } | 70 | } |
diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h index 4f8ddba8c360..fd16bcb6c311 100644 --- a/arch/mips/include/asm/switch_to.h +++ b/arch/mips/include/asm/switch_to.h | |||
@@ -30,7 +30,7 @@ extern struct task_struct *ll_task; | |||
30 | #ifdef CONFIG_MIPS_MT_FPAFF | 30 | #ifdef CONFIG_MIPS_MT_FPAFF |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Handle the scheduler resume end of FPU affinity management. We do this | 33 | * Handle the scheduler resume end of FPU affinity management. We do this |
34 | * inline to try to keep the overhead down. If we have been forced to run on | 34 | * inline to try to keep the overhead down. If we have been forced to run on |
35 | * a "CPU" with an FPU because of a previous high level of FP computation, | 35 | * a "CPU" with an FPU because of a previous high level of FP computation, |
36 | * but did not actually use the FPU during the most recent time-slice (CU1 | 36 | * but did not actually use the FPU during the most recent time-slice (CU1 |
@@ -72,7 +72,7 @@ do { \ | |||
72 | __save_dsp(prev); \ | 72 | __save_dsp(prev); \ |
73 | __clear_software_ll_bit(); \ | 73 | __clear_software_ll_bit(); \ |
74 | __usedfpu = test_and_clear_tsk_thread_flag(prev, TIF_USEDFPU); \ | 74 | __usedfpu = test_and_clear_tsk_thread_flag(prev, TIF_USEDFPU); \ |
75 | (last) = resume(prev, next, task_thread_info(next), __usedfpu); \ | 75 | (last) = resume(prev, next, task_thread_info(next), __usedfpu); \ |
76 | } while (0) | 76 | } while (0) |
77 | 77 | ||
78 | #define finish_arch_switch(prev) \ | 78 | #define finish_arch_switch(prev) \ |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index b2050b9e64b1..178f7924149a 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -44,7 +44,7 @@ struct thread_info { | |||
44 | #define INIT_THREAD_INFO(tsk) \ | 44 | #define INIT_THREAD_INFO(tsk) \ |
45 | { \ | 45 | { \ |
46 | .task = &tsk, \ | 46 | .task = &tsk, \ |
47 | .exec_domain = &default_exec_domain, \ | 47 | .exec_domain = &default_exec_domain, \ |
48 | .flags = _TIF_FIXADE, \ | 48 | .flags = _TIF_FIXADE, \ |
49 | .cpu = 0, \ | 49 | .cpu = 0, \ |
50 | .preempt_count = INIT_PREEMPT_COUNT, \ | 50 | .preempt_count = INIT_PREEMPT_COUNT, \ |
diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h index 761f2e92119e..96353075cc60 100644 --- a/arch/mips/include/asm/time.h +++ b/arch/mips/include/asm/time.h | |||
@@ -6,8 +6,8 @@ | |||
6 | * include/asm-mips/time.h | 6 | * include/asm-mips/time.h |
7 | * header file for the new style time.c file and time services. | 7 | * header file for the new style time.c file and time services. |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
11 | * Free Software Foundation; either version 2 of the License, or (at your | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * option) any later version. | 12 | * option) any later version. |
13 | */ | 13 | */ |
diff --git a/arch/mips/include/asm/tlb.h b/arch/mips/include/asm/tlb.h index 80d9dfcf1e88..c67842bc8ef3 100644 --- a/arch/mips/include/asm/tlb.h +++ b/arch/mips/include/asm/tlb.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * MIPS doesn't need any special per-pte or per-vma handling, except | 5 | * MIPS doesn't need any special per-pte or per-vma handling, except |
6 | * we need to flush cache for area to be unmapped. | 6 | * we need to flush cache for area to be unmapped. |
7 | */ | 7 | */ |
8 | #define tlb_start_vma(tlb, vma) \ | 8 | #define tlb_start_vma(tlb, vma) \ |
9 | do { \ | 9 | do { \ |
10 | if (!tlb->fullmm) \ | 10 | if (!tlb->fullmm) \ |
11 | flush_cache_range(vma, vma->vm_start, vma->vm_end); \ | 11 | flush_cache_range(vma, vma->vm_start, vma->vm_end); \ |
diff --git a/arch/mips/include/asm/topology.h b/arch/mips/include/asm/topology.h index 259145e07e97..12609a17dc8b 100644 --- a/arch/mips/include/asm/topology.h +++ b/arch/mips/include/asm/topology.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <topology.h> | 11 | #include <topology.h> |
12 | 12 | ||
13 | #ifdef CONFIG_SMP | 13 | #ifdef CONFIG_SMP |
14 | #define smt_capable() (smp_num_siblings > 1) | 14 | #define smt_capable() (smp_num_siblings > 1) |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #endif /* __ASM_TOPOLOGY_H */ | 17 | #endif /* __ASM_TOPOLOGY_H */ |
diff --git a/arch/mips/include/asm/traps.h b/arch/mips/include/asm/traps.h index 420ca06b2f42..f41cf3ee82a7 100644 --- a/arch/mips/include/asm/traps.h +++ b/arch/mips/include/asm/traps.h | |||
@@ -14,7 +14,7 @@ | |||
14 | /* | 14 | /* |
15 | * Possible status responses for a board_be_handler backend. | 15 | * Possible status responses for a board_be_handler backend. |
16 | */ | 16 | */ |
17 | #define MIPS_BE_DISCARD 0 /* return with no action */ | 17 | #define MIPS_BE_DISCARD 0 /* return with no action */ |
18 | #define MIPS_BE_FIXUP 1 /* return to the fixup code */ | 18 | #define MIPS_BE_FIXUP 1 /* return to the fixup code */ |
19 | #define MIPS_BE_FATAL 2 /* treat as an unrecoverable error */ | 19 | #define MIPS_BE_FATAL 2 /* treat as an unrecoverable error */ |
20 | 20 | ||
diff --git a/arch/mips/include/asm/txx9/jmr3927.h b/arch/mips/include/asm/txx9/jmr3927.h index 8808d7f82da0..aab959dc30ba 100644 --- a/arch/mips/include/asm/txx9/jmr3927.h +++ b/arch/mips/include/asm/txx9/jmr3927.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define JMR3927_PCIIO_BASE (KSEG1 + JMR3927_PCIIO) | 40 | #define JMR3927_PCIIO_BASE (KSEG1 + JMR3927_PCIIO) |
41 | 41 | ||
42 | #define JMR3927_IOC_REV_ADDR (JMR3927_IOC_BASE + 0x00000000) | 42 | #define JMR3927_IOC_REV_ADDR (JMR3927_IOC_BASE + 0x00000000) |
43 | #define JMR3927_IOC_NVRAMB_ADDR (JMR3927_IOC_BASE + 0x00010000) | 43 | #define JMR3927_IOC_NVRAMB_ADDR (JMR3927_IOC_BASE + 0x00010000) |
44 | #define JMR3927_IOC_LED_ADDR (JMR3927_IOC_BASE + 0x00020000) | 44 | #define JMR3927_IOC_LED_ADDR (JMR3927_IOC_BASE + 0x00020000) |
45 | #define JMR3927_IOC_DIPSW_ADDR (JMR3927_IOC_BASE + 0x00030000) | 45 | #define JMR3927_IOC_DIPSW_ADDR (JMR3927_IOC_BASE + 0x00030000) |
46 | #define JMR3927_IOC_BREV_ADDR (JMR3927_IOC_BASE + 0x00040000) | 46 | #define JMR3927_IOC_BREV_ADDR (JMR3927_IOC_BASE + 0x00040000) |
@@ -115,9 +115,9 @@ | |||
115 | #define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */ | 115 | #define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */ |
116 | #define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */ | 116 | #define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */ |
117 | 117 | ||
118 | #define JMR3927_IRQ_IRC TXX9_IRQ_BASE | 118 | #define JMR3927_IRQ_IRC TXX9_IRQ_BASE |
119 | #define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC) | 119 | #define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC) |
120 | #define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC) | 120 | #define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC) |
121 | 121 | ||
122 | #define JMR3927_IRQ_IRC_INT0 (JMR3927_IRQ_IRC + TX3927_IR_INT0) | 122 | #define JMR3927_IRQ_IRC_INT0 (JMR3927_IRQ_IRC + TX3927_IR_INT0) |
123 | #define JMR3927_IRQ_IRC_INT1 (JMR3927_IRQ_IRC + TX3927_IR_INT1) | 123 | #define JMR3927_IRQ_IRC_INT1 (JMR3927_IRQ_IRC + TX3927_IR_INT1) |
@@ -127,11 +127,11 @@ | |||
127 | #define JMR3927_IRQ_IRC_INT5 (JMR3927_IRQ_IRC + TX3927_IR_INT5) | 127 | #define JMR3927_IRQ_IRC_INT5 (JMR3927_IRQ_IRC + TX3927_IR_INT5) |
128 | #define JMR3927_IRQ_IRC_SIO0 (JMR3927_IRQ_IRC + TX3927_IR_SIO0) | 128 | #define JMR3927_IRQ_IRC_SIO0 (JMR3927_IRQ_IRC + TX3927_IR_SIO0) |
129 | #define JMR3927_IRQ_IRC_SIO1 (JMR3927_IRQ_IRC + TX3927_IR_SIO1) | 129 | #define JMR3927_IRQ_IRC_SIO1 (JMR3927_IRQ_IRC + TX3927_IR_SIO1) |
130 | #define JMR3927_IRQ_IRC_SIO(ch) (JMR3927_IRQ_IRC + TX3927_IR_SIO(ch)) | 130 | #define JMR3927_IRQ_IRC_SIO(ch) (JMR3927_IRQ_IRC + TX3927_IR_SIO(ch)) |
131 | #define JMR3927_IRQ_IRC_DMA (JMR3927_IRQ_IRC + TX3927_IR_DMA) | 131 | #define JMR3927_IRQ_IRC_DMA (JMR3927_IRQ_IRC + TX3927_IR_DMA) |
132 | #define JMR3927_IRQ_IRC_PIO (JMR3927_IRQ_IRC + TX3927_IR_PIO) | 132 | #define JMR3927_IRQ_IRC_PIO (JMR3927_IRQ_IRC + TX3927_IR_PIO) |
133 | #define JMR3927_IRQ_IRC_PCI (JMR3927_IRQ_IRC + TX3927_IR_PCI) | 133 | #define JMR3927_IRQ_IRC_PCI (JMR3927_IRQ_IRC + TX3927_IR_PCI) |
134 | #define JMR3927_IRQ_IRC_TMR(ch) (JMR3927_IRQ_IRC + TX3927_IR_TMR(ch)) | 134 | #define JMR3927_IRQ_IRC_TMR(ch) (JMR3927_IRQ_IRC + TX3927_IR_TMR(ch)) |
135 | #define JMR3927_IRQ_IOC_PCIA (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA) | 135 | #define JMR3927_IRQ_IOC_PCIA (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA) |
136 | #define JMR3927_IRQ_IOC_PCIB (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB) | 136 | #define JMR3927_IRQ_IOC_PCIB (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB) |
137 | #define JMR3927_IRQ_IOC_PCIC (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC) | 137 | #define JMR3927_IRQ_IOC_PCIC (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC) |
@@ -147,7 +147,7 @@ | |||
147 | #define JMR3927_IRQ_ETHER0 JMR3927_IRQ_IRC_INT3 | 147 | #define JMR3927_IRQ_ETHER0 JMR3927_IRQ_IRC_INT3 |
148 | 148 | ||
149 | /* Clocks */ | 149 | /* Clocks */ |
150 | #define JMR3927_CORECLK 132710400 /* 132.7MHz */ | 150 | #define JMR3927_CORECLK 132710400 /* 132.7MHz */ |
151 | 151 | ||
152 | /* | 152 | /* |
153 | * TX3927 Pin Configuration: | 153 | * TX3927 Pin Configuration: |
diff --git a/arch/mips/include/asm/txx9/rbtx4927.h b/arch/mips/include/asm/txx9/rbtx4927.h index b2adab3d1acc..4060ad26ca99 100644 --- a/arch/mips/include/asm/txx9/rbtx4927.h +++ b/arch/mips/include/asm/txx9/rbtx4927.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Author: MontaVista Software, Inc. | 2 | * Author: MontaVista Software, Inc. |
3 | * source@mvista.com | 3 | * source@mvista.com |
4 | * | 4 | * |
5 | * Copyright 2001-2002 MontaVista Software Inc. | 5 | * Copyright 2001-2002 MontaVista Software Inc. |
6 | * | 6 | * |
@@ -38,7 +38,7 @@ | |||
38 | #define RBTX4927_IMASK_ADDR (IO_BASE + TXX9_CE(2) + 0x00002000) | 38 | #define RBTX4927_IMASK_ADDR (IO_BASE + TXX9_CE(2) + 0x00002000) |
39 | #define RBTX4927_IMSTAT_ADDR (IO_BASE + TXX9_CE(2) + 0x00002006) | 39 | #define RBTX4927_IMSTAT_ADDR (IO_BASE + TXX9_CE(2) + 0x00002006) |
40 | #define RBTX4927_SOFTINT_ADDR (IO_BASE + TXX9_CE(2) + 0x00003000) | 40 | #define RBTX4927_SOFTINT_ADDR (IO_BASE + TXX9_CE(2) + 0x00003000) |
41 | #define RBTX4927_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f000) | 41 | #define RBTX4927_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f000) |
42 | #define RBTX4927_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f002) | 42 | #define RBTX4927_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f002) |
43 | #define RBTX4927_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f006) | 43 | #define RBTX4927_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x0000f006) |
44 | #define RBTX4927_BRAMRTC_BASE (IO_BASE + TXX9_CE(2) + 0x00010000) | 44 | #define RBTX4927_BRAMRTC_BASE (IO_BASE + TXX9_CE(2) + 0x00010000) |
@@ -50,7 +50,7 @@ | |||
50 | #define rbtx4927_imask_addr ((__u8 __iomem *)RBTX4927_IMASK_ADDR) | 50 | #define rbtx4927_imask_addr ((__u8 __iomem *)RBTX4927_IMASK_ADDR) |
51 | #define rbtx4927_imstat_addr ((__u8 __iomem *)RBTX4927_IMSTAT_ADDR) | 51 | #define rbtx4927_imstat_addr ((__u8 __iomem *)RBTX4927_IMSTAT_ADDR) |
52 | #define rbtx4927_softint_addr ((__u8 __iomem *)RBTX4927_SOFTINT_ADDR) | 52 | #define rbtx4927_softint_addr ((__u8 __iomem *)RBTX4927_SOFTINT_ADDR) |
53 | #define rbtx4927_softreset_addr ((__u8 __iomem *)RBTX4927_SOFTRESET_ADDR) | 53 | #define rbtx4927_softreset_addr ((__u8 __iomem *)RBTX4927_SOFTRESET_ADDR) |
54 | #define rbtx4927_softresetlock_addr \ | 54 | #define rbtx4927_softresetlock_addr \ |
55 | ((__u8 __iomem *)RBTX4927_SOFTRESETLOCK_ADDR) | 55 | ((__u8 __iomem *)RBTX4927_SOFTRESETLOCK_ADDR) |
56 | #define rbtx4927_pcireset_addr ((__u8 __iomem *)RBTX4927_PCIRESET_ADDR) | 56 | #define rbtx4927_pcireset_addr ((__u8 __iomem *)RBTX4927_PCIRESET_ADDR) |
diff --git a/arch/mips/include/asm/txx9/rbtx4938.h b/arch/mips/include/asm/txx9/rbtx4938.h index 9f0441a28126..9c969dd3c6eb 100644 --- a/arch/mips/include/asm/txx9/rbtx4938.h +++ b/arch/mips/include/asm/txx9/rbtx4938.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define RBTX4938_SPICS_ADDR (IO_BASE + TXX9_CE(2) + 0x00005002) | 36 | #define RBTX4938_SPICS_ADDR (IO_BASE + TXX9_CE(2) + 0x00005002) |
37 | #define RBTX4938_SFPWR_ADDR (IO_BASE + TXX9_CE(2) + 0x00005008) | 37 | #define RBTX4938_SFPWR_ADDR (IO_BASE + TXX9_CE(2) + 0x00005008) |
38 | #define RBTX4938_SFVOL_ADDR (IO_BASE + TXX9_CE(2) + 0x0000500a) | 38 | #define RBTX4938_SFVOL_ADDR (IO_BASE + TXX9_CE(2) + 0x0000500a) |
39 | #define RBTX4938_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007000) | 39 | #define RBTX4938_SOFTRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007000) |
40 | #define RBTX4938_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x00007002) | 40 | #define RBTX4938_SOFTRESETLOCK_ADDR (IO_BASE + TXX9_CE(2) + 0x00007002) |
41 | #define RBTX4938_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007004) | 41 | #define RBTX4938_PCIRESET_ADDR (IO_BASE + TXX9_CE(2) + 0x00007004) |
42 | #define RBTX4938_ETHER_BASE (IO_BASE + TXX9_CE(2) + 0x00020000) | 42 | #define RBTX4938_ETHER_BASE (IO_BASE + TXX9_CE(2) + 0x00020000) |
@@ -78,7 +78,7 @@ | |||
78 | #define rbtx4938_spics_addr ((__u8 __iomem *)RBTX4938_SPICS_ADDR) | 78 | #define rbtx4938_spics_addr ((__u8 __iomem *)RBTX4938_SPICS_ADDR) |
79 | #define rbtx4938_sfpwr_addr ((__u8 __iomem *)RBTX4938_SFPWR_ADDR) | 79 | #define rbtx4938_sfpwr_addr ((__u8 __iomem *)RBTX4938_SFPWR_ADDR) |
80 | #define rbtx4938_sfvol_addr ((__u8 __iomem *)RBTX4938_SFVOL_ADDR) | 80 | #define rbtx4938_sfvol_addr ((__u8 __iomem *)RBTX4938_SFVOL_ADDR) |
81 | #define rbtx4938_softreset_addr ((__u8 __iomem *)RBTX4938_SOFTRESET_ADDR) | 81 | #define rbtx4938_softreset_addr ((__u8 __iomem *)RBTX4938_SOFTRESET_ADDR) |
82 | #define rbtx4938_softresetlock_addr \ | 82 | #define rbtx4938_softresetlock_addr \ |
83 | ((__u8 __iomem *)RBTX4938_SOFTRESETLOCK_ADDR) | 83 | ((__u8 __iomem *)RBTX4938_SOFTRESETLOCK_ADDR) |
84 | #define rbtx4938_pcireset_addr ((__u8 __iomem *)RBTX4938_PCIRESET_ADDR) | 84 | #define rbtx4938_pcireset_addr ((__u8 __iomem *)RBTX4938_PCIRESET_ADDR) |
@@ -94,7 +94,7 @@ | |||
94 | 94 | ||
95 | /* These are the virtual IRQ numbers, we divide all IRQ's into | 95 | /* These are the virtual IRQ numbers, we divide all IRQ's into |
96 | * 'spaces', the 'space' determines where and how to enable/disable | 96 | * 'spaces', the 'space' determines where and how to enable/disable |
97 | * that particular IRQ on an RBTX4938 machine. Add new 'spaces' as new | 97 | * that particular IRQ on an RBTX4938 machine. Add new 'spaces' as new |
98 | * IRQ hardware is supported. | 98 | * IRQ hardware is supported. |
99 | */ | 99 | */ |
100 | #define RBTX4938_NR_IRQ_IOC 8 | 100 | #define RBTX4938_NR_IRQ_IOC 8 |
@@ -103,18 +103,18 @@ | |||
103 | #define RBTX4938_IRQ_IOC (TXX9_IRQ_BASE + TX4938_NUM_IR) | 103 | #define RBTX4938_IRQ_IOC (TXX9_IRQ_BASE + TX4938_NUM_IR) |
104 | #define RBTX4938_IRQ_END (RBTX4938_IRQ_IOC + RBTX4938_NR_IRQ_IOC) | 104 | #define RBTX4938_IRQ_END (RBTX4938_IRQ_IOC + RBTX4938_NR_IRQ_IOC) |
105 | 105 | ||
106 | #define RBTX4938_IRQ_IRC_ECCERR (RBTX4938_IRQ_IRC + TX4938_IR_ECCERR) | 106 | #define RBTX4938_IRQ_IRC_ECCERR (RBTX4938_IRQ_IRC + TX4938_IR_ECCERR) |
107 | #define RBTX4938_IRQ_IRC_WTOERR (RBTX4938_IRQ_IRC + TX4938_IR_WTOERR) | 107 | #define RBTX4938_IRQ_IRC_WTOERR (RBTX4938_IRQ_IRC + TX4938_IR_WTOERR) |
108 | #define RBTX4938_IRQ_IRC_INT(n) (RBTX4938_IRQ_IRC + TX4938_IR_INT(n)) | 108 | #define RBTX4938_IRQ_IRC_INT(n) (RBTX4938_IRQ_IRC + TX4938_IR_INT(n)) |
109 | #define RBTX4938_IRQ_IRC_SIO(n) (RBTX4938_IRQ_IRC + TX4938_IR_SIO(n)) | 109 | #define RBTX4938_IRQ_IRC_SIO(n) (RBTX4938_IRQ_IRC + TX4938_IR_SIO(n)) |
110 | #define RBTX4938_IRQ_IRC_DMA(ch, n) (RBTX4938_IRQ_IRC + TX4938_IR_DMA(ch, n)) | 110 | #define RBTX4938_IRQ_IRC_DMA(ch, n) (RBTX4938_IRQ_IRC + TX4938_IR_DMA(ch, n)) |
111 | #define RBTX4938_IRQ_IRC_PIO (RBTX4938_IRQ_IRC + TX4938_IR_PIO) | 111 | #define RBTX4938_IRQ_IRC_PIO (RBTX4938_IRQ_IRC + TX4938_IR_PIO) |
112 | #define RBTX4938_IRQ_IRC_PDMAC (RBTX4938_IRQ_IRC + TX4938_IR_PDMAC) | 112 | #define RBTX4938_IRQ_IRC_PDMAC (RBTX4938_IRQ_IRC + TX4938_IR_PDMAC) |
113 | #define RBTX4938_IRQ_IRC_PCIC (RBTX4938_IRQ_IRC + TX4938_IR_PCIC) | 113 | #define RBTX4938_IRQ_IRC_PCIC (RBTX4938_IRQ_IRC + TX4938_IR_PCIC) |
114 | #define RBTX4938_IRQ_IRC_TMR(n) (RBTX4938_IRQ_IRC + TX4938_IR_TMR(n)) | 114 | #define RBTX4938_IRQ_IRC_TMR(n) (RBTX4938_IRQ_IRC + TX4938_IR_TMR(n)) |
115 | #define RBTX4938_IRQ_IRC_NDFMC (RBTX4938_IRQ_IRC + TX4938_IR_NDFMC) | 115 | #define RBTX4938_IRQ_IRC_NDFMC (RBTX4938_IRQ_IRC + TX4938_IR_NDFMC) |
116 | #define RBTX4938_IRQ_IRC_PCIERR (RBTX4938_IRQ_IRC + TX4938_IR_PCIERR) | 116 | #define RBTX4938_IRQ_IRC_PCIERR (RBTX4938_IRQ_IRC + TX4938_IR_PCIERR) |
117 | #define RBTX4938_IRQ_IRC_PCIPME (RBTX4938_IRQ_IRC + TX4938_IR_PCIPME) | 117 | #define RBTX4938_IRQ_IRC_PCIPME (RBTX4938_IRQ_IRC + TX4938_IR_PCIPME) |
118 | #define RBTX4938_IRQ_IRC_ACLC (RBTX4938_IRQ_IRC + TX4938_IR_ACLC) | 118 | #define RBTX4938_IRQ_IRC_ACLC (RBTX4938_IRQ_IRC + TX4938_IR_ACLC) |
119 | #define RBTX4938_IRQ_IRC_ACLCPME (RBTX4938_IRQ_IRC + TX4938_IR_ACLCPME) | 119 | #define RBTX4938_IRQ_IRC_ACLCPME (RBTX4938_IRQ_IRC + TX4938_IR_ACLCPME) |
120 | #define RBTX4938_IRQ_IRC_PCIC1 (RBTX4938_IRQ_IRC + TX4938_IR_PCIC1) | 120 | #define RBTX4938_IRQ_IRC_PCIC1 (RBTX4938_IRQ_IRC + TX4938_IR_PCIC1) |
diff --git a/arch/mips/include/asm/txx9/rbtx4939.h b/arch/mips/include/asm/txx9/rbtx4939.h index e517899794a8..6157bfd90848 100644 --- a/arch/mips/include/asm/txx9/rbtx4939.h +++ b/arch/mips/include/asm/txx9/rbtx4939.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | /* Address map */ | 18 | /* Address map */ |
19 | #define RBTX4939_IOC_REG_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000) | 19 | #define RBTX4939_IOC_REG_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000) |
20 | #define RBTX4939_BOARD_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000) | 20 | #define RBTX4939_BOARD_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000000) |
21 | #define RBTX4939_IOC_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000002) | 21 | #define RBTX4939_IOC_REV_ADDR (IO_BASE + TXX9_CE(1) + 0x00000002) |
22 | #define RBTX4939_CONFIG1_ADDR (IO_BASE + TXX9_CE(1) + 0x00000004) | 22 | #define RBTX4939_CONFIG1_ADDR (IO_BASE + TXX9_CE(1) + 0x00000004) |
23 | #define RBTX4939_CONFIG2_ADDR (IO_BASE + TXX9_CE(1) + 0x00000006) | 23 | #define RBTX4939_CONFIG2_ADDR (IO_BASE + TXX9_CE(1) + 0x00000006) |
@@ -46,9 +46,9 @@ | |||
46 | #define RBTX4939_VPSIN_ADDR (IO_BASE + TXX9_CE(1) + 0x0000500c) | 46 | #define RBTX4939_VPSIN_ADDR (IO_BASE + TXX9_CE(1) + 0x0000500c) |
47 | #define RBTX4939_7SEG_ADDR(s, ch) \ | 47 | #define RBTX4939_7SEG_ADDR(s, ch) \ |
48 | (IO_BASE + TXX9_CE(1) + 0x00006000 + (s) * 16 + ((ch) & 3) * 2) | 48 | (IO_BASE + TXX9_CE(1) + 0x00006000 + (s) * 16 + ((ch) & 3) * 2) |
49 | #define RBTX4939_SOFTRESET_ADDR (IO_BASE + TXX9_CE(1) + 0x00007000) | 49 | #define RBTX4939_SOFTRESET_ADDR (IO_BASE + TXX9_CE(1) + 0x00007000) |
50 | #define RBTX4939_RESETEN_ADDR (IO_BASE + TXX9_CE(1) + 0x00007002) | 50 | #define RBTX4939_RESETEN_ADDR (IO_BASE + TXX9_CE(1) + 0x00007002) |
51 | #define RBTX4939_RESETSTAT_ADDR (IO_BASE + TXX9_CE(1) + 0x00007004) | 51 | #define RBTX4939_RESETSTAT_ADDR (IO_BASE + TXX9_CE(1) + 0x00007004) |
52 | #define RBTX4939_ETHER_BASE (IO_BASE + TXX9_CE(1) + 0x00020000) | 52 | #define RBTX4939_ETHER_BASE (IO_BASE + TXX9_CE(1) + 0x00020000) |
53 | 53 | ||
54 | /* Ethernet port address */ | 54 | /* Ethernet port address */ |
@@ -77,11 +77,11 @@ | |||
77 | #define RBTX4939_PE2_CIR 0x08 | 77 | #define RBTX4939_PE2_CIR 0x08 |
78 | #define RBTX4939_PE2_SPI 0x10 | 78 | #define RBTX4939_PE2_SPI 0x10 |
79 | #define RBTX4939_PE2_GPIO 0x20 | 79 | #define RBTX4939_PE2_GPIO 0x20 |
80 | #define RBTX4939_PE3_VP 0x01 | 80 | #define RBTX4939_PE3_VP 0x01 |
81 | #define RBTX4939_PE3_VP_P 0x02 | 81 | #define RBTX4939_PE3_VP_P 0x02 |
82 | #define RBTX4939_PE3_VP_S 0x04 | 82 | #define RBTX4939_PE3_VP_S 0x04 |
83 | 83 | ||
84 | #define rbtx4939_board_rev_addr ((u8 __iomem *)RBTX4939_BOARD_REV_ADDR) | 84 | #define rbtx4939_board_rev_addr ((u8 __iomem *)RBTX4939_BOARD_REV_ADDR) |
85 | #define rbtx4939_ioc_rev_addr ((u8 __iomem *)RBTX4939_IOC_REV_ADDR) | 85 | #define rbtx4939_ioc_rev_addr ((u8 __iomem *)RBTX4939_IOC_REV_ADDR) |
86 | #define rbtx4939_config1_addr ((u8 __iomem *)RBTX4939_CONFIG1_ADDR) | 86 | #define rbtx4939_config1_addr ((u8 __iomem *)RBTX4939_CONFIG1_ADDR) |
87 | #define rbtx4939_config2_addr ((u8 __iomem *)RBTX4939_CONFIG2_ADDR) | 87 | #define rbtx4939_config2_addr ((u8 __iomem *)RBTX4939_CONFIG2_ADDR) |
@@ -110,9 +110,9 @@ | |||
110 | #define rbtx4939_vpsin_addr ((u8 __iomem *)RBTX4939_VPSIN_ADDR) | 110 | #define rbtx4939_vpsin_addr ((u8 __iomem *)RBTX4939_VPSIN_ADDR) |
111 | #define rbtx4939_7seg_addr(s, ch) \ | 111 | #define rbtx4939_7seg_addr(s, ch) \ |
112 | ((u8 __iomem *)RBTX4939_7SEG_ADDR(s, ch)) | 112 | ((u8 __iomem *)RBTX4939_7SEG_ADDR(s, ch)) |
113 | #define rbtx4939_softreset_addr ((u8 __iomem *)RBTX4939_SOFTRESET_ADDR) | 113 | #define rbtx4939_softreset_addr ((u8 __iomem *)RBTX4939_SOFTRESET_ADDR) |
114 | #define rbtx4939_reseten_addr ((u8 __iomem *)RBTX4939_RESETEN_ADDR) | 114 | #define rbtx4939_reseten_addr ((u8 __iomem *)RBTX4939_RESETEN_ADDR) |
115 | #define rbtx4939_resetstat_addr ((u8 __iomem *)RBTX4939_RESETSTAT_ADDR) | 115 | #define rbtx4939_resetstat_addr ((u8 __iomem *)RBTX4939_RESETSTAT_ADDR) |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * IRQ mappings | 118 | * IRQ mappings |
diff --git a/arch/mips/include/asm/txx9/smsc_fdc37m81x.h b/arch/mips/include/asm/txx9/smsc_fdc37m81x.h index d1d6332b4ca6..926d08f18463 100644 --- a/arch/mips/include/asm/txx9/smsc_fdc37m81x.h +++ b/arch/mips/include/asm/txx9/smsc_fdc37m81x.h | |||
@@ -18,43 +18,43 @@ | |||
18 | /* Common Registers */ | 18 | /* Common Registers */ |
19 | #define SMSC_FDC37M81X_CONFIG_INDEX 0x00 | 19 | #define SMSC_FDC37M81X_CONFIG_INDEX 0x00 |
20 | #define SMSC_FDC37M81X_CONFIG_DATA 0x01 | 20 | #define SMSC_FDC37M81X_CONFIG_DATA 0x01 |
21 | #define SMSC_FDC37M81X_CONF 0x02 | 21 | #define SMSC_FDC37M81X_CONF 0x02 |
22 | #define SMSC_FDC37M81X_INDEX 0x03 | 22 | #define SMSC_FDC37M81X_INDEX 0x03 |
23 | #define SMSC_FDC37M81X_DNUM 0x07 | 23 | #define SMSC_FDC37M81X_DNUM 0x07 |
24 | #define SMSC_FDC37M81X_DID 0x20 | 24 | #define SMSC_FDC37M81X_DID 0x20 |
25 | #define SMSC_FDC37M81X_DREV 0x21 | 25 | #define SMSC_FDC37M81X_DREV 0x21 |
26 | #define SMSC_FDC37M81X_PCNT 0x22 | 26 | #define SMSC_FDC37M81X_PCNT 0x22 |
27 | #define SMSC_FDC37M81X_PMGT 0x23 | 27 | #define SMSC_FDC37M81X_PMGT 0x23 |
28 | #define SMSC_FDC37M81X_OSC 0x24 | 28 | #define SMSC_FDC37M81X_OSC 0x24 |
29 | #define SMSC_FDC37M81X_CONFPA0 0x26 | 29 | #define SMSC_FDC37M81X_CONFPA0 0x26 |
30 | #define SMSC_FDC37M81X_CONFPA1 0x27 | 30 | #define SMSC_FDC37M81X_CONFPA1 0x27 |
31 | #define SMSC_FDC37M81X_TEST4 0x2B | 31 | #define SMSC_FDC37M81X_TEST4 0x2B |
32 | #define SMSC_FDC37M81X_TEST5 0x2C | 32 | #define SMSC_FDC37M81X_TEST5 0x2C |
33 | #define SMSC_FDC37M81X_TEST1 0x2D | 33 | #define SMSC_FDC37M81X_TEST1 0x2D |
34 | #define SMSC_FDC37M81X_TEST2 0x2E | 34 | #define SMSC_FDC37M81X_TEST2 0x2E |
35 | #define SMSC_FDC37M81X_TEST3 0x2F | 35 | #define SMSC_FDC37M81X_TEST3 0x2F |
36 | 36 | ||
37 | /* Logical device numbers */ | 37 | /* Logical device numbers */ |
38 | #define SMSC_FDC37M81X_FDD 0x00 | 38 | #define SMSC_FDC37M81X_FDD 0x00 |
39 | #define SMSC_FDC37M81X_PARALLEL 0x03 | 39 | #define SMSC_FDC37M81X_PARALLEL 0x03 |
40 | #define SMSC_FDC37M81X_SERIAL1 0x04 | 40 | #define SMSC_FDC37M81X_SERIAL1 0x04 |
41 | #define SMSC_FDC37M81X_SERIAL2 0x05 | 41 | #define SMSC_FDC37M81X_SERIAL2 0x05 |
42 | #define SMSC_FDC37M81X_KBD 0x07 | 42 | #define SMSC_FDC37M81X_KBD 0x07 |
43 | #define SMSC_FDC37M81X_AUXIO 0x08 | 43 | #define SMSC_FDC37M81X_AUXIO 0x08 |
44 | #define SMSC_FDC37M81X_NONE 0xff | 44 | #define SMSC_FDC37M81X_NONE 0xff |
45 | 45 | ||
46 | /* Logical device Config Registers */ | 46 | /* Logical device Config Registers */ |
47 | #define SMSC_FDC37M81X_ACTIVE 0x30 | 47 | #define SMSC_FDC37M81X_ACTIVE 0x30 |
48 | #define SMSC_FDC37M81X_BASEADDR0 0x60 | 48 | #define SMSC_FDC37M81X_BASEADDR0 0x60 |
49 | #define SMSC_FDC37M81X_BASEADDR1 0x61 | 49 | #define SMSC_FDC37M81X_BASEADDR1 0x61 |
50 | #define SMSC_FDC37M81X_INT 0x70 | 50 | #define SMSC_FDC37M81X_INT 0x70 |
51 | #define SMSC_FDC37M81X_INT2 0x72 | 51 | #define SMSC_FDC37M81X_INT2 0x72 |
52 | #define SMSC_FDC37M81X_LDCR_F0 0xF0 | 52 | #define SMSC_FDC37M81X_LDCR_F0 0xF0 |
53 | 53 | ||
54 | /* Chip Config Values */ | 54 | /* Chip Config Values */ |
55 | #define SMSC_FDC37M81X_CONFIG_ENTER 0x55 | 55 | #define SMSC_FDC37M81X_CONFIG_ENTER 0x55 |
56 | #define SMSC_FDC37M81X_CONFIG_EXIT 0xaa | 56 | #define SMSC_FDC37M81X_CONFIG_EXIT 0xaa |
57 | #define SMSC_FDC37M81X_CHIP_ID 0x4d | 57 | #define SMSC_FDC37M81X_CHIP_ID 0x4d |
58 | 58 | ||
59 | unsigned long smsc_fdc37m81x_init(unsigned long port); | 59 | unsigned long smsc_fdc37m81x_init(unsigned long port); |
60 | 60 | ||
diff --git a/arch/mips/include/asm/txx9/tx3927.h b/arch/mips/include/asm/txx9/tx3927.h index dc30c8d42061..149fab4f8327 100644 --- a/arch/mips/include/asm/txx9/tx3927.h +++ b/arch/mips/include/asm/txx9/tx3927.h | |||
@@ -8,8 +8,8 @@ | |||
8 | #ifndef __ASM_TXX9_TX3927_H | 8 | #ifndef __ASM_TXX9_TX3927_H |
9 | #define __ASM_TXX9_TX3927_H | 9 | #define __ASM_TXX9_TX3927_H |
10 | 10 | ||
11 | #define TX3927_REG_BASE 0xfffe0000UL | 11 | #define TX3927_REG_BASE 0xfffe0000UL |
12 | #define TX3927_REG_SIZE 0x00010000 | 12 | #define TX3927_REG_SIZE 0x00010000 |
13 | #define TX3927_SDRAMC_REG (TX3927_REG_BASE + 0x8000) | 13 | #define TX3927_SDRAMC_REG (TX3927_REG_BASE + 0x8000) |
14 | #define TX3927_ROMC_REG (TX3927_REG_BASE + 0x9000) | 14 | #define TX3927_ROMC_REG (TX3927_REG_BASE + 0x9000) |
15 | #define TX3927_DMA_REG (TX3927_REG_BASE + 0xb000) | 15 | #define TX3927_DMA_REG (TX3927_REG_BASE + 0xb000) |
@@ -191,8 +191,8 @@ struct tx3927_ccfg_reg { | |||
191 | #define TX3927_DMA_CCR_XFSZ_1W TX3927_DMA_CCR_XFSZ(2) | 191 | #define TX3927_DMA_CCR_XFSZ_1W TX3927_DMA_CCR_XFSZ(2) |
192 | #define TX3927_DMA_CCR_XFSZ_4W TX3927_DMA_CCR_XFSZ(4) | 192 | #define TX3927_DMA_CCR_XFSZ_4W TX3927_DMA_CCR_XFSZ(4) |
193 | #define TX3927_DMA_CCR_XFSZ_8W TX3927_DMA_CCR_XFSZ(5) | 193 | #define TX3927_DMA_CCR_XFSZ_8W TX3927_DMA_CCR_XFSZ(5) |
194 | #define TX3927_DMA_CCR_XFSZ_16W TX3927_DMA_CCR_XFSZ(6) | 194 | #define TX3927_DMA_CCR_XFSZ_16W TX3927_DMA_CCR_XFSZ(6) |
195 | #define TX3927_DMA_CCR_XFSZ_32W TX3927_DMA_CCR_XFSZ(7) | 195 | #define TX3927_DMA_CCR_XFSZ_32W TX3927_DMA_CCR_XFSZ(7) |
196 | #define TX3927_DMA_CCR_MEMIO 0x00000002 | 196 | #define TX3927_DMA_CCR_MEMIO 0x00000002 |
197 | #define TX3927_DMA_CCR_ONEAD 0x00000001 | 197 | #define TX3927_DMA_CCR_ONEAD 0x00000001 |
198 | 198 | ||
@@ -250,7 +250,7 @@ struct tx3927_ccfg_reg { | |||
250 | /* see PCI_BASE_ADDRESS_XXX in linux/pci.h */ | 250 | /* see PCI_BASE_ADDRESS_XXX in linux/pci.h */ |
251 | 251 | ||
252 | /* bits for PBAPMC */ | 252 | /* bits for PBAPMC */ |
253 | #define TX3927_PCIC_PBAPMC_RPBA 0x00000004 | 253 | #define TX3927_PCIC_PBAPMC_RPBA 0x00000004 |
254 | #define TX3927_PCIC_PBAPMC_PBAEN 0x00000002 | 254 | #define TX3927_PCIC_PBAPMC_PBAEN 0x00000002 |
255 | #define TX3927_PCIC_PBAPMC_BMCEN 0x00000001 | 255 | #define TX3927_PCIC_PBAPMC_BMCEN 0x00000001 |
256 | 256 | ||
@@ -282,7 +282,7 @@ struct tx3927_ccfg_reg { | |||
282 | #define TX3927_CCFG_TLBOFF 0x00020000 | 282 | #define TX3927_CCFG_TLBOFF 0x00020000 |
283 | #define TX3927_CCFG_BEOW 0x00010000 | 283 | #define TX3927_CCFG_BEOW 0x00010000 |
284 | #define TX3927_CCFG_WR 0x00008000 | 284 | #define TX3927_CCFG_WR 0x00008000 |
285 | #define TX3927_CCFG_TOE 0x00004000 | 285 | #define TX3927_CCFG_TOE 0x00004000 |
286 | #define TX3927_CCFG_PCIXARB 0x00002000 | 286 | #define TX3927_CCFG_PCIXARB 0x00002000 |
287 | #define TX3927_CCFG_PCI3 0x00001000 | 287 | #define TX3927_CCFG_PCI3 0x00001000 |
288 | #define TX3927_CCFG_PSNP 0x00000800 | 288 | #define TX3927_CCFG_PSNP 0x00000800 |
@@ -301,8 +301,8 @@ struct tx3927_ccfg_reg { | |||
301 | #define TX3927_PCFG_SELALL 0x0003ffff | 301 | #define TX3927_PCFG_SELALL 0x0003ffff |
302 | #define TX3927_PCFG_SELCS 0x00020000 | 302 | #define TX3927_PCFG_SELCS 0x00020000 |
303 | #define TX3927_PCFG_SELDSF 0x00010000 | 303 | #define TX3927_PCFG_SELDSF 0x00010000 |
304 | #define TX3927_PCFG_SELSIOC_ALL 0x0000c000 | 304 | #define TX3927_PCFG_SELSIOC_ALL 0x0000c000 |
305 | #define TX3927_PCFG_SELSIOC(ch) (0x00004000<<(ch)) | 305 | #define TX3927_PCFG_SELSIOC(ch) (0x00004000<<(ch)) |
306 | #define TX3927_PCFG_SELSIO_ALL 0x00003000 | 306 | #define TX3927_PCFG_SELSIO_ALL 0x00003000 |
307 | #define TX3927_PCFG_SELSIO(ch) (0x00001000<<(ch)) | 307 | #define TX3927_PCFG_SELSIO(ch) (0x00001000<<(ch)) |
308 | #define TX3927_PCFG_SELTMR_ALL 0x00000e00 | 308 | #define TX3927_PCFG_SELTMR_ALL 0x00000e00 |
diff --git a/arch/mips/include/asm/txx9/tx4927.h b/arch/mips/include/asm/txx9/tx4927.h index 18c98c52afdb..284eea752d55 100644 --- a/arch/mips/include/asm/txx9/tx4927.h +++ b/arch/mips/include/asm/txx9/tx4927.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Author: MontaVista Software, Inc. | 2 | * Author: MontaVista Software, Inc. |
3 | * source@mvista.com | 3 | * source@mvista.com |
4 | * | 4 | * |
5 | * Copyright 2001-2006 MontaVista Software Inc. | 5 | * Copyright 2001-2006 MontaVista Software Inc. |
6 | * | 6 | * |
@@ -33,11 +33,11 @@ | |||
33 | #include <asm/txx9/tx4927pcic.h> | 33 | #include <asm/txx9/tx4927pcic.h> |
34 | 34 | ||
35 | #ifdef CONFIG_64BIT | 35 | #ifdef CONFIG_64BIT |
36 | #define TX4927_REG_BASE 0xffffffffff1f0000UL | 36 | #define TX4927_REG_BASE 0xffffffffff1f0000UL |
37 | #else | 37 | #else |
38 | #define TX4927_REG_BASE 0xff1f0000UL | 38 | #define TX4927_REG_BASE 0xff1f0000UL |
39 | #endif | 39 | #endif |
40 | #define TX4927_REG_SIZE 0x00010000 | 40 | #define TX4927_REG_SIZE 0x00010000 |
41 | 41 | ||
42 | #define TX4927_SDRAMC_REG (TX4927_REG_BASE + 0x8000) | 42 | #define TX4927_SDRAMC_REG (TX4927_REG_BASE + 0x8000) |
43 | #define TX4927_EBUSC_REG (TX4927_REG_BASE + 0x9000) | 43 | #define TX4927_EBUSC_REG (TX4927_REG_BASE + 0x9000) |
@@ -118,10 +118,10 @@ struct tx4927_ccfg_reg { | |||
118 | #define TX4927_CCFG_DIVMODE_2 (0x4 << 17) | 118 | #define TX4927_CCFG_DIVMODE_2 (0x4 << 17) |
119 | #define TX4927_CCFG_DIVMODE_3 (0x5 << 17) | 119 | #define TX4927_CCFG_DIVMODE_3 (0x5 << 17) |
120 | #define TX4927_CCFG_DIVMODE_4 (0x6 << 17) | 120 | #define TX4927_CCFG_DIVMODE_4 (0x6 << 17) |
121 | #define TX4927_CCFG_DIVMODE_2_5 (0x7 << 17) | 121 | #define TX4927_CCFG_DIVMODE_2_5 (0x7 << 17) |
122 | #define TX4927_CCFG_BEOW 0x00010000 | 122 | #define TX4927_CCFG_BEOW 0x00010000 |
123 | #define TX4927_CCFG_WR 0x00008000 | 123 | #define TX4927_CCFG_WR 0x00008000 |
124 | #define TX4927_CCFG_TOE 0x00004000 | 124 | #define TX4927_CCFG_TOE 0x00004000 |
125 | #define TX4927_CCFG_PCIARB 0x00002000 | 125 | #define TX4927_CCFG_PCIARB 0x00002000 |
126 | #define TX4927_CCFG_PCIDIVMODE_MASK 0x00001800 | 126 | #define TX4927_CCFG_PCIDIVMODE_MASK 0x00001800 |
127 | #define TX4927_CCFG_PCIDIVMODE_2_5 0x00000000 | 127 | #define TX4927_CCFG_PCIDIVMODE_2_5 0x00000000 |
@@ -136,10 +136,10 @@ struct tx4927_ccfg_reg { | |||
136 | 136 | ||
137 | /* PCFG : Pin Configuration */ | 137 | /* PCFG : Pin Configuration */ |
138 | #define TX4927_PCFG_SDCLKDLY_MASK 0x30000000 | 138 | #define TX4927_PCFG_SDCLKDLY_MASK 0x30000000 |
139 | #define TX4927_PCFG_SDCLKDLY(d) ((d)<<28) | 139 | #define TX4927_PCFG_SDCLKDLY(d) ((d)<<28) |
140 | #define TX4927_PCFG_SYSCLKEN 0x08000000 | 140 | #define TX4927_PCFG_SYSCLKEN 0x08000000 |
141 | #define TX4927_PCFG_SDCLKEN_ALL 0x07800000 | 141 | #define TX4927_PCFG_SDCLKEN_ALL 0x07800000 |
142 | #define TX4927_PCFG_SDCLKEN(ch) (0x00800000<<(ch)) | 142 | #define TX4927_PCFG_SDCLKEN(ch) (0x00800000<<(ch)) |
143 | #define TX4927_PCFG_PCICLKEN_ALL 0x003f0000 | 143 | #define TX4927_PCFG_PCICLKEN_ALL 0x003f0000 |
144 | #define TX4927_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) | 144 | #define TX4927_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) |
145 | #define TX4927_PCFG_SEL2 0x00000200 | 145 | #define TX4927_PCFG_SEL2 0x00000200 |
diff --git a/arch/mips/include/asm/txx9/tx4927pcic.h b/arch/mips/include/asm/txx9/tx4927pcic.h index c470b8a5fe57..9eab2698caec 100644 --- a/arch/mips/include/asm/txx9/tx4927pcic.h +++ b/arch/mips/include/asm/txx9/tx4927pcic.h | |||
@@ -93,7 +93,7 @@ struct tx4927_pcic_reg { | |||
93 | 93 | ||
94 | /* bits for PBACFG */ | 94 | /* bits for PBACFG */ |
95 | #define TX4927_PCIC_PBACFG_FIXPA 0x00000008 | 95 | #define TX4927_PCIC_PBACFG_FIXPA 0x00000008 |
96 | #define TX4927_PCIC_PBACFG_RPBA 0x00000004 | 96 | #define TX4927_PCIC_PBACFG_RPBA 0x00000004 |
97 | #define TX4927_PCIC_PBACFG_PBAEN 0x00000002 | 97 | #define TX4927_PCIC_PBACFG_PBAEN 0x00000002 |
98 | #define TX4927_PCIC_PBACFG_BMCEN 0x00000001 | 98 | #define TX4927_PCIC_PBACFG_BMCEN 0x00000001 |
99 | 99 | ||
@@ -165,7 +165,7 @@ struct tx4927_pcic_reg { | |||
165 | #define TX4927_PCIC_PDMCFG_CHNEN 0x00000080 | 165 | #define TX4927_PCIC_PDMCFG_CHNEN 0x00000080 |
166 | #define TX4927_PCIC_PDMCFG_XFRACT 0x00000040 | 166 | #define TX4927_PCIC_PDMCFG_XFRACT 0x00000040 |
167 | #define TX4927_PCIC_PDMCFG_BSWAP 0x00000020 | 167 | #define TX4927_PCIC_PDMCFG_BSWAP 0x00000020 |
168 | #define TX4927_PCIC_PDMCFG_XFRSIZE_MASK 0x0000000c | 168 | #define TX4927_PCIC_PDMCFG_XFRSIZE_MASK 0x0000000c |
169 | #define TX4927_PCIC_PDMCFG_XFRSIZE_1DW 0x00000000 | 169 | #define TX4927_PCIC_PDMCFG_XFRSIZE_1DW 0x00000000 |
170 | #define TX4927_PCIC_PDMCFG_XFRSIZE_1QW 0x00000004 | 170 | #define TX4927_PCIC_PDMCFG_XFRSIZE_1QW 0x00000004 |
171 | #define TX4927_PCIC_PDMCFG_XFRSIZE_4QW 0x00000008 | 171 | #define TX4927_PCIC_PDMCFG_XFRSIZE_4QW 0x00000008 |
@@ -174,7 +174,7 @@ struct tx4927_pcic_reg { | |||
174 | 174 | ||
175 | /* bits for PDMSTS */ | 175 | /* bits for PDMSTS */ |
176 | #define TX4927_PCIC_PDMSTS_REQCNT_MASK 0x3f000000 | 176 | #define TX4927_PCIC_PDMSTS_REQCNT_MASK 0x3f000000 |
177 | #define TX4927_PCIC_PDMSTS_FIFOCNT_MASK 0x00f00000 | 177 | #define TX4927_PCIC_PDMSTS_FIFOCNT_MASK 0x00f00000 |
178 | #define TX4927_PCIC_PDMSTS_FIFOWP_MASK 0x000c0000 | 178 | #define TX4927_PCIC_PDMSTS_FIFOWP_MASK 0x000c0000 |
179 | #define TX4927_PCIC_PDMSTS_FIFORP_MASK 0x00030000 | 179 | #define TX4927_PCIC_PDMSTS_FIFORP_MASK 0x00030000 |
180 | #define TX4927_PCIC_PDMSTS_ERRINT 0x00000800 | 180 | #define TX4927_PCIC_PDMSTS_ERRINT 0x00000800 |
diff --git a/arch/mips/include/asm/txx9/tx4938.h b/arch/mips/include/asm/txx9/tx4938.h index 8a178f186f7d..6ca767ee6467 100644 --- a/arch/mips/include/asm/txx9/tx4938.h +++ b/arch/mips/include/asm/txx9/tx4938.h | |||
@@ -16,11 +16,11 @@ | |||
16 | #include <asm/txx9/tx4927.h> | 16 | #include <asm/txx9/tx4927.h> |
17 | 17 | ||
18 | #ifdef CONFIG_64BIT | 18 | #ifdef CONFIG_64BIT |
19 | #define TX4938_REG_BASE 0xffffffffff1f0000UL /* == TX4937_REG_BASE */ | 19 | #define TX4938_REG_BASE 0xffffffffff1f0000UL /* == TX4937_REG_BASE */ |
20 | #else | 20 | #else |
21 | #define TX4938_REG_BASE 0xff1f0000UL /* == TX4937_REG_BASE */ | 21 | #define TX4938_REG_BASE 0xff1f0000UL /* == TX4937_REG_BASE */ |
22 | #endif | 22 | #endif |
23 | #define TX4938_REG_SIZE 0x00010000 /* == TX4937_REG_SIZE */ | 23 | #define TX4938_REG_SIZE 0x00010000 /* == TX4937_REG_SIZE */ |
24 | 24 | ||
25 | /* NDFMC, SRAMC, PCIC1, SPIC: TX4938 only */ | 25 | /* NDFMC, SRAMC, PCIC1, SPIC: TX4938 only */ |
26 | #define TX4938_NDFMC_REG (TX4938_REG_BASE + 0x5000) | 26 | #define TX4938_NDFMC_REG (TX4938_REG_BASE + 0x5000) |
@@ -72,16 +72,16 @@ struct tx4938_ccfg_reg { | |||
72 | #define TX4938_NUM_IR_DMA 4 | 72 | #define TX4938_NUM_IR_DMA 4 |
73 | #define TX4938_IR_DMA(ch, n) ((ch ? 27 : 10) + (n)) /* 10-13, 27-30 */ | 73 | #define TX4938_IR_DMA(ch, n) ((ch ? 27 : 10) + (n)) /* 10-13, 27-30 */ |
74 | #define TX4938_IR_PIO 14 | 74 | #define TX4938_IR_PIO 14 |
75 | #define TX4938_IR_PDMAC 15 | 75 | #define TX4938_IR_PDMAC 15 |
76 | #define TX4938_IR_PCIC 16 | 76 | #define TX4938_IR_PCIC 16 |
77 | #define TX4938_NUM_IR_TMR 3 | 77 | #define TX4938_NUM_IR_TMR 3 |
78 | #define TX4938_IR_TMR(n) (17 + (n)) | 78 | #define TX4938_IR_TMR(n) (17 + (n)) |
79 | #define TX4938_IR_NDFMC 21 | 79 | #define TX4938_IR_NDFMC 21 |
80 | #define TX4938_IR_PCIERR 22 | 80 | #define TX4938_IR_PCIERR 22 |
81 | #define TX4938_IR_PCIPME 23 | 81 | #define TX4938_IR_PCIPME 23 |
82 | #define TX4938_IR_ACLC 24 | 82 | #define TX4938_IR_ACLC 24 |
83 | #define TX4938_IR_ACLCPME 25 | 83 | #define TX4938_IR_ACLCPME 25 |
84 | #define TX4938_IR_PCIC1 26 | 84 | #define TX4938_IR_PCIC1 26 |
85 | #define TX4938_IR_SPI 31 | 85 | #define TX4938_IR_SPI 31 |
86 | #define TX4938_NUM_IR 32 | 86 | #define TX4938_NUM_IR 32 |
87 | /* multiplex */ | 87 | /* multiplex */ |
@@ -105,10 +105,10 @@ struct tx4938_ccfg_reg { | |||
105 | #define TX4938_CCFG_PCI1_66 0x00200000 | 105 | #define TX4938_CCFG_PCI1_66 0x00200000 |
106 | #define TX4938_CCFG_DIVMODE_MASK 0x001e0000 | 106 | #define TX4938_CCFG_DIVMODE_MASK 0x001e0000 |
107 | #define TX4938_CCFG_DIVMODE_2 (0x4 << 17) | 107 | #define TX4938_CCFG_DIVMODE_2 (0x4 << 17) |
108 | #define TX4938_CCFG_DIVMODE_2_5 (0xf << 17) | 108 | #define TX4938_CCFG_DIVMODE_2_5 (0xf << 17) |
109 | #define TX4938_CCFG_DIVMODE_3 (0x5 << 17) | 109 | #define TX4938_CCFG_DIVMODE_3 (0x5 << 17) |
110 | #define TX4938_CCFG_DIVMODE_4 (0x6 << 17) | 110 | #define TX4938_CCFG_DIVMODE_4 (0x6 << 17) |
111 | #define TX4938_CCFG_DIVMODE_4_5 (0xd << 17) | 111 | #define TX4938_CCFG_DIVMODE_4_5 (0xd << 17) |
112 | #define TX4938_CCFG_DIVMODE_8 (0x0 << 17) | 112 | #define TX4938_CCFG_DIVMODE_8 (0x0 << 17) |
113 | #define TX4938_CCFG_DIVMODE_10 (0xb << 17) | 113 | #define TX4938_CCFG_DIVMODE_10 (0xb << 17) |
114 | #define TX4938_CCFG_DIVMODE_12 (0x1 << 17) | 114 | #define TX4938_CCFG_DIVMODE_12 (0x1 << 17) |
@@ -116,7 +116,7 @@ struct tx4938_ccfg_reg { | |||
116 | #define TX4938_CCFG_DIVMODE_18 (0x9 << 17) | 116 | #define TX4938_CCFG_DIVMODE_18 (0x9 << 17) |
117 | #define TX4938_CCFG_BEOW 0x00010000 | 117 | #define TX4938_CCFG_BEOW 0x00010000 |
118 | #define TX4938_CCFG_WR 0x00008000 | 118 | #define TX4938_CCFG_WR 0x00008000 |
119 | #define TX4938_CCFG_TOE 0x00004000 | 119 | #define TX4938_CCFG_TOE 0x00004000 |
120 | #define TX4938_CCFG_PCIARB 0x00002000 | 120 | #define TX4938_CCFG_PCIARB 0x00002000 |
121 | #define TX4938_CCFG_PCIDIVMODE_MASK 0x00001c00 | 121 | #define TX4938_CCFG_PCIDIVMODE_MASK 0x00001c00 |
122 | #define TX4938_CCFG_PCIDIVMODE_4 (0x1 << 10) | 122 | #define TX4938_CCFG_PCIDIVMODE_4 (0x1 << 10) |
@@ -141,10 +141,10 @@ struct tx4938_ccfg_reg { | |||
141 | #define TX4938_PCFG_SPI_SEL 0x0800000000000000ULL | 141 | #define TX4938_PCFG_SPI_SEL 0x0800000000000000ULL |
142 | #define TX4938_PCFG_NDF_SEL 0x0400000000000000ULL | 142 | #define TX4938_PCFG_NDF_SEL 0x0400000000000000ULL |
143 | #define TX4938_PCFG_SDCLKDLY_MASK 0x30000000 | 143 | #define TX4938_PCFG_SDCLKDLY_MASK 0x30000000 |
144 | #define TX4938_PCFG_SDCLKDLY(d) ((d)<<28) | 144 | #define TX4938_PCFG_SDCLKDLY(d) ((d)<<28) |
145 | #define TX4938_PCFG_SYSCLKEN 0x08000000 | 145 | #define TX4938_PCFG_SYSCLKEN 0x08000000 |
146 | #define TX4938_PCFG_SDCLKEN_ALL 0x07800000 | 146 | #define TX4938_PCFG_SDCLKEN_ALL 0x07800000 |
147 | #define TX4938_PCFG_SDCLKEN(ch) (0x00800000<<(ch)) | 147 | #define TX4938_PCFG_SDCLKEN(ch) (0x00800000<<(ch)) |
148 | #define TX4938_PCFG_PCICLKEN_ALL 0x003f0000 | 148 | #define TX4938_PCFG_PCICLKEN_ALL 0x003f0000 |
149 | #define TX4938_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) | 149 | #define TX4938_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) |
150 | #define TX4938_PCFG_SEL2 0x00000200 | 150 | #define TX4938_PCFG_SEL2 0x00000200 |
@@ -230,8 +230,8 @@ struct tx4938_ccfg_reg { | |||
230 | #define TX4938_DMA_CCR_XFSZ_2W TX4938_DMA_CCR_XFSZ(3) | 230 | #define TX4938_DMA_CCR_XFSZ_2W TX4938_DMA_CCR_XFSZ(3) |
231 | #define TX4938_DMA_CCR_XFSZ_4W TX4938_DMA_CCR_XFSZ(4) | 231 | #define TX4938_DMA_CCR_XFSZ_4W TX4938_DMA_CCR_XFSZ(4) |
232 | #define TX4938_DMA_CCR_XFSZ_8W TX4938_DMA_CCR_XFSZ(5) | 232 | #define TX4938_DMA_CCR_XFSZ_8W TX4938_DMA_CCR_XFSZ(5) |
233 | #define TX4938_DMA_CCR_XFSZ_16W TX4938_DMA_CCR_XFSZ(6) | 233 | #define TX4938_DMA_CCR_XFSZ_16W TX4938_DMA_CCR_XFSZ(6) |
234 | #define TX4938_DMA_CCR_XFSZ_32W TX4938_DMA_CCR_XFSZ(7) | 234 | #define TX4938_DMA_CCR_XFSZ_32W TX4938_DMA_CCR_XFSZ(7) |
235 | #define TX4938_DMA_CCR_MEMIO 0x00000002 | 235 | #define TX4938_DMA_CCR_MEMIO 0x00000002 |
236 | #define TX4938_DMA_CCR_SNGAD 0x00000001 | 236 | #define TX4938_DMA_CCR_SNGAD 0x00000001 |
237 | 237 | ||
@@ -263,9 +263,9 @@ struct tx4938_ccfg_reg { | |||
263 | #define TX4938_REV_PCODE() \ | 263 | #define TX4938_REV_PCODE() \ |
264 | ((__u32)__raw_readq(&tx4938_ccfgptr->crir) >> 16) | 264 | ((__u32)__raw_readq(&tx4938_ccfgptr->crir) >> 16) |
265 | 265 | ||
266 | #define tx4938_ccfg_clear(bits) tx4927_ccfg_clear(bits) | 266 | #define tx4938_ccfg_clear(bits) tx4927_ccfg_clear(bits) |
267 | #define tx4938_ccfg_set(bits) tx4927_ccfg_set(bits) | 267 | #define tx4938_ccfg_set(bits) tx4927_ccfg_set(bits) |
268 | #define tx4938_ccfg_change(change, new) tx4927_ccfg_change(change, new) | 268 | #define tx4938_ccfg_change(change, new) tx4927_ccfg_change(change, new) |
269 | 269 | ||
270 | #define TX4938_SDRAMC_CR(ch) TX4927_SDRAMC_CR(ch) | 270 | #define TX4938_SDRAMC_CR(ch) TX4927_SDRAMC_CR(ch) |
271 | #define TX4938_SDRAMC_BA(ch) TX4927_SDRAMC_BA(ch) | 271 | #define TX4938_SDRAMC_BA(ch) TX4927_SDRAMC_BA(ch) |
diff --git a/arch/mips/include/asm/txx9/tx4939.h b/arch/mips/include/asm/txx9/tx4939.h index d4f342cd5939..6d667087f2aa 100644 --- a/arch/mips/include/asm/txx9/tx4939.h +++ b/arch/mips/include/asm/txx9/tx4939.h | |||
@@ -14,11 +14,11 @@ | |||
14 | #include <asm/txx9/tx4938.h> | 14 | #include <asm/txx9/tx4938.h> |
15 | 15 | ||
16 | #ifdef CONFIG_64BIT | 16 | #ifdef CONFIG_64BIT |
17 | #define TX4939_REG_BASE 0xffffffffff1f0000UL /* == TX4938_REG_BASE */ | 17 | #define TX4939_REG_BASE 0xffffffffff1f0000UL /* == TX4938_REG_BASE */ |
18 | #else | 18 | #else |
19 | #define TX4939_REG_BASE 0xff1f0000UL /* == TX4938_REG_BASE */ | 19 | #define TX4939_REG_BASE 0xff1f0000UL /* == TX4938_REG_BASE */ |
20 | #endif | 20 | #endif |
21 | #define TX4939_REG_SIZE 0x00010000 /* == TX4938_REG_SIZE */ | 21 | #define TX4939_REG_SIZE 0x00010000 /* == TX4938_REG_SIZE */ |
22 | 22 | ||
23 | #define TX4939_ATA_REG(ch) (TX4939_REG_BASE + 0x3000 + (ch) * 0x1000) | 23 | #define TX4939_ATA_REG(ch) (TX4939_REG_BASE + 0x3000 + (ch) * 0x1000) |
24 | #define TX4939_NDFMC_REG (TX4939_REG_BASE + 0x5000) | 24 | #define TX4939_NDFMC_REG (TX4939_REG_BASE + 0x5000) |
@@ -189,14 +189,14 @@ struct tx4939_vpc_desc { | |||
189 | #define TX4939_IR_INT(n) (3 + (n)) | 189 | #define TX4939_IR_INT(n) (3 + (n)) |
190 | #define TX4939_NUM_IR_ETH 2 | 190 | #define TX4939_NUM_IR_ETH 2 |
191 | #define TX4939_IR_ETH(n) ((n) ? 43 : 6) | 191 | #define TX4939_IR_ETH(n) ((n) ? 43 : 6) |
192 | #define TX4939_IR_VIDEO 7 | 192 | #define TX4939_IR_VIDEO 7 |
193 | #define TX4939_IR_CIR 8 | 193 | #define TX4939_IR_CIR 8 |
194 | #define TX4939_NUM_IR_SIO 4 | 194 | #define TX4939_NUM_IR_SIO 4 |
195 | #define TX4939_IR_SIO(n) ((n) ? 43 + (n) : 9) /* 9,44-46 */ | 195 | #define TX4939_IR_SIO(n) ((n) ? 43 + (n) : 9) /* 9,44-46 */ |
196 | #define TX4939_NUM_IR_DMA 4 | 196 | #define TX4939_NUM_IR_DMA 4 |
197 | #define TX4939_IR_DMA(ch, n) (((ch) ? 22 : 10) + (n)) /* 10-13,22-25 */ | 197 | #define TX4939_IR_DMA(ch, n) (((ch) ? 22 : 10) + (n)) /* 10-13,22-25 */ |
198 | #define TX4939_IR_IRC 14 | 198 | #define TX4939_IR_IRC 14 |
199 | #define TX4939_IR_PDMAC 15 | 199 | #define TX4939_IR_PDMAC 15 |
200 | #define TX4939_NUM_IR_TMR 6 | 200 | #define TX4939_NUM_IR_TMR 6 |
201 | #define TX4939_IR_TMR(n) (((n) >= 3 ? 45 : 16) + (n)) /* 16-18,48-50 */ | 201 | #define TX4939_IR_TMR(n) (((n) >= 3 ? 45 : 16) + (n)) /* 16-18,48-50 */ |
202 | #define TX4939_NUM_IR_ATA 2 | 202 | #define TX4939_NUM_IR_ATA 2 |
@@ -210,10 +210,10 @@ struct tx4939_vpc_desc { | |||
210 | #define TX4939_IR_I2C 33 | 210 | #define TX4939_IR_I2C 33 |
211 | #define TX4939_IR_SPI 34 | 211 | #define TX4939_IR_SPI 34 |
212 | #define TX4939_IR_PCIC 35 | 212 | #define TX4939_IR_PCIC 35 |
213 | #define TX4939_IR_PCIC1 36 | 213 | #define TX4939_IR_PCIC1 36 |
214 | #define TX4939_IR_PCIERR 37 | 214 | #define TX4939_IR_PCIERR 37 |
215 | #define TX4939_IR_PCIPME 38 | 215 | #define TX4939_IR_PCIPME 38 |
216 | #define TX4939_IR_NDFMC 39 | 216 | #define TX4939_IR_NDFMC 39 |
217 | #define TX4939_IR_ACLCPME 40 | 217 | #define TX4939_IR_ACLCPME 40 |
218 | #define TX4939_IR_RTC 41 | 218 | #define TX4939_IR_RTC 41 |
219 | #define TX4939_IR_RND 42 | 219 | #define TX4939_IR_RND 42 |
@@ -239,7 +239,7 @@ struct tx4939_vpc_desc { | |||
239 | #define TX4939_CCFG_PCI66 0x00800000 | 239 | #define TX4939_CCFG_PCI66 0x00800000 |
240 | #define TX4939_CCFG_PCIMODE 0x00400000 | 240 | #define TX4939_CCFG_PCIMODE 0x00400000 |
241 | #define TX4939_CCFG_SSCG 0x00100000 | 241 | #define TX4939_CCFG_SSCG 0x00100000 |
242 | #define TX4939_CCFG_MULCLK_MASK 0x000e0000 | 242 | #define TX4939_CCFG_MULCLK_MASK 0x000e0000 |
243 | #define TX4939_CCFG_MULCLK_8 (0x7 << 17) | 243 | #define TX4939_CCFG_MULCLK_8 (0x7 << 17) |
244 | #define TX4939_CCFG_MULCLK_9 (0x0 << 17) | 244 | #define TX4939_CCFG_MULCLK_9 (0x0 << 17) |
245 | #define TX4939_CCFG_MULCLK_10 (0x1 << 17) | 245 | #define TX4939_CCFG_MULCLK_10 (0x1 << 17) |
@@ -250,7 +250,7 @@ struct tx4939_vpc_desc { | |||
250 | #define TX4939_CCFG_MULCLK_15 (0x6 << 17) | 250 | #define TX4939_CCFG_MULCLK_15 (0x6 << 17) |
251 | #define TX4939_CCFG_BEOW 0x00010000 | 251 | #define TX4939_CCFG_BEOW 0x00010000 |
252 | #define TX4939_CCFG_WR 0x00008000 | 252 | #define TX4939_CCFG_WR 0x00008000 |
253 | #define TX4939_CCFG_TOE 0x00004000 | 253 | #define TX4939_CCFG_TOE 0x00004000 |
254 | #define TX4939_CCFG_PCIARB 0x00002000 | 254 | #define TX4939_CCFG_PCIARB 0x00002000 |
255 | #define TX4939_CCFG_YDIVMODE_MASK 0x00001c00 | 255 | #define TX4939_CCFG_YDIVMODE_MASK 0x00001c00 |
256 | #define TX4939_CCFG_YDIVMODE_2 (0x0 << 10) | 256 | #define TX4939_CCFG_YDIVMODE_2 (0x0 << 10) |
@@ -275,7 +275,7 @@ struct tx4939_vpc_desc { | |||
275 | #define TX4939_PCFG_I2CMODE 0x1000000000000000ULL | 275 | #define TX4939_PCFG_I2CMODE 0x1000000000000000ULL |
276 | #define TX4939_PCFG_I2SMODE_MASK 0x0c00000000000000ULL | 276 | #define TX4939_PCFG_I2SMODE_MASK 0x0c00000000000000ULL |
277 | #define TX4939_PCFG_I2SMODE_GPIO 0x0c00000000000000ULL | 277 | #define TX4939_PCFG_I2SMODE_GPIO 0x0c00000000000000ULL |
278 | #define TX4939_PCFG_I2SMODE_I2S 0x0800000000000000ULL | 278 | #define TX4939_PCFG_I2SMODE_I2S 0x0800000000000000ULL |
279 | #define TX4939_PCFG_I2SMODE_I2S_ALT 0x0400000000000000ULL | 279 | #define TX4939_PCFG_I2SMODE_I2S_ALT 0x0400000000000000ULL |
280 | #define TX4939_PCFG_I2SMODE_ACLC 0x0000000000000000ULL | 280 | #define TX4939_PCFG_I2SMODE_ACLC 0x0000000000000000ULL |
281 | #define TX4939_PCFG_SIO3MODE 0x0200000000000000ULL | 281 | #define TX4939_PCFG_SIO3MODE 0x0200000000000000ULL |
@@ -392,15 +392,15 @@ struct tx4939_vpc_desc { | |||
392 | /* | 392 | /* |
393 | * CRYPTO | 393 | * CRYPTO |
394 | */ | 394 | */ |
395 | #define TX4939_CRYPTO_CSR_SAESO 0x08000000 | 395 | #define TX4939_CRYPTO_CSR_SAESO 0x08000000 |
396 | #define TX4939_CRYPTO_CSR_SAESI 0x04000000 | 396 | #define TX4939_CRYPTO_CSR_SAESI 0x04000000 |
397 | #define TX4939_CRYPTO_CSR_SDESO 0x02000000 | 397 | #define TX4939_CRYPTO_CSR_SDESO 0x02000000 |
398 | #define TX4939_CRYPTO_CSR_SDESI 0x01000000 | 398 | #define TX4939_CRYPTO_CSR_SDESI 0x01000000 |
399 | #define TX4939_CRYPTO_CSR_INDXBST_MASK 0x00700000 | 399 | #define TX4939_CRYPTO_CSR_INDXBST_MASK 0x00700000 |
400 | #define TX4939_CRYPTO_CSR_INDXBST(n) ((n) << 20) | 400 | #define TX4939_CRYPTO_CSR_INDXBST(n) ((n) << 20) |
401 | #define TX4939_CRYPTO_CSR_TOINT 0x00080000 | 401 | #define TX4939_CRYPTO_CSR_TOINT 0x00080000 |
402 | #define TX4939_CRYPTO_CSR_DCINT 0x00040000 | 402 | #define TX4939_CRYPTO_CSR_DCINT 0x00040000 |
403 | #define TX4939_CRYPTO_CSR_GBINT 0x00010000 | 403 | #define TX4939_CRYPTO_CSR_GBINT 0x00010000 |
404 | #define TX4939_CRYPTO_CSR_INDXAST_MASK 0x0000e000 | 404 | #define TX4939_CRYPTO_CSR_INDXAST_MASK 0x0000e000 |
405 | #define TX4939_CRYPTO_CSR_INDXAST(n) ((n) << 13) | 405 | #define TX4939_CRYPTO_CSR_INDXAST(n) ((n) << 13) |
406 | #define TX4939_CRYPTO_CSR_CSWAP_MASK 0x00001800 | 406 | #define TX4939_CRYPTO_CSR_CSWAP_MASK 0x00001800 |
@@ -418,7 +418,7 @@ struct tx4939_vpc_desc { | |||
418 | #define TX4939_CRYPTO_CSR_PDINT_END 0x00000040 | 418 | #define TX4939_CRYPTO_CSR_PDINT_END 0x00000040 |
419 | #define TX4939_CRYPTO_CSR_PDINT_NEXT 0x00000080 | 419 | #define TX4939_CRYPTO_CSR_PDINT_NEXT 0x00000080 |
420 | #define TX4939_CRYPTO_CSR_PDINT_NONE 0x000000c0 | 420 | #define TX4939_CRYPTO_CSR_PDINT_NONE 0x000000c0 |
421 | #define TX4939_CRYPTO_CSR_GINTE 0x00000008 | 421 | #define TX4939_CRYPTO_CSR_GINTE 0x00000008 |
422 | #define TX4939_CRYPTO_CSR_RSTD 0x00000004 | 422 | #define TX4939_CRYPTO_CSR_RSTD 0x00000004 |
423 | #define TX4939_CRYPTO_CSR_RSTC 0x00000002 | 423 | #define TX4939_CRYPTO_CSR_RSTC 0x00000002 |
424 | #define TX4939_CRYPTO_CSR_ENCR 0x00000001 | 424 | #define TX4939_CRYPTO_CSR_ENCR 0x00000001 |
@@ -442,7 +442,7 @@ struct tx4939_vpc_desc { | |||
442 | #define TX4939_CRYPTO_DESC_START 0x00000200 | 442 | #define TX4939_CRYPTO_DESC_START 0x00000200 |
443 | #define TX4939_CRYPTO_DESC_END 0x00000100 | 443 | #define TX4939_CRYPTO_DESC_END 0x00000100 |
444 | #define TX4939_CRYPTO_DESC_XOR 0x00000010 | 444 | #define TX4939_CRYPTO_DESC_XOR 0x00000010 |
445 | #define TX4939_CRYPTO_DESC_LAST 0x00000008 | 445 | #define TX4939_CRYPTO_DESC_LAST 0x00000008 |
446 | #define TX4939_CRYPTO_DESC_ERR_MASK 0x00000006 | 446 | #define TX4939_CRYPTO_DESC_ERR_MASK 0x00000006 |
447 | #define TX4939_CRYPTO_DESC_ERR_NONE 0x00000000 | 447 | #define TX4939_CRYPTO_DESC_ERR_NONE 0x00000000 |
448 | #define TX4939_CRYPTO_DESC_ERR_TOUT 0x00000002 | 448 | #define TX4939_CRYPTO_DESC_ERR_TOUT 0x00000002 |
@@ -457,7 +457,7 @@ struct tx4939_vpc_desc { | |||
457 | 457 | ||
458 | #define TX4939_CRYPTO_NR_SET 6 | 458 | #define TX4939_CRYPTO_NR_SET 6 |
459 | 459 | ||
460 | #define TX4939_CRYPTO_RCSR_INTE 0x00000008 | 460 | #define TX4939_CRYPTO_RCSR_INTE 0x00000008 |
461 | #define TX4939_CRYPTO_RCSR_RST 0x00000004 | 461 | #define TX4939_CRYPTO_RCSR_RST 0x00000004 |
462 | #define TX4939_CRYPTO_RCSR_FIN 0x00000002 | 462 | #define TX4939_CRYPTO_RCSR_FIN 0x00000002 |
463 | #define TX4939_CRYPTO_RCSR_ST 0x00000001 | 463 | #define TX4939_CRYPTO_RCSR_ST 0x00000001 |
@@ -480,8 +480,8 @@ struct tx4939_vpc_desc { | |||
480 | #define TX4939_VPC_CTRLA_PDINT_ALL 0x00000000 | 480 | #define TX4939_VPC_CTRLA_PDINT_ALL 0x00000000 |
481 | #define TX4939_VPC_CTRLA_PDINT_NEXT 0x00000010 | 481 | #define TX4939_VPC_CTRLA_PDINT_NEXT 0x00000010 |
482 | #define TX4939_VPC_CTRLA_PDINT_NONE 0x00000030 | 482 | #define TX4939_VPC_CTRLA_PDINT_NONE 0x00000030 |
483 | #define TX4939_VPC_CTRLA_VDVLDP 0x00000008 | 483 | #define TX4939_VPC_CTRLA_VDVLDP 0x00000008 |
484 | #define TX4939_VPC_CTRLA_VDMODE 0x00000004 | 484 | #define TX4939_VPC_CTRLA_VDMODE 0x00000004 |
485 | #define TX4939_VPC_CTRLA_VDFOR 0x00000002 | 485 | #define TX4939_VPC_CTRLA_VDFOR 0x00000002 |
486 | #define TX4939_VPC_CTRLA_ENVPC 0x00000001 | 486 | #define TX4939_VPC_CTRLA_ENVPC 0x00000001 |
487 | 487 | ||
@@ -512,9 +512,9 @@ struct tx4939_vpc_desc { | |||
512 | ((__u32)((__raw_readq(&tx4939_ccfgptr->ccfg) & TX4939_CCFG_BCFG_MASK) \ | 512 | ((__u32)((__raw_readq(&tx4939_ccfgptr->ccfg) & TX4939_CCFG_BCFG_MASK) \ |
513 | >> 32)) | 513 | >> 32)) |
514 | 514 | ||
515 | #define tx4939_ccfg_clear(bits) tx4938_ccfg_clear(bits) | 515 | #define tx4939_ccfg_clear(bits) tx4938_ccfg_clear(bits) |
516 | #define tx4939_ccfg_set(bits) tx4938_ccfg_set(bits) | 516 | #define tx4939_ccfg_set(bits) tx4938_ccfg_set(bits) |
517 | #define tx4939_ccfg_change(change, new) tx4938_ccfg_change(change, new) | 517 | #define tx4939_ccfg_change(change, new) tx4938_ccfg_change(change, new) |
518 | 518 | ||
519 | #define TX4939_EBUSC_CR(ch) TX4927_EBUSC_CR(ch) | 519 | #define TX4939_EBUSC_CR(ch) TX4927_EBUSC_CR(ch) |
520 | #define TX4939_EBUSC_BA(ch) TX4927_EBUSC_BA(ch) | 520 | #define TX4939_EBUSC_BA(ch) TX4927_EBUSC_BA(ch) |
@@ -522,7 +522,7 @@ struct tx4939_vpc_desc { | |||
522 | #define TX4939_EBUSC_WIDTH(ch) \ | 522 | #define TX4939_EBUSC_WIDTH(ch) \ |
523 | (16 >> ((__u32)(TX4939_EBUSC_CR(ch) >> 20) & 0x1)) | 523 | (16 >> ((__u32)(TX4939_EBUSC_CR(ch) >> 20) & 0x1)) |
524 | 524 | ||
525 | /* SCLK0 = MSTCLK * 429/19 * 16/245 / 2 (14.745MHz for MST 20MHz) */ | 525 | /* SCLK0 = MSTCLK * 429/19 * 16/245 / 2 (14.745MHz for MST 20MHz) */ |
526 | #define TX4939_SCLK0(mst) \ | 526 | #define TX4939_SCLK0(mst) \ |
527 | ((((mst) + 245/2) / 245UL * 429 * 16 + 19) / 19 / 2) | 527 | ((((mst) + 245/2) / 245UL * 429 * 16 + 19) / 19 / 2) |
528 | 528 | ||
diff --git a/arch/mips/include/asm/txx9tmr.h b/arch/mips/include/asm/txx9tmr.h index 67f70a8f09bd..466a3def3866 100644 --- a/arch/mips/include/asm/txx9tmr.h +++ b/arch/mips/include/asm/txx9tmr.h | |||
@@ -59,9 +59,9 @@ void txx9_clockevent_init(unsigned long baseaddr, int irq, | |||
59 | void txx9_tmr_init(unsigned long baseaddr); | 59 | void txx9_tmr_init(unsigned long baseaddr); |
60 | 60 | ||
61 | #ifdef CONFIG_CPU_TX39XX | 61 | #ifdef CONFIG_CPU_TX39XX |
62 | #define TXX9_TIMER_BITS 24 | 62 | #define TXX9_TIMER_BITS 24 |
63 | #else | 63 | #else |
64 | #define TXX9_TIMER_BITS 32 | 64 | #define TXX9_TIMER_BITS 32 |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #endif /* __ASM_TXX9TMR_H */ | 67 | #endif /* __ASM_TXX9TMR_H */ |
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h index 3b92efef56d3..bd87e36bf26a 100644 --- a/arch/mips/include/asm/uaccess.h +++ b/arch/mips/include/asm/uaccess.h | |||
@@ -87,12 +87,12 @@ extern u64 __ua_limit; | |||
87 | /* | 87 | /* |
88 | * access_ok: - Checks if a user space pointer is valid | 88 | * access_ok: - Checks if a user space pointer is valid |
89 | * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that | 89 | * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that |
90 | * %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe | 90 | * %VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe |
91 | * to write to a block, it is always safe to read from it. | 91 | * to write to a block, it is always safe to read from it. |
92 | * @addr: User space pointer to start of block to check | 92 | * @addr: User space pointer to start of block to check |
93 | * @size: Size of block to check | 93 | * @size: Size of block to check |
94 | * | 94 | * |
95 | * Context: User context only. This function may sleep. | 95 | * Context: User context only. This function may sleep. |
96 | * | 96 | * |
97 | * Checks if a pointer to a block of memory in user space is valid. | 97 | * Checks if a pointer to a block of memory in user space is valid. |
98 | * | 98 | * |
@@ -124,10 +124,10 @@ extern u64 __ua_limit; | |||
124 | 124 | ||
125 | /* | 125 | /* |
126 | * put_user: - Write a simple value into user space. | 126 | * put_user: - Write a simple value into user space. |
127 | * @x: Value to copy to user space. | 127 | * @x: Value to copy to user space. |
128 | * @ptr: Destination address, in user space. | 128 | * @ptr: Destination address, in user space. |
129 | * | 129 | * |
130 | * Context: User context only. This function may sleep. | 130 | * Context: User context only. This function may sleep. |
131 | * | 131 | * |
132 | * This macro copies a single simple value from kernel space to user | 132 | * This macro copies a single simple value from kernel space to user |
133 | * space. It supports simple types like char and int, but not larger | 133 | * space. It supports simple types like char and int, but not larger |
@@ -138,15 +138,15 @@ extern u64 __ua_limit; | |||
138 | * | 138 | * |
139 | * Returns zero on success, or -EFAULT on error. | 139 | * Returns zero on success, or -EFAULT on error. |
140 | */ | 140 | */ |
141 | #define put_user(x,ptr) \ | 141 | #define put_user(x,ptr) \ |
142 | __put_user_check((x), (ptr), sizeof(*(ptr))) | 142 | __put_user_check((x), (ptr), sizeof(*(ptr))) |
143 | 143 | ||
144 | /* | 144 | /* |
145 | * get_user: - Get a simple variable from user space. | 145 | * get_user: - Get a simple variable from user space. |
146 | * @x: Variable to store result. | 146 | * @x: Variable to store result. |
147 | * @ptr: Source address, in user space. | 147 | * @ptr: Source address, in user space. |
148 | * | 148 | * |
149 | * Context: User context only. This function may sleep. | 149 | * Context: User context only. This function may sleep. |
150 | * | 150 | * |
151 | * This macro copies a single simple variable from user space to kernel | 151 | * This macro copies a single simple variable from user space to kernel |
152 | * space. It supports simple types like char and int, but not larger | 152 | * space. It supports simple types like char and int, but not larger |
@@ -163,10 +163,10 @@ extern u64 __ua_limit; | |||
163 | 163 | ||
164 | /* | 164 | /* |
165 | * __put_user: - Write a simple value into user space, with less checking. | 165 | * __put_user: - Write a simple value into user space, with less checking. |
166 | * @x: Value to copy to user space. | 166 | * @x: Value to copy to user space. |
167 | * @ptr: Destination address, in user space. | 167 | * @ptr: Destination address, in user space. |
168 | * | 168 | * |
169 | * Context: User context only. This function may sleep. | 169 | * Context: User context only. This function may sleep. |
170 | * | 170 | * |
171 | * This macro copies a single simple value from kernel space to user | 171 | * This macro copies a single simple value from kernel space to user |
172 | * space. It supports simple types like char and int, but not larger | 172 | * space. It supports simple types like char and int, but not larger |
@@ -185,10 +185,10 @@ extern u64 __ua_limit; | |||
185 | 185 | ||
186 | /* | 186 | /* |
187 | * __get_user: - Get a simple variable from user space, with less checking. | 187 | * __get_user: - Get a simple variable from user space, with less checking. |
188 | * @x: Variable to store result. | 188 | * @x: Variable to store result. |
189 | * @ptr: Source address, in user space. | 189 | * @ptr: Source address, in user space. |
190 | * | 190 | * |
191 | * Context: User context only. This function may sleep. | 191 | * Context: User context only. This function may sleep. |
192 | * | 192 | * |
193 | * This macro copies a single simple variable from user space to kernel | 193 | * This macro copies a single simple variable from user space to kernel |
194 | * space. It supports simple types like char and int, but not larger | 194 | * space. It supports simple types like char and int, but not larger |
@@ -390,10 +390,10 @@ extern void __put_user_unknown(void); | |||
390 | 390 | ||
391 | /* | 391 | /* |
392 | * put_user_unaligned: - Write a simple value into user space. | 392 | * put_user_unaligned: - Write a simple value into user space. |
393 | * @x: Value to copy to user space. | 393 | * @x: Value to copy to user space. |
394 | * @ptr: Destination address, in user space. | 394 | * @ptr: Destination address, in user space. |
395 | * | 395 | * |
396 | * Context: User context only. This function may sleep. | 396 | * Context: User context only. This function may sleep. |
397 | * | 397 | * |
398 | * This macro copies a single simple value from kernel space to user | 398 | * This macro copies a single simple value from kernel space to user |
399 | * space. It supports simple types like char and int, but not larger | 399 | * space. It supports simple types like char and int, but not larger |
@@ -409,10 +409,10 @@ extern void __put_user_unknown(void); | |||
409 | 409 | ||
410 | /* | 410 | /* |
411 | * get_user_unaligned: - Get a simple variable from user space. | 411 | * get_user_unaligned: - Get a simple variable from user space. |
412 | * @x: Variable to store result. | 412 | * @x: Variable to store result. |
413 | * @ptr: Source address, in user space. | 413 | * @ptr: Source address, in user space. |
414 | * | 414 | * |
415 | * Context: User context only. This function may sleep. | 415 | * Context: User context only. This function may sleep. |
416 | * | 416 | * |
417 | * This macro copies a single simple variable from user space to kernel | 417 | * This macro copies a single simple variable from user space to kernel |
418 | * space. It supports simple types like char and int, but not larger | 418 | * space. It supports simple types like char and int, but not larger |
@@ -429,10 +429,10 @@ extern void __put_user_unknown(void); | |||
429 | 429 | ||
430 | /* | 430 | /* |
431 | * __put_user_unaligned: - Write a simple value into user space, with less checking. | 431 | * __put_user_unaligned: - Write a simple value into user space, with less checking. |
432 | * @x: Value to copy to user space. | 432 | * @x: Value to copy to user space. |
433 | * @ptr: Destination address, in user space. | 433 | * @ptr: Destination address, in user space. |
434 | * | 434 | * |
435 | * Context: User context only. This function may sleep. | 435 | * Context: User context only. This function may sleep. |
436 | * | 436 | * |
437 | * This macro copies a single simple value from kernel space to user | 437 | * This macro copies a single simple value from kernel space to user |
438 | * space. It supports simple types like char and int, but not larger | 438 | * space. It supports simple types like char and int, but not larger |
@@ -451,10 +451,10 @@ extern void __put_user_unknown(void); | |||
451 | 451 | ||
452 | /* | 452 | /* |
453 | * __get_user_unaligned: - Get a simple variable from user space, with less checking. | 453 | * __get_user_unaligned: - Get a simple variable from user space, with less checking. |
454 | * @x: Variable to store result. | 454 | * @x: Variable to store result. |
455 | * @ptr: Source address, in user space. | 455 | * @ptr: Source address, in user space. |
456 | * | 456 | * |
457 | * Context: User context only. This function may sleep. | 457 | * Context: User context only. This function may sleep. |
458 | * | 458 | * |
459 | * This macro copies a single simple variable from user space to kernel | 459 | * This macro copies a single simple variable from user space to kernel |
460 | * space. It supports simple types like char and int, but not larger | 460 | * space. It supports simple types like char and int, but not larger |
@@ -543,7 +543,7 @@ do { \ | |||
543 | */ | 543 | */ |
544 | #define __get_user_unaligned_asm_ll32(val, addr) \ | 544 | #define __get_user_unaligned_asm_ll32(val, addr) \ |
545 | { \ | 545 | { \ |
546 | unsigned long long __gu_tmp; \ | 546 | unsigned long long __gu_tmp; \ |
547 | \ | 547 | \ |
548 | __asm__ __volatile__( \ | 548 | __asm__ __volatile__( \ |
549 | "1: ulw %1, (%3) \n" \ | 549 | "1: ulw %1, (%3) \n" \ |
@@ -631,7 +631,7 @@ do { \ | |||
631 | #define __put_user_unaligned_asm_ll32(ptr) \ | 631 | #define __put_user_unaligned_asm_ll32(ptr) \ |
632 | { \ | 632 | { \ |
633 | __asm__ __volatile__( \ | 633 | __asm__ __volatile__( \ |
634 | "1: sw %2, (%3) # __put_user_unaligned_asm_ll32 \n" \ | 634 | "1: sw %2, (%3) # __put_user_unaligned_asm_ll32 \n" \ |
635 | "2: sw %D2, 4(%3) \n" \ | 635 | "2: sw %D2, 4(%3) \n" \ |
636 | "3: \n" \ | 636 | "3: \n" \ |
637 | " .section .fixup,\"ax\" \n" \ | 637 | " .section .fixup,\"ax\" \n" \ |
@@ -658,7 +658,7 @@ extern void __put_user_unaligned_unknown(void); | |||
658 | #ifdef MODULE | 658 | #ifdef MODULE |
659 | #define __MODULE_JAL(destination) \ | 659 | #define __MODULE_JAL(destination) \ |
660 | ".set\tnoat\n\t" \ | 660 | ".set\tnoat\n\t" \ |
661 | __UA_LA "\t$1, " #destination "\n\t" \ | 661 | __UA_LA "\t$1, " #destination "\n\t" \ |
662 | "jalr\t$1\n\t" \ | 662 | "jalr\t$1\n\t" \ |
663 | ".set\tat\n\t" | 663 | ".set\tat\n\t" |
664 | #else | 664 | #else |
@@ -694,11 +694,11 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); | |||
694 | 694 | ||
695 | /* | 695 | /* |
696 | * __copy_to_user: - Copy a block of data into user space, with less checking. | 696 | * __copy_to_user: - Copy a block of data into user space, with less checking. |
697 | * @to: Destination address, in user space. | 697 | * @to: Destination address, in user space. |
698 | * @from: Source address, in kernel space. | 698 | * @from: Source address, in kernel space. |
699 | * @n: Number of bytes to copy. | 699 | * @n: Number of bytes to copy. |
700 | * | 700 | * |
701 | * Context: User context only. This function may sleep. | 701 | * Context: User context only. This function may sleep. |
702 | * | 702 | * |
703 | * Copy data from kernel space to user space. Caller must check | 703 | * Copy data from kernel space to user space. Caller must check |
704 | * the specified block with access_ok() before calling this function. | 704 | * the specified block with access_ok() before calling this function. |
@@ -716,7 +716,7 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); | |||
716 | __cu_from = (from); \ | 716 | __cu_from = (from); \ |
717 | __cu_len = (n); \ | 717 | __cu_len = (n); \ |
718 | might_fault(); \ | 718 | might_fault(); \ |
719 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ | 719 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ |
720 | __cu_len; \ | 720 | __cu_len; \ |
721 | }) | 721 | }) |
722 | 722 | ||
@@ -731,7 +731,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
731 | __cu_to = (to); \ | 731 | __cu_to = (to); \ |
732 | __cu_from = (from); \ | 732 | __cu_from = (from); \ |
733 | __cu_len = (n); \ | 733 | __cu_len = (n); \ |
734 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ | 734 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ |
735 | __cu_len; \ | 735 | __cu_len; \ |
736 | }) | 736 | }) |
737 | 737 | ||
@@ -744,18 +744,18 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
744 | __cu_to = (to); \ | 744 | __cu_to = (to); \ |
745 | __cu_from = (from); \ | 745 | __cu_from = (from); \ |
746 | __cu_len = (n); \ | 746 | __cu_len = (n); \ |
747 | __cu_len = __invoke_copy_from_user_inatomic(__cu_to, __cu_from, \ | 747 | __cu_len = __invoke_copy_from_user_inatomic(__cu_to, __cu_from, \ |
748 | __cu_len); \ | 748 | __cu_len); \ |
749 | __cu_len; \ | 749 | __cu_len; \ |
750 | }) | 750 | }) |
751 | 751 | ||
752 | /* | 752 | /* |
753 | * copy_to_user: - Copy a block of data into user space. | 753 | * copy_to_user: - Copy a block of data into user space. |
754 | * @to: Destination address, in user space. | 754 | * @to: Destination address, in user space. |
755 | * @from: Source address, in kernel space. | 755 | * @from: Source address, in kernel space. |
756 | * @n: Number of bytes to copy. | 756 | * @n: Number of bytes to copy. |
757 | * | 757 | * |
758 | * Context: User context only. This function may sleep. | 758 | * Context: User context only. This function may sleep. |
759 | * | 759 | * |
760 | * Copy data from kernel space to user space. | 760 | * Copy data from kernel space to user space. |
761 | * | 761 | * |
@@ -774,7 +774,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
774 | if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) { \ | 774 | if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) { \ |
775 | might_fault(); \ | 775 | might_fault(); \ |
776 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, \ | 776 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, \ |
777 | __cu_len); \ | 777 | __cu_len); \ |
778 | } \ | 778 | } \ |
779 | __cu_len; \ | 779 | __cu_len; \ |
780 | }) | 780 | }) |
@@ -827,11 +827,11 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
827 | 827 | ||
828 | /* | 828 | /* |
829 | * __copy_from_user: - Copy a block of data from user space, with less checking. | 829 | * __copy_from_user: - Copy a block of data from user space, with less checking. |
830 | * @to: Destination address, in kernel space. | 830 | * @to: Destination address, in kernel space. |
831 | * @from: Source address, in user space. | 831 | * @from: Source address, in user space. |
832 | * @n: Number of bytes to copy. | 832 | * @n: Number of bytes to copy. |
833 | * | 833 | * |
834 | * Context: User context only. This function may sleep. | 834 | * Context: User context only. This function may sleep. |
835 | * | 835 | * |
836 | * Copy data from user space to kernel space. Caller must check | 836 | * Copy data from user space to kernel space. Caller must check |
837 | * the specified block with access_ok() before calling this function. | 837 | * the specified block with access_ok() before calling this function. |
@@ -853,17 +853,17 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
853 | __cu_len = (n); \ | 853 | __cu_len = (n); \ |
854 | might_fault(); \ | 854 | might_fault(); \ |
855 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ | 855 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ |
856 | __cu_len); \ | 856 | __cu_len); \ |
857 | __cu_len; \ | 857 | __cu_len; \ |
858 | }) | 858 | }) |
859 | 859 | ||
860 | /* | 860 | /* |
861 | * copy_from_user: - Copy a block of data from user space. | 861 | * copy_from_user: - Copy a block of data from user space. |
862 | * @to: Destination address, in kernel space. | 862 | * @to: Destination address, in kernel space. |
863 | * @from: Source address, in user space. | 863 | * @from: Source address, in user space. |
864 | * @n: Number of bytes to copy. | 864 | * @n: Number of bytes to copy. |
865 | * | 865 | * |
866 | * Context: User context only. This function may sleep. | 866 | * Context: User context only. This function may sleep. |
867 | * | 867 | * |
868 | * Copy data from user space to kernel space. | 868 | * Copy data from user space to kernel space. |
869 | * | 869 | * |
@@ -885,7 +885,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
885 | if (access_ok(VERIFY_READ, __cu_from, __cu_len)) { \ | 885 | if (access_ok(VERIFY_READ, __cu_from, __cu_len)) { \ |
886 | might_fault(); \ | 886 | might_fault(); \ |
887 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ | 887 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ |
888 | __cu_len); \ | 888 | __cu_len); \ |
889 | } \ | 889 | } \ |
890 | __cu_len; \ | 890 | __cu_len; \ |
891 | }) | 891 | }) |
@@ -901,7 +901,7 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
901 | __cu_len = (n); \ | 901 | __cu_len = (n); \ |
902 | might_fault(); \ | 902 | might_fault(); \ |
903 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ | 903 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ |
904 | __cu_len); \ | 904 | __cu_len); \ |
905 | __cu_len; \ | 905 | __cu_len; \ |
906 | }) | 906 | }) |
907 | 907 | ||
@@ -915,18 +915,18 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n); | |||
915 | __cu_from = (from); \ | 915 | __cu_from = (from); \ |
916 | __cu_len = (n); \ | 916 | __cu_len = (n); \ |
917 | if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && \ | 917 | if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && \ |
918 | access_ok(VERIFY_WRITE, __cu_to, __cu_len))) { \ | 918 | access_ok(VERIFY_WRITE, __cu_to, __cu_len))) { \ |
919 | might_fault(); \ | 919 | might_fault(); \ |
920 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ | 920 | __cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \ |
921 | __cu_len); \ | 921 | __cu_len); \ |
922 | } \ | 922 | } \ |
923 | __cu_len; \ | 923 | __cu_len; \ |
924 | }) | 924 | }) |
925 | 925 | ||
926 | /* | 926 | /* |
927 | * __clear_user: - Zero a block of memory in user space, with less checking. | 927 | * __clear_user: - Zero a block of memory in user space, with less checking. |
928 | * @to: Destination address, in user space. | 928 | * @to: Destination address, in user space. |
929 | * @n: Number of bytes to zero. | 929 | * @n: Number of bytes to zero. |
930 | * | 930 | * |
931 | * Zero a block of memory in user space. Caller must check | 931 | * Zero a block of memory in user space. Caller must check |
932 | * the specified block with access_ok() before calling this function. | 932 | * the specified block with access_ok() before calling this function. |
@@ -966,7 +966,7 @@ __clear_user(void __user *addr, __kernel_size_t size) | |||
966 | /* | 966 | /* |
967 | * __strncpy_from_user: - Copy a NUL terminated string from userspace, with less checking. | 967 | * __strncpy_from_user: - Copy a NUL terminated string from userspace, with less checking. |
968 | * @dst: Destination address, in kernel space. This buffer must be at | 968 | * @dst: Destination address, in kernel space. This buffer must be at |
969 | * least @count bytes long. | 969 | * least @count bytes long. |
970 | * @src: Source address, in user space. | 970 | * @src: Source address, in user space. |
971 | * @count: Maximum number of bytes to copy, including the trailing NUL. | 971 | * @count: Maximum number of bytes to copy, including the trailing NUL. |
972 | * | 972 | * |
@@ -1005,7 +1005,7 @@ __strncpy_from_user(char *__to, const char __user *__from, long __len) | |||
1005 | /* | 1005 | /* |
1006 | * strncpy_from_user: - Copy a NUL terminated string from userspace. | 1006 | * strncpy_from_user: - Copy a NUL terminated string from userspace. |
1007 | * @dst: Destination address, in kernel space. This buffer must be at | 1007 | * @dst: Destination address, in kernel space. This buffer must be at |
1008 | * least @count bytes long. | 1008 | * least @count bytes long. |
1009 | * @src: Source address, in user space. | 1009 | * @src: Source address, in user space. |
1010 | * @count: Maximum number of bytes to copy, including the trailing NUL. | 1010 | * @count: Maximum number of bytes to copy, including the trailing NUL. |
1011 | * | 1011 | * |
@@ -1060,7 +1060,7 @@ static inline long __strlen_user(const char __user *s) | |||
1060 | * strlen_user: - Get the size of a string in user space. | 1060 | * strlen_user: - Get the size of a string in user space. |
1061 | * @str: The string to measure. | 1061 | * @str: The string to measure. |
1062 | * | 1062 | * |
1063 | * Context: User context only. This function may sleep. | 1063 | * Context: User context only. This function may sleep. |
1064 | * | 1064 | * |
1065 | * Get the size of a NUL-terminated string in user space. | 1065 | * Get the size of a NUL-terminated string in user space. |
1066 | * | 1066 | * |
@@ -1108,7 +1108,7 @@ static inline long __strnlen_user(const char __user *s, long n) | |||
1108 | * strlen_user: - Get the size of a string in user space. | 1108 | * strlen_user: - Get the size of a string in user space. |
1109 | * @str: The string to measure. | 1109 | * @str: The string to measure. |
1110 | * | 1110 | * |
1111 | * Context: User context only. This function may sleep. | 1111 | * Context: User context only. This function may sleep. |
1112 | * | 1112 | * |
1113 | * Get the size of a NUL-terminated string in user space. | 1113 | * Get the size of a NUL-terminated string in user space. |
1114 | * | 1114 | * |
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index 7e0bf17c9324..058e941626a6 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer | 6 | * Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer |
7 | * Copyright (C) 2005 Maciej W. Rozycki | 7 | * Copyright (C) 2005 Maciej W. Rozycki |
8 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) | 8 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) |
9 | * Copyright (C) 2012 MIPS Technologies, Inc. | 9 | * Copyright (C) 2012 MIPS Technologies, Inc. |
diff --git a/arch/mips/include/asm/user.h b/arch/mips/include/asm/user.h index afa83a4c1888..6bad61b0a53a 100644 --- a/arch/mips/include/asm/user.h +++ b/arch/mips/include/asm/user.h | |||
@@ -20,7 +20,7 @@ | |||
20 | * upage: 1 page consisting of a user struct that tells gdb | 20 | * upage: 1 page consisting of a user struct that tells gdb |
21 | * what is present in the file. Directly after this is a | 21 | * what is present in the file. Directly after this is a |
22 | * copy of the task_struct, which is currently not used by gdb, | 22 | * copy of the task_struct, which is currently not used by gdb, |
23 | * but it may come in handy at some point. All of the registers | 23 | * but it may come in handy at some point. All of the registers |
24 | * are stored as part of the upage. The upage should always be | 24 | * are stored as part of the upage. The upage should always be |
25 | * only one page long. | 25 | * only one page long. |
26 | * data: The data segment follows next. We use current->end_text to | 26 | * data: The data segment follows next. We use current->end_text to |
diff --git a/arch/mips/include/asm/vr41xx/pci.h b/arch/mips/include/asm/vr41xx/pci.h index c231a3d6cfd8..a866918cfea5 100644 --- a/arch/mips/include/asm/vr41xx/pci.h +++ b/arch/mips/include/asm/vr41xx/pci.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #ifndef __NEC_VR41XX_PCI_H | 20 | #ifndef __NEC_VR41XX_PCI_H |
21 | #define __NEC_VR41XX_PCI_H | 21 | #define __NEC_VR41XX_PCI_H |
22 | 22 | ||
23 | #define PCI_MASTER_ADDRESS_MASK 0x7fffffffU | 23 | #define PCI_MASTER_ADDRESS_MASK 0x7fffffffU |
24 | 24 | ||
25 | struct pci_master_address_conversion { | 25 | struct pci_master_address_conversion { |
26 | uint32_t bus_base_address; | 26 | uint32_t bus_base_address; |
diff --git a/arch/mips/include/asm/vr41xx/tb0287.h b/arch/mips/include/asm/vr41xx/tb0287.h index 61bead68abf0..d58b5678f243 100644 --- a/arch/mips/include/asm/vr41xx/tb0287.h +++ b/arch/mips/include/asm/vr41xx/tb0287.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * tb0287.h, Include file for TANBAC TB0287 mini-ITX board. | 2 | * tb0287.h, Include file for TANBAC TB0287 mini-ITX board. |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Media Lab Inc. <ito@mlb.co.jp> | 4 | * Copyright (C) 2005 Media Lab Inc. <ito@mlb.co.jp> |
5 | * | 5 | * |
6 | * This code is largely based on tb0219.h. | 6 | * This code is largely based on tb0219.h. |
7 | * | 7 | * |
diff --git a/arch/mips/include/asm/war.h b/arch/mips/include/asm/war.h index 65e344532ded..9344e247a6c8 100644 --- a/arch/mips/include/asm/war.h +++ b/arch/mips/include/asm/war.h | |||
@@ -83,30 +83,30 @@ | |||
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Pleasures of the R4600 V1.x. Cite from the IDT R4600 V1.7 errata: | 86 | * Pleasures of the R4600 V1.x. Cite from the IDT R4600 V1.7 errata: |
87 | * | 87 | * |
88 | * 18. The CACHE instructions Hit_Writeback_Invalidate_D, Hit_Writeback_D, | 88 | * 18. The CACHE instructions Hit_Writeback_Invalidate_D, Hit_Writeback_D, |
89 | * Hit_Invalidate_D and Create_Dirty_Excl_D should only be | 89 | * Hit_Invalidate_D and Create_Dirty_Excl_D should only be |
90 | * executed if there is no other dcache activity. If the dcache is | 90 | * executed if there is no other dcache activity. If the dcache is |
91 | * accessed for another instruction immeidately preceding when these | 91 | * accessed for another instruction immeidately preceding when these |
92 | * cache instructions are executing, it is possible that the dcache | 92 | * cache instructions are executing, it is possible that the dcache |
93 | * tag match outputs used by these cache instructions will be | 93 | * tag match outputs used by these cache instructions will be |
94 | * incorrect. These cache instructions should be preceded by at least | 94 | * incorrect. These cache instructions should be preceded by at least |
95 | * four instructions that are not any kind of load or store | 95 | * four instructions that are not any kind of load or store |
96 | * instruction. | 96 | * instruction. |
97 | * | 97 | * |
98 | * This is not allowed: lw | 98 | * This is not allowed: lw |
99 | * nop | 99 | * nop |
100 | * nop | 100 | * nop |
101 | * nop | 101 | * nop |
102 | * cache Hit_Writeback_Invalidate_D | 102 | * cache Hit_Writeback_Invalidate_D |
103 | * | 103 | * |
104 | * This is allowed: lw | 104 | * This is allowed: lw |
105 | * nop | 105 | * nop |
106 | * nop | 106 | * nop |
107 | * nop | 107 | * nop |
108 | * nop | 108 | * nop |
109 | * cache Hit_Writeback_Invalidate_D | 109 | * cache Hit_Writeback_Invalidate_D |
110 | */ | 110 | */ |
111 | #ifndef R4600_V1_HIT_CACHEOP_WAR | 111 | #ifndef R4600_V1_HIT_CACHEOP_WAR |
112 | #error Check setting of R4600_V1_HIT_CACHEOP_WAR for your platform | 112 | #error Check setting of R4600_V1_HIT_CACHEOP_WAR for your platform |
@@ -118,7 +118,7 @@ | |||
118 | * | 118 | * |
119 | * R4600 v2.0 bug: "The CACHE instructions Hit_Writeback_Inv_D, | 119 | * R4600 v2.0 bug: "The CACHE instructions Hit_Writeback_Inv_D, |
120 | * Hit_Writeback_D, Hit_Invalidate_D and Create_Dirty_Exclusive_D will only | 120 | * Hit_Writeback_D, Hit_Invalidate_D and Create_Dirty_Exclusive_D will only |
121 | * operate correctly if the internal data cache refill buffer is empty. These | 121 | * operate correctly if the internal data cache refill buffer is empty. These |
122 | * CACHE instructions should be separated from any potential data cache miss | 122 | * CACHE instructions should be separated from any potential data cache miss |
123 | * by a load instruction to an uncached address to empty the response buffer." | 123 | * by a load instruction to an uncached address to empty the response buffer." |
124 | * (Revision 2.0 device errata from IDT available on http://www.idt.com/ | 124 | * (Revision 2.0 device errata from IDT available on http://www.idt.com/ |
diff --git a/arch/mips/include/asm/xtalk/xtalk.h b/arch/mips/include/asm/xtalk/xtalk.h index 79bac882a739..680e7efebbaf 100644 --- a/arch/mips/include/asm/xtalk/xtalk.h +++ b/arch/mips/include/asm/xtalk/xtalk.h | |||
@@ -16,15 +16,15 @@ | |||
16 | /* | 16 | /* |
17 | * User-level device driver visible types | 17 | * User-level device driver visible types |
18 | */ | 18 | */ |
19 | typedef char xwidgetnum_t; /* xtalk widget number (0..15) */ | 19 | typedef char xwidgetnum_t; /* xtalk widget number (0..15) */ |
20 | 20 | ||
21 | #define XWIDGET_NONE -1 | 21 | #define XWIDGET_NONE -1 |
22 | 22 | ||
23 | typedef int xwidget_part_num_t; /* xtalk widget part number */ | 23 | typedef int xwidget_part_num_t; /* xtalk widget part number */ |
24 | 24 | ||
25 | #define XWIDGET_PART_NUM_NONE -1 | 25 | #define XWIDGET_PART_NUM_NONE -1 |
26 | 26 | ||
27 | typedef int xwidget_rev_num_t; /* xtalk widget revision number */ | 27 | typedef int xwidget_rev_num_t; /* xtalk widget revision number */ |
28 | 28 | ||
29 | #define XWIDGET_REV_NUM_NONE -1 | 29 | #define XWIDGET_REV_NUM_NONE -1 |
30 | 30 | ||
@@ -37,15 +37,15 @@ typedef struct xtalk_piomap_s *xtalk_piomap_t; | |||
37 | /* It is often convenient to fold the XIO target port | 37 | /* It is often convenient to fold the XIO target port |
38 | * number into the XIO address. | 38 | * number into the XIO address. |
39 | */ | 39 | */ |
40 | #define XIO_NOWHERE (0xFFFFFFFFFFFFFFFFull) | 40 | #define XIO_NOWHERE (0xFFFFFFFFFFFFFFFFull) |
41 | #define XIO_ADDR_BITS (0x0000FFFFFFFFFFFFull) | 41 | #define XIO_ADDR_BITS (0x0000FFFFFFFFFFFFull) |
42 | #define XIO_PORT_BITS (0xF000000000000000ull) | 42 | #define XIO_PORT_BITS (0xF000000000000000ull) |
43 | #define XIO_PORT_SHIFT (60) | 43 | #define XIO_PORT_SHIFT (60) |
44 | 44 | ||
45 | #define XIO_PACKED(x) (((x)&XIO_PORT_BITS) != 0) | 45 | #define XIO_PACKED(x) (((x)&XIO_PORT_BITS) != 0) |
46 | #define XIO_ADDR(x) ((x)&XIO_ADDR_BITS) | 46 | #define XIO_ADDR(x) ((x)&XIO_ADDR_BITS) |
47 | #define XIO_PORT(x) ((xwidgetnum_t)(((x)&XIO_PORT_BITS) >> XIO_PORT_SHIFT)) | 47 | #define XIO_PORT(x) ((xwidgetnum_t)(((x)&XIO_PORT_BITS) >> XIO_PORT_SHIFT)) |
48 | #define XIO_PACK(p, o) ((((uint64_t)(p))<<XIO_PORT_SHIFT) | ((o)&XIO_ADDR_BITS)) | 48 | #define XIO_PACK(p, o) ((((uint64_t)(p))<<XIO_PORT_SHIFT) | ((o)&XIO_ADDR_BITS)) |
49 | 49 | ||
50 | #endif /* !__ASSEMBLY__ */ | 50 | #endif /* !__ASSEMBLY__ */ |
51 | 51 | ||
diff --git a/arch/mips/include/asm/xtalk/xwidget.h b/arch/mips/include/asm/xtalk/xwidget.h index b4a13d7405ee..32e4e884f9b9 100644 --- a/arch/mips/include/asm/xtalk/xwidget.h +++ b/arch/mips/include/asm/xtalk/xwidget.h | |||
@@ -45,12 +45,12 @@ | |||
45 | #define WIDGET_PENDING 0x0000001f | 45 | #define WIDGET_PENDING 0x0000001f |
46 | 46 | ||
47 | /* WIDGET_ERR_UPPER_ADDR */ | 47 | /* WIDGET_ERR_UPPER_ADDR */ |
48 | #define WIDGET_ERR_UPPER_ADDR_ONLY 0x0000ffff | 48 | #define WIDGET_ERR_UPPER_ADDR_ONLY 0x0000ffff |
49 | 49 | ||
50 | /* WIDGET_CONTROL */ | 50 | /* WIDGET_CONTROL */ |
51 | #define WIDGET_F_BAD_PKT 0x00010000 | 51 | #define WIDGET_F_BAD_PKT 0x00010000 |
52 | #define WIDGET_LLP_XBAR_CRD 0x0000f000 | 52 | #define WIDGET_LLP_XBAR_CRD 0x0000f000 |
53 | #define WIDGET_LLP_XBAR_CRD_SHFT 12 | 53 | #define WIDGET_LLP_XBAR_CRD_SHFT 12 |
54 | #define WIDGET_CLR_RLLP_CNT 0x00000800 | 54 | #define WIDGET_CLR_RLLP_CNT 0x00000800 |
55 | #define WIDGET_CLR_TLLP_CNT 0x00000400 | 55 | #define WIDGET_CLR_TLLP_CNT 0x00000400 |
56 | #define WIDGET_SYS_END 0x00000200 | 56 | #define WIDGET_SYS_END 0x00000200 |
@@ -86,8 +86,8 @@ | |||
86 | 86 | ||
87 | /* | 87 | /* |
88 | * according to the crosstalk spec, only 32-bits access to the widget | 88 | * according to the crosstalk spec, only 32-bits access to the widget |
89 | * configuration registers is allowed. some widgets may allow 64-bits | 89 | * configuration registers is allowed. some widgets may allow 64-bits |
90 | * access but software should not depend on it. registers beyond the | 90 | * access but software should not depend on it. registers beyond the |
91 | * widget target flush register are widget dependent thus will not be | 91 | * widget target flush register are widget dependent thus will not be |
92 | * defined here | 92 | * defined here |
93 | */ | 93 | */ |
diff --git a/arch/mips/include/uapi/asm/break.h b/arch/mips/include/uapi/asm/break.h index 9161e684cb4c..e5fa7b5b0556 100644 --- a/arch/mips/include/uapi/asm/break.h +++ b/arch/mips/include/uapi/asm/break.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define BRK_KERNELBP 1 /* Break in the kernel */ | 19 | #define BRK_KERNELBP 1 /* Break in the kernel */ |
20 | #define BRK_ABORT 2 /* Sometimes used by abort(3) to SIGIOT */ | 20 | #define BRK_ABORT 2 /* Sometimes used by abort(3) to SIGIOT */ |
21 | #define BRK_BD_TAKEN 3 /* For bd slot emulation - not implemented */ | 21 | #define BRK_BD_TAKEN 3 /* For bd slot emulation - not implemented */ |
22 | #define BRK_BD_NOTTAKEN 4 /* For bd slot emulation - not implemented */ | 22 | #define BRK_BD_NOTTAKEN 4 /* For bd slot emulation - not implemented */ |
23 | #define BRK_SSTEPBP 5 /* User bp (used by debuggers) */ | 23 | #define BRK_SSTEPBP 5 /* User bp (used by debuggers) */ |
24 | #define BRK_OVERFLOW 6 /* Overflow check */ | 24 | #define BRK_OVERFLOW 6 /* Overflow check */ |
25 | #define BRK_DIVZERO 7 /* Divide by zero check */ | 25 | #define BRK_DIVZERO 7 /* Divide by zero check */ |
diff --git a/arch/mips/include/uapi/asm/cachectl.h b/arch/mips/include/uapi/asm/cachectl.h index f3ce721861d3..230390908773 100644 --- a/arch/mips/include/uapi/asm/cachectl.h +++ b/arch/mips/include/uapi/asm/cachectl.h | |||
@@ -5,15 +5,15 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 1994, 1995, 1996 by Ralf Baechle | 6 | * Copyright (C) 1994, 1995, 1996 by Ralf Baechle |
7 | */ | 7 | */ |
8 | #ifndef _ASM_CACHECTL | 8 | #ifndef _ASM_CACHECTL |
9 | #define _ASM_CACHECTL | 9 | #define _ASM_CACHECTL |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * Options for cacheflush system call | 12 | * Options for cacheflush system call |
13 | */ | 13 | */ |
14 | #define ICACHE (1<<0) /* flush instruction cache */ | 14 | #define ICACHE (1<<0) /* flush instruction cache */ |
15 | #define DCACHE (1<<1) /* writeback and flush data cache */ | 15 | #define DCACHE (1<<1) /* writeback and flush data cache */ |
16 | #define BCACHE (ICACHE|DCACHE) /* flush both caches */ | 16 | #define BCACHE (ICACHE|DCACHE) /* flush both caches */ |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Caching modes for the cachectl(2) call | 19 | * Caching modes for the cachectl(2) call |
diff --git a/arch/mips/include/uapi/asm/errno.h b/arch/mips/include/uapi/asm/errno.h index bd67b15042ec..31575e2fd1bd 100644 --- a/arch/mips/include/uapi/asm/errno.h +++ b/arch/mips/include/uapi/asm/errno.h | |||
@@ -14,95 +14,95 @@ | |||
14 | 14 | ||
15 | #include <asm-generic/errno-base.h> | 15 | #include <asm-generic/errno-base.h> |
16 | 16 | ||
17 | #define ENOMSG 35 /* No message of desired type */ | 17 | #define ENOMSG 35 /* No message of desired type */ |
18 | #define EIDRM 36 /* Identifier removed */ | 18 | #define EIDRM 36 /* Identifier removed */ |
19 | #define ECHRNG 37 /* Channel number out of range */ | 19 | #define ECHRNG 37 /* Channel number out of range */ |
20 | #define EL2NSYNC 38 /* Level 2 not synchronized */ | 20 | #define EL2NSYNC 38 /* Level 2 not synchronized */ |
21 | #define EL3HLT 39 /* Level 3 halted */ | 21 | #define EL3HLT 39 /* Level 3 halted */ |
22 | #define EL3RST 40 /* Level 3 reset */ | 22 | #define EL3RST 40 /* Level 3 reset */ |
23 | #define ELNRNG 41 /* Link number out of range */ | 23 | #define ELNRNG 41 /* Link number out of range */ |
24 | #define EUNATCH 42 /* Protocol driver not attached */ | 24 | #define EUNATCH 42 /* Protocol driver not attached */ |
25 | #define ENOCSI 43 /* No CSI structure available */ | 25 | #define ENOCSI 43 /* No CSI structure available */ |
26 | #define EL2HLT 44 /* Level 2 halted */ | 26 | #define EL2HLT 44 /* Level 2 halted */ |
27 | #define EDEADLK 45 /* Resource deadlock would occur */ | 27 | #define EDEADLK 45 /* Resource deadlock would occur */ |
28 | #define ENOLCK 46 /* No record locks available */ | 28 | #define ENOLCK 46 /* No record locks available */ |
29 | #define EBADE 50 /* Invalid exchange */ | 29 | #define EBADE 50 /* Invalid exchange */ |
30 | #define EBADR 51 /* Invalid request descriptor */ | 30 | #define EBADR 51 /* Invalid request descriptor */ |
31 | #define EXFULL 52 /* Exchange full */ | 31 | #define EXFULL 52 /* Exchange full */ |
32 | #define ENOANO 53 /* No anode */ | 32 | #define ENOANO 53 /* No anode */ |
33 | #define EBADRQC 54 /* Invalid request code */ | 33 | #define EBADRQC 54 /* Invalid request code */ |
34 | #define EBADSLT 55 /* Invalid slot */ | 34 | #define EBADSLT 55 /* Invalid slot */ |
35 | #define EDEADLOCK 56 /* File locking deadlock error */ | 35 | #define EDEADLOCK 56 /* File locking deadlock error */ |
36 | #define EBFONT 59 /* Bad font file format */ | 36 | #define EBFONT 59 /* Bad font file format */ |
37 | #define ENOSTR 60 /* Device not a stream */ | 37 | #define ENOSTR 60 /* Device not a stream */ |
38 | #define ENODATA 61 /* No data available */ | 38 | #define ENODATA 61 /* No data available */ |
39 | #define ETIME 62 /* Timer expired */ | 39 | #define ETIME 62 /* Timer expired */ |
40 | #define ENOSR 63 /* Out of streams resources */ | 40 | #define ENOSR 63 /* Out of streams resources */ |
41 | #define ENONET 64 /* Machine is not on the network */ | 41 | #define ENONET 64 /* Machine is not on the network */ |
42 | #define ENOPKG 65 /* Package not installed */ | 42 | #define ENOPKG 65 /* Package not installed */ |
43 | #define EREMOTE 66 /* Object is remote */ | 43 | #define EREMOTE 66 /* Object is remote */ |
44 | #define ENOLINK 67 /* Link has been severed */ | 44 | #define ENOLINK 67 /* Link has been severed */ |
45 | #define EADV 68 /* Advertise error */ | 45 | #define EADV 68 /* Advertise error */ |
46 | #define ESRMNT 69 /* Srmount error */ | 46 | #define ESRMNT 69 /* Srmount error */ |
47 | #define ECOMM 70 /* Communication error on send */ | 47 | #define ECOMM 70 /* Communication error on send */ |
48 | #define EPROTO 71 /* Protocol error */ | 48 | #define EPROTO 71 /* Protocol error */ |
49 | #define EDOTDOT 73 /* RFS specific error */ | 49 | #define EDOTDOT 73 /* RFS specific error */ |
50 | #define EMULTIHOP 74 /* Multihop attempted */ | 50 | #define EMULTIHOP 74 /* Multihop attempted */ |
51 | #define EBADMSG 77 /* Not a data message */ | 51 | #define EBADMSG 77 /* Not a data message */ |
52 | #define ENAMETOOLONG 78 /* File name too long */ | 52 | #define ENAMETOOLONG 78 /* File name too long */ |
53 | #define EOVERFLOW 79 /* Value too large for defined data type */ | 53 | #define EOVERFLOW 79 /* Value too large for defined data type */ |
54 | #define ENOTUNIQ 80 /* Name not unique on network */ | 54 | #define ENOTUNIQ 80 /* Name not unique on network */ |
55 | #define EBADFD 81 /* File descriptor in bad state */ | 55 | #define EBADFD 81 /* File descriptor in bad state */ |
56 | #define EREMCHG 82 /* Remote address changed */ | 56 | #define EREMCHG 82 /* Remote address changed */ |
57 | #define ELIBACC 83 /* Can not access a needed shared library */ | 57 | #define ELIBACC 83 /* Can not access a needed shared library */ |
58 | #define ELIBBAD 84 /* Accessing a corrupted shared library */ | 58 | #define ELIBBAD 84 /* Accessing a corrupted shared library */ |
59 | #define ELIBSCN 85 /* .lib section in a.out corrupted */ | 59 | #define ELIBSCN 85 /* .lib section in a.out corrupted */ |
60 | #define ELIBMAX 86 /* Attempting to link in too many shared libraries */ | 60 | #define ELIBMAX 86 /* Attempting to link in too many shared libraries */ |
61 | #define ELIBEXEC 87 /* Cannot exec a shared library directly */ | 61 | #define ELIBEXEC 87 /* Cannot exec a shared library directly */ |
62 | #define EILSEQ 88 /* Illegal byte sequence */ | 62 | #define EILSEQ 88 /* Illegal byte sequence */ |
63 | #define ENOSYS 89 /* Function not implemented */ | 63 | #define ENOSYS 89 /* Function not implemented */ |
64 | #define ELOOP 90 /* Too many symbolic links encountered */ | 64 | #define ELOOP 90 /* Too many symbolic links encountered */ |
65 | #define ERESTART 91 /* Interrupted system call should be restarted */ | 65 | #define ERESTART 91 /* Interrupted system call should be restarted */ |
66 | #define ESTRPIPE 92 /* Streams pipe error */ | 66 | #define ESTRPIPE 92 /* Streams pipe error */ |
67 | #define ENOTEMPTY 93 /* Directory not empty */ | 67 | #define ENOTEMPTY 93 /* Directory not empty */ |
68 | #define EUSERS 94 /* Too many users */ | 68 | #define EUSERS 94 /* Too many users */ |
69 | #define ENOTSOCK 95 /* Socket operation on non-socket */ | 69 | #define ENOTSOCK 95 /* Socket operation on non-socket */ |
70 | #define EDESTADDRREQ 96 /* Destination address required */ | 70 | #define EDESTADDRREQ 96 /* Destination address required */ |
71 | #define EMSGSIZE 97 /* Message too long */ | 71 | #define EMSGSIZE 97 /* Message too long */ |
72 | #define EPROTOTYPE 98 /* Protocol wrong type for socket */ | 72 | #define EPROTOTYPE 98 /* Protocol wrong type for socket */ |
73 | #define ENOPROTOOPT 99 /* Protocol not available */ | 73 | #define ENOPROTOOPT 99 /* Protocol not available */ |
74 | #define EPROTONOSUPPORT 120 /* Protocol not supported */ | 74 | #define EPROTONOSUPPORT 120 /* Protocol not supported */ |
75 | #define ESOCKTNOSUPPORT 121 /* Socket type not supported */ | 75 | #define ESOCKTNOSUPPORT 121 /* Socket type not supported */ |
76 | #define EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ | 76 | #define EOPNOTSUPP 122 /* Operation not supported on transport endpoint */ |
77 | #define EPFNOSUPPORT 123 /* Protocol family not supported */ | 77 | #define EPFNOSUPPORT 123 /* Protocol family not supported */ |
78 | #define EAFNOSUPPORT 124 /* Address family not supported by protocol */ | 78 | #define EAFNOSUPPORT 124 /* Address family not supported by protocol */ |
79 | #define EADDRINUSE 125 /* Address already in use */ | 79 | #define EADDRINUSE 125 /* Address already in use */ |
80 | #define EADDRNOTAVAIL 126 /* Cannot assign requested address */ | 80 | #define EADDRNOTAVAIL 126 /* Cannot assign requested address */ |
81 | #define ENETDOWN 127 /* Network is down */ | 81 | #define ENETDOWN 127 /* Network is down */ |
82 | #define ENETUNREACH 128 /* Network is unreachable */ | 82 | #define ENETUNREACH 128 /* Network is unreachable */ |
83 | #define ENETRESET 129 /* Network dropped connection because of reset */ | 83 | #define ENETRESET 129 /* Network dropped connection because of reset */ |
84 | #define ECONNABORTED 130 /* Software caused connection abort */ | 84 | #define ECONNABORTED 130 /* Software caused connection abort */ |
85 | #define ECONNRESET 131 /* Connection reset by peer */ | 85 | #define ECONNRESET 131 /* Connection reset by peer */ |
86 | #define ENOBUFS 132 /* No buffer space available */ | 86 | #define ENOBUFS 132 /* No buffer space available */ |
87 | #define EISCONN 133 /* Transport endpoint is already connected */ | 87 | #define EISCONN 133 /* Transport endpoint is already connected */ |
88 | #define ENOTCONN 134 /* Transport endpoint is not connected */ | 88 | #define ENOTCONN 134 /* Transport endpoint is not connected */ |
89 | #define EUCLEAN 135 /* Structure needs cleaning */ | 89 | #define EUCLEAN 135 /* Structure needs cleaning */ |
90 | #define ENOTNAM 137 /* Not a XENIX named type file */ | 90 | #define ENOTNAM 137 /* Not a XENIX named type file */ |
91 | #define ENAVAIL 138 /* No XENIX semaphores available */ | 91 | #define ENAVAIL 138 /* No XENIX semaphores available */ |
92 | #define EISNAM 139 /* Is a named type file */ | 92 | #define EISNAM 139 /* Is a named type file */ |
93 | #define EREMOTEIO 140 /* Remote I/O error */ | 93 | #define EREMOTEIO 140 /* Remote I/O error */ |
94 | #define EINIT 141 /* Reserved */ | 94 | #define EINIT 141 /* Reserved */ |
95 | #define EREMDEV 142 /* Error 142 */ | 95 | #define EREMDEV 142 /* Error 142 */ |
96 | #define ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ | 96 | #define ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */ |
97 | #define ETOOMANYREFS 144 /* Too many references: cannot splice */ | 97 | #define ETOOMANYREFS 144 /* Too many references: cannot splice */ |
98 | #define ETIMEDOUT 145 /* Connection timed out */ | 98 | #define ETIMEDOUT 145 /* Connection timed out */ |
99 | #define ECONNREFUSED 146 /* Connection refused */ | 99 | #define ECONNREFUSED 146 /* Connection refused */ |
100 | #define EHOSTDOWN 147 /* Host is down */ | 100 | #define EHOSTDOWN 147 /* Host is down */ |
101 | #define EHOSTUNREACH 148 /* No route to host */ | 101 | #define EHOSTUNREACH 148 /* No route to host */ |
102 | #define EWOULDBLOCK EAGAIN /* Operation would block */ | 102 | #define EWOULDBLOCK EAGAIN /* Operation would block */ |
103 | #define EALREADY 149 /* Operation already in progress */ | 103 | #define EALREADY 149 /* Operation already in progress */ |
104 | #define EINPROGRESS 150 /* Operation now in progress */ | 104 | #define EINPROGRESS 150 /* Operation now in progress */ |
105 | #define ESTALE 151 /* Stale NFS file handle */ | 105 | #define ESTALE 151 /* Stale NFS file handle */ |
106 | #define ECANCELED 158 /* AIO operation canceled */ | 106 | #define ECANCELED 158 /* AIO operation canceled */ |
107 | 107 | ||
108 | /* | 108 | /* |
@@ -110,16 +110,16 @@ | |||
110 | */ | 110 | */ |
111 | #define ENOMEDIUM 159 /* No medium found */ | 111 | #define ENOMEDIUM 159 /* No medium found */ |
112 | #define EMEDIUMTYPE 160 /* Wrong medium type */ | 112 | #define EMEDIUMTYPE 160 /* Wrong medium type */ |
113 | #define ENOKEY 161 /* Required key not available */ | 113 | #define ENOKEY 161 /* Required key not available */ |
114 | #define EKEYEXPIRED 162 /* Key has expired */ | 114 | #define EKEYEXPIRED 162 /* Key has expired */ |
115 | #define EKEYREVOKED 163 /* Key has been revoked */ | 115 | #define EKEYREVOKED 163 /* Key has been revoked */ |
116 | #define EKEYREJECTED 164 /* Key was rejected by service */ | 116 | #define EKEYREJECTED 164 /* Key was rejected by service */ |
117 | 117 | ||
118 | /* for robust mutexes */ | 118 | /* for robust mutexes */ |
119 | #define EOWNERDEAD 165 /* Owner died */ | 119 | #define EOWNERDEAD 165 /* Owner died */ |
120 | #define ENOTRECOVERABLE 166 /* State not recoverable */ | 120 | #define ENOTRECOVERABLE 166 /* State not recoverable */ |
121 | 121 | ||
122 | #define ERFKILL 167 /* Operation not possible due to RF-kill */ | 122 | #define ERFKILL 167 /* Operation not possible due to RF-kill */ |
123 | 123 | ||
124 | #define EHWPOISON 168 /* Memory page has hardware error */ | 124 | #define EHWPOISON 168 /* Memory page has hardware error */ |
125 | 125 | ||
diff --git a/arch/mips/include/uapi/asm/fcntl.h b/arch/mips/include/uapi/asm/fcntl.h index 75eddedcfc3e..0bda78f70e1e 100644 --- a/arch/mips/include/uapi/asm/fcntl.h +++ b/arch/mips/include/uapi/asm/fcntl.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #define O_APPEND 0x0008 | 12 | #define O_APPEND 0x0008 |
13 | #define O_DSYNC 0x0010 /* used to be O_SYNC, see below */ | 13 | #define O_DSYNC 0x0010 /* used to be O_SYNC, see below */ |
14 | #define O_NONBLOCK 0x0080 | 14 | #define O_NONBLOCK 0x0080 |
15 | #define O_CREAT 0x0100 /* not fcntl */ | 15 | #define O_CREAT 0x0100 /* not fcntl */ |
16 | #define O_TRUNC 0x0200 /* not fcntl */ | 16 | #define O_TRUNC 0x0200 /* not fcntl */ |
17 | #define O_EXCL 0x0400 /* not fcntl */ | 17 | #define O_EXCL 0x0400 /* not fcntl */ |
18 | #define O_NOCTTY 0x0800 /* not fcntl */ | 18 | #define O_NOCTTY 0x0800 /* not fcntl */ |
@@ -50,7 +50,7 @@ | |||
50 | 50 | ||
51 | /* | 51 | /* |
52 | * The flavours of struct flock. "struct flock" is the ABI compliant | 52 | * The flavours of struct flock. "struct flock" is the ABI compliant |
53 | * variant. Finally struct flock64 is the LFS variant of struct flock. As | 53 | * variant. Finally struct flock64 is the LFS variant of struct flock. As |
54 | * a historic accident and inconsistence with the ABI definition it doesn't | 54 | * a historic accident and inconsistence with the ABI definition it doesn't |
55 | * contain all the same fields as struct flock. | 55 | * contain all the same fields as struct flock. |
56 | */ | 56 | */ |
diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h index fb77a0e01cd7..4d078815eaa5 100644 --- a/arch/mips/include/uapi/asm/inst.h +++ b/arch/mips/include/uapi/asm/inst.h | |||
@@ -96,11 +96,11 @@ enum rt_op { | |||
96 | * rs field of cop opcodes. | 96 | * rs field of cop opcodes. |
97 | */ | 97 | */ |
98 | enum cop_op { | 98 | enum cop_op { |
99 | mfc_op = 0x00, dmfc_op = 0x01, | 99 | mfc_op = 0x00, dmfc_op = 0x01, |
100 | cfc_op = 0x02, mtc_op = 0x04, | 100 | cfc_op = 0x02, mtc_op = 0x04, |
101 | dmtc_op = 0x05, ctc_op = 0x06, | 101 | dmtc_op = 0x05, ctc_op = 0x06, |
102 | bc_op = 0x08, cop_op = 0x10, | 102 | bc_op = 0x08, cop_op = 0x10, |
103 | copm_op = 0x18 | 103 | copm_op = 0x18 |
104 | }; | 104 | }; |
105 | 105 | ||
106 | /* | 106 | /* |
@@ -114,18 +114,18 @@ enum bcop_op { | |||
114 | * func field of cop0 coi opcodes. | 114 | * func field of cop0 coi opcodes. |
115 | */ | 115 | */ |
116 | enum cop0_coi_func { | 116 | enum cop0_coi_func { |
117 | tlbr_op = 0x01, tlbwi_op = 0x02, | 117 | tlbr_op = 0x01, tlbwi_op = 0x02, |
118 | tlbwr_op = 0x06, tlbp_op = 0x08, | 118 | tlbwr_op = 0x06, tlbp_op = 0x08, |
119 | rfe_op = 0x10, eret_op = 0x18 | 119 | rfe_op = 0x10, eret_op = 0x18 |
120 | }; | 120 | }; |
121 | 121 | ||
122 | /* | 122 | /* |
123 | * func field of cop0 com opcodes. | 123 | * func field of cop0 com opcodes. |
124 | */ | 124 | */ |
125 | enum cop0_com_func { | 125 | enum cop0_com_func { |
126 | tlbr1_op = 0x01, tlbw_op = 0x02, | 126 | tlbr1_op = 0x01, tlbw_op = 0x02, |
127 | tlbp1_op = 0x08, dctr_op = 0x09, | 127 | tlbp1_op = 0x08, dctr_op = 0x09, |
128 | dctw_op = 0x0a | 128 | dctw_op = 0x0a |
129 | }; | 129 | }; |
130 | 130 | ||
131 | /* | 131 | /* |
@@ -140,43 +140,43 @@ enum cop1_fmt { | |||
140 | * func field of cop1 instructions using d, s or w format. | 140 | * func field of cop1 instructions using d, s or w format. |
141 | */ | 141 | */ |
142 | enum cop1_sdw_func { | 142 | enum cop1_sdw_func { |
143 | fadd_op = 0x00, fsub_op = 0x01, | 143 | fadd_op = 0x00, fsub_op = 0x01, |
144 | fmul_op = 0x02, fdiv_op = 0x03, | 144 | fmul_op = 0x02, fdiv_op = 0x03, |
145 | fsqrt_op = 0x04, fabs_op = 0x05, | 145 | fsqrt_op = 0x04, fabs_op = 0x05, |
146 | fmov_op = 0x06, fneg_op = 0x07, | 146 | fmov_op = 0x06, fneg_op = 0x07, |
147 | froundl_op = 0x08, ftruncl_op = 0x09, | 147 | froundl_op = 0x08, ftruncl_op = 0x09, |
148 | fceill_op = 0x0a, ffloorl_op = 0x0b, | 148 | fceill_op = 0x0a, ffloorl_op = 0x0b, |
149 | fround_op = 0x0c, ftrunc_op = 0x0d, | 149 | fround_op = 0x0c, ftrunc_op = 0x0d, |
150 | fceil_op = 0x0e, ffloor_op = 0x0f, | 150 | fceil_op = 0x0e, ffloor_op = 0x0f, |
151 | fmovc_op = 0x11, fmovz_op = 0x12, | 151 | fmovc_op = 0x11, fmovz_op = 0x12, |
152 | fmovn_op = 0x13, frecip_op = 0x15, | 152 | fmovn_op = 0x13, frecip_op = 0x15, |
153 | frsqrt_op = 0x16, fcvts_op = 0x20, | 153 | frsqrt_op = 0x16, fcvts_op = 0x20, |
154 | fcvtd_op = 0x21, fcvte_op = 0x22, | 154 | fcvtd_op = 0x21, fcvte_op = 0x22, |
155 | fcvtw_op = 0x24, fcvtl_op = 0x25, | 155 | fcvtw_op = 0x24, fcvtl_op = 0x25, |
156 | fcmp_op = 0x30 | 156 | fcmp_op = 0x30 |
157 | }; | 157 | }; |
158 | 158 | ||
159 | /* | 159 | /* |
160 | * func field of cop1x opcodes (MIPS IV). | 160 | * func field of cop1x opcodes (MIPS IV). |
161 | */ | 161 | */ |
162 | enum cop1x_func { | 162 | enum cop1x_func { |
163 | lwxc1_op = 0x00, ldxc1_op = 0x01, | 163 | lwxc1_op = 0x00, ldxc1_op = 0x01, |
164 | pfetch_op = 0x07, swxc1_op = 0x08, | 164 | pfetch_op = 0x07, swxc1_op = 0x08, |
165 | sdxc1_op = 0x09, madd_s_op = 0x20, | 165 | sdxc1_op = 0x09, madd_s_op = 0x20, |
166 | madd_d_op = 0x21, madd_e_op = 0x22, | 166 | madd_d_op = 0x21, madd_e_op = 0x22, |
167 | msub_s_op = 0x28, msub_d_op = 0x29, | 167 | msub_s_op = 0x28, msub_d_op = 0x29, |
168 | msub_e_op = 0x2a, nmadd_s_op = 0x30, | 168 | msub_e_op = 0x2a, nmadd_s_op = 0x30, |
169 | nmadd_d_op = 0x31, nmadd_e_op = 0x32, | 169 | nmadd_d_op = 0x31, nmadd_e_op = 0x32, |
170 | nmsub_s_op = 0x38, nmsub_d_op = 0x39, | 170 | nmsub_s_op = 0x38, nmsub_d_op = 0x39, |
171 | nmsub_e_op = 0x3a | 171 | nmsub_e_op = 0x3a |
172 | }; | 172 | }; |
173 | 173 | ||
174 | /* | 174 | /* |
175 | * func field for mad opcodes (MIPS IV). | 175 | * func field for mad opcodes (MIPS IV). |
176 | */ | 176 | */ |
177 | enum mad_func { | 177 | enum mad_func { |
178 | madd_fp_op = 0x08, msub_fp_op = 0x0a, | 178 | madd_fp_op = 0x08, msub_fp_op = 0x0a, |
179 | nmadd_fp_op = 0x0c, nmsub_fp_op = 0x0e | 179 | nmadd_fp_op = 0x0c, nmsub_fp_op = 0x0e |
180 | }; | 180 | }; |
181 | 181 | ||
182 | /* | 182 | /* |
@@ -185,10 +185,10 @@ enum mad_func { | |||
185 | enum lx_func { | 185 | enum lx_func { |
186 | lwx_op = 0x00, | 186 | lwx_op = 0x00, |
187 | lhx_op = 0x04, | 187 | lhx_op = 0x04, |
188 | lbux_op = 0x06, | 188 | lbux_op = 0x06, |
189 | ldx_op = 0x08, | 189 | ldx_op = 0x08, |
190 | lwux_op = 0x10, | 190 | lwux_op = 0x10, |
191 | lhux_op = 0x14, | 191 | lhux_op = 0x14, |
192 | lbx_op = 0x16, | 192 | lbx_op = 0x16, |
193 | }; | 193 | }; |
194 | 194 | ||
@@ -211,7 +211,7 @@ enum lx_func { | |||
211 | #endif | 211 | #endif |
212 | 212 | ||
213 | struct j_format { | 213 | struct j_format { |
214 | BITFIELD_FIELD(unsigned int opcode : 6, /* Jump format */ | 214 | BITFIELD_FIELD(unsigned int opcode : 6, /* Jump format */ |
215 | BITFIELD_FIELD(unsigned int target : 26, | 215 | BITFIELD_FIELD(unsigned int target : 26, |
216 | ;)) | 216 | ;)) |
217 | }; | 217 | }; |
@@ -261,7 +261,7 @@ struct p_format { /* Performance counter format (R10000) */ | |||
261 | ;)))))) | 261 | ;)))))) |
262 | }; | 262 | }; |
263 | 263 | ||
264 | struct f_format { /* FPU register format */ | 264 | struct f_format { /* FPU register format */ |
265 | BITFIELD_FIELD(unsigned int opcode : 6, | 265 | BITFIELD_FIELD(unsigned int opcode : 6, |
266 | BITFIELD_FIELD(unsigned int : 1, | 266 | BITFIELD_FIELD(unsigned int : 1, |
267 | BITFIELD_FIELD(unsigned int fmt : 4, | 267 | BITFIELD_FIELD(unsigned int fmt : 4, |
diff --git a/arch/mips/include/uapi/asm/ioctls.h b/arch/mips/include/uapi/asm/ioctls.h index addd56b60694..b1e637757fe3 100644 --- a/arch/mips/include/uapi/asm/ioctls.h +++ b/arch/mips/include/uapi/asm/ioctls.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #define TIOCPKT_START 0x08 /* start output */ | 41 | #define TIOCPKT_START 0x08 /* start output */ |
42 | #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ | 42 | #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ |
43 | #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ | 43 | #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ |
44 | #define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ | 44 | #define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ |
45 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ | 45 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ |
46 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ | 46 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ |
47 | #define TIOCNOTTY 0x5471 /* void tty association */ | 47 | #define TIOCNOTTY 0x5471 /* void tty association */ |
@@ -63,9 +63,9 @@ | |||
63 | #define FIONREAD 0x467f | 63 | #define FIONREAD 0x467f |
64 | #define TIOCINQ FIONREAD | 64 | #define TIOCINQ FIONREAD |
65 | 65 | ||
66 | #define TIOCGETP 0x7408 | 66 | #define TIOCGETP 0x7408 |
67 | #define TIOCSETP 0x7409 | 67 | #define TIOCSETP 0x7409 |
68 | #define TIOCSETN 0x740a /* TIOCSETP wo flush */ | 68 | #define TIOCSETN 0x740a /* TIOCSETP wo flush */ |
69 | 69 | ||
70 | /* #define TIOCSETA _IOW('t', 20, struct termios) set termios struct */ | 70 | /* #define TIOCSETA _IOW('t', 20, struct termios) set termios struct */ |
71 | /* #define TIOCSETAW _IOW('t', 21, struct termios) drain output, set */ | 71 | /* #define TIOCSETAW _IOW('t', 21, struct termios) drain output, set */ |
@@ -74,9 +74,9 @@ | |||
74 | /* #define TIOCSETD _IOW('t', 27, int) set line discipline */ | 74 | /* #define TIOCSETD _IOW('t', 27, int) set line discipline */ |
75 | /* 127-124 compat */ | 75 | /* 127-124 compat */ |
76 | 76 | ||
77 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 77 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
78 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 78 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
79 | #define TIOCGSID 0x7416 /* Return the session ID of FD */ | 79 | #define TIOCGSID 0x7416 /* Return the session ID of FD */ |
80 | #define TCGETS2 _IOR('T', 0x2A, struct termios2) | 80 | #define TCGETS2 _IOR('T', 0x2A, struct termios2) |
81 | #define TCSETS2 _IOW('T', 0x2B, struct termios2) | 81 | #define TCSETS2 _IOW('T', 0x2B, struct termios2) |
82 | #define TCSETSW2 _IOW('T', 0x2C, struct termios2) | 82 | #define TCSETSW2 _IOW('T', 0x2C, struct termios2) |
@@ -104,10 +104,10 @@ | |||
104 | #define TIOCGLCKTRMIOS 0x548b | 104 | #define TIOCGLCKTRMIOS 0x548b |
105 | #define TIOCSLCKTRMIOS 0x548c | 105 | #define TIOCSLCKTRMIOS 0x548c |
106 | #define TIOCSERGSTRUCT 0x548d /* For debugging only */ | 106 | #define TIOCSERGSTRUCT 0x548d /* For debugging only */ |
107 | #define TIOCSERGETLSR 0x548e /* Get line status register */ | 107 | #define TIOCSERGETLSR 0x548e /* Get line status register */ |
108 | #define TIOCSERGETMULTI 0x548f /* Get multiport config */ | 108 | #define TIOCSERGETMULTI 0x548f /* Get multiport config */ |
109 | #define TIOCSERSETMULTI 0x5490 /* Set multiport config */ | 109 | #define TIOCSERSETMULTI 0x5490 /* Set multiport config */ |
110 | #define TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */ | 110 | #define TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */ |
111 | #define TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */ | 111 | #define TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */ |
112 | 112 | ||
113 | #endif /* __ASM_IOCTLS_H */ | 113 | #endif /* __ASM_IOCTLS_H */ |
diff --git a/arch/mips/include/uapi/asm/mman.h b/arch/mips/include/uapi/asm/mman.h index 9a936ac9a942..cfcb876cae6b 100644 --- a/arch/mips/include/uapi/asm/mman.h +++ b/arch/mips/include/uapi/asm/mman.h | |||
@@ -64,7 +64,7 @@ | |||
64 | 64 | ||
65 | #define MADV_NORMAL 0 /* no further special treatment */ | 65 | #define MADV_NORMAL 0 /* no further special treatment */ |
66 | #define MADV_RANDOM 1 /* expect random page references */ | 66 | #define MADV_RANDOM 1 /* expect random page references */ |
67 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ | 67 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ |
68 | #define MADV_WILLNEED 3 /* will need these pages */ | 68 | #define MADV_WILLNEED 3 /* will need these pages */ |
69 | #define MADV_DONTNEED 4 /* don't need these pages */ | 69 | #define MADV_DONTNEED 4 /* don't need these pages */ |
70 | 70 | ||
@@ -73,14 +73,14 @@ | |||
73 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | 73 | #define MADV_DONTFORK 10 /* don't inherit across fork */ |
74 | #define MADV_DOFORK 11 /* do inherit across fork */ | 74 | #define MADV_DOFORK 11 /* do inherit across fork */ |
75 | 75 | ||
76 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | 76 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ |
77 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | 77 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ |
78 | #define MADV_HWPOISON 100 /* poison a page for testing */ | 78 | #define MADV_HWPOISON 100 /* poison a page for testing */ |
79 | 79 | ||
80 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ | 80 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ |
81 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ | 81 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ |
82 | 82 | ||
83 | #define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, | 83 | #define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, |
84 | overrides the coredump filter bits */ | 84 | overrides the coredump filter bits */ |
85 | #define MADV_DODUMP 17 /* Clear the MADV_NODUMP flag */ | 85 | #define MADV_DODUMP 17 /* Clear the MADV_NODUMP flag */ |
86 | 86 | ||
diff --git a/arch/mips/include/uapi/asm/ptrace.h b/arch/mips/include/uapi/asm/ptrace.h index 1bc1f52f40d7..4d58d8468705 100644 --- a/arch/mips/include/uapi/asm/ptrace.h +++ b/arch/mips/include/uapi/asm/ptrace.h | |||
@@ -49,8 +49,8 @@ struct pt_regs { | |||
49 | unsigned long cp0_tcstatus; | 49 | unsigned long cp0_tcstatus; |
50 | #endif /* CONFIG_MIPS_MT_SMTC */ | 50 | #endif /* CONFIG_MIPS_MT_SMTC */ |
51 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | 51 | #ifdef CONFIG_CPU_CAVIUM_OCTEON |
52 | unsigned long long mpl[3]; /* MTM{0,1,2} */ | 52 | unsigned long long mpl[3]; /* MTM{0,1,2} */ |
53 | unsigned long long mtp[3]; /* MTP{0,1,2} */ | 53 | unsigned long long mtp[3]; /* MTP{0,1,2} */ |
54 | #endif | 54 | #endif |
55 | } __attribute__ ((aligned (8))); | 55 | } __attribute__ ((aligned (8))); |
56 | 56 | ||
@@ -67,14 +67,14 @@ struct pt_regs { | |||
67 | #define PTRACE_GET_THREAD_AREA 25 | 67 | #define PTRACE_GET_THREAD_AREA 25 |
68 | #define PTRACE_SET_THREAD_AREA 26 | 68 | #define PTRACE_SET_THREAD_AREA 26 |
69 | 69 | ||
70 | /* Calls to trace a 64bit program from a 32bit program. */ | 70 | /* Calls to trace a 64bit program from a 32bit program. */ |
71 | #define PTRACE_PEEKTEXT_3264 0xc0 | 71 | #define PTRACE_PEEKTEXT_3264 0xc0 |
72 | #define PTRACE_PEEKDATA_3264 0xc1 | 72 | #define PTRACE_PEEKDATA_3264 0xc1 |
73 | #define PTRACE_POKETEXT_3264 0xc2 | 73 | #define PTRACE_POKETEXT_3264 0xc2 |
74 | #define PTRACE_POKEDATA_3264 0xc3 | 74 | #define PTRACE_POKEDATA_3264 0xc3 |
75 | #define PTRACE_GET_THREAD_AREA_3264 0xc4 | 75 | #define PTRACE_GET_THREAD_AREA_3264 0xc4 |
76 | 76 | ||
77 | /* Read and write watchpoint registers. */ | 77 | /* Read and write watchpoint registers. */ |
78 | enum pt_watch_style { | 78 | enum pt_watch_style { |
79 | pt_watch_style_mips32, | 79 | pt_watch_style_mips32, |
80 | pt_watch_style_mips64 | 80 | pt_watch_style_mips64 |
diff --git a/arch/mips/include/uapi/asm/sembuf.h b/arch/mips/include/uapi/asm/sembuf.h index 7281a4decaa0..e1085ac880f2 100644 --- a/arch/mips/include/uapi/asm/sembuf.h +++ b/arch/mips/include/uapi/asm/sembuf.h | |||
@@ -12,8 +12,8 @@ | |||
12 | 12 | ||
13 | struct semid64_ds { | 13 | struct semid64_ds { |
14 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | 14 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ |
15 | __kernel_time_t sem_otime; /* last semop time */ | 15 | __kernel_time_t sem_otime; /* last semop time */ |
16 | __kernel_time_t sem_ctime; /* last change time */ | 16 | __kernel_time_t sem_ctime; /* last change time */ |
17 | unsigned long sem_nsems; /* no. of semaphores in array */ | 17 | unsigned long sem_nsems; /* no. of semaphores in array */ |
18 | unsigned long __unused1; | 18 | unsigned long __unused1; |
19 | unsigned long __unused2; | 19 | unsigned long __unused2; |
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h index 73446508d846..6a8714193fb9 100644 --- a/arch/mips/include/uapi/asm/siginfo.h +++ b/arch/mips/include/uapi/asm/siginfo.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int)) | 13 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int)) |
14 | #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ | 14 | #undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ |
15 | 15 | ||
16 | #define HAVE_ARCH_SIGINFO_T | 16 | #define HAVE_ARCH_SIGINFO_T |
17 | 17 | ||
@@ -55,7 +55,7 @@ typedef struct siginfo { | |||
55 | int _overrun; /* overrun count */ | 55 | int _overrun; /* overrun count */ |
56 | char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; | 56 | char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; |
57 | sigval_t _sigval; /* same as below */ | 57 | sigval_t _sigval; /* same as below */ |
58 | int _sys_private; /* not to be passed to user */ | 58 | int _sys_private; /* not to be passed to user */ |
59 | } _timer; | 59 | } _timer; |
60 | 60 | ||
61 | /* POSIX.1b signals */ | 61 | /* POSIX.1b signals */ |
@@ -91,9 +91,9 @@ typedef struct siginfo { | |||
91 | short _addr_lsb; | 91 | short _addr_lsb; |
92 | } _sigfault; | 92 | } _sigfault; |
93 | 93 | ||
94 | /* SIGPOLL, SIGXFSZ (To do ...) */ | 94 | /* SIGPOLL, SIGXFSZ (To do ...) */ |
95 | struct { | 95 | struct { |
96 | __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | 96 | __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
97 | int _fd; | 97 | int _fd; |
98 | } _sigpoll; | 98 | } _sigpoll; |
99 | } _sifields; | 99 | } _sifields; |
diff --git a/arch/mips/include/uapi/asm/signal.h b/arch/mips/include/uapi/asm/signal.h index 770732cb8d03..e66e3984b1d4 100644 --- a/arch/mips/include/uapi/asm/signal.h +++ b/arch/mips/include/uapi/asm/signal.h | |||
@@ -24,28 +24,28 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ | |||
24 | #define SIGHUP 1 /* Hangup (POSIX). */ | 24 | #define SIGHUP 1 /* Hangup (POSIX). */ |
25 | #define SIGINT 2 /* Interrupt (ANSI). */ | 25 | #define SIGINT 2 /* Interrupt (ANSI). */ |
26 | #define SIGQUIT 3 /* Quit (POSIX). */ | 26 | #define SIGQUIT 3 /* Quit (POSIX). */ |
27 | #define SIGILL 4 /* Illegal instruction (ANSI). */ | 27 | #define SIGILL 4 /* Illegal instruction (ANSI). */ |
28 | #define SIGTRAP 5 /* Trace trap (POSIX). */ | 28 | #define SIGTRAP 5 /* Trace trap (POSIX). */ |
29 | #define SIGIOT 6 /* IOT trap (4.2 BSD). */ | 29 | #define SIGIOT 6 /* IOT trap (4.2 BSD). */ |
30 | #define SIGABRT SIGIOT /* Abort (ANSI). */ | 30 | #define SIGABRT SIGIOT /* Abort (ANSI). */ |
31 | #define SIGEMT 7 | 31 | #define SIGEMT 7 |
32 | #define SIGFPE 8 /* Floating-point exception (ANSI). */ | 32 | #define SIGFPE 8 /* Floating-point exception (ANSI). */ |
33 | #define SIGKILL 9 /* Kill, unblockable (POSIX). */ | 33 | #define SIGKILL 9 /* Kill, unblockable (POSIX). */ |
34 | #define SIGBUS 10 /* BUS error (4.2 BSD). */ | 34 | #define SIGBUS 10 /* BUS error (4.2 BSD). */ |
35 | #define SIGSEGV 11 /* Segmentation violation (ANSI). */ | 35 | #define SIGSEGV 11 /* Segmentation violation (ANSI). */ |
36 | #define SIGSYS 12 | 36 | #define SIGSYS 12 |
37 | #define SIGPIPE 13 /* Broken pipe (POSIX). */ | 37 | #define SIGPIPE 13 /* Broken pipe (POSIX). */ |
38 | #define SIGALRM 14 /* Alarm clock (POSIX). */ | 38 | #define SIGALRM 14 /* Alarm clock (POSIX). */ |
39 | #define SIGTERM 15 /* Termination (ANSI). */ | 39 | #define SIGTERM 15 /* Termination (ANSI). */ |
40 | #define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ | 40 | #define SIGUSR1 16 /* User-defined signal 1 (POSIX). */ |
41 | #define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ | 41 | #define SIGUSR2 17 /* User-defined signal 2 (POSIX). */ |
42 | #define SIGCHLD 18 /* Child status has changed (POSIX). */ | 42 | #define SIGCHLD 18 /* Child status has changed (POSIX). */ |
43 | #define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ | 43 | #define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ |
44 | #define SIGPWR 19 /* Power failure restart (System V). */ | 44 | #define SIGPWR 19 /* Power failure restart (System V). */ |
45 | #define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ | 45 | #define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ |
46 | #define SIGURG 21 /* Urgent condition on socket (4.2 BSD). */ | 46 | #define SIGURG 21 /* Urgent condition on socket (4.2 BSD). */ |
47 | #define SIGIO 22 /* I/O now possible (4.2 BSD). */ | 47 | #define SIGIO 22 /* I/O now possible (4.2 BSD). */ |
48 | #define SIGPOLL SIGIO /* Pollable event occurred (System V). */ | 48 | #define SIGPOLL SIGIO /* Pollable event occurred (System V). */ |
49 | #define SIGSTOP 23 /* Stop, unblockable (POSIX). */ | 49 | #define SIGSTOP 23 /* Stop, unblockable (POSIX). */ |
50 | #define SIGTSTP 24 /* Keyboard stop (POSIX). */ | 50 | #define SIGTSTP 24 /* Keyboard stop (POSIX). */ |
51 | #define SIGCONT 25 /* Continue (POSIX). */ | 51 | #define SIGCONT 25 /* Continue (POSIX). */ |
@@ -54,7 +54,7 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ | |||
54 | #define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ | 54 | #define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */ |
55 | #define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ | 55 | #define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */ |
56 | #define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ | 56 | #define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */ |
57 | #define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ | 57 | #define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */ |
58 | 58 | ||
59 | /* These should not be considered constants from userland. */ | 59 | /* These should not be considered constants from userland. */ |
60 | #define SIGRTMIN 32 | 60 | #define SIGRTMIN 32 |
diff --git a/arch/mips/include/uapi/asm/socket.h b/arch/mips/include/uapi/asm/socket.h index 17307ab90474..cc208f9f8920 100644 --- a/arch/mips/include/uapi/asm/socket.h +++ b/arch/mips/include/uapi/asm/socket.h | |||
@@ -24,23 +24,23 @@ | |||
24 | SIGPIPE when they die. */ | 24 | SIGPIPE when they die. */ |
25 | #define SO_DONTROUTE 0x0010 /* Don't do local routing. */ | 25 | #define SO_DONTROUTE 0x0010 /* Don't do local routing. */ |
26 | #define SO_BROADCAST 0x0020 /* Allow transmission of | 26 | #define SO_BROADCAST 0x0020 /* Allow transmission of |
27 | broadcast messages. */ | 27 | broadcast messages. */ |
28 | #define SO_LINGER 0x0080 /* Block on close of a reliable | 28 | #define SO_LINGER 0x0080 /* Block on close of a reliable |
29 | socket to transmit pending data. */ | 29 | socket to transmit pending data. */ |
30 | #define SO_OOBINLINE 0x0100 /* Receive out-of-band data in-band. */ | 30 | #define SO_OOBINLINE 0x0100 /* Receive out-of-band data in-band. */ |
31 | #if 0 | 31 | #if 0 |
32 | To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ | 32 | To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #define SO_TYPE 0x1008 /* Compatible name for SO_STYLE. */ | 35 | #define SO_TYPE 0x1008 /* Compatible name for SO_STYLE. */ |
36 | #define SO_STYLE SO_TYPE /* Synonym */ | 36 | #define SO_STYLE SO_TYPE /* Synonym */ |
37 | #define SO_ERROR 0x1007 /* get error status and clear */ | 37 | #define SO_ERROR 0x1007 /* get error status and clear */ |
38 | #define SO_SNDBUF 0x1001 /* Send buffer size. */ | 38 | #define SO_SNDBUF 0x1001 /* Send buffer size. */ |
39 | #define SO_RCVBUF 0x1002 /* Receive buffer. */ | 39 | #define SO_RCVBUF 0x1002 /* Receive buffer. */ |
40 | #define SO_SNDLOWAT 0x1003 /* send low-water mark */ | 40 | #define SO_SNDLOWAT 0x1003 /* send low-water mark */ |
41 | #define SO_RCVLOWAT 0x1004 /* receive low-water mark */ | 41 | #define SO_RCVLOWAT 0x1004 /* receive low-water mark */ |
42 | #define SO_SNDTIMEO 0x1005 /* send timeout */ | 42 | #define SO_SNDTIMEO 0x1005 /* send timeout */ |
43 | #define SO_RCVTIMEO 0x1006 /* receive timeout */ | 43 | #define SO_RCVTIMEO 0x1006 /* receive timeout */ |
44 | #define SO_ACCEPTCONN 0x1009 | 44 | #define SO_ACCEPTCONN 0x1009 |
45 | #define SO_PROTOCOL 0x1028 /* protocol type */ | 45 | #define SO_PROTOCOL 0x1028 /* protocol type */ |
46 | #define SO_DOMAIN 0x1029 /* domain/socket family */ | 46 | #define SO_DOMAIN 0x1029 /* domain/socket family */ |
@@ -61,11 +61,11 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ | |||
61 | #define SO_BINDTODEVICE 25 | 61 | #define SO_BINDTODEVICE 25 |
62 | 62 | ||
63 | /* Socket filtering */ | 63 | /* Socket filtering */ |
64 | #define SO_ATTACH_FILTER 26 | 64 | #define SO_ATTACH_FILTER 26 |
65 | #define SO_DETACH_FILTER 27 | 65 | #define SO_DETACH_FILTER 27 |
66 | #define SO_GET_FILTER SO_ATTACH_FILTER | 66 | #define SO_GET_FILTER SO_ATTACH_FILTER |
67 | 67 | ||
68 | #define SO_PEERNAME 28 | 68 | #define SO_PEERNAME 28 |
69 | #define SO_TIMESTAMP 29 | 69 | #define SO_TIMESTAMP 29 |
70 | #define SCM_TIMESTAMP SO_TIMESTAMP | 70 | #define SCM_TIMESTAMP SO_TIMESTAMP |
71 | 71 | ||
@@ -81,7 +81,7 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ | |||
81 | #define SO_TIMESTAMPING 37 | 81 | #define SO_TIMESTAMPING 37 |
82 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | 82 | #define SCM_TIMESTAMPING SO_TIMESTAMPING |
83 | 83 | ||
84 | #define SO_RXQ_OVFL 40 | 84 | #define SO_RXQ_OVFL 40 |
85 | 85 | ||
86 | #define SO_WIFI_STATUS 41 | 86 | #define SO_WIFI_STATUS 41 |
87 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | 87 | #define SCM_WIFI_STATUS SO_WIFI_STATUS |
diff --git a/arch/mips/include/uapi/asm/sockios.h b/arch/mips/include/uapi/asm/sockios.h index ed1a5f78d22f..419fbe661da3 100644 --- a/arch/mips/include/uapi/asm/sockios.h +++ b/arch/mips/include/uapi/asm/sockios.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | /* Socket-level I/O control calls. */ | 15 | /* Socket-level I/O control calls. */ |
16 | #define FIOGETOWN _IOR('f', 123, int) | 16 | #define FIOGETOWN _IOR('f', 123, int) |
17 | #define FIOSETOWN _IOW('f', 124, int) | 17 | #define FIOSETOWN _IOW('f', 124, int) |
18 | 18 | ||
19 | #define SIOCATMARK _IOR('s', 7, int) | 19 | #define SIOCATMARK _IOR('s', 7, int) |
20 | #define SIOCSPGRP _IOW('s', 8, pid_t) | 20 | #define SIOCSPGRP _IOW('s', 8, pid_t) |
diff --git a/arch/mips/include/uapi/asm/stat.h b/arch/mips/include/uapi/asm/stat.h index fe9a4c3ec5a1..b47bc541bbc0 100644 --- a/arch/mips/include/uapi/asm/stat.h +++ b/arch/mips/include/uapi/asm/stat.h | |||
@@ -23,7 +23,7 @@ struct stat { | |||
23 | __u32 st_nlink; | 23 | __u32 st_nlink; |
24 | uid_t st_uid; | 24 | uid_t st_uid; |
25 | gid_t st_gid; | 25 | gid_t st_gid; |
26 | unsigned st_rdev; | 26 | unsigned st_rdev; |
27 | long st_pad2[2]; | 27 | long st_pad2[2]; |
28 | off_t st_size; | 28 | off_t st_size; |
29 | long st_pad3; | 29 | long st_pad3; |
diff --git a/arch/mips/include/uapi/asm/statfs.h b/arch/mips/include/uapi/asm/statfs.h index 0f805c7a42a5..3305c834fc16 100644 --- a/arch/mips/include/uapi/asm/statfs.h +++ b/arch/mips/include/uapi/asm/statfs.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | 17 | ||
18 | typedef __kernel_fsid_t fsid_t; | 18 | typedef __kernel_fsid_t fsid_t; |
19 | 19 | ||
20 | #endif | 20 | #endif |
21 | 21 | ||
@@ -31,7 +31,7 @@ struct statfs { | |||
31 | long f_bavail; | 31 | long f_bavail; |
32 | 32 | ||
33 | /* Linux specials */ | 33 | /* Linux specials */ |
34 | __kernel_fsid_t f_fsid; | 34 | __kernel_fsid_t f_fsid; |
35 | long f_namelen; | 35 | long f_namelen; |
36 | long f_flags; | 36 | long f_flags; |
37 | long f_spare[5]; | 37 | long f_spare[5]; |
@@ -73,7 +73,7 @@ struct statfs64 { /* Same as struct statfs */ | |||
73 | long f_bavail; | 73 | long f_bavail; |
74 | 74 | ||
75 | /* Linux specials */ | 75 | /* Linux specials */ |
76 | __kernel_fsid_t f_fsid; | 76 | __kernel_fsid_t f_fsid; |
77 | long f_namelen; | 77 | long f_namelen; |
78 | long f_flags; | 78 | long f_flags; |
79 | long f_spare[5]; | 79 | long f_spare[5]; |
diff --git a/arch/mips/include/uapi/asm/sysmips.h b/arch/mips/include/uapi/asm/sysmips.h index 4f47b7d6a5f7..ae637e907856 100644 --- a/arch/mips/include/uapi/asm/sysmips.h +++ b/arch/mips/include/uapi/asm/sysmips.h | |||
@@ -16,10 +16,10 @@ | |||
16 | * sysmips(2) is deprecated - though some existing software uses it. | 16 | * sysmips(2) is deprecated - though some existing software uses it. |
17 | * We only support the following commands. | 17 | * We only support the following commands. |
18 | */ | 18 | */ |
19 | #define SETNAME 1 /* set hostname */ | 19 | #define SETNAME 1 /* set hostname */ |
20 | #define FLUSH_CACHE 3 /* writeback and invalidate caches */ | 20 | #define FLUSH_CACHE 3 /* writeback and invalidate caches */ |
21 | #define MIPS_FIXADE 7 /* control address error fixing */ | 21 | #define MIPS_FIXADE 7 /* control address error fixing */ |
22 | #define MIPS_RDNVRAM 10 /* read NVRAM */ | 22 | #define MIPS_RDNVRAM 10 /* read NVRAM */ |
23 | #define MIPS_ATOMIC_SET 2001 /* atomically set variable */ | 23 | #define MIPS_ATOMIC_SET 2001 /* atomically set variable */ |
24 | 24 | ||
25 | #endif /* _ASM_SYSMIPS_H */ | 25 | #endif /* _ASM_SYSMIPS_H */ |
diff --git a/arch/mips/include/uapi/asm/termbits.h b/arch/mips/include/uapi/asm/termbits.h index 76630b396fac..2750203e1e7d 100644 --- a/arch/mips/include/uapi/asm/termbits.h +++ b/arch/mips/include/uapi/asm/termbits.h | |||
@@ -53,7 +53,7 @@ struct ktermios { | |||
53 | }; | 53 | }; |
54 | 54 | ||
55 | /* c_cc characters */ | 55 | /* c_cc characters */ |
56 | #define VINTR 0 /* Interrupt character [ISIG]. */ | 56 | #define VINTR 0 /* Interrupt character [ISIG]. */ |
57 | #define VQUIT 1 /* Quit character [ISIG]. */ | 57 | #define VQUIT 1 /* Quit character [ISIG]. */ |
58 | #define VERASE 2 /* Erase character [ICANON]. */ | 58 | #define VERASE 2 /* Erase character [ICANON]. */ |
59 | #define VKILL 3 /* Kill-line character [ICANON]. */ | 59 | #define VKILL 3 /* Kill-line character [ICANON]. */ |
@@ -72,7 +72,7 @@ struct ktermios { | |||
72 | #define VDSUSP 11 /* Delayed suspend character [ISIG]. */ | 72 | #define VDSUSP 11 /* Delayed suspend character [ISIG]. */ |
73 | #endif | 73 | #endif |
74 | #define VREPRINT 12 /* Reprint-line character [ICANON]. */ | 74 | #define VREPRINT 12 /* Reprint-line character [ICANON]. */ |
75 | #define VDISCARD 13 /* Discard character [IEXTEN]. */ | 75 | #define VDISCARD 13 /* Discard character [IEXTEN]. */ |
76 | #define VWERASE 14 /* Word-erase character [ICANON]. */ | 76 | #define VWERASE 14 /* Word-erase character [ICANON]. */ |
77 | #define VLNEXT 15 /* Literal-next character [IEXTEN]. */ | 77 | #define VLNEXT 15 /* Literal-next character [IEXTEN]. */ |
78 | #define VEOF 16 /* End-of-file character [ICANON]. */ | 78 | #define VEOF 16 /* End-of-file character [ICANON]. */ |
@@ -92,7 +92,7 @@ struct ktermios { | |||
92 | #define IXON 0002000 /* Enable start/stop output control. */ | 92 | #define IXON 0002000 /* Enable start/stop output control. */ |
93 | #define IXANY 0004000 /* Any character will restart after stop. */ | 93 | #define IXANY 0004000 /* Any character will restart after stop. */ |
94 | #define IXOFF 0010000 /* Enable start/stop input control. */ | 94 | #define IXOFF 0010000 /* Enable start/stop input control. */ |
95 | #define IMAXBEL 0020000 /* Ring bell when input queue is full. */ | 95 | #define IMAXBEL 0020000 /* Ring bell when input queue is full. */ |
96 | #define IUTF8 0040000 /* Input is UTF-8 */ | 96 | #define IUTF8 0040000 /* Input is UTF-8 */ |
97 | 97 | ||
98 | /* c_oflag bits */ | 98 | /* c_oflag bits */ |
@@ -105,123 +105,123 @@ struct ktermios { | |||
105 | #define OFILL 0000100 | 105 | #define OFILL 0000100 |
106 | #define OFDEL 0000200 | 106 | #define OFDEL 0000200 |
107 | #define NLDLY 0000400 | 107 | #define NLDLY 0000400 |
108 | #define NL0 0000000 | 108 | #define NL0 0000000 |
109 | #define NL1 0000400 | 109 | #define NL1 0000400 |
110 | #define CRDLY 0003000 | 110 | #define CRDLY 0003000 |
111 | #define CR0 0000000 | 111 | #define CR0 0000000 |
112 | #define CR1 0001000 | 112 | #define CR1 0001000 |
113 | #define CR2 0002000 | 113 | #define CR2 0002000 |
114 | #define CR3 0003000 | 114 | #define CR3 0003000 |
115 | #define TABDLY 0014000 | 115 | #define TABDLY 0014000 |
116 | #define TAB0 0000000 | 116 | #define TAB0 0000000 |
117 | #define TAB1 0004000 | 117 | #define TAB1 0004000 |
118 | #define TAB2 0010000 | 118 | #define TAB2 0010000 |
119 | #define TAB3 0014000 | 119 | #define TAB3 0014000 |
120 | #define XTABS 0014000 | 120 | #define XTABS 0014000 |
121 | #define BSDLY 0020000 | 121 | #define BSDLY 0020000 |
122 | #define BS0 0000000 | 122 | #define BS0 0000000 |
123 | #define BS1 0020000 | 123 | #define BS1 0020000 |
124 | #define VTDLY 0040000 | 124 | #define VTDLY 0040000 |
125 | #define VT0 0000000 | 125 | #define VT0 0000000 |
126 | #define VT1 0040000 | 126 | #define VT1 0040000 |
127 | #define FFDLY 0100000 | 127 | #define FFDLY 0100000 |
128 | #define FF0 0000000 | 128 | #define FF0 0000000 |
129 | #define FF1 0100000 | 129 | #define FF1 0100000 |
130 | /* | 130 | /* |
131 | #define PAGEOUT ??? | 131 | #define PAGEOUT ??? |
132 | #define WRAP ??? | 132 | #define WRAP ??? |
133 | */ | 133 | */ |
134 | 134 | ||
135 | /* c_cflag bit meaning */ | 135 | /* c_cflag bit meaning */ |
136 | #define CBAUD 0010017 | 136 | #define CBAUD 0010017 |
137 | #define B0 0000000 /* hang up */ | 137 | #define B0 0000000 /* hang up */ |
138 | #define B50 0000001 | 138 | #define B50 0000001 |
139 | #define B75 0000002 | 139 | #define B75 0000002 |
140 | #define B110 0000003 | 140 | #define B110 0000003 |
141 | #define B134 0000004 | 141 | #define B134 0000004 |
142 | #define B150 0000005 | 142 | #define B150 0000005 |
143 | #define B200 0000006 | 143 | #define B200 0000006 |
144 | #define B300 0000007 | 144 | #define B300 0000007 |
145 | #define B600 0000010 | 145 | #define B600 0000010 |
146 | #define B1200 0000011 | 146 | #define B1200 0000011 |
147 | #define B1800 0000012 | 147 | #define B1800 0000012 |
148 | #define B2400 0000013 | 148 | #define B2400 0000013 |
149 | #define B4800 0000014 | 149 | #define B4800 0000014 |
150 | #define B9600 0000015 | 150 | #define B9600 0000015 |
151 | #define B19200 0000016 | 151 | #define B19200 0000016 |
152 | #define B38400 0000017 | 152 | #define B38400 0000017 |
153 | #define EXTA B19200 | 153 | #define EXTA B19200 |
154 | #define EXTB B38400 | 154 | #define EXTB B38400 |
155 | #define CSIZE 0000060 /* Number of bits per byte (mask). */ | 155 | #define CSIZE 0000060 /* Number of bits per byte (mask). */ |
156 | #define CS5 0000000 /* 5 bits per byte. */ | 156 | #define CS5 0000000 /* 5 bits per byte. */ |
157 | #define CS6 0000020 /* 6 bits per byte. */ | 157 | #define CS6 0000020 /* 6 bits per byte. */ |
158 | #define CS7 0000040 /* 7 bits per byte. */ | 158 | #define CS7 0000040 /* 7 bits per byte. */ |
159 | #define CS8 0000060 /* 8 bits per byte. */ | 159 | #define CS8 0000060 /* 8 bits per byte. */ |
160 | #define CSTOPB 0000100 /* Two stop bits instead of one. */ | 160 | #define CSTOPB 0000100 /* Two stop bits instead of one. */ |
161 | #define CREAD 0000200 /* Enable receiver. */ | 161 | #define CREAD 0000200 /* Enable receiver. */ |
162 | #define PARENB 0000400 /* Parity enable. */ | 162 | #define PARENB 0000400 /* Parity enable. */ |
163 | #define PARODD 0001000 /* Odd parity instead of even. */ | 163 | #define PARODD 0001000 /* Odd parity instead of even. */ |
164 | #define HUPCL 0002000 /* Hang up on last close. */ | 164 | #define HUPCL 0002000 /* Hang up on last close. */ |
165 | #define CLOCAL 0004000 /* Ignore modem status lines. */ | 165 | #define CLOCAL 0004000 /* Ignore modem status lines. */ |
166 | #define CBAUDEX 0010000 | 166 | #define CBAUDEX 0010000 |
167 | #define BOTHER 0010000 | 167 | #define BOTHER 0010000 |
168 | #define B57600 0010001 | 168 | #define B57600 0010001 |
169 | #define B115200 0010002 | 169 | #define B115200 0010002 |
170 | #define B230400 0010003 | 170 | #define B230400 0010003 |
171 | #define B460800 0010004 | 171 | #define B460800 0010004 |
172 | #define B500000 0010005 | 172 | #define B500000 0010005 |
173 | #define B576000 0010006 | 173 | #define B576000 0010006 |
174 | #define B921600 0010007 | 174 | #define B921600 0010007 |
175 | #define B1000000 0010010 | 175 | #define B1000000 0010010 |
176 | #define B1152000 0010011 | 176 | #define B1152000 0010011 |
177 | #define B1500000 0010012 | 177 | #define B1500000 0010012 |
178 | #define B2000000 0010013 | 178 | #define B2000000 0010013 |
179 | #define B2500000 0010014 | 179 | #define B2500000 0010014 |
180 | #define B3000000 0010015 | 180 | #define B3000000 0010015 |
181 | #define B3500000 0010016 | 181 | #define B3500000 0010016 |
182 | #define B4000000 0010017 | 182 | #define B4000000 0010017 |
183 | #define CIBAUD 002003600000 /* input baud rate */ | 183 | #define CIBAUD 002003600000 /* input baud rate */ |
184 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 184 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
185 | #define CRTSCTS 020000000000 /* flow control */ | 185 | #define CRTSCTS 020000000000 /* flow control */ |
186 | 186 | ||
187 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | 187 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ |
188 | 188 | ||
189 | /* c_lflag bits */ | 189 | /* c_lflag bits */ |
190 | #define ISIG 0000001 /* Enable signals. */ | 190 | #define ISIG 0000001 /* Enable signals. */ |
191 | #define ICANON 0000002 /* Do erase and kill processing. */ | 191 | #define ICANON 0000002 /* Do erase and kill processing. */ |
192 | #define XCASE 0000004 | 192 | #define XCASE 0000004 |
193 | #define ECHO 0000010 /* Enable echo. */ | 193 | #define ECHO 0000010 /* Enable echo. */ |
194 | #define ECHOE 0000020 /* Visual erase for ERASE. */ | 194 | #define ECHOE 0000020 /* Visual erase for ERASE. */ |
195 | #define ECHOK 0000040 /* Echo NL after KILL. */ | 195 | #define ECHOK 0000040 /* Echo NL after KILL. */ |
196 | #define ECHONL 0000100 /* Echo NL even if ECHO is off. */ | 196 | #define ECHONL 0000100 /* Echo NL even if ECHO is off. */ |
197 | #define NOFLSH 0000200 /* Disable flush after interrupt. */ | 197 | #define NOFLSH 0000200 /* Disable flush after interrupt. */ |
198 | #define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */ | 198 | #define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */ |
199 | #define ECHOCTL 0001000 /* Echo control characters as ^X. */ | 199 | #define ECHOCTL 0001000 /* Echo control characters as ^X. */ |
200 | #define ECHOPRT 0002000 /* Hardcopy visual erase. */ | 200 | #define ECHOPRT 0002000 /* Hardcopy visual erase. */ |
201 | #define ECHOKE 0004000 /* Visual erase for KILL. */ | 201 | #define ECHOKE 0004000 /* Visual erase for KILL. */ |
202 | #define FLUSHO 0020000 | 202 | #define FLUSHO 0020000 |
203 | #define PENDIN 0040000 /* Retype pending input (state). */ | 203 | #define PENDIN 0040000 /* Retype pending input (state). */ |
204 | #define TOSTOP 0100000 /* Send SIGTTOU for background output. */ | 204 | #define TOSTOP 0100000 /* Send SIGTTOU for background output. */ |
205 | #define ITOSTOP TOSTOP | 205 | #define ITOSTOP TOSTOP |
206 | #define EXTPROC 0200000 /* External processing on pty */ | 206 | #define EXTPROC 0200000 /* External processing on pty */ |
207 | 207 | ||
208 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 208 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
209 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 209 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
210 | 210 | ||
211 | /* tcflow() and TCXONC use these */ | 211 | /* tcflow() and TCXONC use these */ |
212 | #define TCOOFF 0 /* Suspend output. */ | 212 | #define TCOOFF 0 /* Suspend output. */ |
213 | #define TCOON 1 /* Restart suspended output. */ | 213 | #define TCOON 1 /* Restart suspended output. */ |
214 | #define TCIOFF 2 /* Send a STOP character. */ | 214 | #define TCIOFF 2 /* Send a STOP character. */ |
215 | #define TCION 3 /* Send a START character. */ | 215 | #define TCION 3 /* Send a START character. */ |
216 | 216 | ||
217 | /* tcflush() and TCFLSH use these */ | 217 | /* tcflush() and TCFLSH use these */ |
218 | #define TCIFLUSH 0 /* Discard data received but not yet read. */ | 218 | #define TCIFLUSH 0 /* Discard data received but not yet read. */ |
219 | #define TCOFLUSH 1 /* Discard data written but not yet sent. */ | 219 | #define TCOFLUSH 1 /* Discard data written but not yet sent. */ |
220 | #define TCIOFLUSH 2 /* Discard all pending data. */ | 220 | #define TCIOFLUSH 2 /* Discard all pending data. */ |
221 | 221 | ||
222 | /* tcsetattr uses these */ | 222 | /* tcsetattr uses these */ |
223 | #define TCSANOW TCSETS /* Change immediately. */ | 223 | #define TCSANOW TCSETS /* Change immediately. */ |
224 | #define TCSADRAIN TCSETSW /* Change when pending output is written. */ | 224 | #define TCSADRAIN TCSETSW /* Change when pending output is written. */ |
225 | #define TCSAFLUSH TCSETSF /* Flush pending input before changing. */ | 225 | #define TCSAFLUSH TCSETSF /* Flush pending input before changing. */ |
226 | 226 | ||
227 | #endif /* _ASM_TERMBITS_H */ | 227 | #endif /* _ASM_TERMBITS_H */ |
diff --git a/arch/mips/include/uapi/asm/termios.h b/arch/mips/include/uapi/asm/termios.h index 574fbdfb7202..baeb2fa87451 100644 --- a/arch/mips/include/uapi/asm/termios.h +++ b/arch/mips/include/uapi/asm/termios.h | |||
@@ -31,12 +31,12 @@ struct tchars { | |||
31 | }; | 31 | }; |
32 | 32 | ||
33 | struct ltchars { | 33 | struct ltchars { |
34 | char t_suspc; /* stop process signal */ | 34 | char t_suspc; /* stop process signal */ |
35 | char t_dsuspc; /* delayed stop process signal */ | 35 | char t_dsuspc; /* delayed stop process signal */ |
36 | char t_rprntc; /* reprint line */ | 36 | char t_rprntc; /* reprint line */ |
37 | char t_flushc; /* flush output (toggles) */ | 37 | char t_flushc; /* flush output (toggles) */ |
38 | char t_werasc; /* word erase */ | 38 | char t_werasc; /* word erase */ |
39 | char t_lnextc; /* literal next character */ | 39 | char t_lnextc; /* literal next character */ |
40 | }; | 40 | }; |
41 | 41 | ||
42 | /* TIOCGSIZE, TIOCSSIZE not defined yet. Only needed for SunOS source | 42 | /* TIOCGSIZE, TIOCSSIZE not defined yet. Only needed for SunOS source |
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index 0eebf3c3e03c..16338b84fa79 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
@@ -20,16 +20,16 @@ | |||
20 | * Linux o32 style syscalls are in the range from 4000 to 4999. | 20 | * Linux o32 style syscalls are in the range from 4000 to 4999. |
21 | */ | 21 | */ |
22 | #define __NR_Linux 4000 | 22 | #define __NR_Linux 4000 |
23 | #define __NR_syscall (__NR_Linux + 0) | 23 | #define __NR_syscall (__NR_Linux + 0) |
24 | #define __NR_exit (__NR_Linux + 1) | 24 | #define __NR_exit (__NR_Linux + 1) |
25 | #define __NR_fork (__NR_Linux + 2) | 25 | #define __NR_fork (__NR_Linux + 2) |
26 | #define __NR_read (__NR_Linux + 3) | 26 | #define __NR_read (__NR_Linux + 3) |
27 | #define __NR_write (__NR_Linux + 4) | 27 | #define __NR_write (__NR_Linux + 4) |
28 | #define __NR_open (__NR_Linux + 5) | 28 | #define __NR_open (__NR_Linux + 5) |
29 | #define __NR_close (__NR_Linux + 6) | 29 | #define __NR_close (__NR_Linux + 6) |
30 | #define __NR_waitpid (__NR_Linux + 7) | 30 | #define __NR_waitpid (__NR_Linux + 7) |
31 | #define __NR_creat (__NR_Linux + 8) | 31 | #define __NR_creat (__NR_Linux + 8) |
32 | #define __NR_link (__NR_Linux + 9) | 32 | #define __NR_link (__NR_Linux + 9) |
33 | #define __NR_unlink (__NR_Linux + 10) | 33 | #define __NR_unlink (__NR_Linux + 10) |
34 | #define __NR_execve (__NR_Linux + 11) | 34 | #define __NR_execve (__NR_Linux + 11) |
35 | #define __NR_chdir (__NR_Linux + 12) | 35 | #define __NR_chdir (__NR_Linux + 12) |
@@ -386,16 +386,16 @@ | |||
386 | * Linux 64-bit syscalls are in the range from 5000 to 5999. | 386 | * Linux 64-bit syscalls are in the range from 5000 to 5999. |
387 | */ | 387 | */ |
388 | #define __NR_Linux 5000 | 388 | #define __NR_Linux 5000 |
389 | #define __NR_read (__NR_Linux + 0) | 389 | #define __NR_read (__NR_Linux + 0) |
390 | #define __NR_write (__NR_Linux + 1) | 390 | #define __NR_write (__NR_Linux + 1) |
391 | #define __NR_open (__NR_Linux + 2) | 391 | #define __NR_open (__NR_Linux + 2) |
392 | #define __NR_close (__NR_Linux + 3) | 392 | #define __NR_close (__NR_Linux + 3) |
393 | #define __NR_stat (__NR_Linux + 4) | 393 | #define __NR_stat (__NR_Linux + 4) |
394 | #define __NR_fstat (__NR_Linux + 5) | 394 | #define __NR_fstat (__NR_Linux + 5) |
395 | #define __NR_lstat (__NR_Linux + 6) | 395 | #define __NR_lstat (__NR_Linux + 6) |
396 | #define __NR_poll (__NR_Linux + 7) | 396 | #define __NR_poll (__NR_Linux + 7) |
397 | #define __NR_lseek (__NR_Linux + 8) | 397 | #define __NR_lseek (__NR_Linux + 8) |
398 | #define __NR_mmap (__NR_Linux + 9) | 398 | #define __NR_mmap (__NR_Linux + 9) |
399 | #define __NR_mprotect (__NR_Linux + 10) | 399 | #define __NR_mprotect (__NR_Linux + 10) |
400 | #define __NR_munmap (__NR_Linux + 11) | 400 | #define __NR_munmap (__NR_Linux + 11) |
401 | #define __NR_brk (__NR_Linux + 12) | 401 | #define __NR_brk (__NR_Linux + 12) |
@@ -711,16 +711,16 @@ | |||
711 | * Linux N32 syscalls are in the range from 6000 to 6999. | 711 | * Linux N32 syscalls are in the range from 6000 to 6999. |
712 | */ | 712 | */ |
713 | #define __NR_Linux 6000 | 713 | #define __NR_Linux 6000 |
714 | #define __NR_read (__NR_Linux + 0) | 714 | #define __NR_read (__NR_Linux + 0) |
715 | #define __NR_write (__NR_Linux + 1) | 715 | #define __NR_write (__NR_Linux + 1) |
716 | #define __NR_open (__NR_Linux + 2) | 716 | #define __NR_open (__NR_Linux + 2) |
717 | #define __NR_close (__NR_Linux + 3) | 717 | #define __NR_close (__NR_Linux + 3) |
718 | #define __NR_stat (__NR_Linux + 4) | 718 | #define __NR_stat (__NR_Linux + 4) |
719 | #define __NR_fstat (__NR_Linux + 5) | 719 | #define __NR_fstat (__NR_Linux + 5) |
720 | #define __NR_lstat (__NR_Linux + 6) | 720 | #define __NR_lstat (__NR_Linux + 6) |
721 | #define __NR_poll (__NR_Linux + 7) | 721 | #define __NR_poll (__NR_Linux + 7) |
722 | #define __NR_lseek (__NR_Linux + 8) | 722 | #define __NR_lseek (__NR_Linux + 8) |
723 | #define __NR_mmap (__NR_Linux + 9) | 723 | #define __NR_mmap (__NR_Linux + 9) |
724 | #define __NR_mprotect (__NR_Linux + 10) | 724 | #define __NR_mprotect (__NR_Linux + 10) |
725 | #define __NR_munmap (__NR_Linux + 11) | 725 | #define __NR_munmap (__NR_Linux + 11) |
726 | #define __NR_brk (__NR_Linux + 12) | 726 | #define __NR_brk (__NR_Linux + 12) |
diff --git a/arch/mips/jazz/Makefile b/arch/mips/jazz/Makefile index dd9d99bfcf7a..624b0ee3e5d4 100644 --- a/arch/mips/jazz/Makefile +++ b/arch/mips/jazz/Makefile | |||
@@ -2,4 +2,4 @@ | |||
2 | # Makefile for the Jazz family specific parts of the kernel | 2 | # Makefile for the Jazz family specific parts of the kernel |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := irq.o jazzdma.o reset.o setup.o | 5 | obj-y := irq.o jazzdma.o reset.o setup.o |
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c index f21868b28b24..e1ea4f625f7a 100644 --- a/arch/mips/jazz/irq.c +++ b/arch/mips/jazz/irq.c | |||
@@ -111,7 +111,7 @@ asmlinkage void plat_irq_dispatch(void) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | static void r4030_set_mode(enum clock_event_mode mode, | 113 | static void r4030_set_mode(enum clock_event_mode mode, |
114 | struct clock_event_device *evt) | 114 | struct clock_event_device *evt) |
115 | { | 115 | { |
116 | /* Nothing to do ... */ | 116 | /* Nothing to do ... */ |
117 | } | 117 | } |
@@ -146,7 +146,7 @@ void __init plat_time_init(void) | |||
146 | 146 | ||
147 | BUG_ON(HZ != 100); | 147 | BUG_ON(HZ != 100); |
148 | 148 | ||
149 | cd->cpumask = cpumask_of(cpu); | 149 | cd->cpumask = cpumask_of(cpu); |
150 | clockevents_register_device(cd); | 150 | clockevents_register_device(cd); |
151 | action->dev_id = cd; | 151 | action->dev_id = cd; |
152 | setup_irq(JAZZ_TIMER_IRQ, action); | 152 | setup_irq(JAZZ_TIMER_IRQ, action); |
diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c index 2d8e447cb828..db6f5afff4ff 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c | |||
@@ -63,7 +63,7 @@ static inline void vdma_pgtbl_init(void) | |||
63 | static int __init vdma_init(void) | 63 | static int __init vdma_init(void) |
64 | { | 64 | { |
65 | /* | 65 | /* |
66 | * Allocate 32k of memory for DMA page tables. This needs to be page | 66 | * Allocate 32k of memory for DMA page tables. This needs to be page |
67 | * aligned and should be uncached to avoid cache flushing after every | 67 | * aligned and should be uncached to avoid cache flushing after every |
68 | * update. | 68 | * update. |
69 | */ | 69 | */ |
@@ -218,14 +218,14 @@ int vdma_remap(unsigned long laddr, unsigned long paddr, unsigned long size) | |||
218 | printk | 218 | printk |
219 | ("vdma_map: Invalid logical address: %08lx\n", | 219 | ("vdma_map: Invalid logical address: %08lx\n", |
220 | laddr); | 220 | laddr); |
221 | return -EINVAL; /* invalid logical address */ | 221 | return -EINVAL; /* invalid logical address */ |
222 | } | 222 | } |
223 | if (paddr > 0x1fffffff) { | 223 | if (paddr > 0x1fffffff) { |
224 | if (vdma_debug) | 224 | if (vdma_debug) |
225 | printk | 225 | printk |
226 | ("vdma_map: Invalid physical address: %08lx\n", | 226 | ("vdma_map: Invalid physical address: %08lx\n", |
227 | paddr); | 227 | paddr); |
228 | return -EINVAL; /* invalid physical address */ | 228 | return -EINVAL; /* invalid physical address */ |
229 | } | 229 | } |
230 | 230 | ||
231 | pages = (((paddr & (VDMA_PAGESIZE - 1)) + size) >> 12) + 1; | 231 | pages = (((paddr & (VDMA_PAGESIZE - 1)) + size) >> 12) + 1; |
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index 820e926dacbc..e4374a5651ce 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c | |||
@@ -137,9 +137,9 @@ static struct resource jazz_esp_rsrc[] = { | |||
137 | }; | 137 | }; |
138 | 138 | ||
139 | static struct platform_device jazz_esp_pdev = { | 139 | static struct platform_device jazz_esp_pdev = { |
140 | .name = "jazz_esp", | 140 | .name = "jazz_esp", |
141 | .num_resources = ARRAY_SIZE(jazz_esp_rsrc), | 141 | .num_resources = ARRAY_SIZE(jazz_esp_rsrc), |
142 | .resource = jazz_esp_rsrc | 142 | .resource = jazz_esp_rsrc |
143 | }; | 143 | }; |
144 | 144 | ||
145 | static struct resource jazz_sonic_rsrc[] = { | 145 | static struct resource jazz_sonic_rsrc[] = { |
@@ -156,9 +156,9 @@ static struct resource jazz_sonic_rsrc[] = { | |||
156 | }; | 156 | }; |
157 | 157 | ||
158 | static struct platform_device jazz_sonic_pdev = { | 158 | static struct platform_device jazz_sonic_pdev = { |
159 | .name = "jazzsonic", | 159 | .name = "jazzsonic", |
160 | .num_resources = ARRAY_SIZE(jazz_sonic_rsrc), | 160 | .num_resources = ARRAY_SIZE(jazz_sonic_rsrc), |
161 | .resource = jazz_sonic_rsrc | 161 | .resource = jazz_sonic_rsrc |
162 | }; | 162 | }; |
163 | 163 | ||
164 | static struct resource jazz_cmos_rsrc[] = { | 164 | static struct resource jazz_cmos_rsrc[] = { |
@@ -175,13 +175,13 @@ static struct resource jazz_cmos_rsrc[] = { | |||
175 | }; | 175 | }; |
176 | 176 | ||
177 | static struct platform_device jazz_cmos_pdev = { | 177 | static struct platform_device jazz_cmos_pdev = { |
178 | .name = "rtc_cmos", | 178 | .name = "rtc_cmos", |
179 | .num_resources = ARRAY_SIZE(jazz_cmos_rsrc), | 179 | .num_resources = ARRAY_SIZE(jazz_cmos_rsrc), |
180 | .resource = jazz_cmos_rsrc | 180 | .resource = jazz_cmos_rsrc |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static struct platform_device pcspeaker_pdev = { | 183 | static struct platform_device pcspeaker_pdev = { |
184 | .name = "pcspkr", | 184 | .name = "pcspkr", |
185 | .id = -1, | 185 | .id = -1, |
186 | }; | 186 | }; |
187 | 187 | ||
diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c index 43d964d36288..be2b3deeef1d 100644 --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c | |||
@@ -52,7 +52,7 @@ static bool is_avt2; | |||
52 | static struct nand_ecclayout qi_lb60_ecclayout_1gb = { | 52 | static struct nand_ecclayout qi_lb60_ecclayout_1gb = { |
53 | .eccbytes = 36, | 53 | .eccbytes = 36, |
54 | .eccpos = { | 54 | .eccpos = { |
55 | 6, 7, 8, 9, 10, 11, 12, 13, | 55 | 6, 7, 8, 9, 10, 11, 12, 13, |
56 | 14, 15, 16, 17, 18, 19, 20, 21, | 56 | 14, 15, 16, 17, 18, 19, 20, 21, |
57 | 22, 23, 24, 25, 26, 27, 28, 29, | 57 | 22, 23, 24, 25, 26, 27, 28, 29, |
58 | 30, 31, 32, 33, 34, 35, 36, 37, | 58 | 30, 31, 32, 33, 34, 35, 36, 37, |
@@ -210,7 +210,7 @@ static const uint32_t qi_lb60_keymap[] = { | |||
210 | KEY(6, 7, KEY_RIGHT), /* S57 */ | 210 | KEY(6, 7, KEY_RIGHT), /* S57 */ |
211 | 211 | ||
212 | KEY(7, 0, KEY_LEFTSHIFT), /* S58 */ | 212 | KEY(7, 0, KEY_LEFTSHIFT), /* S58 */ |
213 | KEY(7, 1, KEY_LEFTALT), /* S59 */ | 213 | KEY(7, 1, KEY_LEFTALT), /* S59 */ |
214 | KEY(7, 2, KEY_QI_FN), /* S60 */ | 214 | KEY(7, 2, KEY_QI_FN), /* S60 */ |
215 | }; | 215 | }; |
216 | 216 | ||
@@ -317,7 +317,7 @@ static struct spi_board_info qi_lb60_spi_board_info[] = { | |||
317 | 317 | ||
318 | /* Battery */ | 318 | /* Battery */ |
319 | static struct jz_battery_platform_data qi_lb60_battery_pdata = { | 319 | static struct jz_battery_platform_data qi_lb60_battery_pdata = { |
320 | .gpio_charge = JZ_GPIO_PORTC(27), | 320 | .gpio_charge = JZ_GPIO_PORTC(27), |
321 | .gpio_charge_active_low = 1, | 321 | .gpio_charge_active_low = 1, |
322 | .info = { | 322 | .info = { |
323 | .name = "battery", | 323 | .name = "battery", |
@@ -344,7 +344,7 @@ static struct gpio_keys_platform_data qi_lb60_gpio_keys_data = { | |||
344 | }; | 344 | }; |
345 | 345 | ||
346 | static struct platform_device qi_lb60_gpio_keys = { | 346 | static struct platform_device qi_lb60_gpio_keys = { |
347 | .name = "gpio-keys", | 347 | .name = "gpio-keys", |
348 | .id = -1, | 348 | .id = -1, |
349 | .dev = { | 349 | .dev = { |
350 | .platform_data = &qi_lb60_gpio_keys_data, | 350 | .platform_data = &qi_lb60_gpio_keys_data, |
diff --git a/arch/mips/jz4740/clock-debugfs.c b/arch/mips/jz4740/clock-debugfs.c index 330a0f2bf17b..a8acdeff267e 100644 --- a/arch/mips/jz4740/clock-debugfs.c +++ b/arch/mips/jz4740/clock-debugfs.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 SoC clock support debugfs entries | 3 | * JZ4740 SoC clock support debugfs entries |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/jz4740/clock.c b/arch/mips/jz4740/clock.c index 118a8a5562dd..484d38a0864f 100644 --- a/arch/mips/jz4740/clock.c +++ b/arch/mips/jz4740/clock.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 SoC clock support | 3 | * JZ4740 SoC clock support |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
@@ -31,7 +31,7 @@ | |||
31 | #define JZ_REG_CLOCK_LOW_POWER 0x04 | 31 | #define JZ_REG_CLOCK_LOW_POWER 0x04 |
32 | #define JZ_REG_CLOCK_PLL 0x10 | 32 | #define JZ_REG_CLOCK_PLL 0x10 |
33 | #define JZ_REG_CLOCK_GATE 0x20 | 33 | #define JZ_REG_CLOCK_GATE 0x20 |
34 | #define JZ_REG_CLOCK_SLEEP_CTRL 0x24 | 34 | #define JZ_REG_CLOCK_SLEEP_CTRL 0x24 |
35 | #define JZ_REG_CLOCK_I2S 0x60 | 35 | #define JZ_REG_CLOCK_I2S 0x60 |
36 | #define JZ_REG_CLOCK_LCD 0x64 | 36 | #define JZ_REG_CLOCK_LCD 0x64 |
37 | #define JZ_REG_CLOCK_MMC 0x68 | 37 | #define JZ_REG_CLOCK_MMC 0x68 |
diff --git a/arch/mips/jz4740/dma.c b/arch/mips/jz4740/dma.c index d7feb898692c..317ec6fffb12 100644 --- a/arch/mips/jz4740/dma.c +++ b/arch/mips/jz4740/dma.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 SoC DMA support | 3 | * JZ4740 SoC DMA support |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/jz4740/gpio.c b/arch/mips/jz4740/gpio.c index e1ddb95c05e3..00b798d2fb7c 100644 --- a/arch/mips/jz4740/gpio.c +++ b/arch/mips/jz4740/gpio.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 platform GPIO support | 3 | * JZ4740 platform GPIO support |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/jz4740/irq.c b/arch/mips/jz4740/irq.c index fc57ded326d8..2531da1d3add 100644 --- a/arch/mips/jz4740/irq.c +++ b/arch/mips/jz4740/irq.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 platform IRQ support | 3 | * JZ4740 platform IRQ support |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/jz4740/irq.h b/arch/mips/jz4740/irq.h index f75e39d62885..0f48720b5b63 100644 --- a/arch/mips/jz4740/irq.h +++ b/arch/mips/jz4740/irq.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> | 2 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | * | 8 | * |
diff --git a/arch/mips/jz4740/platform.c b/arch/mips/jz4740/platform.c index 6d14dcdbd908..e9348fd26a35 100644 --- a/arch/mips/jz4740/platform.c +++ b/arch/mips/jz4740/platform.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 platform devices | 3 | * JZ4740 platform devices |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
@@ -102,7 +102,7 @@ struct platform_device jz4740_mmc_device = { | |||
102 | .dma_mask = &jz4740_mmc_device.dev.coherent_dma_mask, | 102 | .dma_mask = &jz4740_mmc_device.dev.coherent_dma_mask, |
103 | .coherent_dma_mask = DMA_BIT_MASK(32), | 103 | .coherent_dma_mask = DMA_BIT_MASK(32), |
104 | }, | 104 | }, |
105 | .num_resources = ARRAY_SIZE(jz4740_mmc_resources), | 105 | .num_resources = ARRAY_SIZE(jz4740_mmc_resources), |
106 | .resource = jz4740_mmc_resources, | 106 | .resource = jz4740_mmc_resources, |
107 | }; | 107 | }; |
108 | 108 | ||
@@ -114,7 +114,7 @@ static struct resource jz4740_rtc_resources[] = { | |||
114 | .flags = IORESOURCE_MEM, | 114 | .flags = IORESOURCE_MEM, |
115 | }, | 115 | }, |
116 | { | 116 | { |
117 | .start = JZ4740_IRQ_RTC, | 117 | .start = JZ4740_IRQ_RTC, |
118 | .end = JZ4740_IRQ_RTC, | 118 | .end = JZ4740_IRQ_RTC, |
119 | .flags = IORESOURCE_IRQ, | 119 | .flags = IORESOURCE_IRQ, |
120 | }, | 120 | }, |
@@ -144,7 +144,7 @@ static struct resource jz4740_i2c_resources[] = { | |||
144 | struct platform_device jz4740_i2c_device = { | 144 | struct platform_device jz4740_i2c_device = { |
145 | .name = "jz4740-i2c", | 145 | .name = "jz4740-i2c", |
146 | .id = 0, | 146 | .id = 0, |
147 | .num_resources = ARRAY_SIZE(jz4740_i2c_resources), | 147 | .num_resources = ARRAY_SIZE(jz4740_i2c_resources), |
148 | .resource = jz4740_i2c_resources, | 148 | .resource = jz4740_i2c_resources, |
149 | }; | 149 | }; |
150 | 150 | ||
@@ -318,8 +318,8 @@ static struct resource jz4740_wdt_resources[] = { | |||
318 | }; | 318 | }; |
319 | 319 | ||
320 | struct platform_device jz4740_wdt_device = { | 320 | struct platform_device jz4740_wdt_device = { |
321 | .name = "jz4740-wdt", | 321 | .name = "jz4740-wdt", |
322 | .id = -1, | 322 | .id = -1, |
323 | .num_resources = ARRAY_SIZE(jz4740_wdt_resources), | 323 | .num_resources = ARRAY_SIZE(jz4740_wdt_resources), |
324 | .resource = jz4740_wdt_resources, | 324 | .resource = jz4740_wdt_resources, |
325 | }; | 325 | }; |
diff --git a/arch/mips/jz4740/pm.c b/arch/mips/jz4740/pm.c index 6744fa723f72..d8e213010169 100644 --- a/arch/mips/jz4740/pm.c +++ b/arch/mips/jz4740/pm.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 SoC power management support | 3 | * JZ4740 SoC power management support |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c index 4a70407f55bb..5a93f381590d 100644 --- a/arch/mips/jz4740/prom.c +++ b/arch/mips/jz4740/prom.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 SoC prom code | 3 | * JZ4740 SoC prom code |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/jz4740/reset.c b/arch/mips/jz4740/reset.c index 6c0da5afcf17..b6c6343d2834 100644 --- a/arch/mips/jz4740/reset.c +++ b/arch/mips/jz4740/reset.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> | 2 | * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | * | 8 | * |
diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c index d97cfbf882f5..76eafcb79c89 100644 --- a/arch/mips/jz4740/setup.c +++ b/arch/mips/jz4740/setup.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * JZ4740 setup code | 4 | * JZ4740 setup code |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | * | 10 | * |
diff --git a/arch/mips/jz4740/time.c b/arch/mips/jz4740/time.c index 39bb4bbf43e7..5e430ce9ac7e 100644 --- a/arch/mips/jz4740/time.c +++ b/arch/mips/jz4740/time.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 platform time support | 3 | * JZ4740 platform time support |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/jz4740/timer.c b/arch/mips/jz4740/timer.c index 22f11d73a17d..4992461787aa 100644 --- a/arch/mips/jz4740/timer.c +++ b/arch/mips/jz4740/timer.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * JZ4740 platform timer support | 3 | * JZ4740 platform timer support |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | * | 9 | * |
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 007c33d73715..c48ed923fd55 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -39,7 +39,7 @@ obj-$(CONFIG_CPU_R4K_FPU) += r4k_fpu.o r4k_switch.o | |||
39 | obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o | 39 | obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o |
40 | obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o | 40 | obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o |
41 | obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o | 41 | obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o |
42 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += octeon_switch.o | 42 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += octeon_switch.o |
43 | 43 | ||
44 | obj-$(CONFIG_SMP) += smp.o | 44 | obj-$(CONFIG_SMP) += smp.o |
45 | obj-$(CONFIG_SMP_UP) += smp-up.o | 45 | obj-$(CONFIG_SMP_UP) += smp-up.o |
@@ -53,7 +53,7 @@ obj-$(CONFIG_MIPS_CMP) += smp-cmp.o | |||
53 | obj-$(CONFIG_CPU_MIPSR2) += spram.o | 53 | obj-$(CONFIG_CPU_MIPSR2) += spram.o |
54 | 54 | ||
55 | obj-$(CONFIG_MIPS_VPE_LOADER) += vpe.o | 55 | obj-$(CONFIG_MIPS_VPE_LOADER) += vpe.o |
56 | obj-$(CONFIG_MIPS_VPE_APSP_API) += rtlx.o | 56 | obj-$(CONFIG_MIPS_VPE_APSP_API) += rtlx.o |
57 | 57 | ||
58 | obj-$(CONFIG_I8259) += i8259.o | 58 | obj-$(CONFIG_I8259) += i8259.o |
59 | obj-$(CONFIG_IRQ_CPU) += irq_cpu.o | 59 | obj-$(CONFIG_IRQ_CPU) += irq_cpu.o |
diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c index 9fdd8bcdd21e..e06f777e9c49 100644 --- a/arch/mips/kernel/binfmt_elfn32.c +++ b/arch/mips/kernel/binfmt_elfn32.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * Heavily inspired by the 32-bit Sparc compat code which is | 7 | * Heavily inspired by the 32-bit Sparc compat code which is |
8 | * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@redhat.com) | 8 | * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@redhat.com) |
9 | * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz) | 9 | * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz) |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define ELF_ARCH EM_MIPS | 12 | #define ELF_ARCH EM_MIPS |
@@ -48,7 +48,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
48 | 48 | ||
49 | #define TASK32_SIZE 0x7fff8000UL | 49 | #define TASK32_SIZE 0x7fff8000UL |
50 | #undef ELF_ET_DYN_BASE | 50 | #undef ELF_ET_DYN_BASE |
51 | #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) | 51 | #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) |
52 | 52 | ||
53 | #include <asm/processor.h> | 53 | #include <asm/processor.h> |
54 | #include <linux/module.h> | 54 | #include <linux/module.h> |
@@ -67,8 +67,8 @@ struct elf_prstatus32 | |||
67 | pid_t pr_ppid; | 67 | pid_t pr_ppid; |
68 | pid_t pr_pgrp; | 68 | pid_t pr_pgrp; |
69 | pid_t pr_sid; | 69 | pid_t pr_sid; |
70 | struct compat_timeval pr_utime; /* User time */ | 70 | struct compat_timeval pr_utime; /* User time */ |
71 | struct compat_timeval pr_stime; /* System time */ | 71 | struct compat_timeval pr_stime; /* System time */ |
72 | struct compat_timeval pr_cutime;/* Cumulative user time */ | 72 | struct compat_timeval pr_cutime;/* Cumulative user time */ |
73 | struct compat_timeval pr_cstime;/* Cumulative system time */ | 73 | struct compat_timeval pr_cstime;/* Cumulative system time */ |
74 | elf_gregset_t pr_reg; /* GP registers */ | 74 | elf_gregset_t pr_reg; /* GP registers */ |
@@ -88,7 +88,7 @@ struct elf_prpsinfo32 | |||
88 | pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; | 88 | pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; |
89 | /* Lots missing */ | 89 | /* Lots missing */ |
90 | char pr_fname[16]; /* filename of executable */ | 90 | char pr_fname[16]; /* filename of executable */ |
91 | char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ | 91 | char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ |
92 | }; | 92 | }; |
93 | 93 | ||
94 | #define elf_caddr_t u32 | 94 | #define elf_caddr_t u32 |
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c index ff448233dab5..556a4357d7fc 100644 --- a/arch/mips/kernel/binfmt_elfo32.c +++ b/arch/mips/kernel/binfmt_elfo32.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * Heavily inspired by the 32-bit Sparc compat code which is | 7 | * Heavily inspired by the 32-bit Sparc compat code which is |
8 | * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@redhat.com) | 8 | * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@redhat.com) |
9 | * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz) | 9 | * Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz) |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define ELF_ARCH EM_MIPS | 12 | #define ELF_ARCH EM_MIPS |
@@ -50,7 +50,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
50 | 50 | ||
51 | #define TASK32_SIZE 0x7fff8000UL | 51 | #define TASK32_SIZE 0x7fff8000UL |
52 | #undef ELF_ET_DYN_BASE | 52 | #undef ELF_ET_DYN_BASE |
53 | #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) | 53 | #define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2) |
54 | 54 | ||
55 | #include <asm/processor.h> | 55 | #include <asm/processor.h> |
56 | 56 | ||
@@ -86,8 +86,8 @@ struct elf_prstatus32 | |||
86 | pid_t pr_ppid; | 86 | pid_t pr_ppid; |
87 | pid_t pr_pgrp; | 87 | pid_t pr_pgrp; |
88 | pid_t pr_sid; | 88 | pid_t pr_sid; |
89 | struct compat_timeval pr_utime; /* User time */ | 89 | struct compat_timeval pr_utime; /* User time */ |
90 | struct compat_timeval pr_stime; /* System time */ | 90 | struct compat_timeval pr_stime; /* System time */ |
91 | struct compat_timeval pr_cutime;/* Cumulative user time */ | 91 | struct compat_timeval pr_cutime;/* Cumulative user time */ |
92 | struct compat_timeval pr_cstime;/* Cumulative system time */ | 92 | struct compat_timeval pr_cstime;/* Cumulative system time */ |
93 | elf_gregset_t pr_reg; /* GP registers */ | 93 | elf_gregset_t pr_reg; /* GP registers */ |
@@ -107,7 +107,7 @@ struct elf_prpsinfo32 | |||
107 | pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; | 107 | pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; |
108 | /* Lots missing */ | 108 | /* Lots missing */ |
109 | char pr_fname[16]; /* filename of executable */ | 109 | char pr_fname[16]; /* filename of executable */ |
110 | char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ | 110 | char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ |
111 | }; | 111 | }; |
112 | 112 | ||
113 | #define elf_caddr_t u32 | 113 | #define elf_caddr_t u32 |
diff --git a/arch/mips/kernel/bmips_vec.S b/arch/mips/kernel/bmips_vec.S index e908e81330b1..64c4fd62cf08 100644 --- a/arch/mips/kernel/bmips_vec.S +++ b/arch/mips/kernel/bmips_vec.S | |||
@@ -170,7 +170,7 @@ bmips_smp_entry: | |||
170 | 170 | ||
171 | /* switch to permanent stack and continue booting */ | 171 | /* switch to permanent stack and continue booting */ |
172 | 172 | ||
173 | .global bmips_secondary_reentry | 173 | .global bmips_secondary_reentry |
174 | bmips_secondary_reentry: | 174 | bmips_secondary_reentry: |
175 | la k0, bmips_smp_boot_sp | 175 | la k0, bmips_smp_boot_sp |
176 | lw sp, 0(k0) | 176 | lw sp, 0(k0) |
@@ -182,7 +182,7 @@ bmips_secondary_reentry: | |||
182 | #endif /* CONFIG_SMP */ | 182 | #endif /* CONFIG_SMP */ |
183 | 183 | ||
184 | .align 4 | 184 | .align 4 |
185 | .global bmips_reset_nmi_vec_end | 185 | .global bmips_reset_nmi_vec_end |
186 | bmips_reset_nmi_vec_end: | 186 | bmips_reset_nmi_vec_end: |
187 | 187 | ||
188 | END(bmips_reset_nmi_vec) | 188 | END(bmips_reset_nmi_vec) |
@@ -206,7 +206,7 @@ LEAF(bmips_smp_int_vec) | |||
206 | eret | 206 | eret |
207 | 207 | ||
208 | .align 4 | 208 | .align 4 |
209 | .global bmips_smp_int_vec_end | 209 | .global bmips_smp_int_vec_end |
210 | bmips_smp_int_vec_end: | 210 | bmips_smp_int_vec_end: |
211 | 211 | ||
212 | END(bmips_smp_int_vec) | 212 | END(bmips_smp_int_vec) |
diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c index 4d735d0e58f5..83ffe950f710 100644 --- a/arch/mips/kernel/branch.c +++ b/arch/mips/kernel/branch.c | |||
@@ -57,7 +57,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs, | |||
57 | */ | 57 | */ |
58 | case bcond_op: | 58 | case bcond_op: |
59 | switch (insn.i_format.rt) { | 59 | switch (insn.i_format.rt) { |
60 | case bltz_op: | 60 | case bltz_op: |
61 | case bltzl_op: | 61 | case bltzl_op: |
62 | if ((long)regs->regs[insn.i_format.rs] < 0) { | 62 | if ((long)regs->regs[insn.i_format.rs] < 0) { |
63 | epc = epc + 4 + (insn.i_format.simmediate << 2); | 63 | epc = epc + 4 + (insn.i_format.simmediate << 2); |
@@ -197,8 +197,8 @@ int __compute_return_epc_for_insn(struct pt_regs *regs, | |||
197 | bit += (bit != 0); | 197 | bit += (bit != 0); |
198 | bit += 23; | 198 | bit += 23; |
199 | switch (insn.i_format.rt & 3) { | 199 | switch (insn.i_format.rt & 3) { |
200 | case 0: /* bc1f */ | 200 | case 0: /* bc1f */ |
201 | case 2: /* bc1fl */ | 201 | case 2: /* bc1fl */ |
202 | if (~fcr31 & (1 << bit)) { | 202 | if (~fcr31 & (1 << bit)) { |
203 | epc = epc + 4 + (insn.i_format.simmediate << 2); | 203 | epc = epc + 4 + (insn.i_format.simmediate << 2); |
204 | if (insn.i_format.rt == 2) | 204 | if (insn.i_format.rt == 2) |
@@ -208,8 +208,8 @@ int __compute_return_epc_for_insn(struct pt_regs *regs, | |||
208 | regs->cp0_epc = epc; | 208 | regs->cp0_epc = epc; |
209 | break; | 209 | break; |
210 | 210 | ||
211 | case 1: /* bc1t */ | 211 | case 1: /* bc1t */ |
212 | case 3: /* bc1tl */ | 212 | case 3: /* bc1tl */ |
213 | if (fcr31 & (1 << bit)) { | 213 | if (fcr31 & (1 << bit)) { |
214 | epc = epc + 4 + (insn.i_format.simmediate << 2); | 214 | epc = epc + 4 + (insn.i_format.simmediate << 2); |
215 | if (insn.i_format.rt == 3) | 215 | if (insn.i_format.rt == 3) |
diff --git a/arch/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c index 69bbfae183bc..15f618b40cf6 100644 --- a/arch/mips/kernel/cevt-bcm1480.c +++ b/arch/mips/kernel/cevt-bcm1480.c | |||
@@ -41,7 +41,7 @@ | |||
41 | * the rest of the system | 41 | * the rest of the system |
42 | */ | 42 | */ |
43 | static void sibyte_set_mode(enum clock_event_mode mode, | 43 | static void sibyte_set_mode(enum clock_event_mode mode, |
44 | struct clock_event_device *evt) | 44 | struct clock_event_device *evt) |
45 | { | 45 | { |
46 | unsigned int cpu = smp_processor_id(); | 46 | unsigned int cpu = smp_processor_id(); |
47 | void __iomem *cfg, *init; | 47 | void __iomem *cfg, *init; |
@@ -144,7 +144,7 @@ void __cpuinit sb1480_clockevent_init(void) | |||
144 | 144 | ||
145 | bcm1480_unmask_irq(cpu, irq); | 145 | bcm1480_unmask_irq(cpu, irq); |
146 | 146 | ||
147 | action->handler = sibyte_counter_handler; | 147 | action->handler = sibyte_counter_handler; |
148 | action->flags = IRQF_PERCPU | IRQF_TIMER; | 148 | action->flags = IRQF_PERCPU | IRQF_TIMER; |
149 | action->name = name; | 149 | action->name = name; |
150 | action->dev_id = cd; | 150 | action->dev_id = cd; |
diff --git a/arch/mips/kernel/cevt-ds1287.c b/arch/mips/kernel/cevt-ds1287.c index ed648cb5a69f..ff1f01b72270 100644 --- a/arch/mips/kernel/cevt-ds1287.c +++ b/arch/mips/kernel/cevt-ds1287.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * DS1287 clockevent driver | 2 | * DS1287 clockevent driver |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2008 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -89,7 +89,7 @@ static void ds1287_event_handler(struct clock_event_device *dev) | |||
89 | static struct clock_event_device ds1287_clockevent = { | 89 | static struct clock_event_device ds1287_clockevent = { |
90 | .name = "ds1287", | 90 | .name = "ds1287", |
91 | .features = CLOCK_EVT_FEAT_PERIODIC, | 91 | .features = CLOCK_EVT_FEAT_PERIODIC, |
92 | .set_next_event = ds1287_set_next_event, | 92 | .set_next_event = ds1287_set_next_event, |
93 | .set_mode = ds1287_set_mode, | 93 | .set_mode = ds1287_set_mode, |
94 | .event_handler = ds1287_event_handler, | 94 | .event_handler = ds1287_event_handler, |
95 | }; | 95 | }; |
diff --git a/arch/mips/kernel/cevt-gt641xx.c b/arch/mips/kernel/cevt-gt641xx.c index 831b47585b7c..f069460751ab 100644 --- a/arch/mips/kernel/cevt-gt641xx.c +++ b/arch/mips/kernel/cevt-gt641xx.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GT641xx clockevent routines. | 2 | * GT641xx clockevent routines. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -98,7 +98,7 @@ static struct clock_event_device gt641xx_timer0_clockevent = { | |||
98 | .name = "gt641xx-timer0", | 98 | .name = "gt641xx-timer0", |
99 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 99 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
100 | .irq = GT641XX_TIMER0_IRQ, | 100 | .irq = GT641XX_TIMER0_IRQ, |
101 | .set_next_event = gt641xx_timer0_set_next_event, | 101 | .set_next_event = gt641xx_timer0_set_next_event, |
102 | .set_mode = gt641xx_timer0_set_mode, | 102 | .set_mode = gt641xx_timer0_set_mode, |
103 | .event_handler = gt641xx_timer0_event_handler, | 103 | .event_handler = gt641xx_timer0_event_handler, |
104 | }; | 104 | }; |
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index 75323925e537..07b847d77f5d 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #ifndef CONFIG_MIPS_MT_SMTC | 25 | #ifndef CONFIG_MIPS_MT_SMTC |
26 | 26 | ||
27 | static int mips_next_event(unsigned long delta, | 27 | static int mips_next_event(unsigned long delta, |
28 | struct clock_event_device *evt) | 28 | struct clock_event_device *evt) |
29 | { | 29 | { |
30 | unsigned int cnt; | 30 | unsigned int cnt; |
31 | int res; | 31 | int res; |
@@ -66,7 +66,7 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id) | |||
66 | goto out; | 66 | goto out; |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * The same applies to performance counter interrupts. But with the | 69 | * The same applies to performance counter interrupts. But with the |
70 | * above we now know that the reason we got here must be a timer | 70 | * above we now know that the reason we got here must be a timer |
71 | * interrupt. Being the paranoiacs we are we check anyway. | 71 | * interrupt. Being the paranoiacs we are we check anyway. |
72 | */ | 72 | */ |
@@ -119,7 +119,7 @@ int c0_compare_int_usable(void) | |||
119 | unsigned int cnt; | 119 | unsigned int cnt; |
120 | 120 | ||
121 | /* | 121 | /* |
122 | * IP7 already pending? Try to clear it by acking the timer. | 122 | * IP7 already pending? Try to clear it by acking the timer. |
123 | */ | 123 | */ |
124 | if (c0_compare_int_pending()) { | 124 | if (c0_compare_int_pending()) { |
125 | cnt = read_c0_count(); | 125 | cnt = read_c0_count(); |
diff --git a/arch/mips/kernel/cevt-sb1250.c b/arch/mips/kernel/cevt-sb1250.c index e73439fd6850..200f2778bf36 100644 --- a/arch/mips/kernel/cevt-sb1250.c +++ b/arch/mips/kernel/cevt-sb1250.c | |||
@@ -39,7 +39,7 @@ | |||
39 | * the rest of the system | 39 | * the rest of the system |
40 | */ | 40 | */ |
41 | static void sibyte_set_mode(enum clock_event_mode mode, | 41 | static void sibyte_set_mode(enum clock_event_mode mode, |
42 | struct clock_event_device *evt) | 42 | struct clock_event_device *evt) |
43 | { | 43 | { |
44 | unsigned int cpu = smp_processor_id(); | 44 | unsigned int cpu = smp_processor_id(); |
45 | void __iomem *cfg, *init; | 45 | void __iomem *cfg, *init; |
@@ -143,7 +143,7 @@ void __cpuinit sb1250_clockevent_init(void) | |||
143 | 143 | ||
144 | sb1250_unmask_irq(cpu, irq); | 144 | sb1250_unmask_irq(cpu, irq); |
145 | 145 | ||
146 | action->handler = sibyte_counter_handler; | 146 | action->handler = sibyte_counter_handler; |
147 | action->flags = IRQF_PERCPU | IRQF_TIMER; | 147 | action->flags = IRQF_PERCPU | IRQF_TIMER; |
148 | action->name = name; | 148 | action->name = name; |
149 | action->dev_id = cd; | 149 | action->dev_id = cd; |
diff --git a/arch/mips/kernel/cevt-smtc.c b/arch/mips/kernel/cevt-smtc.c index 2e72d30b2f05..9de5ed7ef1a3 100644 --- a/arch/mips/kernel/cevt-smtc.c +++ b/arch/mips/kernel/cevt-smtc.c | |||
@@ -49,7 +49,7 @@ static int smtc_nextinvpe[NR_CPUS]; | |||
49 | 49 | ||
50 | /* | 50 | /* |
51 | * Timestamps stored are absolute values to be programmed | 51 | * Timestamps stored are absolute values to be programmed |
52 | * into Count register. Valid timestamps will never be zero. | 52 | * into Count register. Valid timestamps will never be zero. |
53 | * If a Zero Count value is actually calculated, it is converted | 53 | * If a Zero Count value is actually calculated, it is converted |
54 | * to be a 1, which will introduce 1 or two CPU cycles of error | 54 | * to be a 1, which will introduce 1 or two CPU cycles of error |
55 | * roughly once every four billion events, which at 1000 HZ means | 55 | * roughly once every four billion events, which at 1000 HZ means |
diff --git a/arch/mips/kernel/cevt-txx9.c b/arch/mips/kernel/cevt-txx9.c index e5c30b1d0860..2ae08462e46e 100644 --- a/arch/mips/kernel/cevt-txx9.c +++ b/arch/mips/kernel/cevt-txx9.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Based on linux/arch/mips/kernel/cevt-r4k.c, | 6 | * Based on linux/arch/mips/kernel/cevt-r4k.c, |
7 | * linux/arch/mips/jmr3927/rbhma3100/setup.c | 7 | * linux/arch/mips/jmr3927/rbhma3100/setup.c |
8 | * | 8 | * |
9 | * Copyright 2001 MontaVista Software Inc. | 9 | * Copyright 2001 MontaVista Software Inc. |
10 | * Copyright (C) 2000-2001 Toshiba Corporation | 10 | * Copyright (C) 2000-2001 Toshiba Corporation |
@@ -129,7 +129,7 @@ static struct txx9_clock_event_device txx9_clock_event_device = { | |||
129 | CLOCK_EVT_FEAT_ONESHOT, | 129 | CLOCK_EVT_FEAT_ONESHOT, |
130 | .rating = 200, | 130 | .rating = 200, |
131 | .set_mode = txx9tmr_set_mode, | 131 | .set_mode = txx9tmr_set_mode, |
132 | .set_next_event = txx9tmr_set_next_event, | 132 | .set_next_event = txx9tmr_set_next_event, |
133 | }, | 133 | }, |
134 | }; | 134 | }; |
135 | 135 | ||
@@ -139,7 +139,7 @@ static irqreturn_t txx9tmr_interrupt(int irq, void *dev_id) | |||
139 | struct clock_event_device *cd = &txx9_cd->cd; | 139 | struct clock_event_device *cd = &txx9_cd->cd; |
140 | struct txx9_tmr_reg __iomem *tmrptr = txx9_cd->tmrptr; | 140 | struct txx9_tmr_reg __iomem *tmrptr = txx9_cd->tmrptr; |
141 | 141 | ||
142 | __raw_writel(0, &tmrptr->tisr); /* ack interrupt */ | 142 | __raw_writel(0, &tmrptr->tisr); /* ack interrupt */ |
143 | cd->event_handler(cd); | 143 | cd->event_handler(cd); |
144 | return IRQ_HANDLED; | 144 | return IRQ_HANDLED; |
145 | } | 145 | } |
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index d6a18644365a..de3c25ffd9f9 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c | |||
@@ -84,9 +84,9 @@ static inline void mult_sh_align_mod(long *v1, long *v2, long *w, | |||
84 | ".set noreorder\n\t" | 84 | ".set noreorder\n\t" |
85 | ".set nomacro\n\t" | 85 | ".set nomacro\n\t" |
86 | "mult %2, %3\n\t" | 86 | "mult %2, %3\n\t" |
87 | "dsll32 %0, %4, %5\n\t" | 87 | "dsll32 %0, %4, %5\n\t" |
88 | "mflo $0\n\t" | 88 | "mflo $0\n\t" |
89 | "dsll32 %1, %4, %5\n\t" | 89 | "dsll32 %1, %4, %5\n\t" |
90 | "nop\n\t" | 90 | "nop\n\t" |
91 | ".set pop" | 91 | ".set pop" |
92 | : "=&r" (lv1), "=r" (lw) | 92 | : "=&r" (lv1), "=r" (lw) |
@@ -239,7 +239,7 @@ static inline void check_daddi(void) | |||
239 | panic(bug64hit, !DADDI_WAR ? daddiwar : nowar); | 239 | panic(bug64hit, !DADDI_WAR ? daddiwar : nowar); |
240 | } | 240 | } |
241 | 241 | ||
242 | int daddiu_bug = -1; | 242 | int daddiu_bug = -1; |
243 | 243 | ||
244 | static inline void check_daddiu(void) | 244 | static inline void check_daddiu(void) |
245 | { | 245 | { |
@@ -273,7 +273,7 @@ static inline void check_daddiu(void) | |||
273 | #ifdef HAVE_AS_SET_DADDI | 273 | #ifdef HAVE_AS_SET_DADDI |
274 | ".set daddi\n\t" | 274 | ".set daddi\n\t" |
275 | #endif | 275 | #endif |
276 | "daddiu %0, %2, %4\n\t" | 276 | "daddiu %0, %2, %4\n\t" |
277 | "addiu %1, $0, %4\n\t" | 277 | "addiu %1, $0, %4\n\t" |
278 | "daddu %1, %2\n\t" | 278 | "daddu %1, %2\n\t" |
279 | ".set pop" | 279 | ".set pop" |
@@ -292,7 +292,7 @@ static inline void check_daddiu(void) | |||
292 | asm volatile( | 292 | asm volatile( |
293 | "addiu %2, $0, %3\n\t" | 293 | "addiu %2, $0, %3\n\t" |
294 | "dsrl %2, %2, 1\n\t" | 294 | "dsrl %2, %2, 1\n\t" |
295 | "daddiu %0, %2, %4\n\t" | 295 | "daddiu %0, %2, %4\n\t" |
296 | "addiu %1, $0, %4\n\t" | 296 | "addiu %1, $0, %4\n\t" |
297 | "daddu %1, %2" | 297 | "daddu %1, %2" |
298 | : "=&r" (v), "=&r" (w), "=&r" (tmp) | 298 | : "=&r" (v), "=&r" (w), "=&r" (tmp) |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index cce3782c96c9..760139ee7a99 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright (C) xxxx the Anonymous | 4 | * Copyright (C) xxxx the Anonymous |
5 | * Copyright (C) 1994 - 2006 Ralf Baechle | 5 | * Copyright (C) 1994 - 2006 Ralf Baechle |
6 | * Copyright (C) 2003, 2004 Maciej W. Rozycki | 6 | * Copyright (C) 2003, 2004 Maciej W. Rozycki |
7 | * Copyright (C) 2001, 2004, 2011, 2012 MIPS Technologies, Inc. | 7 | * Copyright (C) 2001, 2004, 2011, 2012 MIPS Technologies, Inc. |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
10 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
@@ -69,12 +69,12 @@ void r4k_wait_irqoff(void) | |||
69 | " wait \n" | 69 | " wait \n" |
70 | " .set pop \n"); | 70 | " .set pop \n"); |
71 | local_irq_enable(); | 71 | local_irq_enable(); |
72 | __asm__(" .globl __pastwait \n" | 72 | __asm__(" .globl __pastwait \n" |
73 | "__pastwait: \n"); | 73 | "__pastwait: \n"); |
74 | } | 74 | } |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * The RM7000 variant has to handle erratum 38. The workaround is to not | 77 | * The RM7000 variant has to handle erratum 38. The workaround is to not |
78 | * have any pending stores when the WAIT instruction is executed. | 78 | * have any pending stores when the WAIT instruction is executed. |
79 | */ | 79 | */ |
80 | static void rm7k_wait_irqoff(void) | 80 | static void rm7k_wait_irqoff(void) |
@@ -469,7 +469,7 @@ static void __cpuinit decode_configs(struct cpuinfo_mips *c) | |||
469 | c->scache.flags = MIPS_CACHE_NOT_PRESENT; | 469 | c->scache.flags = MIPS_CACHE_NOT_PRESENT; |
470 | 470 | ||
471 | ok = decode_config0(c); /* Read Config registers. */ | 471 | ok = decode_config0(c); /* Read Config registers. */ |
472 | BUG_ON(!ok); /* Arch spec violation! */ | 472 | BUG_ON(!ok); /* Arch spec violation! */ |
473 | if (ok) | 473 | if (ok) |
474 | ok = decode_config1(c); | 474 | ok = decode_config1(c); |
475 | if (ok) | 475 | if (ok) |
@@ -710,12 +710,12 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
710 | c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | | 710 | c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | |
711 | MIPS_CPU_LLSC; | 711 | MIPS_CPU_LLSC; |
712 | /* | 712 | /* |
713 | * Undocumented RM7000: Bit 29 in the info register of | 713 | * Undocumented RM7000: Bit 29 in the info register of |
714 | * the RM7000 v2.0 indicates if the TLB has 48 or 64 | 714 | * the RM7000 v2.0 indicates if the TLB has 48 or 64 |
715 | * entries. | 715 | * entries. |
716 | * | 716 | * |
717 | * 29 1 => 64 entry JTLB | 717 | * 29 1 => 64 entry JTLB |
718 | * 0 => 48 entry JTLB | 718 | * 0 => 48 entry JTLB |
719 | */ | 719 | */ |
720 | c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48; | 720 | c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48; |
721 | break; | 721 | break; |
@@ -729,8 +729,8 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) | |||
729 | * Bit 29 in the info register of the RM9000 | 729 | * Bit 29 in the info register of the RM9000 |
730 | * indicates if the TLB has 48 or 64 entries. | 730 | * indicates if the TLB has 48 or 64 entries. |
731 | * | 731 | * |
732 | * 29 1 => 64 entry JTLB | 732 | * 29 1 => 64 entry JTLB |
733 | * 0 => 48 entry JTLB | 733 | * 0 => 48 entry JTLB |
734 | */ | 734 | */ |
735 | c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48; | 735 | c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48; |
736 | break; | 736 | break; |
@@ -1053,12 +1053,12 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu) | |||
1053 | return; | 1053 | return; |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | c->options = (MIPS_CPU_TLB | | 1056 | c->options = (MIPS_CPU_TLB | |
1057 | MIPS_CPU_4KEX | | 1057 | MIPS_CPU_4KEX | |
1058 | MIPS_CPU_COUNTER | | 1058 | MIPS_CPU_COUNTER | |
1059 | MIPS_CPU_DIVEC | | 1059 | MIPS_CPU_DIVEC | |
1060 | MIPS_CPU_WATCH | | 1060 | MIPS_CPU_WATCH | |
1061 | MIPS_CPU_EJTAG | | 1061 | MIPS_CPU_EJTAG | |
1062 | MIPS_CPU_LLSC); | 1062 | MIPS_CPU_LLSC); |
1063 | 1063 | ||
1064 | switch (c->processor_id & 0xff00) { | 1064 | switch (c->processor_id & 0xff00) { |
@@ -1129,7 +1129,7 @@ __cpuinit void cpu_probe(void) | |||
1129 | struct cpuinfo_mips *c = ¤t_cpu_data; | 1129 | struct cpuinfo_mips *c = ¤t_cpu_data; |
1130 | unsigned int cpu = smp_processor_id(); | 1130 | unsigned int cpu = smp_processor_id(); |
1131 | 1131 | ||
1132 | c->processor_id = PRID_IMP_UNKNOWN; | 1132 | c->processor_id = PRID_IMP_UNKNOWN; |
1133 | c->fpu_id = FPIR_IMP_NONE; | 1133 | c->fpu_id = FPIR_IMP_NONE; |
1134 | c->cputype = CPU_UNKNOWN; | 1134 | c->cputype = CPU_UNKNOWN; |
1135 | 1135 | ||
diff --git a/arch/mips/kernel/cpufreq/loongson2_cpufreq.c b/arch/mips/kernel/cpufreq/loongson2_cpufreq.c index e7c98e2b78b6..bb51d3193ad4 100644 --- a/arch/mips/kernel/cpufreq/loongson2_cpufreq.c +++ b/arch/mips/kernel/cpufreq/loongson2_cpufreq.c | |||
@@ -195,8 +195,8 @@ static void loongson2_cpu_wait(void) | |||
195 | 195 | ||
196 | spin_lock_irqsave(&loongson2_wait_lock, flags); | 196 | spin_lock_irqsave(&loongson2_wait_lock, flags); |
197 | cpu_freq = LOONGSON_CHIPCFG0; | 197 | cpu_freq = LOONGSON_CHIPCFG0; |
198 | LOONGSON_CHIPCFG0 &= ~0x7; /* Put CPU into wait mode */ | 198 | LOONGSON_CHIPCFG0 &= ~0x7; /* Put CPU into wait mode */ |
199 | LOONGSON_CHIPCFG0 = cpu_freq; /* Restore CPU state */ | 199 | LOONGSON_CHIPCFG0 = cpu_freq; /* Restore CPU state */ |
200 | spin_unlock_irqrestore(&loongson2_wait_lock, flags); | 200 | spin_unlock_irqrestore(&loongson2_wait_lock, flags); |
201 | } | 201 | } |
202 | 202 | ||
diff --git a/arch/mips/kernel/crash.c b/arch/mips/kernel/crash.c index 0f53c39324bb..93aa302948d7 100644 --- a/arch/mips/kernel/crash.c +++ b/arch/mips/kernel/crash.c | |||
@@ -59,7 +59,7 @@ static void crash_kexec_prepare_cpus(void) | |||
59 | 59 | ||
60 | #else /* !defined(CONFIG_SMP) */ | 60 | #else /* !defined(CONFIG_SMP) */ |
61 | static void crash_kexec_prepare_cpus(void) {} | 61 | static void crash_kexec_prepare_cpus(void) {} |
62 | #endif /* !defined(CONFIG_SMP) */ | 62 | #endif /* !defined(CONFIG_SMP) */ |
63 | 63 | ||
64 | void default_machine_crash_shutdown(struct pt_regs *regs) | 64 | void default_machine_crash_shutdown(struct pt_regs *regs) |
65 | { | 65 | { |
diff --git a/arch/mips/kernel/csrc-bcm1480.c b/arch/mips/kernel/csrc-bcm1480.c index f96f99c794a3..468f3eba4132 100644 --- a/arch/mips/kernel/csrc-bcm1480.c +++ b/arch/mips/kernel/csrc-bcm1480.c | |||
@@ -35,7 +35,7 @@ static cycle_t bcm1480_hpt_read(struct clocksource *cs) | |||
35 | 35 | ||
36 | struct clocksource bcm1480_clocksource = { | 36 | struct clocksource bcm1480_clocksource = { |
37 | .name = "zbbus-cycles", | 37 | .name = "zbbus-cycles", |
38 | .rating = 200, | 38 | .rating = 200, |
39 | .read = bcm1480_hpt_read, | 39 | .read = bcm1480_hpt_read, |
40 | .mask = CLOCKSOURCE_MASK(64), | 40 | .mask = CLOCKSOURCE_MASK(64), |
41 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 41 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
diff --git a/arch/mips/kernel/csrc-ioasic.c b/arch/mips/kernel/csrc-ioasic.c index 46bd7fa98d6c..0654bff9b69c 100644 --- a/arch/mips/kernel/csrc-ioasic.c +++ b/arch/mips/kernel/csrc-ioasic.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * DEC I/O ASIC's counter clocksource | 2 | * DEC I/O ASIC's counter clocksource |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2008 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/kernel/csrc-powertv.c b/arch/mips/kernel/csrc-powertv.c index 2e7c5232da8d..abd99ea911ae 100644 --- a/arch/mips/kernel/csrc-powertv.c +++ b/arch/mips/kernel/csrc-powertv.c | |||
@@ -45,7 +45,7 @@ unsigned int __init mips_get_pll_freq(void) | |||
45 | m = PLL_GET_M(pll_reg); | 45 | m = PLL_GET_M(pll_reg); |
46 | n = PLL_GET_N(pll_reg); | 46 | n = PLL_GET_N(pll_reg); |
47 | p = PLL_GET_P(pll_reg); | 47 | p = PLL_GET_P(pll_reg); |
48 | pr_info("MIPS PLL Register:0x%x M=%d N=%d P=%d\n", pll_reg, m, n, p); | 48 | pr_info("MIPS PLL Register:0x%x M=%d N=%d P=%d\n", pll_reg, m, n, p); |
49 | 49 | ||
50 | /* Calculate clock frequency = (2 * N * 54MHz) / (M * (2**P)) */ | 50 | /* Calculate clock frequency = (2 * N * 54MHz) / (M * (2**P)) */ |
51 | fout = ((2 * n * fin) / (m * (0x01 << p))); | 51 | fout = ((2 * n * fin) / (m * (0x01 << p))); |
@@ -83,8 +83,8 @@ static void __init powertv_c0_hpt_clocksource_init(void) | |||
83 | 83 | ||
84 | /** | 84 | /** |
85 | * struct tim_c - free running counter | 85 | * struct tim_c - free running counter |
86 | * @hi: High 16 bits of the counter | 86 | * @hi: High 16 bits of the counter |
87 | * @lo: Low 32 bits of the counter | 87 | * @lo: Low 32 bits of the counter |
88 | * | 88 | * |
89 | * Lays out the structure of the free running counter in memory. This counter | 89 | * Lays out the structure of the free running counter in memory. This counter |
90 | * increments at a rate of 27 MHz/8 on all platforms. | 90 | * increments at a rate of 27 MHz/8 on all platforms. |
diff --git a/arch/mips/kernel/csrc-sb1250.c b/arch/mips/kernel/csrc-sb1250.c index e9606d907685..6ecb77d82063 100644 --- a/arch/mips/kernel/csrc-sb1250.c +++ b/arch/mips/kernel/csrc-sb1250.c | |||
@@ -44,7 +44,7 @@ static cycle_t sb1250_hpt_read(struct clocksource *cs) | |||
44 | 44 | ||
45 | struct clocksource bcm1250_clocksource = { | 45 | struct clocksource bcm1250_clocksource = { |
46 | .name = "bcm1250-counter-3", | 46 | .name = "bcm1250-counter-3", |
47 | .rating = 200, | 47 | .rating = 200, |
48 | .read = sb1250_hpt_read, | 48 | .read = sb1250_hpt_read, |
49 | .mask = CLOCKSOURCE_MASK(23), | 49 | .mask = CLOCKSOURCE_MASK(23), |
50 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 50 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c index 83fa1460e294..cf5509f13dd5 100644 --- a/arch/mips/kernel/ftrace.c +++ b/arch/mips/kernel/ftrace.c | |||
@@ -125,21 +125,21 @@ static int ftrace_modify_code_2(unsigned long ip, unsigned int new_code1, | |||
125 | * | 125 | * |
126 | * 2.1 For KBUILD_MCOUNT_RA_ADDRESS and CONFIG_32BIT | 126 | * 2.1 For KBUILD_MCOUNT_RA_ADDRESS and CONFIG_32BIT |
127 | * | 127 | * |
128 | * lui v1, hi_16bit_of_mcount --> b 1f (0x10000005) | 128 | * lui v1, hi_16bit_of_mcount --> b 1f (0x10000005) |
129 | * addiu v1, v1, low_16bit_of_mcount | 129 | * addiu v1, v1, low_16bit_of_mcount |
130 | * move at, ra | 130 | * move at, ra |
131 | * move $12, ra_address | 131 | * move $12, ra_address |
132 | * jalr v1 | 132 | * jalr v1 |
133 | * sub sp, sp, 8 | 133 | * sub sp, sp, 8 |
134 | * 1: offset = 5 instructions | 134 | * 1: offset = 5 instructions |
135 | * 2.2 For the Other situations | 135 | * 2.2 For the Other situations |
136 | * | 136 | * |
137 | * lui v1, hi_16bit_of_mcount --> b 1f (0x10000004) | 137 | * lui v1, hi_16bit_of_mcount --> b 1f (0x10000004) |
138 | * addiu v1, v1, low_16bit_of_mcount | 138 | * addiu v1, v1, low_16bit_of_mcount |
139 | * move at, ra | 139 | * move at, ra |
140 | * jalr v1 | 140 | * jalr v1 |
141 | * nop | move $12, ra_address | sub sp, sp, 8 | 141 | * nop | move $12, ra_address | sub sp, sp, 8 |
142 | * 1: offset = 4 instructions | 142 | * 1: offset = 4 instructions |
143 | */ | 143 | */ |
144 | 144 | ||
145 | #define INSN_B_1F (0x10000000 | MCOUNT_OFFSET_INSNS) | 145 | #define INSN_B_1F (0x10000000 | MCOUNT_OFFSET_INSNS) |
@@ -228,8 +228,8 @@ int ftrace_disable_ftrace_graph_caller(void) | |||
228 | 228 | ||
229 | #ifndef KBUILD_MCOUNT_RA_ADDRESS | 229 | #ifndef KBUILD_MCOUNT_RA_ADDRESS |
230 | 230 | ||
231 | #define S_RA_SP (0xafbf << 16) /* s{d,w} ra, offset(sp) */ | 231 | #define S_RA_SP (0xafbf << 16) /* s{d,w} ra, offset(sp) */ |
232 | #define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */ | 232 | #define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */ |
233 | #define OFFSET_MASK 0xffff /* stack offset range: 0 ~ PT_SIZE */ | 233 | #define OFFSET_MASK 0xffff /* stack offset range: 0 ~ PT_SIZE */ |
234 | 234 | ||
235 | unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long | 235 | unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long |
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index 8a0096d62812..ecb347ce1b3d 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
@@ -160,7 +160,7 @@ LEAF(r4k_wait) | |||
160 | .set pop | 160 | .set pop |
161 | .endm | 161 | .endm |
162 | 162 | ||
163 | .align 5 | 163 | .align 5 |
164 | BUILD_ROLLBACK_PROLOGUE handle_int | 164 | BUILD_ROLLBACK_PROLOGUE handle_int |
165 | NESTED(handle_int, PT_SIZE, sp) | 165 | NESTED(handle_int, PT_SIZE, sp) |
166 | #ifdef CONFIG_TRACE_IRQFLAGS | 166 | #ifdef CONFIG_TRACE_IRQFLAGS |
@@ -362,7 +362,7 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
362 | .set push | 362 | .set push |
363 | .set noat | 363 | .set noat |
364 | SAVE_ALL | 364 | SAVE_ALL |
365 | move a0, sp | 365 | move a0, sp |
366 | jal nmi_exception_handler | 366 | jal nmi_exception_handler |
367 | RESTORE_ALL | 367 | RESTORE_ALL |
368 | .set mips3 | 368 | .set mips3 |
@@ -409,7 +409,7 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
409 | string escapes and emits bogus warnings if it believes to | 409 | string escapes and emits bogus warnings if it believes to |
410 | recognize an unknown escape code. So make the arguments | 410 | recognize an unknown escape code. So make the arguments |
411 | start with an n and gas will believe \n is ok ... */ | 411 | start with an n and gas will believe \n is ok ... */ |
412 | .macro __BUILD_verbose nexception | 412 | .macro __BUILD_verbose nexception |
413 | LONG_L a1, PT_EPC(sp) | 413 | LONG_L a1, PT_EPC(sp) |
414 | #ifdef CONFIG_32BIT | 414 | #ifdef CONFIG_32BIT |
415 | PRINT("Got \nexception at %08lx\012") | 415 | PRINT("Got \nexception at %08lx\012") |
@@ -442,7 +442,7 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
442 | .endm | 442 | .endm |
443 | 443 | ||
444 | .macro BUILD_HANDLER exception handler clear verbose | 444 | .macro BUILD_HANDLER exception handler clear verbose |
445 | __BUILD_HANDLER \exception \handler \clear \verbose _int | 445 | __BUILD_HANDLER \exception \handler \clear \verbose _int |
446 | .endm | 446 | .endm |
447 | 447 | ||
448 | BUILD_HANDLER adel ade ade silent /* #4 */ | 448 | BUILD_HANDLER adel ade ade silent /* #4 */ |
@@ -456,7 +456,7 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
456 | BUILD_HANDLER tr tr sti silent /* #13 */ | 456 | BUILD_HANDLER tr tr sti silent /* #13 */ |
457 | BUILD_HANDLER fpe fpe fpe silent /* #15 */ | 457 | BUILD_HANDLER fpe fpe fpe silent /* #15 */ |
458 | BUILD_HANDLER mdmx mdmx sti silent /* #22 */ | 458 | BUILD_HANDLER mdmx mdmx sti silent /* #22 */ |
459 | #ifdef CONFIG_HARDWARE_WATCHPOINTS | 459 | #ifdef CONFIG_HARDWARE_WATCHPOINTS |
460 | /* | 460 | /* |
461 | * For watch, interrupts will be enabled after the watch | 461 | * For watch, interrupts will be enabled after the watch |
462 | * registers are read. | 462 | * registers are read. |
@@ -482,8 +482,8 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
482 | MFC0 k1, CP0_ENTRYHI | 482 | MFC0 k1, CP0_ENTRYHI |
483 | andi k1, 0xff /* ASID_MASK */ | 483 | andi k1, 0xff /* ASID_MASK */ |
484 | MFC0 k0, CP0_EPC | 484 | MFC0 k0, CP0_EPC |
485 | PTR_SRL k0, _PAGE_SHIFT + 1 | 485 | PTR_SRL k0, _PAGE_SHIFT + 1 |
486 | PTR_SLL k0, _PAGE_SHIFT + 1 | 486 | PTR_SLL k0, _PAGE_SHIFT + 1 |
487 | or k1, k0 | 487 | or k1, k0 |
488 | MTC0 k1, CP0_ENTRYHI | 488 | MTC0 k1, CP0_ENTRYHI |
489 | mtc0_tlbw_hazard | 489 | mtc0_tlbw_hazard |
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index fcf97312f328..c61cdaed2b1d 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -133,7 +133,7 @@ EXPORT(_stext) | |||
133 | #ifdef CONFIG_BOOT_RAW | 133 | #ifdef CONFIG_BOOT_RAW |
134 | /* | 134 | /* |
135 | * Give us a fighting chance of running if execution beings at the | 135 | * Give us a fighting chance of running if execution beings at the |
136 | * kernel load address. This is needed because this platform does | 136 | * kernel load address. This is needed because this platform does |
137 | * not have a ELF loader yet. | 137 | * not have a ELF loader yet. |
138 | */ | 138 | */ |
139 | FEXPORT(__kernel_entry) | 139 | FEXPORT(__kernel_entry) |
@@ -201,7 +201,7 @@ NESTED(kernel_entry, 16, sp) # kernel entry point | |||
201 | 201 | ||
202 | #ifdef CONFIG_SMP | 202 | #ifdef CONFIG_SMP |
203 | /* | 203 | /* |
204 | * SMP slave cpus entry point. Board specific code for bootstrap calls this | 204 | * SMP slave cpus entry point. Board specific code for bootstrap calls this |
205 | * function after setting up the stack and gp registers. | 205 | * function after setting up the stack and gp registers. |
206 | */ | 206 | */ |
207 | NESTED(smp_bootstrap, 16, sp) | 207 | NESTED(smp_bootstrap, 16, sp) |
diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c index 32b397b646ee..2b91fe80c436 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c | |||
@@ -178,7 +178,7 @@ handle_real_irq: | |||
178 | } else { | 178 | } else { |
179 | inb(PIC_MASTER_IMR); /* DUMMY - (do we need this?) */ | 179 | inb(PIC_MASTER_IMR); /* DUMMY - (do we need this?) */ |
180 | outb(cached_master_mask, PIC_MASTER_IMR); | 180 | outb(cached_master_mask, PIC_MASTER_IMR); |
181 | outb(0x60+irq, PIC_MASTER_CMD); /* 'Specific EOI to master */ | 181 | outb(0x60+irq, PIC_MASTER_CMD); /* 'Specific EOI to master */ |
182 | } | 182 | } |
183 | smtc_im_ack_irq(irq); | 183 | smtc_im_ack_irq(irq); |
184 | raw_spin_unlock_irqrestore(&i8259A_lock, flags); | 184 | raw_spin_unlock_irqrestore(&i8259A_lock, flags); |
diff --git a/arch/mips/kernel/irq-gt641xx.c b/arch/mips/kernel/irq-gt641xx.c index 883fc6cead36..44a1f792e399 100644 --- a/arch/mips/kernel/irq-gt641xx.c +++ b/arch/mips/kernel/irq-gt641xx.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GT641xx IRQ routines. | 2 | * GT641xx IRQ routines. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #include <asm/gt64120.h> | 26 | #include <asm/gt64120.h> |
27 | 27 | ||
28 | #define GT641XX_IRQ_TO_BIT(irq) (1U << (irq - GT641XX_IRQ_BASE)) | 28 | #define GT641XX_IRQ_TO_BIT(irq) (1U << (irq - GT641XX_IRQ_BASE)) |
29 | 29 | ||
30 | static DEFINE_RAW_SPINLOCK(gt641xx_irq_lock); | 30 | static DEFINE_RAW_SPINLOCK(gt641xx_irq_lock); |
31 | 31 | ||
diff --git a/arch/mips/kernel/irq-msc01.c b/arch/mips/kernel/irq-msc01.c index 14ac52c5ae86..fab40f7d2e03 100644 --- a/arch/mips/kernel/irq-msc01.c +++ b/arch/mips/kernel/irq-msc01.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This program is free software; you can redistribute it and/or modify it | 2 | * This program is free software; you can redistribute it and/or modify it |
3 | * under the terms of the GNU General Public License as published by the | 3 | * under the terms of the GNU General Public License as published by the |
4 | * Free Software Foundation; either version 2 of the License, or (at your | 4 | * Free Software Foundation; either version 2 of the License, or (at your |
5 | * option) any later version. | 5 | * option) any later version. |
6 | * | 6 | * |
@@ -86,7 +86,7 @@ static void edge_mask_and_ack_msc_irq(struct irq_data *d) | |||
86 | */ | 86 | */ |
87 | void ll_msc_irq(void) | 87 | void ll_msc_irq(void) |
88 | { | 88 | { |
89 | unsigned int irq; | 89 | unsigned int irq; |
90 | 90 | ||
91 | /* read the interrupt vector register */ | 91 | /* read the interrupt vector register */ |
92 | MSCIC_READ(MSC01_IC_VEC, irq); | 92 | MSCIC_READ(MSC01_IC_VEC, irq); |
diff --git a/arch/mips/kernel/irq-rm7000.c b/arch/mips/kernel/irq-rm7000.c index b0662cf97ea8..26f4e4c9db1a 100644 --- a/arch/mips/kernel/irq-rm7000.c +++ b/arch/mips/kernel/irq-rm7000.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2003 Ralf Baechle | 2 | * Copyright (C) 2003 Ralf Baechle |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | * | 8 | * |
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index a5aa43d07c8e..d1fea7a054be 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c | |||
@@ -48,7 +48,7 @@ again: | |||
48 | } | 48 | } |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * Allocate the 16 legacy interrupts for i8259 devices. This happens early | 51 | * Allocate the 16 legacy interrupts for i8259 devices. This happens early |
52 | * in the kernel initialization so treating allocation failure as BUG() is | 52 | * in the kernel initialization so treating allocation failure as BUG() is |
53 | * ok. | 53 | * ok. |
54 | */ | 54 | */ |
diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c index 972263bcf403..0207a44917bf 100644 --- a/arch/mips/kernel/irq_cpu.c +++ b/arch/mips/kernel/irq_cpu.c | |||
@@ -3,13 +3,13 @@ | |||
3 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | 3 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net |
4 | * | 4 | * |
5 | * Copyright (C) 2001 Ralf Baechle | 5 | * Copyright (C) 2001 Ralf Baechle |
6 | * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. | 6 | * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. |
7 | * Author: Maciej W. Rozycki <macro@mips.com> | 7 | * Author: Maciej W. Rozycki <macro@mips.com> |
8 | * | 8 | * |
9 | * This file define the irq handler for MIPS CPU interrupts. | 9 | * This file define the irq handler for MIPS CPU interrupts. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify it | 11 | * This program is free software; you can redistribute it and/or modify it |
12 | * under the terms of the GNU General Public License as published by the | 12 | * under the terms of the GNU General Public License as published by the |
13 | * Free Software Foundation; either version 2 of the License, or (at your | 13 | * Free Software Foundation; either version 2 of the License, or (at your |
14 | * option) any later version. | 14 | * option) any later version. |
15 | */ | 15 | */ |
diff --git a/arch/mips/kernel/irq_txx9.c b/arch/mips/kernel/irq_txx9.c index b0c55b50218e..ab00e490482f 100644 --- a/arch/mips/kernel/irq_txx9.c +++ b/arch/mips/kernel/irq_txx9.c | |||
@@ -1,12 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * Based on linux/arch/mips/jmr3927/rbhma3100/irq.c, | 2 | * Based on linux/arch/mips/jmr3927/rbhma3100/irq.c, |
3 | * linux/arch/mips/tx4927/common/tx4927_irq.c, | 3 | * linux/arch/mips/tx4927/common/tx4927_irq.c, |
4 | * linux/arch/mips/tx4938/common/irq.c | 4 | * linux/arch/mips/tx4938/common/irq.c |
5 | * | 5 | * |
6 | * Copyright 2001, 2003-2005 MontaVista Software Inc. | 6 | * Copyright 2001, 2003-2005 MontaVista Software Inc. |
7 | * Author: MontaVista Software, Inc. | 7 | * Author: MontaVista Software, Inc. |
8 | * ahennessy@mvista.com | 8 | * ahennessy@mvista.com |
9 | * source@mvista.com | 9 | * source@mvista.com |
10 | * Copyright (C) 2000-2001 Toshiba Corporation | 10 | * Copyright (C) 2000-2001 Toshiba Corporation |
11 | * | 11 | * |
12 | * This file is subject to the terms and conditions of the GNU General Public | 12 | * This file is subject to the terms and conditions of the GNU General Public |
@@ -122,7 +122,7 @@ static int txx9_irq_set_type(struct irq_data *d, unsigned int flow_type) | |||
122 | switch (flow_type & IRQF_TRIGGER_MASK) { | 122 | switch (flow_type & IRQF_TRIGGER_MASK) { |
123 | case IRQF_TRIGGER_RISING: mode = TXx9_IRCR_UP; break; | 123 | case IRQF_TRIGGER_RISING: mode = TXx9_IRCR_UP; break; |
124 | case IRQF_TRIGGER_FALLING: mode = TXx9_IRCR_DOWN; break; | 124 | case IRQF_TRIGGER_FALLING: mode = TXx9_IRCR_DOWN; break; |
125 | case IRQF_TRIGGER_HIGH: mode = TXx9_IRCR_HIGH; break; | 125 | case IRQF_TRIGGER_HIGH: mode = TXx9_IRCR_HIGH; break; |
126 | case IRQF_TRIGGER_LOW: mode = TXx9_IRCR_LOW; break; | 126 | case IRQF_TRIGGER_LOW: mode = TXx9_IRCR_LOW; break; |
127 | default: | 127 | default: |
128 | return -EINVAL; | 128 | return -EINVAL; |
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index 23817a6e32b6..fcaac2f132f0 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c | |||
@@ -40,7 +40,7 @@ static struct hard_trap_info { | |||
40 | { 6, SIGBUS }, /* instruction bus error */ | 40 | { 6, SIGBUS }, /* instruction bus error */ |
41 | { 7, SIGBUS }, /* data bus error */ | 41 | { 7, SIGBUS }, /* data bus error */ |
42 | { 9, SIGTRAP }, /* break */ | 42 | { 9, SIGTRAP }, /* break */ |
43 | /* { 11, SIGILL }, */ /* CPU unusable */ | 43 | /* { 11, SIGILL }, */ /* CPU unusable */ |
44 | { 12, SIGFPE }, /* overflow */ | 44 | { 12, SIGFPE }, /* overflow */ |
45 | { 13, SIGTRAP }, /* trap */ | 45 | { 13, SIGTRAP }, /* trap */ |
46 | { 14, SIGSEGV }, /* virtual instruction cache coherency */ | 46 | { 14, SIGSEGV }, /* virtual instruction cache coherency */ |
@@ -321,7 +321,7 @@ int kgdb_ll_trap(int cmd, const char *str, | |||
321 | .regs = regs, | 321 | .regs = regs, |
322 | .str = str, | 322 | .str = str, |
323 | .err = err, | 323 | .err = err, |
324 | .trapnr = trap, | 324 | .trapnr = trap, |
325 | .signr = sig, | 325 | .signr = sig, |
326 | 326 | ||
327 | }; | 327 | }; |
@@ -371,7 +371,7 @@ int kgdb_arch_init(void) | |||
371 | union mips_instruction insn = { | 371 | union mips_instruction insn = { |
372 | .r_format = { | 372 | .r_format = { |
373 | .opcode = spec_op, | 373 | .opcode = spec_op, |
374 | .func = break_op, | 374 | .func = break_op, |
375 | } | 375 | } |
376 | }; | 376 | }; |
377 | memcpy(arch_kgdb_ops.gdb_bpt_instr, insn.byte, BREAK_INSTR_SIZE); | 377 | memcpy(arch_kgdb_ops.gdb_bpt_instr, insn.byte, BREAK_INSTR_SIZE); |
diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c index 158467da9bc1..a14be5fa5ec8 100644 --- a/arch/mips/kernel/kprobes.c +++ b/arch/mips/kernel/kprobes.c | |||
@@ -307,7 +307,7 @@ static void prepare_singlestep(struct kprobe *p, struct pt_regs *regs, | |||
307 | /* | 307 | /* |
308 | * Called after single-stepping. p->addr is the address of the | 308 | * Called after single-stepping. p->addr is the address of the |
309 | * instruction whose first byte has been replaced by the "break 0" | 309 | * instruction whose first byte has been replaced by the "break 0" |
310 | * instruction. To avoid the SMP problems that can occur when we | 310 | * instruction. To avoid the SMP problems that can occur when we |
311 | * temporarily put back the original opcode to single-step, we | 311 | * temporarily put back the original opcode to single-step, we |
312 | * single-stepped a copy of the instruction. The address of this | 312 | * single-stepped a copy of the instruction. The address of this |
313 | * copy is p->ainsn.insn. | 313 | * copy is p->ainsn.insn. |
@@ -535,7 +535,7 @@ void jprobe_return_end(void); | |||
535 | 535 | ||
536 | void __kprobes jprobe_return(void) | 536 | void __kprobes jprobe_return(void) |
537 | { | 537 | { |
538 | /* Assembler quirk necessitates this '0,code' business. */ | 538 | /* Assembler quirk necessitates this '0,code' business. */ |
539 | asm volatile( | 539 | asm volatile( |
540 | "break 0,%0\n\t" | 540 | "break 0,%0\n\t" |
541 | ".globl jprobe_return_end\n" | 541 | ".globl jprobe_return_end\n" |
@@ -614,9 +614,9 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
614 | * We can handle this because: | 614 | * We can handle this because: |
615 | * - instances are always inserted at the head of the list | 615 | * - instances are always inserted at the head of the list |
616 | * - when multiple return probes are registered for the same | 616 | * - when multiple return probes are registered for the same |
617 | * function, the first instance's ret_addr will point to the | 617 | * function, the first instance's ret_addr will point to the |
618 | * real return address, and all the rest will point to | 618 | * real return address, and all the rest will point to |
619 | * kretprobe_trampoline | 619 | * kretprobe_trampoline |
620 | */ | 620 | */ |
621 | hlist_for_each_entry_safe(ri, node, tmp, head, hlist) { | 621 | hlist_for_each_entry_safe(ri, node, tmp, head, hlist) { |
622 | if (ri->task != current) | 622 | if (ri->task != current) |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 7adab86c632c..16bf4a5d3d1a 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -76,7 +76,7 @@ out: | |||
76 | return error; | 76 | return error; |
77 | } | 77 | } |
78 | 78 | ||
79 | #define RLIM_INFINITY32 0x7fffffff | 79 | #define RLIM_INFINITY32 0x7fffffff |
80 | #define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x) | 80 | #define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x) |
81 | 81 | ||
82 | struct rlimit32 { | 82 | struct rlimit32 { |
@@ -105,7 +105,7 @@ SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high, | |||
105 | 105 | ||
106 | /* From the Single Unix Spec: pread & pwrite act like lseek to pos + op + | 106 | /* From the Single Unix Spec: pread & pwrite act like lseek to pos + op + |
107 | lseek back to original location. They fail just like lseek does on | 107 | lseek back to original location. They fail just like lseek does on |
108 | non-seekable files. */ | 108 | non-seekable files. */ |
109 | 109 | ||
110 | SYSCALL_DEFINE6(32_pread, unsigned long, fd, char __user *, buf, size_t, count, | 110 | SYSCALL_DEFINE6(32_pread, unsigned long, fd, char __user *, buf, size_t, count, |
111 | unsigned long, unused, unsigned long, a4, unsigned long, a5) | 111 | unsigned long, unused, unsigned long, a4, unsigned long, a5) |
@@ -263,7 +263,7 @@ SYSCALL_DEFINE4(32_sendfile, long, out_fd, long, in_fd, | |||
263 | } | 263 | } |
264 | 264 | ||
265 | asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3, | 265 | asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3, |
266 | size_t count) | 266 | size_t count) |
267 | { | 267 | { |
268 | return sys_readahead(fd, merge_64(a2, a3), count); | 268 | return sys_readahead(fd, merge_64(a2, a3), count); |
269 | } | 269 | } |
@@ -292,7 +292,7 @@ asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2, | |||
292 | unsigned offset_a3, unsigned len_a4, unsigned len_a5) | 292 | unsigned offset_a3, unsigned len_a4, unsigned len_a5) |
293 | { | 293 | { |
294 | return sys_fallocate(fd, mode, merge_64(offset_a2, offset_a3), | 294 | return sys_fallocate(fd, mode, merge_64(offset_a2, offset_a3), |
295 | merge_64(len_a4, len_a5)); | 295 | merge_64(len_a4, len_a5)); |
296 | } | 296 | } |
297 | 297 | ||
298 | save_static_function(sys32_clone); | 298 | save_static_function(sys32_clone); |
@@ -313,7 +313,7 @@ _sys32_clone(nabi_no_regargs struct pt_regs regs) | |||
313 | syscall() works. */ | 313 | syscall() works. */ |
314 | child_tidptr = (int __user *) __dummy4; | 314 | child_tidptr = (int __user *) __dummy4; |
315 | return do_fork(clone_flags, newsp, 0, | 315 | return do_fork(clone_flags, newsp, 0, |
316 | parent_tidptr, child_tidptr); | 316 | parent_tidptr, child_tidptr); |
317 | } | 317 | } |
318 | 318 | ||
319 | asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf, | 319 | asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf, |
@@ -323,7 +323,7 @@ asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf, | |||
323 | } | 323 | } |
324 | 324 | ||
325 | SYSCALL_DEFINE6(32_fanotify_mark, int, fanotify_fd, unsigned int, flags, | 325 | SYSCALL_DEFINE6(32_fanotify_mark, int, fanotify_fd, unsigned int, flags, |
326 | u64, a3, u64, a4, int, dfd, const char __user *, pathname) | 326 | u64, a3, u64, a4, int, dfd, const char __user *, pathname) |
327 | { | 327 | { |
328 | return sys_fanotify_mark(fanotify_fd, flags, merge_64(a3, a4), | 328 | return sys_fanotify_mark(fanotify_fd, flags, merge_64(a3, a4), |
329 | dfd, pathname); | 329 | dfd, pathname); |
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c index df1e3e455f9a..6e58e97fcd39 100644 --- a/arch/mips/kernel/mips_ksyms.c +++ b/arch/mips/kernel/mips_ksyms.c | |||
@@ -17,9 +17,9 @@ | |||
17 | 17 | ||
18 | extern void *__bzero(void *__s, size_t __count); | 18 | extern void *__bzero(void *__s, size_t __count); |
19 | extern long __strncpy_from_user_nocheck_asm(char *__to, | 19 | extern long __strncpy_from_user_nocheck_asm(char *__to, |
20 | const char *__from, long __len); | 20 | const char *__from, long __len); |
21 | extern long __strncpy_from_user_asm(char *__to, const char *__from, | 21 | extern long __strncpy_from_user_asm(char *__to, const char *__from, |
22 | long __len); | 22 | long __len); |
23 | extern long __strlen_user_nocheck_asm(const char *s); | 23 | extern long __strlen_user_nocheck_asm(const char *s); |
24 | extern long __strlen_user_asm(const char *s); | 24 | extern long __strlen_user_asm(const char *s); |
25 | extern long __strnlen_user_nocheck_asm(const char *s); | 25 | extern long __strnlen_user_nocheck_asm(const char *s); |
diff --git a/arch/mips/kernel/module-rela.c b/arch/mips/kernel/module-rela.c index 61d60028b888..2b70723071c3 100644 --- a/arch/mips/kernel/module-rela.c +++ b/arch/mips/kernel/module-rela.c | |||
@@ -55,7 +55,7 @@ static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v) | |||
55 | static int apply_r_mips_hi16_rela(struct module *me, u32 *location, Elf_Addr v) | 55 | static int apply_r_mips_hi16_rela(struct module *me, u32 *location, Elf_Addr v) |
56 | { | 56 | { |
57 | *location = (*location & 0xffff0000) | | 57 | *location = (*location & 0xffff0000) | |
58 | ((((long long) v + 0x8000LL) >> 16) & 0xffff); | 58 | ((((long long) v + 0x8000LL) >> 16) & 0xffff); |
59 | 59 | ||
60 | return 0; | 60 | return 0; |
61 | } | 61 | } |
@@ -78,7 +78,7 @@ static int apply_r_mips_higher_rela(struct module *me, u32 *location, | |||
78 | Elf_Addr v) | 78 | Elf_Addr v) |
79 | { | 79 | { |
80 | *location = (*location & 0xffff0000) | | 80 | *location = (*location & 0xffff0000) | |
81 | ((((long long) v + 0x80008000LL) >> 32) & 0xffff); | 81 | ((((long long) v + 0x80008000LL) >> 32) & 0xffff); |
82 | 82 | ||
83 | return 0; | 83 | return 0; |
84 | } | 84 | } |
@@ -87,7 +87,7 @@ static int apply_r_mips_highest_rela(struct module *me, u32 *location, | |||
87 | Elf_Addr v) | 87 | Elf_Addr v) |
88 | { | 88 | { |
89 | *location = (*location & 0xffff0000) | | 89 | *location = (*location & 0xffff0000) | |
90 | ((((long long) v + 0x800080008000LL) >> 48) & 0xffff); | 90 | ((((long long) v + 0x800080008000LL) >> 48) & 0xffff); |
91 | 91 | ||
92 | return 0; | 92 | return 0; |
93 | } | 93 | } |
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index 07ff5812ffaf..977a623d9253 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c | |||
@@ -79,7 +79,7 @@ static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | *location = (*location & ~0x03ffffff) | | 81 | *location = (*location & ~0x03ffffff) | |
82 | ((*location + (v >> 2)) & 0x03ffffff); | 82 | ((*location + (v >> 2)) & 0x03ffffff); |
83 | 83 | ||
84 | return 0; | 84 | return 0; |
85 | } | 85 | } |
@@ -122,7 +122,7 @@ static int apply_r_mips_lo16_rel(struct module *me, u32 *location, Elf_Addr v) | |||
122 | struct mips_hi16 *l; | 122 | struct mips_hi16 *l; |
123 | Elf_Addr val, vallo; | 123 | Elf_Addr val, vallo; |
124 | 124 | ||
125 | /* Sign extend the addend we extract from the lo insn. */ | 125 | /* Sign extend the addend we extract from the lo insn. */ |
126 | vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000; | 126 | vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000; |
127 | 127 | ||
128 | if (me->arch.r_mips_hi16_list != NULL) { | 128 | if (me->arch.r_mips_hi16_list != NULL) { |
@@ -165,7 +165,7 @@ static int apply_r_mips_lo16_rel(struct module *me, u32 *location, Elf_Addr v) | |||
165 | } | 165 | } |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * Ok, we're done with the HI16 relocs. Now deal with the LO16. | 168 | * Ok, we're done with the HI16 relocs. Now deal with the LO16. |
169 | */ | 169 | */ |
170 | val = v + vallo; | 170 | val = v + vallo; |
171 | insnlo = (insnlo & ~0xffff) | (val & 0xffff); | 171 | insnlo = (insnlo & ~0xffff) | (val & 0xffff); |
@@ -230,7 +230,7 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab, | |||
230 | } | 230 | } |
231 | 231 | ||
232 | /* | 232 | /* |
233 | * Normally the hi16 list should be deallocated at this point. A | 233 | * Normally the hi16 list should be deallocated at this point. A |
234 | * malformed binary however could contain a series of R_MIPS_HI16 | 234 | * malformed binary however could contain a series of R_MIPS_HI16 |
235 | * relocations not followed by a R_MIPS_LO16 relocation. In that | 235 | * relocations not followed by a R_MIPS_LO16 relocation. In that |
236 | * case, free up the list and return an error. | 236 | * case, free up the list and return an error. |
@@ -261,7 +261,7 @@ const struct exception_table_entry *search_module_dbetables(unsigned long addr) | |||
261 | spin_unlock_irqrestore(&dbe_lock, flags); | 261 | spin_unlock_irqrestore(&dbe_lock, flags); |
262 | 262 | ||
263 | /* Now, if we found one, we are running inside it now, hence | 263 | /* Now, if we found one, we are running inside it now, hence |
264 | we cannot unload the module, hence no refcnt needed. */ | 264 | we cannot unload the module, hence no refcnt needed. */ |
265 | return e; | 265 | return e; |
266 | } | 266 | } |
267 | 267 | ||
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S index 207f1341578b..0e23343eb0a9 100644 --- a/arch/mips/kernel/octeon_switch.S +++ b/arch/mips/kernel/octeon_switch.S | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | /* | 31 | /* |
32 | * task_struct *resume(task_struct *prev, task_struct *next, | 32 | * task_struct *resume(task_struct *prev, task_struct *next, |
33 | * struct thread_info *next_ti, int usedfpu) | 33 | * struct thread_info *next_ti, int usedfpu) |
34 | */ | 34 | */ |
35 | .align 7 | 35 | .align 7 |
36 | LEAF(resume) | 36 | LEAF(resume) |
@@ -69,7 +69,7 @@ | |||
69 | 1: | 69 | 1: |
70 | #if CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0 | 70 | #if CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0 |
71 | /* Check if we need to store CVMSEG state */ | 71 | /* Check if we need to store CVMSEG state */ |
72 | mfc0 t0, $11,7 /* CvmMemCtl */ | 72 | mfc0 t0, $11,7 /* CvmMemCtl */ |
73 | bbit0 t0, 6, 3f /* Is user access enabled? */ | 73 | bbit0 t0, 6, 3f /* Is user access enabled? */ |
74 | 74 | ||
75 | /* Store the CVMSEG state */ | 75 | /* Store the CVMSEG state */ |
@@ -77,8 +77,8 @@ | |||
77 | andi t0, 0x3f | 77 | andi t0, 0x3f |
78 | /* Multiply * (cache line size/sizeof(long)/2) */ | 78 | /* Multiply * (cache line size/sizeof(long)/2) */ |
79 | sll t0, 7-LONGLOG-1 | 79 | sll t0, 7-LONGLOG-1 |
80 | li t1, -32768 /* Base address of CVMSEG */ | 80 | li t1, -32768 /* Base address of CVMSEG */ |
81 | LONG_ADDI t2, a0, THREAD_CVMSEG /* Where to store CVMSEG to */ | 81 | LONG_ADDI t2, a0, THREAD_CVMSEG /* Where to store CVMSEG to */ |
82 | synciobdma | 82 | synciobdma |
83 | 2: | 83 | 2: |
84 | .set noreorder | 84 | .set noreorder |
@@ -89,13 +89,13 @@ | |||
89 | LONG_S t8, 0(t2) /* Store CVMSEG to thread storage */ | 89 | LONG_S t8, 0(t2) /* Store CVMSEG to thread storage */ |
90 | LONG_ADDU t2, LONGSIZE*2 /* Increment loc in thread storage */ | 90 | LONG_ADDU t2, LONGSIZE*2 /* Increment loc in thread storage */ |
91 | bnez t0, 2b /* Loop until we've copied it all */ | 91 | bnez t0, 2b /* Loop until we've copied it all */ |
92 | LONG_S t9, -LONGSIZE(t2)/* Store CVMSEG to thread storage */ | 92 | LONG_S t9, -LONGSIZE(t2)/* Store CVMSEG to thread storage */ |
93 | .set reorder | 93 | .set reorder |
94 | 94 | ||
95 | /* Disable access to CVMSEG */ | 95 | /* Disable access to CVMSEG */ |
96 | mfc0 t0, $11,7 /* CvmMemCtl */ | 96 | mfc0 t0, $11,7 /* CvmMemCtl */ |
97 | xori t0, t0, 0x40 /* Bit 6 is CVMSEG user enable */ | 97 | xori t0, t0, 0x40 /* Bit 6 is CVMSEG user enable */ |
98 | mtc0 t0, $11,7 /* CvmMemCtl */ | 98 | mtc0 t0, $11,7 /* CvmMemCtl */ |
99 | #endif | 99 | #endif |
100 | 3: | 100 | 3: |
101 | /* | 101 | /* |
@@ -133,7 +133,7 @@ | |||
133 | 133 | ||
134 | dmfc0 t9, $9,7 /* CvmCtl register. */ | 134 | dmfc0 t9, $9,7 /* CvmCtl register. */ |
135 | 135 | ||
136 | /* Save the COP2 CRC state */ | 136 | /* Save the COP2 CRC state */ |
137 | dmfc2 t0, 0x0201 | 137 | dmfc2 t0, 0x0201 |
138 | dmfc2 t1, 0x0202 | 138 | dmfc2 t1, 0x0202 |
139 | dmfc2 t2, 0x0200 | 139 | dmfc2 t2, 0x0200 |
@@ -149,30 +149,30 @@ | |||
149 | sd t0, OCTEON_CP2_LLM_DAT(a0) | 149 | sd t0, OCTEON_CP2_LLM_DAT(a0) |
150 | sd t1, OCTEON_CP2_LLM_DAT+8(a0) | 150 | sd t1, OCTEON_CP2_LLM_DAT+8(a0) |
151 | 151 | ||
152 | 1: bbit1 t9, 26, 3f /* done if CvmCtl[NOCRYPTO] set */ | 152 | 1: bbit1 t9, 26, 3f /* done if CvmCtl[NOCRYPTO] set */ |
153 | 153 | ||
154 | /* Save the COP2 crypto state */ | 154 | /* Save the COP2 crypto state */ |
155 | /* this part is mostly common to both pass 1 and later revisions */ | 155 | /* this part is mostly common to both pass 1 and later revisions */ |
156 | dmfc2 t0, 0x0084 | 156 | dmfc2 t0, 0x0084 |
157 | dmfc2 t1, 0x0080 | 157 | dmfc2 t1, 0x0080 |
158 | dmfc2 t2, 0x0081 | 158 | dmfc2 t2, 0x0081 |
159 | dmfc2 t3, 0x0082 | 159 | dmfc2 t3, 0x0082 |
160 | sd t0, OCTEON_CP2_3DES_IV(a0) | 160 | sd t0, OCTEON_CP2_3DES_IV(a0) |
161 | dmfc2 t0, 0x0088 | 161 | dmfc2 t0, 0x0088 |
162 | sd t1, OCTEON_CP2_3DES_KEY(a0) | 162 | sd t1, OCTEON_CP2_3DES_KEY(a0) |
163 | dmfc2 t1, 0x0111 /* only necessary for pass 1 */ | 163 | dmfc2 t1, 0x0111 /* only necessary for pass 1 */ |
164 | sd t2, OCTEON_CP2_3DES_KEY+8(a0) | 164 | sd t2, OCTEON_CP2_3DES_KEY+8(a0) |
165 | dmfc2 t2, 0x0102 | 165 | dmfc2 t2, 0x0102 |
166 | sd t3, OCTEON_CP2_3DES_KEY+16(a0) | 166 | sd t3, OCTEON_CP2_3DES_KEY+16(a0) |
167 | dmfc2 t3, 0x0103 | 167 | dmfc2 t3, 0x0103 |
168 | sd t0, OCTEON_CP2_3DES_RESULT(a0) | 168 | sd t0, OCTEON_CP2_3DES_RESULT(a0) |
169 | dmfc2 t0, 0x0104 | 169 | dmfc2 t0, 0x0104 |
170 | sd t1, OCTEON_CP2_AES_INP0(a0) /* only necessary for pass 1 */ | 170 | sd t1, OCTEON_CP2_AES_INP0(a0) /* only necessary for pass 1 */ |
171 | dmfc2 t1, 0x0105 | 171 | dmfc2 t1, 0x0105 |
172 | sd t2, OCTEON_CP2_AES_IV(a0) | 172 | sd t2, OCTEON_CP2_AES_IV(a0) |
173 | dmfc2 t2, 0x0106 | 173 | dmfc2 t2, 0x0106 |
174 | sd t3, OCTEON_CP2_AES_IV+8(a0) | 174 | sd t3, OCTEON_CP2_AES_IV+8(a0) |
175 | dmfc2 t3, 0x0107 | 175 | dmfc2 t3, 0x0107 |
176 | sd t0, OCTEON_CP2_AES_KEY(a0) | 176 | sd t0, OCTEON_CP2_AES_KEY(a0) |
177 | dmfc2 t0, 0x0110 | 177 | dmfc2 t0, 0x0110 |
178 | sd t1, OCTEON_CP2_AES_KEY+8(a0) | 178 | sd t1, OCTEON_CP2_AES_KEY+8(a0) |
@@ -180,7 +180,7 @@ | |||
180 | sd t2, OCTEON_CP2_AES_KEY+16(a0) | 180 | sd t2, OCTEON_CP2_AES_KEY+16(a0) |
181 | dmfc2 t2, 0x0101 | 181 | dmfc2 t2, 0x0101 |
182 | sd t3, OCTEON_CP2_AES_KEY+24(a0) | 182 | sd t3, OCTEON_CP2_AES_KEY+24(a0) |
183 | mfc0 t3, $15,0 /* Get the processor ID register */ | 183 | mfc0 t3, $15,0 /* Get the processor ID register */ |
184 | sd t0, OCTEON_CP2_AES_KEYLEN(a0) | 184 | sd t0, OCTEON_CP2_AES_KEYLEN(a0) |
185 | li t0, 0x000d0000 /* This is the processor ID of Octeon Pass1 */ | 185 | li t0, 0x000d0000 /* This is the processor ID of Octeon Pass1 */ |
186 | sd t1, OCTEON_CP2_AES_RESULT(a0) | 186 | sd t1, OCTEON_CP2_AES_RESULT(a0) |
@@ -188,7 +188,7 @@ | |||
188 | /* Skip to the Pass1 version of the remainder of the COP2 state */ | 188 | /* Skip to the Pass1 version of the remainder of the COP2 state */ |
189 | beq t3, t0, 2f | 189 | beq t3, t0, 2f |
190 | 190 | ||
191 | /* the non-pass1 state when !CvmCtl[NOCRYPTO] */ | 191 | /* the non-pass1 state when !CvmCtl[NOCRYPTO] */ |
192 | dmfc2 t1, 0x0240 | 192 | dmfc2 t1, 0x0240 |
193 | dmfc2 t2, 0x0241 | 193 | dmfc2 t2, 0x0241 |
194 | dmfc2 t3, 0x0242 | 194 | dmfc2 t3, 0x0242 |
@@ -214,7 +214,7 @@ | |||
214 | sd t2, OCTEON_CP2_HSH_DATW+72(a0) | 214 | sd t2, OCTEON_CP2_HSH_DATW+72(a0) |
215 | dmfc2 t2, 0x024D | 215 | dmfc2 t2, 0x024D |
216 | sd t3, OCTEON_CP2_HSH_DATW+80(a0) | 216 | sd t3, OCTEON_CP2_HSH_DATW+80(a0) |
217 | dmfc2 t3, 0x024E | 217 | dmfc2 t3, 0x024E |
218 | sd t0, OCTEON_CP2_HSH_DATW+88(a0) | 218 | sd t0, OCTEON_CP2_HSH_DATW+88(a0) |
219 | dmfc2 t0, 0x0250 | 219 | dmfc2 t0, 0x0250 |
220 | sd t1, OCTEON_CP2_HSH_DATW+96(a0) | 220 | sd t1, OCTEON_CP2_HSH_DATW+96(a0) |
@@ -232,9 +232,9 @@ | |||
232 | sd t3, OCTEON_CP2_HSH_IVW+24(a0) | 232 | sd t3, OCTEON_CP2_HSH_IVW+24(a0) |
233 | dmfc2 t3, 0x0257 | 233 | dmfc2 t3, 0x0257 |
234 | sd t0, OCTEON_CP2_HSH_IVW+32(a0) | 234 | sd t0, OCTEON_CP2_HSH_IVW+32(a0) |
235 | dmfc2 t0, 0x0258 | 235 | dmfc2 t0, 0x0258 |
236 | sd t1, OCTEON_CP2_HSH_IVW+40(a0) | 236 | sd t1, OCTEON_CP2_HSH_IVW+40(a0) |
237 | dmfc2 t1, 0x0259 | 237 | dmfc2 t1, 0x0259 |
238 | sd t2, OCTEON_CP2_HSH_IVW+48(a0) | 238 | sd t2, OCTEON_CP2_HSH_IVW+48(a0) |
239 | dmfc2 t2, 0x025E | 239 | dmfc2 t2, 0x025E |
240 | sd t3, OCTEON_CP2_HSH_IVW+56(a0) | 240 | sd t3, OCTEON_CP2_HSH_IVW+56(a0) |
@@ -247,7 +247,7 @@ | |||
247 | sd t0, OCTEON_CP2_GFM_RESULT+8(a0) | 247 | sd t0, OCTEON_CP2_GFM_RESULT+8(a0) |
248 | jr ra | 248 | jr ra |
249 | 249 | ||
250 | 2: /* pass 1 special stuff when !CvmCtl[NOCRYPTO] */ | 250 | 2: /* pass 1 special stuff when !CvmCtl[NOCRYPTO] */ |
251 | dmfc2 t3, 0x0040 | 251 | dmfc2 t3, 0x0040 |
252 | dmfc2 t0, 0x0041 | 252 | dmfc2 t0, 0x0041 |
253 | dmfc2 t1, 0x0042 | 253 | dmfc2 t1, 0x0042 |
@@ -269,7 +269,7 @@ | |||
269 | sd t3, OCTEON_CP2_HSH_IVW+8(a0) | 269 | sd t3, OCTEON_CP2_HSH_IVW+8(a0) |
270 | sd t0, OCTEON_CP2_HSH_IVW+16(a0) | 270 | sd t0, OCTEON_CP2_HSH_IVW+16(a0) |
271 | 271 | ||
272 | 3: /* pass 1 or CvmCtl[NOCRYPTO] set */ | 272 | 3: /* pass 1 or CvmCtl[NOCRYPTO] set */ |
273 | jr ra | 273 | jr ra |
274 | END(octeon_cop2_save) | 274 | END(octeon_cop2_save) |
275 | 275 | ||
@@ -280,19 +280,19 @@ | |||
280 | .set push | 280 | .set push |
281 | .set noreorder | 281 | .set noreorder |
282 | LEAF(octeon_cop2_restore) | 282 | LEAF(octeon_cop2_restore) |
283 | /* First cache line was prefetched before the call */ | 283 | /* First cache line was prefetched before the call */ |
284 | pref 4, 128(a0) | 284 | pref 4, 128(a0) |
285 | dmfc0 t9, $9,7 /* CvmCtl register. */ | 285 | dmfc0 t9, $9,7 /* CvmCtl register. */ |
286 | 286 | ||
287 | pref 4, 256(a0) | 287 | pref 4, 256(a0) |
288 | ld t0, OCTEON_CP2_CRC_IV(a0) | 288 | ld t0, OCTEON_CP2_CRC_IV(a0) |
289 | pref 4, 384(a0) | 289 | pref 4, 384(a0) |
290 | ld t1, OCTEON_CP2_CRC_LENGTH(a0) | 290 | ld t1, OCTEON_CP2_CRC_LENGTH(a0) |
291 | ld t2, OCTEON_CP2_CRC_POLY(a0) | 291 | ld t2, OCTEON_CP2_CRC_POLY(a0) |
292 | 292 | ||
293 | /* Restore the COP2 CRC state */ | 293 | /* Restore the COP2 CRC state */ |
294 | dmtc2 t0, 0x0201 | 294 | dmtc2 t0, 0x0201 |
295 | dmtc2 t1, 0x1202 | 295 | dmtc2 t1, 0x1202 |
296 | bbit1 t9, 28, 2f /* Skip LLM if CvmCtl[NODFA_CP2] is set */ | 296 | bbit1 t9, 28, 2f /* Skip LLM if CvmCtl[NODFA_CP2] is set */ |
297 | dmtc2 t2, 0x4200 | 297 | dmtc2 t2, 0x4200 |
298 | 298 | ||
@@ -310,19 +310,19 @@ | |||
310 | ld t0, OCTEON_CP2_3DES_IV(a0) | 310 | ld t0, OCTEON_CP2_3DES_IV(a0) |
311 | ld t1, OCTEON_CP2_3DES_KEY(a0) | 311 | ld t1, OCTEON_CP2_3DES_KEY(a0) |
312 | ld t2, OCTEON_CP2_3DES_KEY+8(a0) | 312 | ld t2, OCTEON_CP2_3DES_KEY+8(a0) |
313 | dmtc2 t0, 0x0084 | 313 | dmtc2 t0, 0x0084 |
314 | ld t0, OCTEON_CP2_3DES_KEY+16(a0) | 314 | ld t0, OCTEON_CP2_3DES_KEY+16(a0) |
315 | dmtc2 t1, 0x0080 | 315 | dmtc2 t1, 0x0080 |
316 | ld t1, OCTEON_CP2_3DES_RESULT(a0) | 316 | ld t1, OCTEON_CP2_3DES_RESULT(a0) |
317 | dmtc2 t2, 0x0081 | 317 | dmtc2 t2, 0x0081 |
318 | ld t2, OCTEON_CP2_AES_INP0(a0) /* only really needed for pass 1 */ | 318 | ld t2, OCTEON_CP2_AES_INP0(a0) /* only really needed for pass 1 */ |
319 | dmtc2 t0, 0x0082 | 319 | dmtc2 t0, 0x0082 |
320 | ld t0, OCTEON_CP2_AES_IV(a0) | 320 | ld t0, OCTEON_CP2_AES_IV(a0) |
321 | dmtc2 t1, 0x0098 | 321 | dmtc2 t1, 0x0098 |
322 | ld t1, OCTEON_CP2_AES_IV+8(a0) | 322 | ld t1, OCTEON_CP2_AES_IV+8(a0) |
323 | dmtc2 t2, 0x010A /* only really needed for pass 1 */ | 323 | dmtc2 t2, 0x010A /* only really needed for pass 1 */ |
324 | ld t2, OCTEON_CP2_AES_KEY(a0) | 324 | ld t2, OCTEON_CP2_AES_KEY(a0) |
325 | dmtc2 t0, 0x0102 | 325 | dmtc2 t0, 0x0102 |
326 | ld t0, OCTEON_CP2_AES_KEY+8(a0) | 326 | ld t0, OCTEON_CP2_AES_KEY+8(a0) |
327 | dmtc2 t1, 0x0103 | 327 | dmtc2 t1, 0x0103 |
328 | ld t1, OCTEON_CP2_AES_KEY+16(a0) | 328 | ld t1, OCTEON_CP2_AES_KEY+16(a0) |
@@ -334,14 +334,14 @@ | |||
334 | ld t1, OCTEON_CP2_AES_RESULT(a0) | 334 | ld t1, OCTEON_CP2_AES_RESULT(a0) |
335 | dmtc2 t2, 0x0107 | 335 | dmtc2 t2, 0x0107 |
336 | ld t2, OCTEON_CP2_AES_RESULT+8(a0) | 336 | ld t2, OCTEON_CP2_AES_RESULT+8(a0) |
337 | mfc0 t3, $15,0 /* Get the processor ID register */ | 337 | mfc0 t3, $15,0 /* Get the processor ID register */ |
338 | dmtc2 t0, 0x0110 | 338 | dmtc2 t0, 0x0110 |
339 | li t0, 0x000d0000 /* This is the processor ID of Octeon Pass1 */ | 339 | li t0, 0x000d0000 /* This is the processor ID of Octeon Pass1 */ |
340 | dmtc2 t1, 0x0100 | 340 | dmtc2 t1, 0x0100 |
341 | bne t0, t3, 3f /* Skip the next stuff for non-pass1 */ | 341 | bne t0, t3, 3f /* Skip the next stuff for non-pass1 */ |
342 | dmtc2 t2, 0x0101 | 342 | dmtc2 t2, 0x0101 |
343 | 343 | ||
344 | /* this code is specific for pass 1 */ | 344 | /* this code is specific for pass 1 */ |
345 | ld t0, OCTEON_CP2_HSH_DATW(a0) | 345 | ld t0, OCTEON_CP2_HSH_DATW(a0) |
346 | ld t1, OCTEON_CP2_HSH_DATW+8(a0) | 346 | ld t1, OCTEON_CP2_HSH_DATW+8(a0) |
347 | ld t2, OCTEON_CP2_HSH_DATW+16(a0) | 347 | ld t2, OCTEON_CP2_HSH_DATW+16(a0) |
@@ -361,10 +361,10 @@ | |||
361 | ld t0, OCTEON_CP2_HSH_IVW+16(a0) | 361 | ld t0, OCTEON_CP2_HSH_IVW+16(a0) |
362 | dmtc2 t1, 0x0048 | 362 | dmtc2 t1, 0x0048 |
363 | dmtc2 t2, 0x0049 | 363 | dmtc2 t2, 0x0049 |
364 | b done_restore /* unconditional branch */ | 364 | b done_restore /* unconditional branch */ |
365 | dmtc2 t0, 0x004A | 365 | dmtc2 t0, 0x004A |
366 | 366 | ||
367 | 3: /* this is post-pass1 code */ | 367 | 3: /* this is post-pass1 code */ |
368 | ld t2, OCTEON_CP2_HSH_DATW(a0) | 368 | ld t2, OCTEON_CP2_HSH_DATW(a0) |
369 | ld t0, OCTEON_CP2_HSH_DATW+8(a0) | 369 | ld t0, OCTEON_CP2_HSH_DATW+8(a0) |
370 | ld t1, OCTEON_CP2_HSH_DATW+16(a0) | 370 | ld t1, OCTEON_CP2_HSH_DATW+16(a0) |
@@ -433,7 +433,7 @@ done_restore: | |||
433 | * sp is assumed to point to a struct pt_regs | 433 | * sp is assumed to point to a struct pt_regs |
434 | * | 434 | * |
435 | * NOTE: This is called in SAVE_SOME in stackframe.h. It can only | 435 | * NOTE: This is called in SAVE_SOME in stackframe.h. It can only |
436 | * safely modify k0 and k1. | 436 | * safely modify k0 and k1. |
437 | */ | 437 | */ |
438 | .align 7 | 438 | .align 7 |
439 | .set push | 439 | .set push |
@@ -446,14 +446,14 @@ done_restore: | |||
446 | /* Save the multiplier state */ | 446 | /* Save the multiplier state */ |
447 | v3mulu k0, $0, $0 | 447 | v3mulu k0, $0, $0 |
448 | v3mulu k1, $0, $0 | 448 | v3mulu k1, $0, $0 |
449 | sd k0, PT_MTP(sp) /* PT_MTP has P0 */ | 449 | sd k0, PT_MTP(sp) /* PT_MTP has P0 */ |
450 | v3mulu k0, $0, $0 | 450 | v3mulu k0, $0, $0 |
451 | sd k1, PT_MTP+8(sp) /* PT_MTP+8 has P1 */ | 451 | sd k1, PT_MTP+8(sp) /* PT_MTP+8 has P1 */ |
452 | ori k1, $0, 1 | 452 | ori k1, $0, 1 |
453 | v3mulu k1, k1, $0 | 453 | v3mulu k1, k1, $0 |
454 | sd k0, PT_MTP+16(sp) /* PT_MTP+16 has P2 */ | 454 | sd k0, PT_MTP+16(sp) /* PT_MTP+16 has P2 */ |
455 | v3mulu k0, $0, $0 | 455 | v3mulu k0, $0, $0 |
456 | sd k1, PT_MPL(sp) /* PT_MPL has MPL0 */ | 456 | sd k1, PT_MPL(sp) /* PT_MPL has MPL0 */ |
457 | v3mulu k1, $0, $0 | 457 | v3mulu k1, $0, $0 |
458 | sd k0, PT_MPL+8(sp) /* PT_MPL+8 has MPL1 */ | 458 | sd k0, PT_MPL+8(sp) /* PT_MPL+8 has MPL1 */ |
459 | jr ra | 459 | jr ra |
@@ -475,19 +475,19 @@ done_restore: | |||
475 | .set noreorder | 475 | .set noreorder |
476 | LEAF(octeon_mult_restore) | 476 | LEAF(octeon_mult_restore) |
477 | dmfc0 k1, $9,7 /* CvmCtl register. */ | 477 | dmfc0 k1, $9,7 /* CvmCtl register. */ |
478 | ld v0, PT_MPL(sp) /* MPL0 */ | 478 | ld v0, PT_MPL(sp) /* MPL0 */ |
479 | ld v1, PT_MPL+8(sp) /* MPL1 */ | 479 | ld v1, PT_MPL+8(sp) /* MPL1 */ |
480 | ld k0, PT_MPL+16(sp) /* MPL2 */ | 480 | ld k0, PT_MPL+16(sp) /* MPL2 */ |
481 | bbit1 k1, 27, 1f /* Skip CvmCtl[NOMUL] */ | 481 | bbit1 k1, 27, 1f /* Skip CvmCtl[NOMUL] */ |
482 | /* Normally falls through, so no time wasted here */ | 482 | /* Normally falls through, so no time wasted here */ |
483 | nop | 483 | nop |
484 | 484 | ||
485 | /* Restore the multiplier state */ | 485 | /* Restore the multiplier state */ |
486 | ld k1, PT_MTP+16(sp) /* P2 */ | 486 | ld k1, PT_MTP+16(sp) /* P2 */ |
487 | MTM0 v0 /* MPL0 */ | 487 | MTM0 v0 /* MPL0 */ |
488 | ld v0, PT_MTP+8(sp) /* P1 */ | 488 | ld v0, PT_MTP+8(sp) /* P1 */ |
489 | MTM1 v1 /* MPL1 */ | 489 | MTM1 v1 /* MPL1 */ |
490 | ld v1, PT_MTP(sp) /* P0 */ | 490 | ld v1, PT_MTP(sp) /* P0 */ |
491 | MTM2 k0 /* MPL2 */ | 491 | MTM2 k0 /* MPL2 */ |
492 | MTP2 k1 /* P2 */ | 492 | MTP2 k1 /* P2 */ |
493 | MTP1 v0 /* P1 */ | 493 | MTP1 v0 /* P1 */ |
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c index d9c81c5a6c90..45f1ffcf1a4b 100644 --- a/arch/mips/kernel/perf_event_mipsxx.c +++ b/arch/mips/kernel/perf_event_mipsxx.c | |||
@@ -103,13 +103,13 @@ static struct mips_pmu mipspmu; | |||
103 | 103 | ||
104 | #define M_CONFIG1_PC (1 << 4) | 104 | #define M_CONFIG1_PC (1 << 4) |
105 | 105 | ||
106 | #define M_PERFCTL_EXL (1 << 0) | 106 | #define M_PERFCTL_EXL (1 << 0) |
107 | #define M_PERFCTL_KERNEL (1 << 1) | 107 | #define M_PERFCTL_KERNEL (1 << 1) |
108 | #define M_PERFCTL_SUPERVISOR (1 << 2) | 108 | #define M_PERFCTL_SUPERVISOR (1 << 2) |
109 | #define M_PERFCTL_USER (1 << 3) | 109 | #define M_PERFCTL_USER (1 << 3) |
110 | #define M_PERFCTL_INTERRUPT_ENABLE (1 << 4) | 110 | #define M_PERFCTL_INTERRUPT_ENABLE (1 << 4) |
111 | #define M_PERFCTL_EVENT(event) (((event) & 0x3ff) << 5) | 111 | #define M_PERFCTL_EVENT(event) (((event) & 0x3ff) << 5) |
112 | #define M_PERFCTL_VPEID(vpe) ((vpe) << 16) | 112 | #define M_PERFCTL_VPEID(vpe) ((vpe) << 16) |
113 | 113 | ||
114 | #ifdef CONFIG_CPU_BMIPS5000 | 114 | #ifdef CONFIG_CPU_BMIPS5000 |
115 | #define M_PERFCTL_MT_EN(filter) 0 | 115 | #define M_PERFCTL_MT_EN(filter) 0 |
@@ -117,13 +117,13 @@ static struct mips_pmu mipspmu; | |||
117 | #define M_PERFCTL_MT_EN(filter) ((filter) << 20) | 117 | #define M_PERFCTL_MT_EN(filter) ((filter) << 20) |
118 | #endif /* CONFIG_CPU_BMIPS5000 */ | 118 | #endif /* CONFIG_CPU_BMIPS5000 */ |
119 | 119 | ||
120 | #define M_TC_EN_ALL M_PERFCTL_MT_EN(0) | 120 | #define M_TC_EN_ALL M_PERFCTL_MT_EN(0) |
121 | #define M_TC_EN_VPE M_PERFCTL_MT_EN(1) | 121 | #define M_TC_EN_VPE M_PERFCTL_MT_EN(1) |
122 | #define M_TC_EN_TC M_PERFCTL_MT_EN(2) | 122 | #define M_TC_EN_TC M_PERFCTL_MT_EN(2) |
123 | #define M_PERFCTL_TCID(tcid) ((tcid) << 22) | 123 | #define M_PERFCTL_TCID(tcid) ((tcid) << 22) |
124 | #define M_PERFCTL_WIDE (1 << 30) | 124 | #define M_PERFCTL_WIDE (1 << 30) |
125 | #define M_PERFCTL_MORE (1 << 31) | 125 | #define M_PERFCTL_MORE (1 << 31) |
126 | #define M_PERFCTL_TC (1 << 30) | 126 | #define M_PERFCTL_TC (1 << 30) |
127 | 127 | ||
128 | #define M_PERFCTL_COUNT_EVENT_WHENEVER (M_PERFCTL_EXL | \ | 128 | #define M_PERFCTL_COUNT_EVENT_WHENEVER (M_PERFCTL_EXL | \ |
129 | M_PERFCTL_KERNEL | \ | 129 | M_PERFCTL_KERNEL | \ |
@@ -827,7 +827,7 @@ static const struct mips_perf_event octeon_event_map[PERF_COUNT_HW_MAX] = { | |||
827 | [PERF_COUNT_HW_CPU_CYCLES] = { 0x01, CNTR_ALL }, | 827 | [PERF_COUNT_HW_CPU_CYCLES] = { 0x01, CNTR_ALL }, |
828 | [PERF_COUNT_HW_INSTRUCTIONS] = { 0x03, CNTR_ALL }, | 828 | [PERF_COUNT_HW_INSTRUCTIONS] = { 0x03, CNTR_ALL }, |
829 | [PERF_COUNT_HW_CACHE_REFERENCES] = { 0x2b, CNTR_ALL }, | 829 | [PERF_COUNT_HW_CACHE_REFERENCES] = { 0x2b, CNTR_ALL }, |
830 | [PERF_COUNT_HW_CACHE_MISSES] = { 0x2e, CNTR_ALL }, | 830 | [PERF_COUNT_HW_CACHE_MISSES] = { 0x2e, CNTR_ALL }, |
831 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x08, CNTR_ALL }, | 831 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x08, CNTR_ALL }, |
832 | [PERF_COUNT_HW_BRANCH_MISSES] = { 0x09, CNTR_ALL }, | 832 | [PERF_COUNT_HW_BRANCH_MISSES] = { 0x09, CNTR_ALL }, |
833 | [PERF_COUNT_HW_BUS_CYCLES] = { 0x25, CNTR_ALL }, | 833 | [PERF_COUNT_HW_BUS_CYCLES] = { 0x25, CNTR_ALL }, |
@@ -1371,7 +1371,7 @@ static irqreturn_t mipsxx_pmu_handle_irq(int irq, void *dev) | |||
1371 | (b) == 25 || (b) == 39 || (r) == 44 || (r) == 174 || \ | 1371 | (b) == 25 || (b) == 39 || (r) == 44 || (r) == 174 || \ |
1372 | (r) == 176 || ((b) >= 50 && (b) <= 55) || \ | 1372 | (r) == 176 || ((b) >= 50 && (b) <= 55) || \ |
1373 | ((b) >= 64 && (b) <= 67)) | 1373 | ((b) >= 64 && (b) <= 67)) |
1374 | #define IS_RANGE_V_34K_EVENT(r) ((r) == 47) | 1374 | #define IS_RANGE_V_34K_EVENT(r) ((r) == 47) |
1375 | #endif | 1375 | #endif |
1376 | 1376 | ||
1377 | /* 74K */ | 1377 | /* 74K */ |
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index 07dff54f2ce8..9dafed058136 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1995, 1996, 2001 Ralf Baechle | 2 | * Copyright (C) 1995, 1996, 2001 Ralf Baechle |
3 | * Copyright (C) 2001, 2004 MIPS Technologies, Inc. | 3 | * Copyright (C) 2001, 2004 MIPS Technologies, Inc. |
4 | * Copyright (C) 2004 Maciej W. Rozycki | 4 | * Copyright (C) 2004 Maciej W. Rozycki |
5 | */ | 5 | */ |
6 | #include <linux/delay.h> | 6 | #include <linux/delay.h> |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index a11c6f9fdd5e..902e7803fcfa 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -154,8 +154,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, | |||
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | *childregs = *regs; | 156 | *childregs = *regs; |
157 | childregs->regs[7] = 0; /* Clear error flag */ | 157 | childregs->regs[7] = 0; /* Clear error flag */ |
158 | childregs->regs[2] = 0; /* Child gets zero as return value */ | 158 | childregs->regs[2] = 0; /* Child gets zero as return value */ |
159 | childregs->regs[29] = usp; | 159 | childregs->regs[29] = usp; |
160 | ti->addr_limit = USER_DS; | 160 | ti->addr_limit = USER_DS; |
161 | 161 | ||
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 4812c6d916e4..9c6299c733a3 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
@@ -50,7 +50,7 @@ void ptrace_disable(struct task_struct *child) | |||
50 | } | 50 | } |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * Read a general register set. We always use the 64-bit format, even | 53 | * Read a general register set. We always use the 64-bit format, even |
54 | * for 32-bit kernels and for 32-bit processes on a 64-bit kernel. | 54 | * for 32-bit kernels and for 32-bit processes on a 64-bit kernel. |
55 | * Registers are sign extended to fill the available space. | 55 | * Registers are sign extended to fill the available space. |
56 | */ | 56 | */ |
@@ -326,7 +326,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
326 | case FPC_CSR: | 326 | case FPC_CSR: |
327 | tmp = child->thread.fpu.fcr31; | 327 | tmp = child->thread.fpu.fcr31; |
328 | break; | 328 | break; |
329 | case FPC_EIR: { /* implementation / version register */ | 329 | case FPC_EIR: { /* implementation / version register */ |
330 | unsigned int flags; | 330 | unsigned int flags; |
331 | #ifdef CONFIG_MIPS_MT_SMTC | 331 | #ifdef CONFIG_MIPS_MT_SMTC |
332 | unsigned long irqflags; | 332 | unsigned long irqflags; |
@@ -520,10 +520,10 @@ static inline int audit_arch(void) | |||
520 | { | 520 | { |
521 | int arch = EM_MIPS; | 521 | int arch = EM_MIPS; |
522 | #ifdef CONFIG_64BIT | 522 | #ifdef CONFIG_64BIT |
523 | arch |= __AUDIT_ARCH_64BIT; | 523 | arch |= __AUDIT_ARCH_64BIT; |
524 | #endif | 524 | #endif |
525 | #if defined(__LITTLE_ENDIAN) | 525 | #if defined(__LITTLE_ENDIAN) |
526 | arch |= __AUDIT_ARCH_LE; | 526 | arch |= __AUDIT_ARCH_LE; |
527 | #endif | 527 | #endif |
528 | return arch; | 528 | return arch; |
529 | } | 529 | } |
@@ -546,7 +546,7 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs) | |||
546 | /* The 0x80 provides a way for the tracing parent to distinguish | 546 | /* The 0x80 provides a way for the tracing parent to distinguish |
547 | between a syscall stop and SIGTRAP delivery */ | 547 | between a syscall stop and SIGTRAP delivery */ |
548 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? | 548 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? |
549 | 0x80 : 0)); | 549 | 0x80 : 0)); |
550 | 550 | ||
551 | /* | 551 | /* |
552 | * this isn't the same as continuing with a signal, but it will do | 552 | * this isn't the same as continuing with a signal, but it will do |
@@ -581,7 +581,7 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs) | |||
581 | /* The 0x80 provides a way for the tracing parent to distinguish | 581 | /* The 0x80 provides a way for the tracing parent to distinguish |
582 | between a syscall stop and SIGTRAP delivery */ | 582 | between a syscall stop and SIGTRAP delivery */ |
583 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? | 583 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? |
584 | 0x80 : 0)); | 584 | 0x80 : 0)); |
585 | 585 | ||
586 | /* | 586 | /* |
587 | * this isn't the same as continuing with a signal, but it will do | 587 | * this isn't the same as continuing with a signal, but it will do |
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c index a3b017815eff..9486055ba660 100644 --- a/arch/mips/kernel/ptrace32.c +++ b/arch/mips/kernel/ptrace32.c | |||
@@ -124,7 +124,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
124 | case FPC_CSR: | 124 | case FPC_CSR: |
125 | tmp = child->thread.fpu.fcr31; | 125 | tmp = child->thread.fpu.fcr31; |
126 | break; | 126 | break; |
127 | case FPC_EIR: { /* implementation / version register */ | 127 | case FPC_EIR: { /* implementation / version register */ |
128 | unsigned int flags; | 128 | unsigned int flags; |
129 | #ifdef CONFIG_MIPS_MT_SMTC | 129 | #ifdef CONFIG_MIPS_MT_SMTC |
130 | unsigned int irqflags; | 130 | unsigned int irqflags; |
diff --git a/arch/mips/kernel/r2300_fpu.S b/arch/mips/kernel/r2300_fpu.S index 61c8a0f2a60c..f31063dbdaeb 100644 --- a/arch/mips/kernel/r2300_fpu.S +++ b/arch/mips/kernel/r2300_fpu.S | |||
@@ -30,38 +30,38 @@ | |||
30 | LEAF(_save_fp_context) | 30 | LEAF(_save_fp_context) |
31 | li v0, 0 # assume success | 31 | li v0, 0 # assume success |
32 | cfc1 t1,fcr31 | 32 | cfc1 t1,fcr31 |
33 | EX(swc1 $f0,(SC_FPREGS+0)(a0)) | 33 | EX(swc1 $f0,(SC_FPREGS+0)(a0)) |
34 | EX(swc1 $f1,(SC_FPREGS+8)(a0)) | 34 | EX(swc1 $f1,(SC_FPREGS+8)(a0)) |
35 | EX(swc1 $f2,(SC_FPREGS+16)(a0)) | 35 | EX(swc1 $f2,(SC_FPREGS+16)(a0)) |
36 | EX(swc1 $f3,(SC_FPREGS+24)(a0)) | 36 | EX(swc1 $f3,(SC_FPREGS+24)(a0)) |
37 | EX(swc1 $f4,(SC_FPREGS+32)(a0)) | 37 | EX(swc1 $f4,(SC_FPREGS+32)(a0)) |
38 | EX(swc1 $f5,(SC_FPREGS+40)(a0)) | 38 | EX(swc1 $f5,(SC_FPREGS+40)(a0)) |
39 | EX(swc1 $f6,(SC_FPREGS+48)(a0)) | 39 | EX(swc1 $f6,(SC_FPREGS+48)(a0)) |
40 | EX(swc1 $f7,(SC_FPREGS+56)(a0)) | 40 | EX(swc1 $f7,(SC_FPREGS+56)(a0)) |
41 | EX(swc1 $f8,(SC_FPREGS+64)(a0)) | 41 | EX(swc1 $f8,(SC_FPREGS+64)(a0)) |
42 | EX(swc1 $f9,(SC_FPREGS+72)(a0)) | 42 | EX(swc1 $f9,(SC_FPREGS+72)(a0)) |
43 | EX(swc1 $f10,(SC_FPREGS+80)(a0)) | 43 | EX(swc1 $f10,(SC_FPREGS+80)(a0)) |
44 | EX(swc1 $f11,(SC_FPREGS+88)(a0)) | 44 | EX(swc1 $f11,(SC_FPREGS+88)(a0)) |
45 | EX(swc1 $f12,(SC_FPREGS+96)(a0)) | 45 | EX(swc1 $f12,(SC_FPREGS+96)(a0)) |
46 | EX(swc1 $f13,(SC_FPREGS+104)(a0)) | 46 | EX(swc1 $f13,(SC_FPREGS+104)(a0)) |
47 | EX(swc1 $f14,(SC_FPREGS+112)(a0)) | 47 | EX(swc1 $f14,(SC_FPREGS+112)(a0)) |
48 | EX(swc1 $f15,(SC_FPREGS+120)(a0)) | 48 | EX(swc1 $f15,(SC_FPREGS+120)(a0)) |
49 | EX(swc1 $f16,(SC_FPREGS+128)(a0)) | 49 | EX(swc1 $f16,(SC_FPREGS+128)(a0)) |
50 | EX(swc1 $f17,(SC_FPREGS+136)(a0)) | 50 | EX(swc1 $f17,(SC_FPREGS+136)(a0)) |
51 | EX(swc1 $f18,(SC_FPREGS+144)(a0)) | 51 | EX(swc1 $f18,(SC_FPREGS+144)(a0)) |
52 | EX(swc1 $f19,(SC_FPREGS+152)(a0)) | 52 | EX(swc1 $f19,(SC_FPREGS+152)(a0)) |
53 | EX(swc1 $f20,(SC_FPREGS+160)(a0)) | 53 | EX(swc1 $f20,(SC_FPREGS+160)(a0)) |
54 | EX(swc1 $f21,(SC_FPREGS+168)(a0)) | 54 | EX(swc1 $f21,(SC_FPREGS+168)(a0)) |
55 | EX(swc1 $f22,(SC_FPREGS+176)(a0)) | 55 | EX(swc1 $f22,(SC_FPREGS+176)(a0)) |
56 | EX(swc1 $f23,(SC_FPREGS+184)(a0)) | 56 | EX(swc1 $f23,(SC_FPREGS+184)(a0)) |
57 | EX(swc1 $f24,(SC_FPREGS+192)(a0)) | 57 | EX(swc1 $f24,(SC_FPREGS+192)(a0)) |
58 | EX(swc1 $f25,(SC_FPREGS+200)(a0)) | 58 | EX(swc1 $f25,(SC_FPREGS+200)(a0)) |
59 | EX(swc1 $f26,(SC_FPREGS+208)(a0)) | 59 | EX(swc1 $f26,(SC_FPREGS+208)(a0)) |
60 | EX(swc1 $f27,(SC_FPREGS+216)(a0)) | 60 | EX(swc1 $f27,(SC_FPREGS+216)(a0)) |
61 | EX(swc1 $f28,(SC_FPREGS+224)(a0)) | 61 | EX(swc1 $f28,(SC_FPREGS+224)(a0)) |
62 | EX(swc1 $f29,(SC_FPREGS+232)(a0)) | 62 | EX(swc1 $f29,(SC_FPREGS+232)(a0)) |
63 | EX(swc1 $f30,(SC_FPREGS+240)(a0)) | 63 | EX(swc1 $f30,(SC_FPREGS+240)(a0)) |
64 | EX(swc1 $f31,(SC_FPREGS+248)(a0)) | 64 | EX(swc1 $f31,(SC_FPREGS+248)(a0)) |
65 | EX(sw t1,(SC_FPC_CSR)(a0)) | 65 | EX(sw t1,(SC_FPC_CSR)(a0)) |
66 | cfc1 t0,$0 # implementation/version | 66 | cfc1 t0,$0 # implementation/version |
67 | jr ra | 67 | jr ra |
@@ -82,38 +82,38 @@ LEAF(_save_fp_context) | |||
82 | LEAF(_restore_fp_context) | 82 | LEAF(_restore_fp_context) |
83 | li v0, 0 # assume success | 83 | li v0, 0 # assume success |
84 | EX(lw t0,(SC_FPC_CSR)(a0)) | 84 | EX(lw t0,(SC_FPC_CSR)(a0)) |
85 | EX(lwc1 $f0,(SC_FPREGS+0)(a0)) | 85 | EX(lwc1 $f0,(SC_FPREGS+0)(a0)) |
86 | EX(lwc1 $f1,(SC_FPREGS+8)(a0)) | 86 | EX(lwc1 $f1,(SC_FPREGS+8)(a0)) |
87 | EX(lwc1 $f2,(SC_FPREGS+16)(a0)) | 87 | EX(lwc1 $f2,(SC_FPREGS+16)(a0)) |
88 | EX(lwc1 $f3,(SC_FPREGS+24)(a0)) | 88 | EX(lwc1 $f3,(SC_FPREGS+24)(a0)) |
89 | EX(lwc1 $f4,(SC_FPREGS+32)(a0)) | 89 | EX(lwc1 $f4,(SC_FPREGS+32)(a0)) |
90 | EX(lwc1 $f5,(SC_FPREGS+40)(a0)) | 90 | EX(lwc1 $f5,(SC_FPREGS+40)(a0)) |
91 | EX(lwc1 $f6,(SC_FPREGS+48)(a0)) | 91 | EX(lwc1 $f6,(SC_FPREGS+48)(a0)) |
92 | EX(lwc1 $f7,(SC_FPREGS+56)(a0)) | 92 | EX(lwc1 $f7,(SC_FPREGS+56)(a0)) |
93 | EX(lwc1 $f8,(SC_FPREGS+64)(a0)) | 93 | EX(lwc1 $f8,(SC_FPREGS+64)(a0)) |
94 | EX(lwc1 $f9,(SC_FPREGS+72)(a0)) | 94 | EX(lwc1 $f9,(SC_FPREGS+72)(a0)) |
95 | EX(lwc1 $f10,(SC_FPREGS+80)(a0)) | 95 | EX(lwc1 $f10,(SC_FPREGS+80)(a0)) |
96 | EX(lwc1 $f11,(SC_FPREGS+88)(a0)) | 96 | EX(lwc1 $f11,(SC_FPREGS+88)(a0)) |
97 | EX(lwc1 $f12,(SC_FPREGS+96)(a0)) | 97 | EX(lwc1 $f12,(SC_FPREGS+96)(a0)) |
98 | EX(lwc1 $f13,(SC_FPREGS+104)(a0)) | 98 | EX(lwc1 $f13,(SC_FPREGS+104)(a0)) |
99 | EX(lwc1 $f14,(SC_FPREGS+112)(a0)) | 99 | EX(lwc1 $f14,(SC_FPREGS+112)(a0)) |
100 | EX(lwc1 $f15,(SC_FPREGS+120)(a0)) | 100 | EX(lwc1 $f15,(SC_FPREGS+120)(a0)) |
101 | EX(lwc1 $f16,(SC_FPREGS+128)(a0)) | 101 | EX(lwc1 $f16,(SC_FPREGS+128)(a0)) |
102 | EX(lwc1 $f17,(SC_FPREGS+136)(a0)) | 102 | EX(lwc1 $f17,(SC_FPREGS+136)(a0)) |
103 | EX(lwc1 $f18,(SC_FPREGS+144)(a0)) | 103 | EX(lwc1 $f18,(SC_FPREGS+144)(a0)) |
104 | EX(lwc1 $f19,(SC_FPREGS+152)(a0)) | 104 | EX(lwc1 $f19,(SC_FPREGS+152)(a0)) |
105 | EX(lwc1 $f20,(SC_FPREGS+160)(a0)) | 105 | EX(lwc1 $f20,(SC_FPREGS+160)(a0)) |
106 | EX(lwc1 $f21,(SC_FPREGS+168)(a0)) | 106 | EX(lwc1 $f21,(SC_FPREGS+168)(a0)) |
107 | EX(lwc1 $f22,(SC_FPREGS+176)(a0)) | 107 | EX(lwc1 $f22,(SC_FPREGS+176)(a0)) |
108 | EX(lwc1 $f23,(SC_FPREGS+184)(a0)) | 108 | EX(lwc1 $f23,(SC_FPREGS+184)(a0)) |
109 | EX(lwc1 $f24,(SC_FPREGS+192)(a0)) | 109 | EX(lwc1 $f24,(SC_FPREGS+192)(a0)) |
110 | EX(lwc1 $f25,(SC_FPREGS+200)(a0)) | 110 | EX(lwc1 $f25,(SC_FPREGS+200)(a0)) |
111 | EX(lwc1 $f26,(SC_FPREGS+208)(a0)) | 111 | EX(lwc1 $f26,(SC_FPREGS+208)(a0)) |
112 | EX(lwc1 $f27,(SC_FPREGS+216)(a0)) | 112 | EX(lwc1 $f27,(SC_FPREGS+216)(a0)) |
113 | EX(lwc1 $f28,(SC_FPREGS+224)(a0)) | 113 | EX(lwc1 $f28,(SC_FPREGS+224)(a0)) |
114 | EX(lwc1 $f29,(SC_FPREGS+232)(a0)) | 114 | EX(lwc1 $f29,(SC_FPREGS+232)(a0)) |
115 | EX(lwc1 $f30,(SC_FPREGS+240)(a0)) | 115 | EX(lwc1 $f30,(SC_FPREGS+240)(a0)) |
116 | EX(lwc1 $f31,(SC_FPREGS+248)(a0)) | 116 | EX(lwc1 $f31,(SC_FPREGS+248)(a0)) |
117 | jr ra | 117 | jr ra |
118 | ctc1 t0,fcr31 | 118 | ctc1 t0,fcr31 |
119 | END(_restore_fp_context) | 119 | END(_restore_fp_context) |
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 8d32d5a6b460..5266c6ee2b35 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | /* | 43 | /* |
44 | * task_struct *resume(task_struct *prev, task_struct *next, | 44 | * task_struct *resume(task_struct *prev, task_struct *next, |
45 | * struct thread_info *next_ti, int usedfpu) | 45 | * struct thread_info *next_ti, int usedfpu) |
46 | */ | 46 | */ |
47 | LEAF(resume) | 47 | LEAF(resume) |
48 | mfc0 t1, CP0_STATUS | 48 | mfc0 t1, CP0_STATUS |
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 8decdfacb448..5e51219990aa 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
@@ -40,7 +40,7 @@ | |||
40 | 40 | ||
41 | /* | 41 | /* |
42 | * task_struct *resume(task_struct *prev, task_struct *next, | 42 | * task_struct *resume(task_struct *prev, task_struct *next, |
43 | * struct thread_info *next_ti, int usedfpu) | 43 | * struct thread_info *next_ti, int usedfpu) |
44 | */ | 44 | */ |
45 | .align 5 | 45 | .align 5 |
46 | LEAF(resume) | 46 | LEAF(resume) |
@@ -53,7 +53,7 @@ | |||
53 | * check if we need to save FPU registers | 53 | * check if we need to save FPU registers |
54 | */ | 54 | */ |
55 | 55 | ||
56 | beqz a3, 1f | 56 | beqz a3, 1f |
57 | 57 | ||
58 | PTR_L t3, TASK_THREAD_INFO(a0) | 58 | PTR_L t3, TASK_THREAD_INFO(a0) |
59 | /* | 59 | /* |
diff --git a/arch/mips/kernel/relocate_kernel.S b/arch/mips/kernel/relocate_kernel.S index 804ebb2c34a6..43d2d78d3287 100644 --- a/arch/mips/kernel/relocate_kernel.S +++ b/arch/mips/kernel/relocate_kernel.S | |||
@@ -33,7 +33,7 @@ process_entry: | |||
33 | b process_entry | 33 | b process_entry |
34 | 34 | ||
35 | 1: | 35 | 1: |
36 | /* indirection page, update s0 */ | 36 | /* indirection page, update s0 */ |
37 | and s3, s2, 0x2 | 37 | and s3, s2, 0x2 |
38 | beq s3, zero, 1f | 38 | beq s3, zero, 1f |
39 | and s0, s2, ~0x2 | 39 | and s0, s2, ~0x2 |
@@ -69,7 +69,7 @@ done: | |||
69 | of kexec_flag. */ | 69 | of kexec_flag. */ |
70 | 70 | ||
71 | bal 1f | 71 | bal 1f |
72 | 1: move t1,ra; | 72 | 1: move t1,ra; |
73 | PTR_LA t2,1b | 73 | PTR_LA t2,1b |
74 | PTR_LA t0,kexec_flag | 74 | PTR_LA t0,kexec_flag |
75 | PTR_SUB t0,t0,t2; | 75 | PTR_SUB t0,t0,t2; |
@@ -158,10 +158,10 @@ arg3: PTR 0x0 | |||
158 | */ | 158 | */ |
159 | secondary_kexec_args: | 159 | secondary_kexec_args: |
160 | EXPORT(secondary_kexec_args) | 160 | EXPORT(secondary_kexec_args) |
161 | s_arg0: PTR 0x0 | 161 | s_arg0: PTR 0x0 |
162 | s_arg1: PTR 0x0 | 162 | s_arg1: PTR 0x0 |
163 | s_arg2: PTR 0x0 | 163 | s_arg2: PTR 0x0 |
164 | s_arg3: PTR 0x0 | 164 | s_arg3: PTR 0x0 |
165 | .size secondary_kexec_args,PTRSIZE*4 | 165 | .size secondary_kexec_args,PTRSIZE*4 |
166 | kexec_flag: | 166 | kexec_flag: |
167 | LONG 0x1 | 167 | LONG 0x1 |
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index b8c18dcdd2c4..ce72bfff5e29 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -252,12 +252,12 @@ int rtlx_release(int index) | |||
252 | 252 | ||
253 | unsigned int rtlx_read_poll(int index, int can_sleep) | 253 | unsigned int rtlx_read_poll(int index, int can_sleep) |
254 | { | 254 | { |
255 | struct rtlx_channel *chan; | 255 | struct rtlx_channel *chan; |
256 | 256 | ||
257 | if (rtlx == NULL) | 257 | if (rtlx == NULL) |
258 | return 0; | 258 | return 0; |
259 | 259 | ||
260 | chan = &rtlx->channel[index]; | 260 | chan = &rtlx->channel[index]; |
261 | 261 | ||
262 | /* data available to read? */ | 262 | /* data available to read? */ |
263 | if (chan->lx_read == chan->lx_write) { | 263 | if (chan->lx_read == chan->lx_write) { |
@@ -451,8 +451,8 @@ static ssize_t file_write(struct file *file, const char __user * buffer, | |||
451 | return -EAGAIN; | 451 | return -EAGAIN; |
452 | 452 | ||
453 | __wait_event_interruptible(channel_wqs[minor].rt_queue, | 453 | __wait_event_interruptible(channel_wqs[minor].rt_queue, |
454 | rtlx_write_poll(minor), | 454 | rtlx_write_poll(minor), |
455 | ret); | 455 | ret); |
456 | if (ret) | 456 | if (ret) |
457 | return ret; | 457 | return ret; |
458 | } | 458 | } |
@@ -462,11 +462,11 @@ static ssize_t file_write(struct file *file, const char __user * buffer, | |||
462 | 462 | ||
463 | static const struct file_operations rtlx_fops = { | 463 | static const struct file_operations rtlx_fops = { |
464 | .owner = THIS_MODULE, | 464 | .owner = THIS_MODULE, |
465 | .open = file_open, | 465 | .open = file_open, |
466 | .release = file_release, | 466 | .release = file_release, |
467 | .write = file_write, | 467 | .write = file_write, |
468 | .read = file_read, | 468 | .read = file_read, |
469 | .poll = file_poll, | 469 | .poll = file_poll, |
470 | .llseek = noop_llseek, | 470 | .llseek = noop_llseek, |
471 | }; | 471 | }; |
472 | 472 | ||
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index d20a4bc9ed05..988bc06ff96e 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -24,7 +24,7 @@ | |||
24 | /* Highest syscall used of any syscall flavour */ | 24 | /* Highest syscall used of any syscall flavour */ |
25 | #define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls | 25 | #define MAX_SYSCALL_NO __NR_O32_Linux + __NR_O32_Linux_syscalls |
26 | 26 | ||
27 | .align 5 | 27 | .align 5 |
28 | NESTED(handle_sys, PT_SIZE, sp) | 28 | NESTED(handle_sys, PT_SIZE, sp) |
29 | .set noat | 29 | .set noat |
30 | SAVE_SOME | 30 | SAVE_SOME |
@@ -54,7 +54,7 @@ stack_done: | |||
54 | lw t0, TI_FLAGS($28) # syscall tracing enabled? | 54 | lw t0, TI_FLAGS($28) # syscall tracing enabled? |
55 | li t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | 55 | li t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT |
56 | and t0, t1 | 56 | and t0, t1 |
57 | bnez t0, syscall_trace_entry # -> yes | 57 | bnez t0, syscall_trace_entry # -> yes |
58 | 58 | ||
59 | jalr t2 # Do The Real Thing (TM) | 59 | jalr t2 # Do The Real Thing (TM) |
60 | 60 | ||
@@ -126,8 +126,8 @@ stackargs: | |||
126 | la t1, 5f # load up to 3 arguments | 126 | la t1, 5f # load up to 3 arguments |
127 | subu t1, t3 | 127 | subu t1, t3 |
128 | 1: lw t5, 16(t0) # argument #5 from usp | 128 | 1: lw t5, 16(t0) # argument #5 from usp |
129 | .set push | 129 | .set push |
130 | .set noreorder | 130 | .set noreorder |
131 | .set nomacro | 131 | .set nomacro |
132 | jr t1 | 132 | jr t1 |
133 | addiu t1, 6f - 5f | 133 | addiu t1, 6f - 5f |
@@ -205,7 +205,7 @@ illegal_syscall: | |||
205 | jr t2 | 205 | jr t2 |
206 | /* Unreached */ | 206 | /* Unreached */ |
207 | 207 | ||
208 | einval: li v0, -ENOSYS | 208 | einval: li v0, -ENOSYS |
209 | jr ra | 209 | jr ra |
210 | END(sys_syscall) | 210 | END(sys_syscall) |
211 | 211 | ||
@@ -354,7 +354,7 @@ einval: li v0, -ENOSYS | |||
354 | sys sys_ni_syscall 0 /* was create_module */ | 354 | sys sys_ni_syscall 0 /* was create_module */ |
355 | sys sys_init_module 5 | 355 | sys sys_init_module 5 |
356 | sys sys_delete_module 1 | 356 | sys sys_delete_module 1 |
357 | sys sys_ni_syscall 0 /* 4130 was get_kernel_syms */ | 357 | sys sys_ni_syscall 0 /* 4130 was get_kernel_syms */ |
358 | sys sys_quotactl 4 | 358 | sys sys_quotactl 4 |
359 | sys sys_getpgid 1 | 359 | sys sys_getpgid 1 |
360 | sys sys_fchdir 1 | 360 | sys sys_fchdir 1 |
@@ -589,7 +589,7 @@ einval: li v0, -ENOSYS | |||
589 | /* We pre-compute the number of _instruction_ bytes needed to | 589 | /* We pre-compute the number of _instruction_ bytes needed to |
590 | load or store the arguments 6-8. Negative values are ignored. */ | 590 | load or store the arguments 6-8. Negative values are ignored. */ |
591 | 591 | ||
592 | .macro sys function, nargs | 592 | .macro sys function, nargs |
593 | PTR \function | 593 | PTR \function |
594 | LONG (\nargs << 2) - (5 << 2) | 594 | LONG (\nargs << 2) - (5 << 2) |
595 | .endm | 595 | .endm |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index b64f642da073..4c356b0093cf 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -25,7 +25,7 @@ | |||
25 | #define handle_sys64 handle_sys | 25 | #define handle_sys64 handle_sys |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | .align 5 | 28 | .align 5 |
29 | NESTED(handle_sys64, PT_SIZE, sp) | 29 | NESTED(handle_sys64, PT_SIZE, sp) |
30 | #if !defined(CONFIG_MIPS32_O32) && !defined(CONFIG_MIPS32_N32) | 30 | #if !defined(CONFIG_MIPS32_O32) && !defined(CONFIG_MIPS32_N32) |
31 | /* | 31 | /* |
@@ -40,7 +40,7 @@ NESTED(handle_sys64, PT_SIZE, sp) | |||
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | dsubu t0, v0, __NR_64_Linux # check syscall number | 42 | dsubu t0, v0, __NR_64_Linux # check syscall number |
43 | sltiu t0, t0, __NR_64_Linux_syscalls + 1 | 43 | sltiu t0, t0, __NR_64_Linux_syscalls + 1 |
44 | #if !defined(CONFIG_MIPS32_O32) && !defined(CONFIG_MIPS32_N32) | 44 | #if !defined(CONFIG_MIPS32_O32) && !defined(CONFIG_MIPS32_N32) |
45 | ld t1, PT_EPC(sp) # skip syscall on return | 45 | ld t1, PT_EPC(sp) # skip syscall on return |
46 | daddiu t1, 4 # skip to next instruction | 46 | daddiu t1, 4 # skip to next instruction |
@@ -290,7 +290,7 @@ sys_call_table: | |||
290 | PTR sys_quotactl | 290 | PTR sys_quotactl |
291 | PTR sys_ni_syscall /* was nfsservctl */ | 291 | PTR sys_ni_syscall /* was nfsservctl */ |
292 | PTR sys_ni_syscall /* res. for getpmsg */ | 292 | PTR sys_ni_syscall /* res. for getpmsg */ |
293 | PTR sys_ni_syscall /* 5175 for putpmsg */ | 293 | PTR sys_ni_syscall /* 5175 for putpmsg */ |
294 | PTR sys_ni_syscall /* res. for afs_syscall */ | 294 | PTR sys_ni_syscall /* res. for afs_syscall */ |
295 | PTR sys_ni_syscall /* res. for security */ | 295 | PTR sys_ni_syscall /* res. for security */ |
296 | PTR sys_gettid | 296 | PTR sys_gettid |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index c29ac197f446..30ef88b989af 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -22,7 +22,7 @@ | |||
22 | #define handle_sysn32 handle_sys | 22 | #define handle_sysn32 handle_sys |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | .align 5 | 25 | .align 5 |
26 | NESTED(handle_sysn32, PT_SIZE, sp) | 26 | NESTED(handle_sysn32, PT_SIZE, sp) |
27 | #ifndef CONFIG_MIPS32_O32 | 27 | #ifndef CONFIG_MIPS32_O32 |
28 | .set noat | 28 | .set noat |
@@ -33,7 +33,7 @@ NESTED(handle_sysn32, PT_SIZE, sp) | |||
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | dsubu t0, v0, __NR_N32_Linux # check syscall number | 35 | dsubu t0, v0, __NR_N32_Linux # check syscall number |
36 | sltiu t0, t0, __NR_N32_Linux_syscalls + 1 | 36 | sltiu t0, t0, __NR_N32_Linux_syscalls + 1 |
37 | 37 | ||
38 | #ifndef CONFIG_MIPS32_O32 | 38 | #ifndef CONFIG_MIPS32_O32 |
39 | ld t1, PT_EPC(sp) # skip syscall on return | 39 | ld t1, PT_EPC(sp) # skip syscall on return |
@@ -279,7 +279,7 @@ EXPORT(sysn32_call_table) | |||
279 | PTR sys_quotactl | 279 | PTR sys_quotactl |
280 | PTR sys_ni_syscall /* was nfsservctl */ | 280 | PTR sys_ni_syscall /* was nfsservctl */ |
281 | PTR sys_ni_syscall /* res. for getpmsg */ | 281 | PTR sys_ni_syscall /* res. for getpmsg */ |
282 | PTR sys_ni_syscall /* 6175 for putpmsg */ | 282 | PTR sys_ni_syscall /* 6175 for putpmsg */ |
283 | PTR sys_ni_syscall /* res. for afs_syscall */ | 283 | PTR sys_ni_syscall /* res. for afs_syscall */ |
284 | PTR sys_ni_syscall /* res. for security */ | 284 | PTR sys_ni_syscall /* res. for security */ |
285 | PTR sys_gettid | 285 | PTR sys_gettid |
@@ -402,8 +402,8 @@ EXPORT(sysn32_call_table) | |||
402 | PTR compat_sys_rt_tgsigqueueinfo /* 6295 */ | 402 | PTR compat_sys_rt_tgsigqueueinfo /* 6295 */ |
403 | PTR sys_perf_event_open | 403 | PTR sys_perf_event_open |
404 | PTR sys_accept4 | 404 | PTR sys_accept4 |
405 | PTR compat_sys_recvmmsg | 405 | PTR compat_sys_recvmmsg |
406 | PTR sys_getdents64 | 406 | PTR sys_getdents64 |
407 | PTR sys_fanotify_init /* 6300 */ | 407 | PTR sys_fanotify_init /* 6300 */ |
408 | PTR sys_fanotify_mark | 408 | PTR sys_fanotify_mark |
409 | PTR sys_prlimit64 | 409 | PTR sys_prlimit64 |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index cf3e75e46650..42e789562db4 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -10,7 +10,7 @@ | |||
10 | * | 10 | * |
11 | * Hairy, the userspace application uses a different argument passing | 11 | * Hairy, the userspace application uses a different argument passing |
12 | * convention than the kernel, so we have to translate things from o32 | 12 | * convention than the kernel, so we have to translate things from o32 |
13 | * to ABI64 calling convention. 64-bit syscalls are also processed | 13 | * to ABI64 calling convention. 64-bit syscalls are also processed |
14 | * here for now. | 14 | * here for now. |
15 | */ | 15 | */ |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/unistd.h> | 24 | #include <asm/unistd.h> |
25 | #include <asm/sysmips.h> | 25 | #include <asm/sysmips.h> |
26 | 26 | ||
27 | .align 5 | 27 | .align 5 |
28 | NESTED(handle_sys, PT_SIZE, sp) | 28 | NESTED(handle_sys, PT_SIZE, sp) |
29 | .set noat | 29 | .set noat |
30 | SAVE_SOME | 30 | SAVE_SOME |
@@ -185,7 +185,7 @@ LEAF(sys32_syscall) | |||
185 | jr t2 | 185 | jr t2 |
186 | /* Unreached */ | 186 | /* Unreached */ |
187 | 187 | ||
188 | einval: li v0, -ENOSYS | 188 | einval: li v0, -ENOSYS |
189 | jr ra | 189 | jr ra |
190 | END(sys32_syscall) | 190 | END(sys32_syscall) |
191 | 191 | ||
@@ -329,7 +329,7 @@ sys_call_table: | |||
329 | PTR sys_bdflush | 329 | PTR sys_bdflush |
330 | PTR sys_sysfs /* 4135 */ | 330 | PTR sys_sysfs /* 4135 */ |
331 | PTR sys_32_personality | 331 | PTR sys_32_personality |
332 | PTR sys_ni_syscall /* for afs_syscall */ | 332 | PTR sys_ni_syscall /* for afs_syscall */ |
333 | PTR sys_setfsuid | 333 | PTR sys_setfsuid |
334 | PTR sys_setfsgid | 334 | PTR sys_setfsgid |
335 | PTR sys_32_llseek /* 4140 */ | 335 | PTR sys_32_llseek /* 4140 */ |
@@ -352,12 +352,12 @@ sys_call_table: | |||
352 | PTR sys_munlockall | 352 | PTR sys_munlockall |
353 | PTR sys_sched_setparam | 353 | PTR sys_sched_setparam |
354 | PTR sys_sched_getparam | 354 | PTR sys_sched_getparam |
355 | PTR sys_sched_setscheduler /* 4160 */ | 355 | PTR sys_sched_setscheduler /* 4160 */ |
356 | PTR sys_sched_getscheduler | 356 | PTR sys_sched_getscheduler |
357 | PTR sys_sched_yield | 357 | PTR sys_sched_yield |
358 | PTR sys_sched_get_priority_max | 358 | PTR sys_sched_get_priority_max |
359 | PTR sys_sched_get_priority_min | 359 | PTR sys_sched_get_priority_min |
360 | PTR sys_32_sched_rr_get_interval /* 4165 */ | 360 | PTR sys_32_sched_rr_get_interval /* 4165 */ |
361 | PTR compat_sys_nanosleep | 361 | PTR compat_sys_nanosleep |
362 | PTR sys_mremap | 362 | PTR sys_mremap |
363 | PTR sys_accept | 363 | PTR sys_accept |
@@ -387,7 +387,7 @@ sys_call_table: | |||
387 | PTR sys_prctl | 387 | PTR sys_prctl |
388 | PTR sys32_rt_sigreturn | 388 | PTR sys32_rt_sigreturn |
389 | PTR sys_32_rt_sigaction | 389 | PTR sys_32_rt_sigaction |
390 | PTR sys_32_rt_sigprocmask /* 4195 */ | 390 | PTR sys_32_rt_sigprocmask /* 4195 */ |
391 | PTR sys_32_rt_sigpending | 391 | PTR sys_32_rt_sigpending |
392 | PTR compat_sys_rt_sigtimedwait | 392 | PTR compat_sys_rt_sigtimedwait |
393 | PTR sys_32_rt_sigqueueinfo | 393 | PTR sys_32_rt_sigqueueinfo |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 8c41187801ce..653197e151d5 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 03 Ralf Baechle | 8 | * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 03 Ralf Baechle |
9 | * Copyright (C) 1996 Stoned Elipot | 9 | * Copyright (C) 1996 Stoned Elipot |
10 | * Copyright (C) 1999 Silicon Graphics, Inc. | 10 | * Copyright (C) 1999 Silicon Graphics, Inc. |
11 | * Copyright (C) 2000, 2001, 2002, 2007 Maciej W. Rozycki | 11 | * Copyright (C) 2000, 2001, 2002, 2007 Maciej W. Rozycki |
12 | */ | 12 | */ |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
@@ -449,7 +449,7 @@ static void __init bootmem_init(void) | |||
449 | * At this stage the bootmem allocator is ready to use. | 449 | * At this stage the bootmem allocator is ready to use. |
450 | * | 450 | * |
451 | * NOTE: historically plat_mem_setup did the entire platform initialization. | 451 | * NOTE: historically plat_mem_setup did the entire platform initialization. |
452 | * This was rather impractical because it meant plat_mem_setup had to | 452 | * This was rather impractical because it meant plat_mem_setup had to |
453 | * get away without any kind of memory allocator. To keep old code from | 453 | * get away without any kind of memory allocator. To keep old code from |
454 | * breaking plat_setup was just renamed to plat_setup and a second platform | 454 | * breaking plat_setup was just renamed to plat_setup and a second platform |
455 | * initialization hook for anything else was introduced. | 455 | * initialization hook for anything else was introduced. |
@@ -469,7 +469,7 @@ static int __init early_parse_mem(char *p) | |||
469 | if (usermem == 0) { | 469 | if (usermem == 0) { |
470 | boot_mem_map.nr_map = 0; | 470 | boot_mem_map.nr_map = 0; |
471 | usermem = 1; | 471 | usermem = 1; |
472 | } | 472 | } |
473 | start = 0; | 473 | start = 0; |
474 | size = memparse(p, &p); | 474 | size = memparse(p, &p); |
475 | if (*p == '@') | 475 | if (*p == '@') |
@@ -571,7 +571,7 @@ static void __init mips_parse_crashkernel(void) | |||
571 | return; | 571 | return; |
572 | 572 | ||
573 | crashk_res.start = crash_base; | 573 | crashk_res.start = crash_base; |
574 | crashk_res.end = crash_base + crash_size - 1; | 574 | crashk_res.end = crash_base + crash_size - 1; |
575 | } | 575 | } |
576 | 576 | ||
577 | static void __init request_crashkernel(struct resource *res) | 577 | static void __init request_crashkernel(struct resource *res) |
@@ -585,7 +585,7 @@ static void __init request_crashkernel(struct resource *res) | |||
585 | crashk_res.start + 1) >> 20), | 585 | crashk_res.start + 1) >> 20), |
586 | (unsigned long)(crashk_res.start >> 20)); | 586 | (unsigned long)(crashk_res.start >> 20)); |
587 | } | 587 | } |
588 | #else /* !defined(CONFIG_KEXEC) */ | 588 | #else /* !defined(CONFIG_KEXEC) */ |
589 | static void __init mips_parse_crashkernel(void) | 589 | static void __init mips_parse_crashkernel(void) |
590 | { | 590 | { |
591 | } | 591 | } |
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index b6aa77035019..0f57e06b7fdd 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -445,7 +445,7 @@ give_sigsegv: | |||
445 | #endif | 445 | #endif |
446 | 446 | ||
447 | static int setup_rt_frame(void *sig_return, struct k_sigaction *ka, | 447 | static int setup_rt_frame(void *sig_return, struct k_sigaction *ka, |
448 | struct pt_regs *regs, int signr, sigset_t *set, | 448 | struct pt_regs *regs, int signr, sigset_t *set, |
449 | siginfo_t *info) | 449 | siginfo_t *info) |
450 | { | 450 | { |
451 | struct rt_sigframe __user *frame; | 451 | struct rt_sigframe __user *frame; |
@@ -458,15 +458,15 @@ static int setup_rt_frame(void *sig_return, struct k_sigaction *ka, | |||
458 | /* Create siginfo. */ | 458 | /* Create siginfo. */ |
459 | err |= copy_siginfo_to_user(&frame->rs_info, info); | 459 | err |= copy_siginfo_to_user(&frame->rs_info, info); |
460 | 460 | ||
461 | /* Create the ucontext. */ | 461 | /* Create the ucontext. */ |
462 | err |= __put_user(0, &frame->rs_uc.uc_flags); | 462 | err |= __put_user(0, &frame->rs_uc.uc_flags); |
463 | err |= __put_user(NULL, &frame->rs_uc.uc_link); | 463 | err |= __put_user(NULL, &frame->rs_uc.uc_link); |
464 | err |= __put_user((void __user *)current->sas_ss_sp, | 464 | err |= __put_user((void __user *)current->sas_ss_sp, |
465 | &frame->rs_uc.uc_stack.ss_sp); | 465 | &frame->rs_uc.uc_stack.ss_sp); |
466 | err |= __put_user(sas_ss_flags(regs->regs[29]), | 466 | err |= __put_user(sas_ss_flags(regs->regs[29]), |
467 | &frame->rs_uc.uc_stack.ss_flags); | 467 | &frame->rs_uc.uc_stack.ss_flags); |
468 | err |= __put_user(current->sas_ss_size, | 468 | err |= __put_user(current->sas_ss_size, |
469 | &frame->rs_uc.uc_stack.ss_size); | 469 | &frame->rs_uc.uc_stack.ss_size); |
470 | err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); | 470 | err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); |
471 | err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set)); | 471 | err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set)); |
472 | 472 | ||
@@ -506,7 +506,7 @@ struct mips_abi mips_abi = { | |||
506 | .setup_frame = setup_frame, | 506 | .setup_frame = setup_frame, |
507 | .signal_return_offset = offsetof(struct mips_vdso, signal_trampoline), | 507 | .signal_return_offset = offsetof(struct mips_vdso, signal_trampoline), |
508 | #endif | 508 | #endif |
509 | .setup_rt_frame = setup_rt_frame, | 509 | .setup_rt_frame = setup_rt_frame, |
510 | .rt_signal_return_offset = | 510 | .rt_signal_return_offset = |
511 | offsetof(struct mips_vdso, rt_signal_trampoline), | 511 | offsetof(struct mips_vdso, rt_signal_trampoline), |
512 | .restart = __NR_restart_syscall | 512 | .restart = __NR_restart_syscall |
@@ -538,7 +538,7 @@ static void handle_signal(unsigned long sig, siginfo_t *info, | |||
538 | regs->cp0_epc -= 4; | 538 | regs->cp0_epc -= 4; |
539 | } | 539 | } |
540 | 540 | ||
541 | regs->regs[0] = 0; /* Don't deal with this again. */ | 541 | regs->regs[0] = 0; /* Don't deal with this again. */ |
542 | } | 542 | } |
543 | 543 | ||
544 | if (sig_uses_siginfo(ka)) | 544 | if (sig_uses_siginfo(ka)) |
@@ -562,7 +562,7 @@ static void do_signal(struct pt_regs *regs) | |||
562 | 562 | ||
563 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 563 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
564 | if (signr > 0) { | 564 | if (signr > 0) { |
565 | /* Whee! Actually deliver the signal. */ | 565 | /* Whee! Actually deliver the signal. */ |
566 | handle_signal(signr, &info, &ka, regs); | 566 | handle_signal(signr, &info, &ka, regs); |
567 | return; | 567 | return; |
568 | } | 568 | } |
@@ -583,7 +583,7 @@ static void do_signal(struct pt_regs *regs) | |||
583 | regs->cp0_epc -= 4; | 583 | regs->cp0_epc -= 4; |
584 | break; | 584 | break; |
585 | } | 585 | } |
586 | regs->regs[0] = 0; /* Don't deal with this again. */ | 586 | regs->regs[0] = 0; /* Don't deal with this again. */ |
587 | } | 587 | } |
588 | 588 | ||
589 | /* | 589 | /* |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index da1b56a39ac7..cae0b0e42a53 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -48,7 +48,7 @@ extern asmlinkage int fpu_emulator_restore_context32(struct sigcontext32 __user | |||
48 | /* | 48 | /* |
49 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... | 49 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... |
50 | */ | 50 | */ |
51 | #define __NR_O32_restart_syscall 4253 | 51 | #define __NR_O32_restart_syscall 4253 |
52 | 52 | ||
53 | /* 32-bit compatibility types */ | 53 | /* 32-bit compatibility types */ |
54 | 54 | ||
@@ -69,11 +69,11 @@ typedef struct sigaltstack32 { | |||
69 | } stack32_t; | 69 | } stack32_t; |
70 | 70 | ||
71 | struct ucontext32 { | 71 | struct ucontext32 { |
72 | u32 uc_flags; | 72 | u32 uc_flags; |
73 | s32 uc_link; | 73 | s32 uc_link; |
74 | stack32_t uc_stack; | 74 | stack32_t uc_stack; |
75 | struct sigcontext32 uc_mcontext; | 75 | struct sigcontext32 uc_mcontext; |
76 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ | 76 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
77 | }; | 77 | }; |
78 | 78 | ||
79 | struct sigframe32 { | 79 | struct sigframe32 { |
@@ -338,7 +338,7 @@ SYSCALL_DEFINE3(32_sigaction, long, sig, const struct sigaction32 __user *, act, | |||
338 | return -EFAULT; | 338 | return -EFAULT; |
339 | err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | 339 | err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags); |
340 | err |= __put_user((u32)(u64)old_ka.sa.sa_handler, | 340 | err |= __put_user((u32)(u64)old_ka.sa.sa_handler, |
341 | &oact->sa_handler); | 341 | &oact->sa_handler); |
342 | err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig); | 342 | err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig); |
343 | err |= __put_user(0, &oact->sa_mask.sig[1]); | 343 | err |= __put_user(0, &oact->sa_mask.sig[1]); |
344 | err |= __put_user(0, &oact->sa_mask.sig[2]); | 344 | err |= __put_user(0, &oact->sa_mask.sig[2]); |
@@ -599,16 +599,16 @@ static int setup_rt_frame_32(void *sig_return, struct k_sigaction *ka, | |||
599 | /* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */ | 599 | /* Convert (siginfo_t -> compat_siginfo_t) and copy to user. */ |
600 | err |= copy_siginfo_to_user32(&frame->rs_info, info); | 600 | err |= copy_siginfo_to_user32(&frame->rs_info, info); |
601 | 601 | ||
602 | /* Create the ucontext. */ | 602 | /* Create the ucontext. */ |
603 | err |= __put_user(0, &frame->rs_uc.uc_flags); | 603 | err |= __put_user(0, &frame->rs_uc.uc_flags); |
604 | err |= __put_user(0, &frame->rs_uc.uc_link); | 604 | err |= __put_user(0, &frame->rs_uc.uc_link); |
605 | sp = (int) (long) current->sas_ss_sp; | 605 | sp = (int) (long) current->sas_ss_sp; |
606 | err |= __put_user(sp, | 606 | err |= __put_user(sp, |
607 | &frame->rs_uc.uc_stack.ss_sp); | 607 | &frame->rs_uc.uc_stack.ss_sp); |
608 | err |= __put_user(sas_ss_flags(regs->regs[29]), | 608 | err |= __put_user(sas_ss_flags(regs->regs[29]), |
609 | &frame->rs_uc.uc_stack.ss_flags); | 609 | &frame->rs_uc.uc_stack.ss_flags); |
610 | err |= __put_user(current->sas_ss_size, | 610 | err |= __put_user(current->sas_ss_size, |
611 | &frame->rs_uc.uc_stack.ss_size); | 611 | &frame->rs_uc.uc_stack.ss_size); |
612 | err |= setup_sigcontext32(regs, &frame->rs_uc.uc_mcontext); | 612 | err |= setup_sigcontext32(regs, &frame->rs_uc.uc_mcontext); |
613 | err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set); | 613 | err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set); |
614 | 614 | ||
@@ -650,7 +650,7 @@ struct mips_abi mips_abi_32 = { | |||
650 | .setup_frame = setup_frame_32, | 650 | .setup_frame = setup_frame_32, |
651 | .signal_return_offset = | 651 | .signal_return_offset = |
652 | offsetof(struct mips_vdso, o32_signal_trampoline), | 652 | offsetof(struct mips_vdso, o32_signal_trampoline), |
653 | .setup_rt_frame = setup_rt_frame_32, | 653 | .setup_rt_frame = setup_rt_frame_32, |
654 | .rt_signal_return_offset = | 654 | .rt_signal_return_offset = |
655 | offsetof(struct mips_vdso, o32_rt_signal_trampoline), | 655 | offsetof(struct mips_vdso, o32_rt_signal_trampoline), |
656 | .restart = __NR_O32_restart_syscall | 656 | .restart = __NR_O32_restart_syscall |
@@ -690,7 +690,7 @@ SYSCALL_DEFINE4(32_rt_sigaction, int, sig, | |||
690 | return -EFAULT; | 690 | return -EFAULT; |
691 | 691 | ||
692 | err |= __put_user((u32)(u64)old_sa.sa.sa_handler, | 692 | err |= __put_user((u32)(u64)old_sa.sa.sa_handler, |
693 | &oact->sa_handler); | 693 | &oact->sa_handler); |
694 | err |= __put_user(old_sa.sa.sa_flags, &oact->sa_flags); | 694 | err |= __put_user(old_sa.sa.sa_flags, &oact->sa_flags); |
695 | err |= put_sigset(&old_sa.sa.sa_mask, &oact->sa_mask); | 695 | err |= put_sigset(&old_sa.sa.sa_mask, &oact->sa_mask); |
696 | if (err) | 696 | if (err) |
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c index 3574c145511b..7246e33721ae 100644 --- a/arch/mips/kernel/signal_n32.c +++ b/arch/mips/kernel/signal_n32.c | |||
@@ -59,11 +59,11 @@ typedef struct sigaltstack32 { | |||
59 | } stack32_t; | 59 | } stack32_t; |
60 | 60 | ||
61 | struct ucontextn32 { | 61 | struct ucontextn32 { |
62 | u32 uc_flags; | 62 | u32 uc_flags; |
63 | s32 uc_link; | 63 | s32 uc_link; |
64 | stack32_t uc_stack; | 64 | stack32_t uc_stack; |
65 | struct sigcontext uc_mcontext; | 65 | struct sigcontext uc_mcontext; |
66 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ | 66 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
67 | }; | 67 | }; |
68 | 68 | ||
69 | struct rt_sigframe_n32 { | 69 | struct rt_sigframe_n32 { |
@@ -162,16 +162,16 @@ static int setup_rt_frame_n32(void *sig_return, struct k_sigaction *ka, | |||
162 | /* Create siginfo. */ | 162 | /* Create siginfo. */ |
163 | err |= copy_siginfo_to_user32(&frame->rs_info, info); | 163 | err |= copy_siginfo_to_user32(&frame->rs_info, info); |
164 | 164 | ||
165 | /* Create the ucontext. */ | 165 | /* Create the ucontext. */ |
166 | err |= __put_user(0, &frame->rs_uc.uc_flags); | 166 | err |= __put_user(0, &frame->rs_uc.uc_flags); |
167 | err |= __put_user(0, &frame->rs_uc.uc_link); | 167 | err |= __put_user(0, &frame->rs_uc.uc_link); |
168 | sp = (int) (long) current->sas_ss_sp; | 168 | sp = (int) (long) current->sas_ss_sp; |
169 | err |= __put_user(sp, | 169 | err |= __put_user(sp, |
170 | &frame->rs_uc.uc_stack.ss_sp); | 170 | &frame->rs_uc.uc_stack.ss_sp); |
171 | err |= __put_user(sas_ss_flags(regs->regs[29]), | 171 | err |= __put_user(sas_ss_flags(regs->regs[29]), |
172 | &frame->rs_uc.uc_stack.ss_flags); | 172 | &frame->rs_uc.uc_stack.ss_flags); |
173 | err |= __put_user(current->sas_ss_size, | 173 | err |= __put_user(current->sas_ss_size, |
174 | &frame->rs_uc.uc_stack.ss_size); | 174 | &frame->rs_uc.uc_stack.ss_size); |
175 | err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); | 175 | err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); |
176 | err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set); | 176 | err |= __copy_conv_sigset_to_user(&frame->rs_uc.uc_sigmask, set); |
177 | 177 | ||
@@ -207,7 +207,7 @@ give_sigsegv: | |||
207 | } | 207 | } |
208 | 208 | ||
209 | struct mips_abi mips_abi_n32 = { | 209 | struct mips_abi mips_abi_n32 = { |
210 | .setup_rt_frame = setup_rt_frame_n32, | 210 | .setup_rt_frame = setup_rt_frame_n32, |
211 | .rt_signal_return_offset = | 211 | .rt_signal_return_offset = |
212 | offsetof(struct mips_vdso, n32_rt_signal_trampoline), | 212 | offsetof(struct mips_vdso, n32_rt_signal_trampoline), |
213 | .restart = __NR_N32_restart_syscall | 213 | .restart = __NR_N32_restart_syscall |
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c index 06cd0c610f44..c2e5d74739b4 100644 --- a/arch/mips/kernel/smp-cmp.c +++ b/arch/mips/kernel/smp-cmp.c | |||
@@ -172,7 +172,7 @@ void __init cmp_smp_setup(void) | |||
172 | if (amon_cpu_avail(i)) { | 172 | if (amon_cpu_avail(i)) { |
173 | set_cpu_possible(i, true); | 173 | set_cpu_possible(i, true); |
174 | __cpu_number_map[i] = ++ncpu; | 174 | __cpu_number_map[i] = ++ncpu; |
175 | __cpu_logical_map[ncpu] = i; | 175 | __cpu_logical_map[ncpu] = i; |
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index 2defa2bbdaa7..bfede063d96a 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c | |||
@@ -71,7 +71,7 @@ static unsigned int __init smvp_vpe_init(unsigned int tc, unsigned int mvpconf0, | |||
71 | /* Record this as available CPU */ | 71 | /* Record this as available CPU */ |
72 | set_cpu_possible(tc, true); | 72 | set_cpu_possible(tc, true); |
73 | __cpu_number_map[tc] = ++ncpu; | 73 | __cpu_number_map[tc] = ++ncpu; |
74 | __cpu_logical_map[ncpu] = tc; | 74 | __cpu_logical_map[ncpu] = tc; |
75 | } | 75 | } |
76 | 76 | ||
77 | /* Disable multi-threading with TC's */ | 77 | /* Disable multi-threading with TC's */ |
@@ -215,7 +215,7 @@ static void __cpuinit vsmp_boot_secondary(int cpu, struct task_struct *idle) | |||
215 | write_tc_gpr_gp((unsigned long)gp); | 215 | write_tc_gpr_gp((unsigned long)gp); |
216 | 216 | ||
217 | flush_icache_range((unsigned long)gp, | 217 | flush_icache_range((unsigned long)gp, |
218 | (unsigned long)(gp + sizeof(struct thread_info))); | 218 | (unsigned long)(gp + sizeof(struct thread_info))); |
219 | 219 | ||
220 | /* finally out of configuration and into chaos */ | 220 | /* finally out of configuration and into chaos */ |
221 | clear_c0_mvpcontrol(MVPCONTROL_VPC); | 221 | clear_c0_mvpcontrol(MVPCONTROL_VPC); |
diff --git a/arch/mips/kernel/smtc-asm.S b/arch/mips/kernel/smtc-asm.S index 20938a4cb52d..76016ac0a9c8 100644 --- a/arch/mips/kernel/smtc-asm.S +++ b/arch/mips/kernel/smtc-asm.S | |||
@@ -65,7 +65,7 @@ FEXPORT(__smtc_ipi_vector) | |||
65 | 1: | 65 | 1: |
66 | /* | 66 | /* |
67 | * The IPI sender has put some information on the anticipated | 67 | * The IPI sender has put some information on the anticipated |
68 | * kernel stack frame. If we were in user mode, this will be | 68 | * kernel stack frame. If we were in user mode, this will be |
69 | * built above the saved kernel SP. If we were already in the | 69 | * built above the saved kernel SP. If we were already in the |
70 | * kernel, it will be built above the current CPU SP. | 70 | * kernel, it will be built above the current CPU SP. |
71 | * | 71 | * |
diff --git a/arch/mips/kernel/smtc-proc.c b/arch/mips/kernel/smtc-proc.c index 145771c0ed7a..aee7c8177b5d 100644 --- a/arch/mips/kernel/smtc-proc.c +++ b/arch/mips/kernel/smtc-proc.c | |||
@@ -35,7 +35,7 @@ static struct proc_dir_entry *smtc_stats; | |||
35 | atomic_t smtc_fpu_recoveries; | 35 | atomic_t smtc_fpu_recoveries; |
36 | 36 | ||
37 | static int proc_read_smtc(char *page, char **start, off_t off, | 37 | static int proc_read_smtc(char *page, char **start, off_t off, |
38 | int count, int *eof, void *data) | 38 | int count, int *eof, void *data) |
39 | { | 39 | { |
40 | int totalen = 0; | 40 | int totalen = 0; |
41 | int len; | 41 | int len; |
@@ -68,7 +68,7 @@ static int proc_read_smtc(char *page, char **start, off_t off, | |||
68 | page += len; | 68 | page += len; |
69 | } | 69 | } |
70 | len = sprintf(page, "%d Recoveries of \"stolen\" FPU\n", | 70 | len = sprintf(page, "%d Recoveries of \"stolen\" FPU\n", |
71 | atomic_read(&smtc_fpu_recoveries)); | 71 | atomic_read(&smtc_fpu_recoveries)); |
72 | totalen += len; | 72 | totalen += len; |
73 | page += len; | 73 | page += len; |
74 | 74 | ||
@@ -87,5 +87,5 @@ void init_smtc_stats(void) | |||
87 | atomic_set(&smtc_fpu_recoveries, 0); | 87 | atomic_set(&smtc_fpu_recoveries, 0); |
88 | 88 | ||
89 | smtc_stats = create_proc_read_entry("smtc", 0444, NULL, | 89 | smtc_stats = create_proc_read_entry("smtc", 0444, NULL, |
90 | proc_read_smtc, NULL); | 90 | proc_read_smtc, NULL); |
91 | } | 91 | } |
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 1d47843d3cc0..1c152a93dc7b 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -235,7 +235,7 @@ static void smtc_configure_tlb(void) | |||
235 | mips_ihb(); | 235 | mips_ihb(); |
236 | /* No need to un-Halt - that happens later anyway */ | 236 | /* No need to un-Halt - that happens later anyway */ |
237 | for (i=0; i < vpes; i++) { | 237 | for (i=0; i < vpes; i++) { |
238 | write_tc_c0_tcbind(i); | 238 | write_tc_c0_tcbind(i); |
239 | /* | 239 | /* |
240 | * To be 100% sure we're really getting the right | 240 | * To be 100% sure we're really getting the right |
241 | * information, we exit the configuration state | 241 | * information, we exit the configuration state |
@@ -286,7 +286,7 @@ static void smtc_configure_tlb(void) | |||
286 | 286 | ||
287 | /* | 287 | /* |
288 | * Incrementally build the CPU map out of constituent MIPS MT cores, | 288 | * Incrementally build the CPU map out of constituent MIPS MT cores, |
289 | * using the specified available VPEs and TCs. Plaform code needs | 289 | * using the specified available VPEs and TCs. Plaform code needs |
290 | * to ensure that each MIPS MT core invokes this routine on reset, | 290 | * to ensure that each MIPS MT core invokes this routine on reset, |
291 | * one at a time(!). | 291 | * one at a time(!). |
292 | * | 292 | * |
@@ -348,7 +348,7 @@ static void smtc_tc_setup(int vpe, int tc, int cpu) | |||
348 | { | 348 | { |
349 | /* | 349 | /* |
350 | * FIXME: Multi-core SMTC hasn't been tested and the | 350 | * FIXME: Multi-core SMTC hasn't been tested and the |
351 | * maximum number of VPEs may change. | 351 | * maximum number of VPEs may change. |
352 | */ | 352 | */ |
353 | cp1contexts[0] = smtc_nconf1[0] - 1; | 353 | cp1contexts[0] = smtc_nconf1[0] - 1; |
354 | cp1contexts[1] = smtc_nconf1[1]; | 354 | cp1contexts[1] = smtc_nconf1[1]; |
@@ -761,9 +761,9 @@ void smtc_forward_irq(struct irq_data *d) | |||
761 | * mask has been purged of bits corresponding to nonexistent and | 761 | * mask has been purged of bits corresponding to nonexistent and |
762 | * offline "CPUs", and to TCs bound to VPEs other than the VPE | 762 | * offline "CPUs", and to TCs bound to VPEs other than the VPE |
763 | * connected to the physical interrupt input for the interrupt | 763 | * connected to the physical interrupt input for the interrupt |
764 | * in question. Otherwise we have a nasty problem with interrupt | 764 | * in question. Otherwise we have a nasty problem with interrupt |
765 | * mask management. This is best handled in non-performance-critical | 765 | * mask management. This is best handled in non-performance-critical |
766 | * platform IRQ affinity setting code, to minimize interrupt-time | 766 | * platform IRQ affinity setting code, to minimize interrupt-time |
767 | * checks. | 767 | * checks. |
768 | */ | 768 | */ |
769 | 769 | ||
@@ -899,10 +899,10 @@ void smtc_send_ipi(int cpu, int type, unsigned int action) | |||
899 | mips_ihb(); | 899 | mips_ihb(); |
900 | 900 | ||
901 | /* | 901 | /* |
902 | * Inspect TCStatus - if IXMT is set, we have to queue | 902 | * Inspect TCStatus - if IXMT is set, we have to queue |
903 | * a message. Otherwise, we set up the "interrupt" | 903 | * a message. Otherwise, we set up the "interrupt" |
904 | * of the other TC | 904 | * of the other TC |
905 | */ | 905 | */ |
906 | tcstatus = read_tc_c0_tcstatus(); | 906 | tcstatus = read_tc_c0_tcstatus(); |
907 | 907 | ||
908 | if ((tcstatus & TCSTATUS_IXMT) != 0) { | 908 | if ((tcstatus & TCSTATUS_IXMT) != 0) { |
@@ -964,7 +964,7 @@ static void post_direct_ipi(int cpu, struct smtc_ipi *pipi) | |||
964 | * CU bit of Status is indicator that TC was | 964 | * CU bit of Status is indicator that TC was |
965 | * already running on a kernel stack... | 965 | * already running on a kernel stack... |
966 | */ | 966 | */ |
967 | if (tcstatus & ST0_CU0) { | 967 | if (tcstatus & ST0_CU0) { |
968 | /* Note that this "- 1" is pointer arithmetic */ | 968 | /* Note that this "- 1" is pointer arithmetic */ |
969 | kstack = ((struct pt_regs *)read_tc_gpr_sp()) - 1; | 969 | kstack = ((struct pt_regs *)read_tc_gpr_sp()) - 1; |
970 | } else { | 970 | } else { |
@@ -1288,7 +1288,7 @@ void smtc_idle_loop_hook(void) | |||
1288 | for (tc = 0; tc < hook_ntcs; tc++) { | 1288 | for (tc = 0; tc < hook_ntcs; tc++) { |
1289 | tcnoprog[tc] = 0; | 1289 | tcnoprog[tc] = 0; |
1290 | clock_hang_reported[tc] = 0; | 1290 | clock_hang_reported[tc] = 0; |
1291 | } | 1291 | } |
1292 | for (vpe = 0; vpe < 2; vpe++) | 1292 | for (vpe = 0; vpe < 2; vpe++) |
1293 | for (im = 0; im < 8; im++) | 1293 | for (im = 0; im < 8; im++) |
1294 | imstuckcount[vpe][im] = 0; | 1294 | imstuckcount[vpe][im] = 0; |
@@ -1485,7 +1485,7 @@ static int halt_state_save[NR_CPUS]; | |||
1485 | 1485 | ||
1486 | /* | 1486 | /* |
1487 | * To really, really be sure that nothing is being done | 1487 | * To really, really be sure that nothing is being done |
1488 | * by other TCs, halt them all. This code assumes that | 1488 | * by other TCs, halt them all. This code assumes that |
1489 | * a DVPE has already been done, so while their Halted | 1489 | * a DVPE has already been done, so while their Halted |
1490 | * state is theoretically architecturally unstable, in | 1490 | * state is theoretically architecturally unstable, in |
1491 | * practice, it's not going to change while we're looking | 1491 | * practice, it's not going to change while we're looking |
diff --git a/arch/mips/kernel/sync-r4k.c b/arch/mips/kernel/sync-r4k.c index 7f1eca3858de..1ff43d5ac2c4 100644 --- a/arch/mips/kernel/sync-r4k.c +++ b/arch/mips/kernel/sync-r4k.c | |||
@@ -25,7 +25,7 @@ static atomic_t __cpuinitdata count_count_start = ATOMIC_INIT(0); | |||
25 | static atomic_t __cpuinitdata count_count_stop = ATOMIC_INIT(0); | 25 | static atomic_t __cpuinitdata count_count_stop = ATOMIC_INIT(0); |
26 | static atomic_t __cpuinitdata count_reference = ATOMIC_INIT(0); | 26 | static atomic_t __cpuinitdata count_reference = ATOMIC_INIT(0); |
27 | 27 | ||
28 | #define COUNTON 100 | 28 | #define COUNTON 100 |
29 | #define NR_LOOPS 5 | 29 | #define NR_LOOPS 5 |
30 | 30 | ||
31 | void __cpuinit synchronise_count_master(int cpu) | 31 | void __cpuinit synchronise_count_master(int cpu) |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 107307d583eb..d7feee0c2739 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -41,9 +41,9 @@ | |||
41 | 41 | ||
42 | /* | 42 | /* |
43 | * For historic reasons the pipe(2) syscall on MIPS has an unusual calling | 43 | * For historic reasons the pipe(2) syscall on MIPS has an unusual calling |
44 | * convention. It returns results in registers $v0 / $v1 which means there | 44 | * convention. It returns results in registers $v0 / $v1 which means there |
45 | * is no need for it to do verify the validity of a userspace pointer | 45 | * is no need for it to do verify the validity of a userspace pointer |
46 | * argument. Historically that used to be expensive in Linux. These days | 46 | * argument. Historically that used to be expensive in Linux. These days |
47 | * the performance advantage is negligible. | 47 | * the performance advantage is negligible. |
48 | */ | 48 | */ |
49 | asmlinkage int sysm_pipe(nabi_no_regargs volatile struct pt_regs regs) | 49 | asmlinkage int sysm_pipe(nabi_no_regargs volatile struct pt_regs regs) |
@@ -124,7 +124,7 @@ _sys_clone(nabi_no_regargs struct pt_regs regs) | |||
124 | child_tidptr = (int __user *) regs.regs[8]; | 124 | child_tidptr = (int __user *) regs.regs[8]; |
125 | #endif | 125 | #endif |
126 | return do_fork(clone_flags, newsp, 0, | 126 | return do_fork(clone_flags, newsp, 0, |
127 | parent_tidptr, child_tidptr); | 127 | parent_tidptr, child_tidptr); |
128 | } | 128 | } |
129 | 129 | ||
130 | SYSCALL_DEFINE1(set_thread_area, unsigned long, addr) | 130 | SYSCALL_DEFINE1(set_thread_area, unsigned long, addr) |
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 99d73b72b00b..9d686bf97b0e 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Common time service routines for MIPS machines. | 6 | * Common time service routines for MIPS machines. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 9 | * under the terms of the GNU General Public License as published by the |
10 | * Free Software Foundation; either version 2 of the License, or (at your | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
11 | * option) any later version. | 11 | * option) any later version. |
12 | */ | 12 | */ |
@@ -62,8 +62,8 @@ EXPORT_SYMBOL(perf_irq); | |||
62 | * time_init() - it does the following things. | 62 | * time_init() - it does the following things. |
63 | * | 63 | * |
64 | * 1) plat_time_init() - | 64 | * 1) plat_time_init() - |
65 | * a) (optional) set up RTC routines, | 65 | * a) (optional) set up RTC routines, |
66 | * b) (optional) calibrate and set the mips_hpt_frequency | 66 | * b) (optional) calibrate and set the mips_hpt_frequency |
67 | * (only needed if you intended to use cpu counter as timer interrupt | 67 | * (only needed if you intended to use cpu counter as timer interrupt |
68 | * source) | 68 | * source) |
69 | * 2) calculate a couple of cached variables for later usage | 69 | * 2) calculate a couple of cached variables for later usage |
@@ -75,7 +75,7 @@ unsigned int mips_hpt_frequency; | |||
75 | * This function exists in order to cause an error due to a duplicate | 75 | * This function exists in order to cause an error due to a duplicate |
76 | * definition if platform code should have its own implementation. The hook | 76 | * definition if platform code should have its own implementation. The hook |
77 | * to use instead is plat_time_init. plat_time_init does not receive the | 77 | * to use instead is plat_time_init. plat_time_init does not receive the |
78 | * irqaction pointer argument anymore. This is because any function which | 78 | * irqaction pointer argument anymore. This is because any function which |
79 | * initializes an interrupt timer now takes care of its own request_irq rsp. | 79 | * initializes an interrupt timer now takes care of its own request_irq rsp. |
80 | * setup_irq calls and each clock_event_device should use its own | 80 | * setup_irq calls and each clock_event_device should use its own |
81 | * struct irqrequest. | 81 | * struct irqrequest. |
@@ -93,7 +93,7 @@ static __init int cpu_has_mfc0_count_bug(void) | |||
93 | case CPU_R4000MC: | 93 | case CPU_R4000MC: |
94 | /* | 94 | /* |
95 | * V3.0 is documented as suffering from the mfc0 from count bug. | 95 | * V3.0 is documented as suffering from the mfc0 from count bug. |
96 | * Afaik this is the last version of the R4000. Later versions | 96 | * Afaik this is the last version of the R4000. Later versions |
97 | * were marketed as R4400. | 97 | * were marketed as R4400. |
98 | */ | 98 | */ |
99 | return 1; | 99 | return 1; |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index e3a5f3ddab1a..08c07bdb7e6c 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -164,7 +164,7 @@ static void show_stacktrace(struct task_struct *task, | |||
164 | i = 0; | 164 | i = 0; |
165 | while ((unsigned long) sp & (PAGE_SIZE - 1)) { | 165 | while ((unsigned long) sp & (PAGE_SIZE - 1)) { |
166 | if (i && ((i % (64 / field)) == 0)) | 166 | if (i && ((i % (64 / field)) == 0)) |
167 | printk("\n "); | 167 | printk("\n "); |
168 | if (i > 39) { | 168 | if (i > 39) { |
169 | printk(" ..."); | 169 | printk(" ..."); |
170 | break; | 170 | break; |
@@ -279,7 +279,7 @@ static void __show_regs(const struct pt_regs *regs) | |||
279 | printk("ra : %0*lx %pS\n", field, regs->regs[31], | 279 | printk("ra : %0*lx %pS\n", field, regs->regs[31], |
280 | (void *) regs->regs[31]); | 280 | (void *) regs->regs[31]); |
281 | 281 | ||
282 | printk("Status: %08x ", (uint32_t) regs->cp0_status); | 282 | printk("Status: %08x ", (uint32_t) regs->cp0_status); |
283 | 283 | ||
284 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_I) { | 284 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_I) { |
285 | if (regs->cp0_status & ST0_KUO) | 285 | if (regs->cp0_status & ST0_KUO) |
@@ -441,7 +441,7 @@ asmlinkage void do_be(struct pt_regs *regs) | |||
441 | int data = regs->cp0_cause & 4; | 441 | int data = regs->cp0_cause & 4; |
442 | int action = MIPS_BE_FATAL; | 442 | int action = MIPS_BE_FATAL; |
443 | 443 | ||
444 | /* XXX For now. Fixme, this searches the wrong table ... */ | 444 | /* XXX For now. Fixme, this searches the wrong table ... */ |
445 | if (data && !user_mode(regs)) | 445 | if (data && !user_mode(regs)) |
446 | fixup = search_dbe_tables(exception_epc(regs)); | 446 | fixup = search_dbe_tables(exception_epc(regs)); |
447 | 447 | ||
@@ -739,7 +739,7 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31) | |||
739 | current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X; | 739 | current->thread.fpu.fcr31 &= ~FPU_CSR_ALL_X; |
740 | 740 | ||
741 | /* Restore the hardware register state */ | 741 | /* Restore the hardware register state */ |
742 | own_fpu(1); /* Using the FPU again. */ | 742 | own_fpu(1); /* Using the FPU again. */ |
743 | 743 | ||
744 | /* If something went wrong, signal */ | 744 | /* If something went wrong, signal */ |
745 | process_fpemu_return(sig, fault_addr); | 745 | process_fpemu_return(sig, fault_addr); |
@@ -966,7 +966,7 @@ int cu2_notifier_call_chain(unsigned long val, void *v) | |||
966 | } | 966 | } |
967 | 967 | ||
968 | static int default_cu2_call(struct notifier_block *nfb, unsigned long action, | 968 | static int default_cu2_call(struct notifier_block *nfb, unsigned long action, |
969 | void *data) | 969 | void *data) |
970 | { | 970 | { |
971 | struct pt_regs *regs = data; | 971 | struct pt_regs *regs = data; |
972 | 972 | ||
@@ -974,7 +974,7 @@ static int default_cu2_call(struct notifier_block *nfb, unsigned long action, | |||
974 | default: | 974 | default: |
975 | die_if_kernel("Unhandled kernel unaligned access or invalid " | 975 | die_if_kernel("Unhandled kernel unaligned access or invalid " |
976 | "instruction", regs); | 976 | "instruction", regs); |
977 | /* Fall through */ | 977 | /* Fall through */ |
978 | 978 | ||
979 | case CU2_EXCEPTION: | 979 | case CU2_EXCEPTION: |
980 | force_sig(SIGILL, current); | 980 | force_sig(SIGILL, current); |
@@ -1029,10 +1029,10 @@ asmlinkage void do_cpu(struct pt_regs *regs) | |||
1029 | /* | 1029 | /* |
1030 | * Old (MIPS I and MIPS II) processors will set this code | 1030 | * Old (MIPS I and MIPS II) processors will set this code |
1031 | * for COP1X opcode instructions that replaced the original | 1031 | * for COP1X opcode instructions that replaced the original |
1032 | * COP3 space. We don't limit COP1 space instructions in | 1032 | * COP3 space. We don't limit COP1 space instructions in |
1033 | * the emulator according to the CPU ISA, so we want to | 1033 | * the emulator according to the CPU ISA, so we want to |
1034 | * treat COP1X instructions consistently regardless of which | 1034 | * treat COP1X instructions consistently regardless of which |
1035 | * code the CPU chose. Therefore we redirect this trap to | 1035 | * code the CPU chose. Therefore we redirect this trap to |
1036 | * the FP emulator too. | 1036 | * the FP emulator too. |
1037 | * | 1037 | * |
1038 | * Then some newer FPU-less processors use this code | 1038 | * Then some newer FPU-less processors use this code |
@@ -1044,9 +1044,9 @@ asmlinkage void do_cpu(struct pt_regs *regs) | |||
1044 | /* Fall through. */ | 1044 | /* Fall through. */ |
1045 | 1045 | ||
1046 | case 1: | 1046 | case 1: |
1047 | if (used_math()) /* Using the FPU again. */ | 1047 | if (used_math()) /* Using the FPU again. */ |
1048 | own_fpu(1); | 1048 | own_fpu(1); |
1049 | else { /* First time FPU user. */ | 1049 | else { /* First time FPU user. */ |
1050 | init_fpu(); | 1050 | init_fpu(); |
1051 | set_used_math(); | 1051 | set_used_math(); |
1052 | } | 1052 | } |
@@ -1114,7 +1114,7 @@ asmlinkage void do_mcheck(struct pt_regs *regs) | |||
1114 | show_regs(regs); | 1114 | show_regs(regs); |
1115 | 1115 | ||
1116 | if (multi_match) { | 1116 | if (multi_match) { |
1117 | printk("Index : %0x\n", read_c0_index()); | 1117 | printk("Index : %0x\n", read_c0_index()); |
1118 | printk("Pagemask: %0x\n", read_c0_pagemask()); | 1118 | printk("Pagemask: %0x\n", read_c0_pagemask()); |
1119 | printk("EntryHi : %0*lx\n", field, read_c0_entryhi()); | 1119 | printk("EntryHi : %0*lx\n", field, read_c0_entryhi()); |
1120 | printk("EntryLo0: %0*lx\n", field, read_c0_entrylo0()); | 1120 | printk("EntryLo0: %0*lx\n", field, read_c0_entrylo0()); |
@@ -1181,7 +1181,7 @@ asmlinkage void do_dsp(struct pt_regs *regs) | |||
1181 | asmlinkage void do_reserved(struct pt_regs *regs) | 1181 | asmlinkage void do_reserved(struct pt_regs *regs) |
1182 | { | 1182 | { |
1183 | /* | 1183 | /* |
1184 | * Game over - no way to handle this if it ever occurs. Most probably | 1184 | * Game over - no way to handle this if it ever occurs. Most probably |
1185 | * caused by a new unknown cpu type or after another deadly | 1185 | * caused by a new unknown cpu type or after another deadly |
1186 | * hard/software error. | 1186 | * hard/software error. |
1187 | */ | 1187 | */ |
@@ -1705,7 +1705,7 @@ void __init trap_init(void) | |||
1705 | 1705 | ||
1706 | #if defined(CONFIG_KGDB) | 1706 | #if defined(CONFIG_KGDB) |
1707 | if (kgdb_early_setup) | 1707 | if (kgdb_early_setup) |
1708 | return; /* Already done */ | 1708 | return; /* Already done */ |
1709 | #endif | 1709 | #endif |
1710 | 1710 | ||
1711 | if (cpu_has_veic || cpu_has_vint) { | 1711 | if (cpu_has_veic || cpu_has_vint) { |
@@ -1799,7 +1799,7 @@ void __init trap_init(void) | |||
1799 | * The R6000 is the only R-series CPU that features a machine | 1799 | * The R6000 is the only R-series CPU that features a machine |
1800 | * check exception (similar to the R4000 cache error) and | 1800 | * check exception (similar to the R4000 cache error) and |
1801 | * unaligned ldc1/sdc1 exception. The handlers have not been | 1801 | * unaligned ldc1/sdc1 exception. The handlers have not been |
1802 | * written yet. Well, anyway there is no R6000 machine on the | 1802 | * written yet. Well, anyway there is no R6000 machine on the |
1803 | * current list of targets for Linux/MIPS. | 1803 | * current list of targets for Linux/MIPS. |
1804 | * (Duh, crap, there is someone with a triple R6k machine) | 1804 | * (Duh, crap, there is someone with a triple R6k machine) |
1805 | */ | 1805 | */ |
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index 9c58bdf58f23..6087a54c86a0 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c | |||
@@ -21,11 +21,11 @@ | |||
21 | * | 21 | * |
22 | * For now I enable fixing of address errors by default to make life easier. | 22 | * For now I enable fixing of address errors by default to make life easier. |
23 | * I however intend to disable this somewhen in the future when the alignment | 23 | * I however intend to disable this somewhen in the future when the alignment |
24 | * problems with user programs have been fixed. For programmers this is the | 24 | * problems with user programs have been fixed. For programmers this is the |
25 | * right way to go. | 25 | * right way to go. |
26 | * | 26 | * |
27 | * Fixing address errors is a per process option. The option is inherited | 27 | * Fixing address errors is a per process option. The option is inherited |
28 | * across fork(2) and execve(2) calls. If you really want to use the | 28 | * across fork(2) and execve(2) calls. If you really want to use the |
29 | * option in your user programs - I discourage the use of the software | 29 | * option in your user programs - I discourage the use of the software |
30 | * emulation strongly - use the following code in your userland stuff: | 30 | * emulation strongly - use the following code in your userland stuff: |
31 | * | 31 | * |
@@ -43,34 +43,34 @@ | |||
43 | * #include <sys/sysmips.h> | 43 | * #include <sys/sysmips.h> |
44 | * | 44 | * |
45 | * struct foo { | 45 | * struct foo { |
46 | * unsigned char bar[8]; | 46 | * unsigned char bar[8]; |
47 | * }; | 47 | * }; |
48 | * | 48 | * |
49 | * main(int argc, char *argv[]) | 49 | * main(int argc, char *argv[]) |
50 | * { | 50 | * { |
51 | * struct foo x = {0, 1, 2, 3, 4, 5, 6, 7}; | 51 | * struct foo x = {0, 1, 2, 3, 4, 5, 6, 7}; |
52 | * unsigned int *p = (unsigned int *) (x.bar + 3); | 52 | * unsigned int *p = (unsigned int *) (x.bar + 3); |
53 | * int i; | 53 | * int i; |
54 | * | 54 | * |
55 | * if (argc > 1) | 55 | * if (argc > 1) |
56 | * sysmips(MIPS_FIXADE, atoi(argv[1])); | 56 | * sysmips(MIPS_FIXADE, atoi(argv[1])); |
57 | * | 57 | * |
58 | * printf("*p = %08lx\n", *p); | 58 | * printf("*p = %08lx\n", *p); |
59 | * | 59 | * |
60 | * *p = 0xdeadface; | 60 | * *p = 0xdeadface; |
61 | * | 61 | * |
62 | * for(i = 0; i <= 7; i++) | 62 | * for(i = 0; i <= 7; i++) |
63 | * printf("%02x ", x.bar[i]); | 63 | * printf("%02x ", x.bar[i]); |
64 | * printf("\n"); | 64 | * printf("\n"); |
65 | * } | 65 | * } |
66 | * | 66 | * |
67 | * Coprocessor loads are not supported; I think this case is unimportant | 67 | * Coprocessor loads are not supported; I think this case is unimportant |
68 | * in the practice. | 68 | * in the practice. |
69 | * | 69 | * |
70 | * TODO: Handle ndc (attempted store to doubleword in uncached memory) | 70 | * TODO: Handle ndc (attempted store to doubleword in uncached memory) |
71 | * exception for the R6000. | 71 | * exception for the R6000. |
72 | * A store crossing a page boundary might be executed only partially. | 72 | * A store crossing a page boundary might be executed only partially. |
73 | * Undo the partial store in this case. | 73 | * Undo the partial store in this case. |
74 | */ | 74 | */ |
75 | #include <linux/mm.h> | 75 | #include <linux/mm.h> |
76 | #include <linux/signal.h> | 76 | #include <linux/signal.h> |
@@ -86,7 +86,7 @@ | |||
86 | #include <asm/inst.h> | 86 | #include <asm/inst.h> |
87 | #include <asm/uaccess.h> | 87 | #include <asm/uaccess.h> |
88 | 88 | ||
89 | #define STR(x) __STR(x) | 89 | #define STR(x) __STR(x) |
90 | #define __STR(x) #x | 90 | #define __STR(x) #x |
91 | 91 | ||
92 | enum { | 92 | enum { |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 0a4336b803e9..05826d20a792 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -22,12 +22,12 @@ PHDRS { | |||
22 | 22 | ||
23 | #ifdef CONFIG_32BIT | 23 | #ifdef CONFIG_32BIT |
24 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 24 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
25 | jiffies = jiffies_64; | 25 | jiffies = jiffies_64; |
26 | #else | 26 | #else |
27 | jiffies = jiffies_64 + 4; | 27 | jiffies = jiffies_64 + 4; |
28 | #endif | 28 | #endif |
29 | #else | 29 | #else |
30 | jiffies = jiffies_64; | 30 | jiffies = jiffies_64; |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | SECTIONS | 33 | SECTIONS |
@@ -139,7 +139,7 @@ SECTIONS | |||
139 | 139 | ||
140 | /* | 140 | /* |
141 | * Force .bss to 64K alignment so that .bss..swapper_pg_dir | 141 | * Force .bss to 64K alignment so that .bss..swapper_pg_dir |
142 | * gets that alignment. .sbss should be empty, so there will be | 142 | * gets that alignment. .sbss should be empty, so there will be |
143 | * no holes after __init_end. */ | 143 | * no holes after __init_end. */ |
144 | BSS_SECTION(0, 0x10000, 0) | 144 | BSS_SECTION(0, 0x10000, 0) |
145 | 145 | ||
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 147cec19621d..32fc5d4a22e5 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -254,7 +254,7 @@ static void __maybe_unused dump_mtregs(void) | |||
254 | val & MVPCONF0_PTC, (val & MVPCONF0_M) >> MVPCONF0_M_SHIFT); | 254 | val & MVPCONF0_PTC, (val & MVPCONF0_M) >> MVPCONF0_M_SHIFT); |
255 | } | 255 | } |
256 | 256 | ||
257 | /* Find some VPE program space */ | 257 | /* Find some VPE program space */ |
258 | static void *alloc_progmem(unsigned long len) | 258 | static void *alloc_progmem(unsigned long len) |
259 | { | 259 | { |
260 | void *addr; | 260 | void *addr; |
@@ -292,7 +292,7 @@ static long get_offset(unsigned long *size, Elf_Shdr * sechdr) | |||
292 | } | 292 | } |
293 | 293 | ||
294 | /* Lay out the SHF_ALLOC sections in a way not dissimilar to how ld | 294 | /* Lay out the SHF_ALLOC sections in a way not dissimilar to how ld |
295 | might -- code, read-only data, read-write data, small data. Tally | 295 | might -- code, read-only data, read-write data, small data. Tally |
296 | sizes, and place the offsets into sh_entsize fields: high bit means it | 296 | sizes, and place the offsets into sh_entsize fields: high bit means it |
297 | belongs in init. */ | 297 | belongs in init. */ |
298 | static void layout_sections(struct module *mod, const Elf_Ehdr * hdr, | 298 | static void layout_sections(struct module *mod, const Elf_Ehdr * hdr, |
@@ -386,7 +386,7 @@ static int apply_r_mips_pc16(struct module *me, uint32_t *location, | |||
386 | 386 | ||
387 | if( (rel > 32768) || (rel < -32768) ) { | 387 | if( (rel > 32768) || (rel < -32768) ) { |
388 | printk(KERN_DEBUG "VPE loader: " | 388 | printk(KERN_DEBUG "VPE loader: " |
389 | "apply_r_mips_pc16: relative address out of range 0x%x\n", rel); | 389 | "apply_r_mips_pc16: relative address out of range 0x%x\n", rel); |
390 | return -ENOEXEC; | 390 | return -ENOEXEC; |
391 | } | 391 | } |
392 | 392 | ||
@@ -458,7 +458,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location, | |||
458 | Elf32_Addr val, vallo; | 458 | Elf32_Addr val, vallo; |
459 | struct mips_hi16 *l, *next; | 459 | struct mips_hi16 *l, *next; |
460 | 460 | ||
461 | /* Sign extend the addend we extract from the lo insn. */ | 461 | /* Sign extend the addend we extract from the lo insn. */ |
462 | vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000; | 462 | vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000; |
463 | 463 | ||
464 | if (mips_hi16_list != NULL) { | 464 | if (mips_hi16_list != NULL) { |
@@ -470,7 +470,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location, | |||
470 | /* | 470 | /* |
471 | * The value for the HI16 had best be the same. | 471 | * The value for the HI16 had best be the same. |
472 | */ | 472 | */ |
473 | if (v != l->value) { | 473 | if (v != l->value) { |
474 | printk(KERN_DEBUG "VPE loader: " | 474 | printk(KERN_DEBUG "VPE loader: " |
475 | "apply_r_mips_lo16/hi16: \t" | 475 | "apply_r_mips_lo16/hi16: \t" |
476 | "inconsistent value information\n"); | 476 | "inconsistent value information\n"); |
@@ -505,7 +505,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location, | |||
505 | } | 505 | } |
506 | 506 | ||
507 | /* | 507 | /* |
508 | * Ok, we're done with the HI16 relocs. Now deal with the LO16. | 508 | * Ok, we're done with the HI16 relocs. Now deal with the LO16. |
509 | */ | 509 | */ |
510 | val = v + vallo; | 510 | val = v + vallo; |
511 | insnlo = (insnlo & ~0xffff) | (val & 0xffff); | 511 | insnlo = (insnlo & ~0xffff) | (val & 0xffff); |
@@ -579,7 +579,7 @@ static int apply_relocations(Elf32_Shdr *sechdrs, | |||
579 | res = reloc_handlers[ELF32_R_TYPE(r_info)](me, location, v); | 579 | res = reloc_handlers[ELF32_R_TYPE(r_info)](me, location, v); |
580 | if( res ) { | 580 | if( res ) { |
581 | char *r = rstrs[ELF32_R_TYPE(r_info)]; | 581 | char *r = rstrs[ELF32_R_TYPE(r_info)]; |
582 | printk(KERN_WARNING "VPE loader: .text+0x%x " | 582 | printk(KERN_WARNING "VPE loader: .text+0x%x " |
583 | "relocation type %s for symbol \"%s\" failed\n", | 583 | "relocation type %s for symbol \"%s\" failed\n", |
584 | rel[i].r_offset, r ? r : "UNKNOWN", | 584 | rel[i].r_offset, r ? r : "UNKNOWN", |
585 | strtab + sym->st_name); | 585 | strtab + sym->st_name); |
@@ -772,7 +772,7 @@ static int vpe_run(struct vpe * v) | |||
772 | 772 | ||
773 | /* Set up the XTC bit in vpeconf0 to point at our tc */ | 773 | /* Set up the XTC bit in vpeconf0 to point at our tc */ |
774 | write_vpe_c0_vpeconf0( (read_vpe_c0_vpeconf0() & ~(VPECONF0_XTC)) | 774 | write_vpe_c0_vpeconf0( (read_vpe_c0_vpeconf0() & ~(VPECONF0_XTC)) |
775 | | (t->index << VPECONF0_XTC_SHIFT)); | 775 | | (t->index << VPECONF0_XTC_SHIFT)); |
776 | 776 | ||
777 | back_to_back_c0_hazard(); | 777 | back_to_back_c0_hazard(); |
778 | 778 | ||
@@ -926,34 +926,34 @@ static int vpe_elfload(struct vpe * v) | |||
926 | secstrings + sechdrs[i].sh_name, sechdrs[i].sh_addr); | 926 | secstrings + sechdrs[i].sh_name, sechdrs[i].sh_addr); |
927 | } | 927 | } |
928 | 928 | ||
929 | /* Fix up syms, so that st_value is a pointer to location. */ | 929 | /* Fix up syms, so that st_value is a pointer to location. */ |
930 | simplify_symbols(sechdrs, symindex, strtab, secstrings, | 930 | simplify_symbols(sechdrs, symindex, strtab, secstrings, |
931 | hdr->e_shnum, &mod); | 931 | hdr->e_shnum, &mod); |
932 | 932 | ||
933 | /* Now do relocations. */ | 933 | /* Now do relocations. */ |
934 | for (i = 1; i < hdr->e_shnum; i++) { | 934 | for (i = 1; i < hdr->e_shnum; i++) { |
935 | const char *strtab = (char *)sechdrs[strindex].sh_addr; | 935 | const char *strtab = (char *)sechdrs[strindex].sh_addr; |
936 | unsigned int info = sechdrs[i].sh_info; | 936 | unsigned int info = sechdrs[i].sh_info; |
937 | 937 | ||
938 | /* Not a valid relocation section? */ | 938 | /* Not a valid relocation section? */ |
939 | if (info >= hdr->e_shnum) | 939 | if (info >= hdr->e_shnum) |
940 | continue; | 940 | continue; |
941 | 941 | ||
942 | /* Don't bother with non-allocated sections */ | 942 | /* Don't bother with non-allocated sections */ |
943 | if (!(sechdrs[info].sh_flags & SHF_ALLOC)) | 943 | if (!(sechdrs[info].sh_flags & SHF_ALLOC)) |
944 | continue; | 944 | continue; |
945 | 945 | ||
946 | if (sechdrs[i].sh_type == SHT_REL) | 946 | if (sechdrs[i].sh_type == SHT_REL) |
947 | err = apply_relocations(sechdrs, strtab, symindex, i, | 947 | err = apply_relocations(sechdrs, strtab, symindex, i, |
948 | &mod); | 948 | &mod); |
949 | else if (sechdrs[i].sh_type == SHT_RELA) | 949 | else if (sechdrs[i].sh_type == SHT_RELA) |
950 | err = apply_relocate_add(sechdrs, strtab, symindex, i, | 950 | err = apply_relocate_add(sechdrs, strtab, symindex, i, |
951 | &mod); | 951 | &mod); |
952 | if (err < 0) | 952 | if (err < 0) |
953 | return err; | 953 | return err; |
954 | 954 | ||
955 | } | 955 | } |
956 | } else { | 956 | } else { |
957 | struct elf_phdr *phdr = (struct elf_phdr *) ((char *)hdr + hdr->e_phoff); | 957 | struct elf_phdr *phdr = (struct elf_phdr *) ((char *)hdr + hdr->e_phoff); |
958 | 958 | ||
959 | for (i = 0; i < hdr->e_phnum; i++) { | 959 | for (i = 0; i < hdr->e_phnum; i++) { |
@@ -968,16 +968,16 @@ static int vpe_elfload(struct vpe * v) | |||
968 | } | 968 | } |
969 | 969 | ||
970 | for (i = 0; i < hdr->e_shnum; i++) { | 970 | for (i = 0; i < hdr->e_shnum; i++) { |
971 | /* Internal symbols and strings. */ | 971 | /* Internal symbols and strings. */ |
972 | if (sechdrs[i].sh_type == SHT_SYMTAB) { | 972 | if (sechdrs[i].sh_type == SHT_SYMTAB) { |
973 | symindex = i; | 973 | symindex = i; |
974 | strindex = sechdrs[i].sh_link; | 974 | strindex = sechdrs[i].sh_link; |
975 | strtab = (char *)hdr + sechdrs[strindex].sh_offset; | 975 | strtab = (char *)hdr + sechdrs[strindex].sh_offset; |
976 | 976 | ||
977 | /* mark the symtab's address for when we try to find the | 977 | /* mark the symtab's address for when we try to find the |
978 | magic symbols */ | 978 | magic symbols */ |
979 | sechdrs[i].sh_addr = (size_t) hdr + sechdrs[i].sh_offset; | 979 | sechdrs[i].sh_addr = (size_t) hdr + sechdrs[i].sh_offset; |
980 | } | 980 | } |
981 | } | 981 | } |
982 | } | 982 | } |
983 | 983 | ||
@@ -1049,7 +1049,7 @@ static int getcwd(char *buff, int size) | |||
1049 | return ret; | 1049 | return ret; |
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | /* checks VPE is unused and gets ready to load program */ | 1052 | /* checks VPE is unused and gets ready to load program */ |
1053 | static int vpe_open(struct inode *inode, struct file *filp) | 1053 | static int vpe_open(struct inode *inode, struct file *filp) |
1054 | { | 1054 | { |
1055 | enum vpe_state state; | 1055 | enum vpe_state state; |
@@ -1121,11 +1121,11 @@ static int vpe_release(struct inode *inode, struct file *filp) | |||
1121 | if (vpe_elfload(v) >= 0) { | 1121 | if (vpe_elfload(v) >= 0) { |
1122 | vpe_run(v); | 1122 | vpe_run(v); |
1123 | } else { | 1123 | } else { |
1124 | printk(KERN_WARNING "VPE loader: ELF load failed.\n"); | 1124 | printk(KERN_WARNING "VPE loader: ELF load failed.\n"); |
1125 | ret = -ENOEXEC; | 1125 | ret = -ENOEXEC; |
1126 | } | 1126 | } |
1127 | } else { | 1127 | } else { |
1128 | printk(KERN_WARNING "VPE loader: only elf files are supported\n"); | 1128 | printk(KERN_WARNING "VPE loader: only elf files are supported\n"); |
1129 | ret = -ENOEXEC; | 1129 | ret = -ENOEXEC; |
1130 | } | 1130 | } |
1131 | 1131 | ||
diff --git a/arch/mips/kernel/watch.c b/arch/mips/kernel/watch.c index c15406968030..7726f6157d9e 100644 --- a/arch/mips/kernel/watch.c +++ b/arch/mips/kernel/watch.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <asm/watch.h> | 12 | #include <asm/watch.h> |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * Install the watch registers for the current thread. A maximum of | 15 | * Install the watch registers for the current thread. A maximum of |
16 | * four registers are installed although the machine may have more. | 16 | * four registers are installed although the machine may have more. |
17 | */ | 17 | */ |
18 | void mips_install_watch_registers(void) | 18 | void mips_install_watch_registers(void) |
@@ -72,7 +72,7 @@ void mips_read_watch_registers(void) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * Disable all watch registers. Although only four registers are | 75 | * Disable all watch registers. Although only four registers are |
76 | * installed, all are cleared to eliminate the possibility of endless | 76 | * installed, all are cleared to eliminate the possibility of endless |
77 | * looping in the watch handler. | 77 | * looping in the watch handler. |
78 | */ | 78 | */ |
diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c index ce2f129b081f..186fd3e44242 100644 --- a/arch/mips/lantiq/clk.c +++ b/arch/mips/lantiq/clk.c | |||
@@ -145,9 +145,9 @@ static inline u32 get_counter_resolution(void) | |||
145 | u32 res; | 145 | u32 res; |
146 | 146 | ||
147 | __asm__ __volatile__( | 147 | __asm__ __volatile__( |
148 | ".set push\n" | 148 | ".set push\n" |
149 | ".set mips32r2\n" | 149 | ".set mips32r2\n" |
150 | "rdhwr %0, $3\n" | 150 | "rdhwr %0, $3\n" |
151 | ".set pop\n" | 151 | ".set pop\n" |
152 | : "=&r" (res) | 152 | : "=&r" (res) |
153 | : /* no input */ | 153 | : /* no input */ |
diff --git a/arch/mips/lantiq/dts/danube.dtsi b/arch/mips/lantiq/dts/danube.dtsi index 3a4520f009cf..d4c59e003708 100644 --- a/arch/mips/lantiq/dts/danube.dtsi +++ b/arch/mips/lantiq/dts/danube.dtsi | |||
@@ -97,7 +97,7 @@ | |||
97 | compatible = "lantiq,pci-xway"; | 97 | compatible = "lantiq,pci-xway"; |
98 | bus-range = <0x0 0x0>; | 98 | bus-range = <0x0 0x0>; |
99 | ranges = <0x2000000 0 0x8000000 0x8000000 0 0x2000000 /* pci memory */ | 99 | ranges = <0x2000000 0 0x8000000 0x8000000 0 0x2000000 /* pci memory */ |
100 | 0x1000000 0 0x00000000 0xAE00000 0 0x200000>; /* io space */ | 100 | 0x1000000 0 0x00000000 0xAE00000 0 0x200000>; /* io space */ |
101 | reg = <0x7000000 0x8000 /* config space */ | 101 | reg = <0x7000000 0x8000 /* config space */ |
102 | 0xE105400 0x400>; /* pci bridge */ | 102 | 0xE105400 0x400>; /* pci bridge */ |
103 | }; | 103 | }; |
diff --git a/arch/mips/lantiq/dts/easy50712.dts b/arch/mips/lantiq/dts/easy50712.dts index 68c17310bc82..fac1f5b178eb 100644 --- a/arch/mips/lantiq/dts/easy50712.dts +++ b/arch/mips/lantiq/dts/easy50712.dts | |||
@@ -103,7 +103,7 @@ | |||
103 | lantiq,bus-clock = <33333333>; | 103 | lantiq,bus-clock = <33333333>; |
104 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | 104 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; |
105 | interrupt-map = < | 105 | interrupt-map = < |
106 | 0x7000 0 0 1 &icu0 29 1 // slot 14, irq 29 | 106 | 0x7000 0 0 1 &icu0 29 1 // slot 14, irq 29 |
107 | >; | 107 | >; |
108 | gpios-reset = <&gpio 21 0>; | 108 | gpios-reset = <&gpio 21 0>; |
109 | req-mask = <0x1>; /* GNT1 */ | 109 | req-mask = <0x1>; /* GNT1 */ |
diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c index a7935bf0fecb..5323308aab3f 100644 --- a/arch/mips/lantiq/irq.c +++ b/arch/mips/lantiq/irq.c | |||
@@ -344,7 +344,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent) | |||
344 | if (eiu_node && !of_address_to_resource(eiu_node, 0, &res)) { | 344 | if (eiu_node && !of_address_to_resource(eiu_node, 0, &res)) { |
345 | /* find out how many external irq sources we have */ | 345 | /* find out how many external irq sources we have */ |
346 | const __be32 *count = of_get_property(node, | 346 | const __be32 *count = of_get_property(node, |
347 | "lantiq,count", NULL); | 347 | "lantiq,count", NULL); |
348 | 348 | ||
349 | if (count) | 349 | if (count) |
350 | exin_avail = *count; | 350 | exin_avail = *count; |
diff --git a/arch/mips/lantiq/prom.h b/arch/mips/lantiq/prom.h index a3fa1a2bfaae..8e07b5f28ef1 100644 --- a/arch/mips/lantiq/prom.h +++ b/arch/mips/lantiq/prom.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define _LTQ_PROM_H__ | 10 | #define _LTQ_PROM_H__ |
11 | 11 | ||
12 | #define LTQ_SYS_TYPE_LEN 0x100 | 12 | #define LTQ_SYS_TYPE_LEN 0x100 |
13 | #define LTQ_SYS_REV_LEN 0x10 | 13 | #define LTQ_SYS_REV_LEN 0x10 |
14 | 14 | ||
15 | struct ltq_soc_info { | 15 | struct ltq_soc_info { |
16 | unsigned char *name; | 16 | unsigned char *name; |
diff --git a/arch/mips/lasat/Makefile b/arch/mips/lasat/Makefile index 9cc4e4db8b99..869bd3b37c17 100644 --- a/arch/mips/lasat/Makefile +++ b/arch/mips/lasat/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the LASAT specific kernel interface routines under Linux. | 2 | # Makefile for the LASAT specific kernel interface routines under Linux. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += reset.o setup.o prom.o lasat_board.o \ | 5 | obj-y += reset.o setup.o prom.o lasat_board.o \ |
6 | at93c.o interrupt.o serial.o | 6 | at93c.o interrupt.o serial.o |
7 | 7 | ||
8 | obj-$(CONFIG_LASAT_SYSCTL) += sysctl.o | 8 | obj-$(CONFIG_LASAT_SYSCTL) += sysctl.o |
diff --git a/arch/mips/lasat/ds1603.h b/arch/mips/lasat/ds1603.h index 2da3704044fd..3e718b1cca02 100644 --- a/arch/mips/lasat/ds1603.h +++ b/arch/mips/lasat/ds1603.h | |||
@@ -25,7 +25,7 @@ void ds1603_enable(void); | |||
25 | void ds1603_disable(void); | 25 | void ds1603_disable(void); |
26 | void ds1603_init(struct ds_defs *); | 26 | void ds1603_init(struct ds_defs *); |
27 | 27 | ||
28 | #define TRIMMER_DEFAULT 3 | 28 | #define TRIMMER_DEFAULT 3 |
29 | #define TRIMMER_DISABLE_RTC 0 | 29 | #define TRIMMER_DISABLE_RTC 0 |
30 | 30 | ||
31 | #endif | 31 | #endif |
diff --git a/arch/mips/lasat/image/Makefile b/arch/mips/lasat/image/Makefile index 460626b6d62f..dfb509d21d8e 100644 --- a/arch/mips/lasat/image/Makefile +++ b/arch/mips/lasat/image/Makefile | |||
@@ -28,7 +28,7 @@ $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) | |||
28 | 28 | ||
29 | OBJECTS = head.o kImage.o | 29 | OBJECTS = head.o kImage.o |
30 | 30 | ||
31 | rom.sw: $(obj)/rom.sw | 31 | rom.sw: $(obj)/rom.sw |
32 | rom.bin: $(obj)/rom.bin | 32 | rom.bin: $(obj)/rom.bin |
33 | 33 | ||
34 | $(obj)/rom.sw: $(obj)/rom.bin | 34 | $(obj)/rom.sw: $(obj)/rom.bin |
diff --git a/arch/mips/lasat/image/head.S b/arch/mips/lasat/image/head.S index e0ecda92c40a..41babbe43a8e 100644 --- a/arch/mips/lasat/image/head.S +++ b/arch/mips/lasat/image/head.S | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | /* Magic words identifying a software image */ | 8 | /* Magic words identifying a software image */ |
9 | .word LASAT_K_MAGIC0_VAL | 9 | .word LASAT_K_MAGIC0_VAL |
10 | .word LASAT_K_MAGIC1_VAL | 10 | .word LASAT_K_MAGIC1_VAL |
11 | 11 | ||
12 | /* Image header version */ | 12 | /* Image header version */ |
13 | .word 0x00000002 | 13 | .word 0x00000002 |
diff --git a/arch/mips/lasat/picvue.c b/arch/mips/lasat/picvue.c index d3d04c392e25..7eb334892693 100644 --- a/arch/mips/lasat/picvue.c +++ b/arch/mips/lasat/picvue.c | |||
@@ -163,12 +163,12 @@ int pvc_program_cg(int charnum, u8 bitmap[BM_SIZE]) | |||
163 | } | 163 | } |
164 | 164 | ||
165 | #define FUNC_SET_CMD 0x20 | 165 | #define FUNC_SET_CMD 0x20 |
166 | #define EIGHT_BYTE (1 << 4) | 166 | #define EIGHT_BYTE (1 << 4) |
167 | #define FOUR_BYTE 0 | 167 | #define FOUR_BYTE 0 |
168 | #define TWO_LINES (1 << 3) | 168 | #define TWO_LINES (1 << 3) |
169 | #define ONE_LINE 0 | 169 | #define ONE_LINE 0 |
170 | #define LARGE_FONT (1 << 2) | 170 | #define LARGE_FONT (1 << 2) |
171 | #define SMALL_FONT 0 | 171 | #define SMALL_FONT 0 |
172 | 172 | ||
173 | static void pvc_funcset(u8 cmd) | 173 | static void pvc_funcset(u8 cmd) |
174 | { | 174 | { |
@@ -177,9 +177,9 @@ static void pvc_funcset(u8 cmd) | |||
177 | } | 177 | } |
178 | 178 | ||
179 | #define ENTRYMODE_CMD 0x4 | 179 | #define ENTRYMODE_CMD 0x4 |
180 | #define AUTO_INC (1 << 1) | 180 | #define AUTO_INC (1 << 1) |
181 | #define AUTO_DEC 0 | 181 | #define AUTO_DEC 0 |
182 | #define CURSOR_FOLLOWS_DISP (1 << 0) | 182 | #define CURSOR_FOLLOWS_DISP (1 << 0) |
183 | 183 | ||
184 | static void pvc_entrymode(u8 cmd) | 184 | static void pvc_entrymode(u8 cmd) |
185 | { | 185 | { |
@@ -188,20 +188,20 @@ static void pvc_entrymode(u8 cmd) | |||
188 | } | 188 | } |
189 | 189 | ||
190 | #define DISP_CNT_CMD 0x08 | 190 | #define DISP_CNT_CMD 0x08 |
191 | #define DISP_OFF 0 | 191 | #define DISP_OFF 0 |
192 | #define DISP_ON (1 << 2) | 192 | #define DISP_ON (1 << 2) |
193 | #define CUR_ON (1 << 1) | 193 | #define CUR_ON (1 << 1) |
194 | #define CUR_BLINK (1 << 0) | 194 | #define CUR_BLINK (1 << 0) |
195 | void pvc_dispcnt(u8 cmd) | 195 | void pvc_dispcnt(u8 cmd) |
196 | { | 196 | { |
197 | pvc_write(DISP_CNT_CMD | (cmd & (DISP_ON|CUR_ON|CUR_BLINK)), MODE_INST); | 197 | pvc_write(DISP_CNT_CMD | (cmd & (DISP_ON|CUR_ON|CUR_BLINK)), MODE_INST); |
198 | } | 198 | } |
199 | 199 | ||
200 | #define MOVE_CMD 0x10 | 200 | #define MOVE_CMD 0x10 |
201 | #define DISPLAY (1 << 3) | 201 | #define DISPLAY (1 << 3) |
202 | #define CURSOR 0 | 202 | #define CURSOR 0 |
203 | #define RIGHT (1 << 2) | 203 | #define RIGHT (1 << 2) |
204 | #define LEFT 0 | 204 | #define LEFT 0 |
205 | void pvc_move(u8 cmd) | 205 | void pvc_move(u8 cmd) |
206 | { | 206 | { |
207 | pvc_write(MOVE_CMD | (cmd & (DISPLAY|RIGHT)), MODE_INST); | 207 | pvc_write(MOVE_CMD | (cmd & (DISPLAY|RIGHT)), MODE_INST); |
diff --git a/arch/mips/lasat/picvue.h b/arch/mips/lasat/picvue.h index 2f0757738fdb..d0119fca3862 100644 --- a/arch/mips/lasat/picvue.h +++ b/arch/mips/lasat/picvue.h | |||
@@ -29,16 +29,16 @@ void pvc_dump_string(const unsigned char *str); | |||
29 | int pvc_program_cg(int charnum, u8 bitmap[BM_SIZE]); | 29 | int pvc_program_cg(int charnum, u8 bitmap[BM_SIZE]); |
30 | 30 | ||
31 | void pvc_dispcnt(u8 cmd); | 31 | void pvc_dispcnt(u8 cmd); |
32 | #define DISP_OFF 0 | 32 | #define DISP_OFF 0 |
33 | #define DISP_ON (1 << 2) | 33 | #define DISP_ON (1 << 2) |
34 | #define CUR_ON (1 << 1) | 34 | #define CUR_ON (1 << 1) |
35 | #define CUR_BLINK (1 << 0) | 35 | #define CUR_BLINK (1 << 0) |
36 | 36 | ||
37 | void pvc_move(u8 cmd); | 37 | void pvc_move(u8 cmd); |
38 | #define DISPLAY (1 << 3) | 38 | #define DISPLAY (1 << 3) |
39 | #define CURSOR 0 | 39 | #define CURSOR 0 |
40 | #define RIGHT (1 << 2) | 40 | #define RIGHT (1 << 2) |
41 | #define LEFT 0 | 41 | #define LEFT 0 |
42 | 42 | ||
43 | void pvc_clear(void); | 43 | void pvc_clear(void); |
44 | void pvc_home(void); | 44 | void pvc_home(void); |
diff --git a/arch/mips/lasat/serial.c b/arch/mips/lasat/serial.c index 5bcb6e89ab78..2e5fbed81206 100644 --- a/arch/mips/lasat/serial.c +++ b/arch/mips/lasat/serial.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Registration of Lasat UART platform device. | 2 | * Registration of Lasat UART platform device. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Brian Murphy <brian@murphy.dk> | 4 | * Copyright (C) 2007 Brian Murphy <brian@murphy.dk> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index d87ffd04cb0a..f27694fb2ad1 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c | |||
@@ -134,8 +134,8 @@ int proc_lasat_ip(ctl_table *table, int write, | |||
134 | } else { | 134 | } else { |
135 | ip = *(unsigned int *)(table->data); | 135 | ip = *(unsigned int *)(table->data); |
136 | sprintf(ipbuf, "%d.%d.%d.%d", | 136 | sprintf(ipbuf, "%d.%d.%d.%d", |
137 | (ip) & 0xff, | 137 | (ip) & 0xff, |
138 | (ip >> 8) & 0xff, | 138 | (ip >> 8) & 0xff, |
139 | (ip >> 16) & 0xff, | 139 | (ip >> 16) & 0xff, |
140 | (ip >> 24) & 0xff); | 140 | (ip >> 24) & 0xff); |
141 | len = strlen(ipbuf); | 141 | len = strlen(ipbuf); |
diff --git a/arch/mips/lib/bitops.c b/arch/mips/lib/bitops.c index 239a9c957b02..81f1dcfdcab8 100644 --- a/arch/mips/lib/bitops.c +++ b/arch/mips/lib/bitops.c | |||
@@ -56,7 +56,7 @@ EXPORT_SYMBOL(__mips_clear_bit); | |||
56 | 56 | ||
57 | 57 | ||
58 | /** | 58 | /** |
59 | * __mips_change_bit - Toggle a bit in memory. This is called by change_bit() | 59 | * __mips_change_bit - Toggle a bit in memory. This is called by change_bit() |
60 | * if it cannot find a faster solution. | 60 | * if it cannot find a faster solution. |
61 | * @nr: Bit to change | 61 | * @nr: Bit to change |
62 | * @addr: Address to start counting from | 62 | * @addr: Address to start counting from |
@@ -155,7 +155,7 @@ EXPORT_SYMBOL(__mips_test_and_clear_bit); | |||
155 | 155 | ||
156 | 156 | ||
157 | /** | 157 | /** |
158 | * __mips_test_and_change_bit - Change a bit and return its old value. This is | 158 | * __mips_test_and_change_bit - Change a bit and return its old value. This is |
159 | * called by test_and_change_bit() if it cannot find a faster solution. | 159 | * called by test_and_change_bit() if it cannot find a faster solution. |
160 | * @nr: Bit to change | 160 | * @nr: Bit to change |
161 | * @addr: Address to count from | 161 | * @addr: Address to count from |
diff --git a/arch/mips/lib/csum_partial.S b/arch/mips/lib/csum_partial.S index 6b876ca299ee..507147aebd41 100644 --- a/arch/mips/lib/csum_partial.S +++ b/arch/mips/lib/csum_partial.S | |||
@@ -67,8 +67,8 @@ | |||
67 | #define CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) \ | 67 | #define CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) \ |
68 | LOAD _t0, (offset + UNIT(0))(src); \ | 68 | LOAD _t0, (offset + UNIT(0))(src); \ |
69 | LOAD _t1, (offset + UNIT(1))(src); \ | 69 | LOAD _t1, (offset + UNIT(1))(src); \ |
70 | LOAD _t2, (offset + UNIT(2))(src); \ | 70 | LOAD _t2, (offset + UNIT(2))(src); \ |
71 | LOAD _t3, (offset + UNIT(3))(src); \ | 71 | LOAD _t3, (offset + UNIT(3))(src); \ |
72 | ADDC(sum, _t0); \ | 72 | ADDC(sum, _t0); \ |
73 | ADDC(sum, _t1); \ | 73 | ADDC(sum, _t1); \ |
74 | ADDC(sum, _t2); \ | 74 | ADDC(sum, _t2); \ |
@@ -285,7 +285,7 @@ LEAF(csum_partial) | |||
285 | 1: | 285 | 1: |
286 | #endif | 286 | #endif |
287 | .set reorder | 287 | .set reorder |
288 | /* Add the passed partial csum. */ | 288 | /* Add the passed partial csum. */ |
289 | ADDC32(sum, a2) | 289 | ADDC32(sum, a2) |
290 | jr ra | 290 | jr ra |
291 | .set noreorder | 291 | .set noreorder |
@@ -298,7 +298,7 @@ LEAF(csum_partial) | |||
298 | * csum_partial_copy_nocheck(src, dst, len, sum) | 298 | * csum_partial_copy_nocheck(src, dst, len, sum) |
299 | * __csum_partial_copy_user(src, dst, len, sum, errp) | 299 | * __csum_partial_copy_user(src, dst, len, sum, errp) |
300 | * | 300 | * |
301 | * See "Spec" in memcpy.S for details. Unlike __copy_user, all | 301 | * See "Spec" in memcpy.S for details. Unlike __copy_user, all |
302 | * function in this file use the standard calling convention. | 302 | * function in this file use the standard calling convention. |
303 | */ | 303 | */ |
304 | 304 | ||
@@ -371,16 +371,16 @@ LEAF(csum_partial) | |||
371 | 371 | ||
372 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 372 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
373 | #define LDFIRST LOADR | 373 | #define LDFIRST LOADR |
374 | #define LDREST LOADL | 374 | #define LDREST LOADL |
375 | #define STFIRST STORER | 375 | #define STFIRST STORER |
376 | #define STREST STOREL | 376 | #define STREST STOREL |
377 | #define SHIFT_DISCARD SLLV | 377 | #define SHIFT_DISCARD SLLV |
378 | #define SHIFT_DISCARD_REVERT SRLV | 378 | #define SHIFT_DISCARD_REVERT SRLV |
379 | #else | 379 | #else |
380 | #define LDFIRST LOADL | 380 | #define LDFIRST LOADL |
381 | #define LDREST LOADR | 381 | #define LDREST LOADR |
382 | #define STFIRST STOREL | 382 | #define STFIRST STOREL |
383 | #define STREST STORER | 383 | #define STREST STORER |
384 | #define SHIFT_DISCARD SRLV | 384 | #define SHIFT_DISCARD SRLV |
385 | #define SHIFT_DISCARD_REVERT SLLV | 385 | #define SHIFT_DISCARD_REVERT SLLV |
386 | #endif | 386 | #endif |
@@ -430,7 +430,7 @@ FEXPORT(csum_partial_copy_nocheck) | |||
430 | * src and dst are aligned; need to compute rem | 430 | * src and dst are aligned; need to compute rem |
431 | */ | 431 | */ |
432 | .Lboth_aligned: | 432 | .Lboth_aligned: |
433 | SRL t0, len, LOG_NBYTES+3 # +3 for 8 units/iter | 433 | SRL t0, len, LOG_NBYTES+3 # +3 for 8 units/iter |
434 | beqz t0, .Lcleanup_both_aligned # len < 8*NBYTES | 434 | beqz t0, .Lcleanup_both_aligned # len < 8*NBYTES |
435 | nop | 435 | nop |
436 | SUB len, 8*NBYTES # subtract here for bgez loop | 436 | SUB len, 8*NBYTES # subtract here for bgez loop |
@@ -518,7 +518,7 @@ EXC( STORE t0, 0(dst), .Ls_exc) | |||
518 | /* | 518 | /* |
519 | * src and dst are aligned, need to copy rem bytes (rem < NBYTES) | 519 | * src and dst are aligned, need to copy rem bytes (rem < NBYTES) |
520 | * A loop would do only a byte at a time with possible branch | 520 | * A loop would do only a byte at a time with possible branch |
521 | * mispredicts. Can't do an explicit LOAD dst,mask,or,STORE | 521 | * mispredicts. Can't do an explicit LOAD dst,mask,or,STORE |
522 | * because can't assume read-access to dst. Instead, use | 522 | * because can't assume read-access to dst. Instead, use |
523 | * STREST dst, which doesn't require read access to dst. | 523 | * STREST dst, which doesn't require read access to dst. |
524 | * | 524 | * |
@@ -532,7 +532,7 @@ EXC( STORE t0, 0(dst), .Ls_exc) | |||
532 | li bits, 8*NBYTES | 532 | li bits, 8*NBYTES |
533 | SLL rem, len, 3 # rem = number of bits to keep | 533 | SLL rem, len, 3 # rem = number of bits to keep |
534 | EXC( LOAD t0, 0(src), .Ll_exc) | 534 | EXC( LOAD t0, 0(src), .Ll_exc) |
535 | SUB bits, bits, rem # bits = number of bits to discard | 535 | SUB bits, bits, rem # bits = number of bits to discard |
536 | SHIFT_DISCARD t0, t0, bits | 536 | SHIFT_DISCARD t0, t0, bits |
537 | EXC( STREST t0, -1(t1), .Ls_exc) | 537 | EXC( STREST t0, -1(t1), .Ls_exc) |
538 | SHIFT_DISCARD_REVERT t0, t0, bits | 538 | SHIFT_DISCARD_REVERT t0, t0, bits |
@@ -551,7 +551,7 @@ EXC( STREST t0, -1(t1), .Ls_exc) | |||
551 | * Set match = (src and dst have same alignment) | 551 | * Set match = (src and dst have same alignment) |
552 | */ | 552 | */ |
553 | #define match rem | 553 | #define match rem |
554 | EXC( LDFIRST t3, FIRST(0)(src), .Ll_exc) | 554 | EXC( LDFIRST t3, FIRST(0)(src), .Ll_exc) |
555 | ADD t2, zero, NBYTES | 555 | ADD t2, zero, NBYTES |
556 | EXC( LDREST t3, REST(0)(src), .Ll_exc_copy) | 556 | EXC( LDREST t3, REST(0)(src), .Ll_exc_copy) |
557 | SUB t2, t2, t1 # t2 = number of bytes copied | 557 | SUB t2, t2, t1 # t2 = number of bytes copied |
@@ -568,9 +568,9 @@ EXC( STFIRST t3, FIRST(0)(dst), .Ls_exc) | |||
568 | ADD src, src, t2 | 568 | ADD src, src, t2 |
569 | 569 | ||
570 | .Lsrc_unaligned_dst_aligned: | 570 | .Lsrc_unaligned_dst_aligned: |
571 | SRL t0, len, LOG_NBYTES+2 # +2 for 4 units/iter | 571 | SRL t0, len, LOG_NBYTES+2 # +2 for 4 units/iter |
572 | beqz t0, .Lcleanup_src_unaligned | 572 | beqz t0, .Lcleanup_src_unaligned |
573 | and rem, len, (4*NBYTES-1) # rem = len % 4*NBYTES | 573 | and rem, len, (4*NBYTES-1) # rem = len % 4*NBYTES |
574 | 1: | 574 | 1: |
575 | /* | 575 | /* |
576 | * Avoid consecutive LD*'s to the same register since some mips | 576 | * Avoid consecutive LD*'s to the same register since some mips |
@@ -578,13 +578,13 @@ EXC( STFIRST t3, FIRST(0)(dst), .Ls_exc) | |||
578 | * It's OK to load FIRST(N+1) before REST(N) because the two addresses | 578 | * It's OK to load FIRST(N+1) before REST(N) because the two addresses |
579 | * are to the same unit (unless src is aligned, but it's not). | 579 | * are to the same unit (unless src is aligned, but it's not). |
580 | */ | 580 | */ |
581 | EXC( LDFIRST t0, FIRST(0)(src), .Ll_exc) | 581 | EXC( LDFIRST t0, FIRST(0)(src), .Ll_exc) |
582 | EXC( LDFIRST t1, FIRST(1)(src), .Ll_exc_copy) | 582 | EXC( LDFIRST t1, FIRST(1)(src), .Ll_exc_copy) |
583 | SUB len, len, 4*NBYTES | 583 | SUB len, len, 4*NBYTES |
584 | EXC( LDREST t0, REST(0)(src), .Ll_exc_copy) | 584 | EXC( LDREST t0, REST(0)(src), .Ll_exc_copy) |
585 | EXC( LDREST t1, REST(1)(src), .Ll_exc_copy) | 585 | EXC( LDREST t1, REST(1)(src), .Ll_exc_copy) |
586 | EXC( LDFIRST t2, FIRST(2)(src), .Ll_exc_copy) | 586 | EXC( LDFIRST t2, FIRST(2)(src), .Ll_exc_copy) |
587 | EXC( LDFIRST t3, FIRST(3)(src), .Ll_exc_copy) | 587 | EXC( LDFIRST t3, FIRST(3)(src), .Ll_exc_copy) |
588 | EXC( LDREST t2, REST(2)(src), .Ll_exc_copy) | 588 | EXC( LDREST t2, REST(2)(src), .Ll_exc_copy) |
589 | EXC( LDREST t3, REST(3)(src), .Ll_exc_copy) | 589 | EXC( LDREST t3, REST(3)(src), .Ll_exc_copy) |
590 | ADD src, src, 4*NBYTES | 590 | ADD src, src, 4*NBYTES |
@@ -634,7 +634,7 @@ EXC( STORE t0, 0(dst), .Ls_exc) | |||
634 | #define SHIFT_INC -8 | 634 | #define SHIFT_INC -8 |
635 | #endif | 635 | #endif |
636 | move t2, zero # partial word | 636 | move t2, zero # partial word |
637 | li t3, SHIFT_START # shift | 637 | li t3, SHIFT_START # shift |
638 | /* use .Ll_exc_copy here to return correct sum on fault */ | 638 | /* use .Ll_exc_copy here to return correct sum on fault */ |
639 | #define COPY_BYTE(N) \ | 639 | #define COPY_BYTE(N) \ |
640 | EXC( lbu t0, N(src), .Ll_exc_copy); \ | 640 | EXC( lbu t0, N(src), .Ll_exc_copy); \ |
@@ -642,7 +642,7 @@ EXC( lbu t0, N(src), .Ll_exc_copy); \ | |||
642 | EXC( sb t0, N(dst), .Ls_exc); \ | 642 | EXC( sb t0, N(dst), .Ls_exc); \ |
643 | SLLV t0, t0, t3; \ | 643 | SLLV t0, t0, t3; \ |
644 | addu t3, SHIFT_INC; \ | 644 | addu t3, SHIFT_INC; \ |
645 | beqz len, .Lcopy_bytes_done; \ | 645 | beqz len, .Lcopy_bytes_done; \ |
646 | or t2, t0 | 646 | or t2, t0 |
647 | 647 | ||
648 | COPY_BYTE(0) | 648 | COPY_BYTE(0) |
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c index 288f7954988d..44713af15a62 100644 --- a/arch/mips/lib/delay.c +++ b/arch/mips/lib/delay.c | |||
@@ -36,7 +36,7 @@ EXPORT_SYMBOL(__delay); | |||
36 | * Division by multiplication: you don't have to worry about | 36 | * Division by multiplication: you don't have to worry about |
37 | * loss of precision. | 37 | * loss of precision. |
38 | * | 38 | * |
39 | * Use only for very small delays ( < 1 msec). Should probably use a | 39 | * Use only for very small delays ( < 1 msec). Should probably use a |
40 | * lookup table, really, as the multiplications take much too long with | 40 | * lookup table, really, as the multiplications take much too long with |
41 | * short delays. This is a "reasonable" implementation, though (and the | 41 | * short delays. This is a "reasonable" implementation, though (and the |
42 | * first constant multiplications gets optimized away if the delay is | 42 | * first constant multiplications gets optimized away if the delay is |
diff --git a/arch/mips/lib/dump_tlb.c b/arch/mips/lib/dump_tlb.c index a99c1d3fc567..32b9f21bfd85 100644 --- a/arch/mips/lib/dump_tlb.c +++ b/arch/mips/lib/dump_tlb.c | |||
@@ -63,7 +63,7 @@ static void dump_tlb(int first, int last) | |||
63 | tlb_read(); | 63 | tlb_read(); |
64 | BARRIER(); | 64 | BARRIER(); |
65 | pagemask = read_c0_pagemask(); | 65 | pagemask = read_c0_pagemask(); |
66 | entryhi = read_c0_entryhi(); | 66 | entryhi = read_c0_entryhi(); |
67 | entrylo0 = read_c0_entrylo0(); | 67 | entrylo0 = read_c0_entrylo0(); |
68 | entrylo1 = read_c0_entrylo1(); | 68 | entrylo1 = read_c0_entrylo1(); |
69 | 69 | ||
diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S index 65192c06781e..c5c40dad0bbf 100644 --- a/arch/mips/lib/memcpy.S +++ b/arch/mips/lib/memcpy.S | |||
@@ -156,15 +156,15 @@ | |||
156 | 156 | ||
157 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 157 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
158 | #define LDFIRST LOADR | 158 | #define LDFIRST LOADR |
159 | #define LDREST LOADL | 159 | #define LDREST LOADL |
160 | #define STFIRST STORER | 160 | #define STFIRST STORER |
161 | #define STREST STOREL | 161 | #define STREST STOREL |
162 | #define SHIFT_DISCARD SLLV | 162 | #define SHIFT_DISCARD SLLV |
163 | #else | 163 | #else |
164 | #define LDFIRST LOADL | 164 | #define LDFIRST LOADL |
165 | #define LDREST LOADR | 165 | #define LDREST LOADR |
166 | #define STFIRST STOREL | 166 | #define STFIRST STOREL |
167 | #define STREST STORER | 167 | #define STREST STORER |
168 | #define SHIFT_DISCARD SRLV | 168 | #define SHIFT_DISCARD SRLV |
169 | #endif | 169 | #endif |
170 | 170 | ||
@@ -235,7 +235,7 @@ __copy_user_common: | |||
235 | * src and dst are aligned; need to compute rem | 235 | * src and dst are aligned; need to compute rem |
236 | */ | 236 | */ |
237 | .Lboth_aligned: | 237 | .Lboth_aligned: |
238 | SRL t0, len, LOG_NBYTES+3 # +3 for 8 units/iter | 238 | SRL t0, len, LOG_NBYTES+3 # +3 for 8 units/iter |
239 | beqz t0, .Lcleanup_both_aligned # len < 8*NBYTES | 239 | beqz t0, .Lcleanup_both_aligned # len < 8*NBYTES |
240 | and rem, len, (8*NBYTES-1) # rem = len % (8*NBYTES) | 240 | and rem, len, (8*NBYTES-1) # rem = len % (8*NBYTES) |
241 | PREF( 0, 3*32(src) ) | 241 | PREF( 0, 3*32(src) ) |
@@ -313,7 +313,7 @@ EXC( STORE t0, 0(dst), .Ls_exc_p1u) | |||
313 | /* | 313 | /* |
314 | * src and dst are aligned, need to copy rem bytes (rem < NBYTES) | 314 | * src and dst are aligned, need to copy rem bytes (rem < NBYTES) |
315 | * A loop would do only a byte at a time with possible branch | 315 | * A loop would do only a byte at a time with possible branch |
316 | * mispredicts. Can't do an explicit LOAD dst,mask,or,STORE | 316 | * mispredicts. Can't do an explicit LOAD dst,mask,or,STORE |
317 | * because can't assume read-access to dst. Instead, use | 317 | * because can't assume read-access to dst. Instead, use |
318 | * STREST dst, which doesn't require read access to dst. | 318 | * STREST dst, which doesn't require read access to dst. |
319 | * | 319 | * |
@@ -327,7 +327,7 @@ EXC( STORE t0, 0(dst), .Ls_exc_p1u) | |||
327 | li bits, 8*NBYTES | 327 | li bits, 8*NBYTES |
328 | SLL rem, len, 3 # rem = number of bits to keep | 328 | SLL rem, len, 3 # rem = number of bits to keep |
329 | EXC( LOAD t0, 0(src), .Ll_exc) | 329 | EXC( LOAD t0, 0(src), .Ll_exc) |
330 | SUB bits, bits, rem # bits = number of bits to discard | 330 | SUB bits, bits, rem # bits = number of bits to discard |
331 | SHIFT_DISCARD t0, t0, bits | 331 | SHIFT_DISCARD t0, t0, bits |
332 | EXC( STREST t0, -1(t1), .Ls_exc) | 332 | EXC( STREST t0, -1(t1), .Ls_exc) |
333 | jr ra | 333 | jr ra |
@@ -343,7 +343,7 @@ EXC( STREST t0, -1(t1), .Ls_exc) | |||
343 | * Set match = (src and dst have same alignment) | 343 | * Set match = (src and dst have same alignment) |
344 | */ | 344 | */ |
345 | #define match rem | 345 | #define match rem |
346 | EXC( LDFIRST t3, FIRST(0)(src), .Ll_exc) | 346 | EXC( LDFIRST t3, FIRST(0)(src), .Ll_exc) |
347 | ADD t2, zero, NBYTES | 347 | ADD t2, zero, NBYTES |
348 | EXC( LDREST t3, REST(0)(src), .Ll_exc_copy) | 348 | EXC( LDREST t3, REST(0)(src), .Ll_exc_copy) |
349 | SUB t2, t2, t1 # t2 = number of bytes copied | 349 | SUB t2, t2, t1 # t2 = number of bytes copied |
@@ -357,10 +357,10 @@ EXC( STFIRST t3, FIRST(0)(dst), .Ls_exc) | |||
357 | ADD src, src, t2 | 357 | ADD src, src, t2 |
358 | 358 | ||
359 | .Lsrc_unaligned_dst_aligned: | 359 | .Lsrc_unaligned_dst_aligned: |
360 | SRL t0, len, LOG_NBYTES+2 # +2 for 4 units/iter | 360 | SRL t0, len, LOG_NBYTES+2 # +2 for 4 units/iter |
361 | PREF( 0, 3*32(src) ) | 361 | PREF( 0, 3*32(src) ) |
362 | beqz t0, .Lcleanup_src_unaligned | 362 | beqz t0, .Lcleanup_src_unaligned |
363 | and rem, len, (4*NBYTES-1) # rem = len % 4*NBYTES | 363 | and rem, len, (4*NBYTES-1) # rem = len % 4*NBYTES |
364 | PREF( 1, 3*32(dst) ) | 364 | PREF( 1, 3*32(dst) ) |
365 | 1: | 365 | 1: |
366 | /* | 366 | /* |
@@ -370,13 +370,13 @@ EXC( STFIRST t3, FIRST(0)(dst), .Ls_exc) | |||
370 | * are to the same unit (unless src is aligned, but it's not). | 370 | * are to the same unit (unless src is aligned, but it's not). |
371 | */ | 371 | */ |
372 | R10KCBARRIER(0(ra)) | 372 | R10KCBARRIER(0(ra)) |
373 | EXC( LDFIRST t0, FIRST(0)(src), .Ll_exc) | 373 | EXC( LDFIRST t0, FIRST(0)(src), .Ll_exc) |
374 | EXC( LDFIRST t1, FIRST(1)(src), .Ll_exc_copy) | 374 | EXC( LDFIRST t1, FIRST(1)(src), .Ll_exc_copy) |
375 | SUB len, len, 4*NBYTES | 375 | SUB len, len, 4*NBYTES |
376 | EXC( LDREST t0, REST(0)(src), .Ll_exc_copy) | 376 | EXC( LDREST t0, REST(0)(src), .Ll_exc_copy) |
377 | EXC( LDREST t1, REST(1)(src), .Ll_exc_copy) | 377 | EXC( LDREST t1, REST(1)(src), .Ll_exc_copy) |
378 | EXC( LDFIRST t2, FIRST(2)(src), .Ll_exc_copy) | 378 | EXC( LDFIRST t2, FIRST(2)(src), .Ll_exc_copy) |
379 | EXC( LDFIRST t3, FIRST(3)(src), .Ll_exc_copy) | 379 | EXC( LDFIRST t3, FIRST(3)(src), .Ll_exc_copy) |
380 | EXC( LDREST t2, REST(2)(src), .Ll_exc_copy) | 380 | EXC( LDREST t2, REST(2)(src), .Ll_exc_copy) |
381 | EXC( LDREST t3, REST(3)(src), .Ll_exc_copy) | 381 | EXC( LDREST t3, REST(3)(src), .Ll_exc_copy) |
382 | PREF( 0, 9*32(src) ) # 0 is PREF_LOAD (not streamed) | 382 | PREF( 0, 9*32(src) ) # 0 is PREF_LOAD (not streamed) |
@@ -388,7 +388,7 @@ EXC( STORE t0, UNIT(0)(dst), .Ls_exc_p4u) | |||
388 | EXC( STORE t1, UNIT(1)(dst), .Ls_exc_p3u) | 388 | EXC( STORE t1, UNIT(1)(dst), .Ls_exc_p3u) |
389 | EXC( STORE t2, UNIT(2)(dst), .Ls_exc_p2u) | 389 | EXC( STORE t2, UNIT(2)(dst), .Ls_exc_p2u) |
390 | EXC( STORE t3, UNIT(3)(dst), .Ls_exc_p1u) | 390 | EXC( STORE t3, UNIT(3)(dst), .Ls_exc_p1u) |
391 | PREF( 1, 9*32(dst) ) # 1 is PREF_STORE (not streamed) | 391 | PREF( 1, 9*32(dst) ) # 1 is PREF_STORE (not streamed) |
392 | .set reorder /* DADDI_WAR */ | 392 | .set reorder /* DADDI_WAR */ |
393 | ADD dst, dst, 4*NBYTES | 393 | ADD dst, dst, 4*NBYTES |
394 | bne len, rem, 1b | 394 | bne len, rem, 1b |
@@ -502,7 +502,7 @@ EXC( lb t1, 0(src), .Ll_exc) | |||
502 | 502 | ||
503 | 503 | ||
504 | #define SEXC(n) \ | 504 | #define SEXC(n) \ |
505 | .set reorder; /* DADDI_WAR */ \ | 505 | .set reorder; /* DADDI_WAR */ \ |
506 | .Ls_exc_p ## n ## u: \ | 506 | .Ls_exc_p ## n ## u: \ |
507 | ADD len, len, n*NBYTES; \ | 507 | ADD len, len, n*NBYTES; \ |
508 | jr ra; \ | 508 | jr ra; \ |
diff --git a/arch/mips/lib/memset.S b/arch/mips/lib/memset.S index 606c8a9efe3b..053d3b0b0317 100644 --- a/arch/mips/lib/memset.S +++ b/arch/mips/lib/memset.S | |||
@@ -21,8 +21,8 @@ | |||
21 | 21 | ||
22 | #define EX(insn,reg,addr,handler) \ | 22 | #define EX(insn,reg,addr,handler) \ |
23 | 9: insn reg, addr; \ | 23 | 9: insn reg, addr; \ |
24 | .section __ex_table,"a"; \ | 24 | .section __ex_table,"a"; \ |
25 | PTR 9b, handler; \ | 25 | PTR 9b, handler; \ |
26 | .previous | 26 | .previous |
27 | 27 | ||
28 | .macro f_fill64 dst, offset, val, fixup | 28 | .macro f_fill64 dst, offset, val, fixup |
diff --git a/arch/mips/lib/r3k_dump_tlb.c b/arch/mips/lib/r3k_dump_tlb.c index 9cee907975ae..91615c2ef0cf 100644 --- a/arch/mips/lib/r3k_dump_tlb.c +++ b/arch/mips/lib/r3k_dump_tlb.c | |||
@@ -30,7 +30,7 @@ static void dump_tlb(int first, int last) | |||
30 | "tlbr\n\t" | 30 | "tlbr\n\t" |
31 | "nop\n\t" | 31 | "nop\n\t" |
32 | ".set\treorder"); | 32 | ".set\treorder"); |
33 | entryhi = read_c0_entryhi(); | 33 | entryhi = read_c0_entryhi(); |
34 | entrylo0 = read_c0_entrylo0(); | 34 | entrylo0 = read_c0_entrylo0(); |
35 | 35 | ||
36 | /* Unused entries have a virtual address of KSEG0. */ | 36 | /* Unused entries have a virtual address of KSEG0. */ |
diff --git a/arch/mips/lib/strncpy_user.S b/arch/mips/lib/strncpy_user.S index 7201b2ff08c8..bad539487503 100644 --- a/arch/mips/lib/strncpy_user.S +++ b/arch/mips/lib/strncpy_user.S | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | /* | 24 | /* |
25 | * Ugly special case have to check: we might get passed a user space | 25 | * Ugly special case have to check: we might get passed a user space |
26 | * pointer which wraps into the kernel space. We don't deal with that. If | 26 | * pointer which wraps into the kernel space. We don't deal with that. If |
27 | * it happens at most some bytes of the exceptions handlers will be copied. | 27 | * it happens at most some bytes of the exceptions handlers will be copied. |
28 | */ | 28 | */ |
29 | 29 | ||
diff --git a/arch/mips/lib/strnlen_user.S b/arch/mips/lib/strnlen_user.S index 64457162f7e0..beea03c8c0ce 100644 --- a/arch/mips/lib/strnlen_user.S +++ b/arch/mips/lib/strnlen_user.S | |||
@@ -21,9 +21,9 @@ | |||
21 | * maximum of a1 or 0 in case of error. | 21 | * maximum of a1 or 0 in case of error. |
22 | * | 22 | * |
23 | * Note: for performance reasons we deliberately accept that a user may | 23 | * Note: for performance reasons we deliberately accept that a user may |
24 | * make strlen_user and strnlen_user access the first few KSEG0 | 24 | * make strlen_user and strnlen_user access the first few KSEG0 |
25 | * bytes. There's nothing secret there. On 64-bit accessing beyond | 25 | * bytes. There's nothing secret there. On 64-bit accessing beyond |
26 | * the maximum is a tad hairier ... | 26 | * the maximum is a tad hairier ... |
27 | */ | 27 | */ |
28 | LEAF(__strnlen_user_asm) | 28 | LEAF(__strnlen_user_asm) |
29 | LONG_L v0, TI_ADDR_LIMIT($28) # pointer ok? | 29 | LONG_L v0, TI_ADDR_LIMIT($28) # pointer ok? |
diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c index a6d1c77034d5..65e3dfc4e585 100644 --- a/arch/mips/lib/uncached.c +++ b/arch/mips/lib/uncached.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2005 Thiemo Seufer | 6 | * Copyright (C) 2005 Thiemo Seufer |
7 | * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. | 7 | * Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved. |
8 | * Author: Maciej W. Rozycki <macro@mips.com> | 8 | * Author: Maciej W. Rozycki <macro@mips.com> |
9 | */ | 9 | */ |
10 | 10 | ||
diff --git a/arch/mips/loongson/Makefile b/arch/mips/loongson/Makefile index 2b76cb0fb07d..0dc0055754cd 100644 --- a/arch/mips/loongson/Makefile +++ b/arch/mips/loongson/Makefile | |||
@@ -8,7 +8,7 @@ obj-$(CONFIG_MACH_LOONGSON) += common/ | |||
8 | # Lemote Fuloong mini-PC (Loongson 2E-based) | 8 | # Lemote Fuloong mini-PC (Loongson 2E-based) |
9 | # | 9 | # |
10 | 10 | ||
11 | obj-$(CONFIG_LEMOTE_FULOONG2E) += fuloong-2e/ | 11 | obj-$(CONFIG_LEMOTE_FULOONG2E) += fuloong-2e/ |
12 | 12 | ||
13 | # | 13 | # |
14 | # Lemote loongson2f family machines | 14 | # Lemote loongson2f family machines |
diff --git a/arch/mips/loongson/common/bonito-irq.c b/arch/mips/loongson/common/bonito-irq.c index f27d7ccca92a..cc0e4fd548e6 100644 --- a/arch/mips/loongson/common/bonito-irq.c +++ b/arch/mips/loongson/common/bonito-irq.c | |||
@@ -6,9 +6,9 @@ | |||
6 | * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology | 6 | * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology |
7 | * Author: Fuxin Zhang, zhangfx@lemote.com | 7 | * Author: Fuxin Zhang, zhangfx@lemote.com |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
11 | * Free Software Foundation; either version 2 of the License, or (at your | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * option) any later version. | 12 | * option) any later version. |
13 | */ | 13 | */ |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
diff --git a/arch/mips/loongson/common/cmdline.c b/arch/mips/loongson/common/cmdline.c index 353e1d2e41a5..72fed003a536 100644 --- a/arch/mips/loongson/common/cmdline.c +++ b/arch/mips/loongson/common/cmdline.c | |||
@@ -12,8 +12,8 @@ | |||
12 | * Copyright (C) 2009 Lemote Inc. | 12 | * Copyright (C) 2009 Lemote Inc. |
13 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 13 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
14 | * | 14 | * |
15 | * This program is free software; you can redistribute it and/or modify it | 15 | * This program is free software; you can redistribute it and/or modify it |
16 | * under the terms of the GNU General Public License as published by the | 16 | * under the terms of the GNU General Public License as published by the |
17 | * Free Software Foundation; either version 2 of the License, or (at your | 17 | * Free Software Foundation; either version 2 of the License, or (at your |
18 | * option) any later version. | 18 | * option) any later version. |
19 | */ | 19 | */ |
diff --git a/arch/mips/loongson/common/cs5536/cs5536_acc.c b/arch/mips/loongson/common/cs5536/cs5536_acc.c index b3fd5eab6548..ab4d6cc57384 100644 --- a/arch/mips/loongson/common/cs5536/cs5536_acc.c +++ b/arch/mips/loongson/common/cs5536/cs5536_acc.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * Copyright (C) 2009 Lemote, Inc. | 7 | * Copyright (C) 2009 Lemote, Inc. |
8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
13 | * option) any later version. | 13 | * option) any later version. |
14 | */ | 14 | */ |
diff --git a/arch/mips/loongson/common/cs5536/cs5536_ehci.c b/arch/mips/loongson/common/cs5536/cs5536_ehci.c index 5b5cbba699b3..ec2e360267a8 100644 --- a/arch/mips/loongson/common/cs5536/cs5536_ehci.c +++ b/arch/mips/loongson/common/cs5536/cs5536_ehci.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * Copyright (C) 2009 Lemote, Inc. | 7 | * Copyright (C) 2009 Lemote, Inc. |
8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
13 | * option) any later version. | 13 | * option) any later version. |
14 | */ | 14 | */ |
diff --git a/arch/mips/loongson/common/cs5536/cs5536_ide.c b/arch/mips/loongson/common/cs5536/cs5536_ide.c index 681d1291a2c7..a73414d9ee51 100644 --- a/arch/mips/loongson/common/cs5536/cs5536_ide.c +++ b/arch/mips/loongson/common/cs5536/cs5536_ide.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * Copyright (C) 2009 Lemote, Inc. | 7 | * Copyright (C) 2009 Lemote, Inc. |
8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
13 | * option) any later version. | 13 | * option) any later version. |
14 | */ | 14 | */ |
diff --git a/arch/mips/loongson/common/cs5536/cs5536_isa.c b/arch/mips/loongson/common/cs5536/cs5536_isa.c index 4d9f65abeaff..a6eb2e853d94 100644 --- a/arch/mips/loongson/common/cs5536/cs5536_isa.c +++ b/arch/mips/loongson/common/cs5536/cs5536_isa.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * Copyright (C) 2009 Lemote, Inc. | 7 | * Copyright (C) 2009 Lemote, Inc. |
8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
13 | * option) any later version. | 13 | * option) any later version. |
14 | */ | 14 | */ |
diff --git a/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c b/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c index 5d1f48fa1a52..c639b9db0012 100644 --- a/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c +++ b/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c | |||
@@ -9,9 +9,9 @@ | |||
9 | * | 9 | * |
10 | * Reference: AMD Geode(TM) CS5536 Companion Device Data Book | 10 | * Reference: AMD Geode(TM) CS5536 Companion Device Data Book |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
14 | * Free Software Foundation; either version 2 of the License, or (at your | 14 | * Free Software Foundation; either version 2 of the License, or (at your |
15 | * option) any later version. | 15 | * option) any later version. |
16 | */ | 16 | */ |
17 | 17 | ||
diff --git a/arch/mips/loongson/common/cs5536/cs5536_ohci.c b/arch/mips/loongson/common/cs5536/cs5536_ohci.c index bdedf512baf7..f7c905e50dc4 100644 --- a/arch/mips/loongson/common/cs5536/cs5536_ohci.c +++ b/arch/mips/loongson/common/cs5536/cs5536_ohci.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * Copyright (C) 2009 Lemote, Inc. | 7 | * Copyright (C) 2009 Lemote, Inc. |
8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
13 | * option) any later version. | 13 | * option) any later version. |
14 | */ | 14 | */ |
diff --git a/arch/mips/loongson/common/cs5536/cs5536_pci.c b/arch/mips/loongson/common/cs5536/cs5536_pci.c index 6dfeab11af08..81bed9d18061 100644 --- a/arch/mips/loongson/common/cs5536/cs5536_pci.c +++ b/arch/mips/loongson/common/cs5536/cs5536_pci.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * Copyright (C) 2009 Lemote, Inc. | 7 | * Copyright (C) 2009 Lemote, Inc. |
8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 8 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | 14 | * |
diff --git a/arch/mips/loongson/common/early_printk.c b/arch/mips/loongson/common/early_printk.c index a71736f00443..ced461b39069 100644 --- a/arch/mips/loongson/common/early_printk.c +++ b/arch/mips/loongson/common/early_printk.c | |||
@@ -4,9 +4,9 @@ | |||
4 | * Copyright (c) 2009 Lemote Inc. | 4 | * Copyright (c) 2009 Lemote Inc. |
5 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 5 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
9 | * Free Software Foundation; either version 2 of the License, or (at your | 9 | * Free Software Foundation; either version 2 of the License, or (at your |
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
12 | #include <linux/serial_reg.h> | 12 | #include <linux/serial_reg.h> |
diff --git a/arch/mips/loongson/common/env.c b/arch/mips/loongson/common/env.c index d93830ad6113..0a18fcf2d372 100644 --- a/arch/mips/loongson/common/env.c +++ b/arch/mips/loongson/common/env.c | |||
@@ -12,8 +12,8 @@ | |||
12 | * Copyright (C) 2009 Lemote Inc. | 12 | * Copyright (C) 2009 Lemote Inc. |
13 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 13 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
14 | * | 14 | * |
15 | * This program is free software; you can redistribute it and/or modify it | 15 | * This program is free software; you can redistribute it and/or modify it |
16 | * under the terms of the GNU General Public License as published by the | 16 | * under the terms of the GNU General Public License as published by the |
17 | * Free Software Foundation; either version 2 of the License, or (at your | 17 | * Free Software Foundation; either version 2 of the License, or (at your |
18 | * option) any later version. | 18 | * option) any later version. |
19 | */ | 19 | */ |
diff --git a/arch/mips/loongson/common/gpio.c b/arch/mips/loongson/common/gpio.c index e8a0ffa935b4..21869908aaa4 100644 --- a/arch/mips/loongson/common/gpio.c +++ b/arch/mips/loongson/common/gpio.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * STLS2F GPIO Support | 2 | * STLS2F GPIO Support |
3 | * | 3 | * |
4 | * Copyright (c) 2008 Richard Liu, STMicroelectronics <richard.liu@st.com> | 4 | * Copyright (c) 2008 Richard Liu, STMicroelectronics <richard.liu@st.com> |
5 | * Copyright (c) 2008-2010 Arnaud Patard <apatard@mandriva.com> | 5 | * Copyright (c) 2008-2010 Arnaud Patard <apatard@mandriva.com> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -123,13 +123,13 @@ static void ls2f_gpio_set_value(struct gpio_chip *chip, | |||
123 | } | 123 | } |
124 | 124 | ||
125 | static struct gpio_chip ls2f_chip = { | 125 | static struct gpio_chip ls2f_chip = { |
126 | .label = "ls2f", | 126 | .label = "ls2f", |
127 | .direction_input = ls2f_gpio_direction_input, | 127 | .direction_input = ls2f_gpio_direction_input, |
128 | .get = ls2f_gpio_get_value, | 128 | .get = ls2f_gpio_get_value, |
129 | .direction_output = ls2f_gpio_direction_output, | 129 | .direction_output = ls2f_gpio_direction_output, |
130 | .set = ls2f_gpio_set_value, | 130 | .set = ls2f_gpio_set_value, |
131 | .base = 0, | 131 | .base = 0, |
132 | .ngpio = STLS2F_N_GPIO, | 132 | .ngpio = STLS2F_N_GPIO, |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static int __init ls2f_gpio_setup(void) | 135 | static int __init ls2f_gpio_setup(void) |
diff --git a/arch/mips/loongson/common/init.c b/arch/mips/loongson/common/init.c index 19d341591254..ae7af1fd5d59 100644 --- a/arch/mips/loongson/common/init.c +++ b/arch/mips/loongson/common/init.c | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote Inc. | 2 | * Copyright (C) 2009 Lemote Inc. |
3 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 3 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
diff --git a/arch/mips/loongson/common/irq.c b/arch/mips/loongson/common/irq.c index 5897471dedca..687003b19b45 100644 --- a/arch/mips/loongson/common/irq.c +++ b/arch/mips/loongson/common/irq.c | |||
@@ -2,9 +2,9 @@ | |||
2 | * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology | 2 | * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology |
3 | * Author: Fuxin Zhang, zhangfx@lemote.com | 3 | * Author: Fuxin Zhang, zhangfx@lemote.com |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
diff --git a/arch/mips/loongson/common/machtype.c b/arch/mips/loongson/common/machtype.c index 2efd5d9dee27..4becd4f9ef2e 100644 --- a/arch/mips/loongson/common/machtype.c +++ b/arch/mips/loongson/common/machtype.c | |||
@@ -4,8 +4,8 @@ | |||
4 | * | 4 | * |
5 | * Copyright (c) 2009 Zhang Le <r0bertz@gentoo.org> | 5 | * Copyright (c) 2009 Zhang Le <r0bertz@gentoo.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
9 | * Free Software Foundation; either version 2 of the License, or (at your | 9 | * Free Software Foundation; either version 2 of the License, or (at your |
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
@@ -19,15 +19,15 @@ | |||
19 | #define MACHTYPE_LEN 50 | 19 | #define MACHTYPE_LEN 50 |
20 | 20 | ||
21 | static const char *system_types[] = { | 21 | static const char *system_types[] = { |
22 | [MACH_LOONGSON_UNKNOWN] "unknown loongson machine", | 22 | [MACH_LOONGSON_UNKNOWN] "unknown loongson machine", |
23 | [MACH_LEMOTE_FL2E] "lemote-fuloong-2e-box", | 23 | [MACH_LEMOTE_FL2E] "lemote-fuloong-2e-box", |
24 | [MACH_LEMOTE_FL2F] "lemote-fuloong-2f-box", | 24 | [MACH_LEMOTE_FL2F] "lemote-fuloong-2f-box", |
25 | [MACH_LEMOTE_ML2F7] "lemote-mengloong-2f-7inches", | 25 | [MACH_LEMOTE_ML2F7] "lemote-mengloong-2f-7inches", |
26 | [MACH_LEMOTE_YL2F89] "lemote-yeeloong-2f-8.9inches", | 26 | [MACH_LEMOTE_YL2F89] "lemote-yeeloong-2f-8.9inches", |
27 | [MACH_DEXXON_GDIUM2F10] "dexxon-gdium-2f", | 27 | [MACH_DEXXON_GDIUM2F10] "dexxon-gdium-2f", |
28 | [MACH_LEMOTE_NAS] "lemote-nas-2f", | 28 | [MACH_LEMOTE_NAS] "lemote-nas-2f", |
29 | [MACH_LEMOTE_LL2F] "lemote-lynloong-2f", | 29 | [MACH_LEMOTE_LL2F] "lemote-lynloong-2f", |
30 | [MACH_LOONGSON_END] NULL, | 30 | [MACH_LOONGSON_END] NULL, |
31 | }; | 31 | }; |
32 | 32 | ||
33 | const char *get_system_type(void) | 33 | const char *get_system_type(void) |
diff --git a/arch/mips/loongson/common/mem.c b/arch/mips/loongson/common/mem.c index 30eba6001205..8626a42f5b94 100644 --- a/arch/mips/loongson/common/mem.c +++ b/arch/mips/loongson/common/mem.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This program is free software; you can redistribute it and/or modify it | 2 | * This program is free software; you can redistribute it and/or modify it |
3 | * under the terms of the GNU General Public License as published by the | 3 | * under the terms of the GNU General Public License as published by the |
4 | * Free Software Foundation; either version 2 of the License, or (at your | 4 | * Free Software Foundation; either version 2 of the License, or (at your |
5 | * option) any later version. | 5 | * option) any later version. |
6 | */ | 6 | */ |
diff --git a/arch/mips/loongson/common/pci.c b/arch/mips/loongson/common/pci.c index 31d8c5ecd16c..fa7784459721 100644 --- a/arch/mips/loongson/common/pci.c +++ b/arch/mips/loongson/common/pci.c | |||
@@ -2,9 +2,9 @@ | |||
2 | * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology | 2 | * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology |
3 | * Author: Fuxin Zhang, zhangfx@lemote.com | 3 | * Author: Fuxin Zhang, zhangfx@lemote.com |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
@@ -13,25 +13,25 @@ | |||
13 | #include <loongson.h> | 13 | #include <loongson.h> |
14 | 14 | ||
15 | static struct resource loongson_pci_mem_resource = { | 15 | static struct resource loongson_pci_mem_resource = { |
16 | .name = "pci memory space", | 16 | .name = "pci memory space", |
17 | .start = LOONGSON_PCI_MEM_START, | 17 | .start = LOONGSON_PCI_MEM_START, |
18 | .end = LOONGSON_PCI_MEM_END, | 18 | .end = LOONGSON_PCI_MEM_END, |
19 | .flags = IORESOURCE_MEM, | 19 | .flags = IORESOURCE_MEM, |
20 | }; | 20 | }; |
21 | 21 | ||
22 | static struct resource loongson_pci_io_resource = { | 22 | static struct resource loongson_pci_io_resource = { |
23 | .name = "pci io space", | 23 | .name = "pci io space", |
24 | .start = LOONGSON_PCI_IO_START, | 24 | .start = LOONGSON_PCI_IO_START, |
25 | .end = IO_SPACE_LIMIT, | 25 | .end = IO_SPACE_LIMIT, |
26 | .flags = IORESOURCE_IO, | 26 | .flags = IORESOURCE_IO, |
27 | }; | 27 | }; |
28 | 28 | ||
29 | static struct pci_controller loongson_pci_controller = { | 29 | static struct pci_controller loongson_pci_controller = { |
30 | .pci_ops = &loongson_pci_ops, | 30 | .pci_ops = &loongson_pci_ops, |
31 | .io_resource = &loongson_pci_io_resource, | 31 | .io_resource = &loongson_pci_io_resource, |
32 | .mem_resource = &loongson_pci_mem_resource, | 32 | .mem_resource = &loongson_pci_mem_resource, |
33 | .mem_offset = 0x00000000UL, | 33 | .mem_offset = 0x00000000UL, |
34 | .io_offset = 0x00000000UL, | 34 | .io_offset = 0x00000000UL, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static void __init setup_pcimap(void) | 37 | static void __init setup_pcimap(void) |
@@ -42,7 +42,7 @@ static void __init setup_pcimap(void) | |||
42 | * we set pcimap_lo[0,1,2] to map it to pci space[0M,64M], [320M,448M] | 42 | * we set pcimap_lo[0,1,2] to map it to pci space[0M,64M], [320M,448M] |
43 | * | 43 | * |
44 | * pcimap: PCI_MAP2 PCI_Mem_Lo2 PCI_Mem_Lo1 PCI_Mem_Lo0 | 44 | * pcimap: PCI_MAP2 PCI_Mem_Lo2 PCI_Mem_Lo1 PCI_Mem_Lo0 |
45 | * [<2G] [384M,448M] [320M,384M] [0M,64M] | 45 | * [<2G] [384M,448M] [320M,384M] [0M,64M] |
46 | */ | 46 | */ |
47 | LOONGSON_PCIMAP = LOONGSON_PCIMAP_PCIMAP_2 | | 47 | LOONGSON_PCIMAP = LOONGSON_PCIMAP_PCIMAP_2 | |
48 | LOONGSON_PCIMAP_WIN(2, LOONGSON_PCILO2_BASE) | | 48 | LOONGSON_PCIMAP_WIN(2, LOONGSON_PCILO2_BASE) | |
diff --git a/arch/mips/loongson/common/platform.c b/arch/mips/loongson/common/platform.c index 502b059de422..0ed38321a9a2 100644 --- a/arch/mips/loongson/common/platform.c +++ b/arch/mips/loongson/common/platform.c | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote Inc. | 2 | * Copyright (C) 2009 Lemote Inc. |
3 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 3 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
diff --git a/arch/mips/loongson/common/reset.c b/arch/mips/loongson/common/reset.c index 9e10d6225d9b..35c8c6468494 100644 --- a/arch/mips/loongson/common/reset.c +++ b/arch/mips/loongson/common/reset.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This program is free software; you can redistribute it and/or modify it | 2 | * This program is free software; you can redistribute it and/or modify it |
3 | * under the terms of the GNU General Public License as published by the | 3 | * under the terms of the GNU General Public License as published by the |
4 | * Free Software Foundation; either version 2 of the License, or (at your | 4 | * Free Software Foundation; either version 2 of the License, or (at your |
5 | * option) any later version. | 5 | * option) any later version. |
6 | * | 6 | * |
@@ -26,9 +26,9 @@ static inline void loongson_reboot(void) | |||
26 | func = (void *)ioremap_nocache(LOONGSON_BOOT_BASE, 4); | 26 | func = (void *)ioremap_nocache(LOONGSON_BOOT_BASE, 4); |
27 | 27 | ||
28 | __asm__ __volatile__( | 28 | __asm__ __volatile__( |
29 | " .set noat \n" | 29 | " .set noat \n" |
30 | " jr %[func] \n" | 30 | " jr %[func] \n" |
31 | " .set at \n" | 31 | " .set at \n" |
32 | : /* No outputs */ | 32 | : /* No outputs */ |
33 | : [func] "r" (func)); | 33 | : [func] "r" (func)); |
34 | #endif | 34 | #endif |
diff --git a/arch/mips/loongson/common/serial.c b/arch/mips/loongson/common/serial.c index 7580873143c8..5f2b78ae97cc 100644 --- a/arch/mips/loongson/common/serial.c +++ b/arch/mips/loongson/common/serial.c | |||
@@ -39,15 +39,15 @@ | |||
39 | } | 39 | } |
40 | 40 | ||
41 | static struct plat_serial8250_port uart8250_data[][2] = { | 41 | static struct plat_serial8250_port uart8250_data[][2] = { |
42 | [MACH_LOONGSON_UNKNOWN] {}, | 42 | [MACH_LOONGSON_UNKNOWN] {}, |
43 | [MACH_LEMOTE_FL2E] {PORT(4), {} }, | 43 | [MACH_LEMOTE_FL2E] {PORT(4), {} }, |
44 | [MACH_LEMOTE_FL2F] {PORT(3), {} }, | 44 | [MACH_LEMOTE_FL2F] {PORT(3), {} }, |
45 | [MACH_LEMOTE_ML2F7] {PORT_M(3), {} }, | 45 | [MACH_LEMOTE_ML2F7] {PORT_M(3), {} }, |
46 | [MACH_LEMOTE_YL2F89] {PORT_M(3), {} }, | 46 | [MACH_LEMOTE_YL2F89] {PORT_M(3), {} }, |
47 | [MACH_DEXXON_GDIUM2F10] {PORT_M(3), {} }, | 47 | [MACH_DEXXON_GDIUM2F10] {PORT_M(3), {} }, |
48 | [MACH_LEMOTE_NAS] {PORT_M(3), {} }, | 48 | [MACH_LEMOTE_NAS] {PORT_M(3), {} }, |
49 | [MACH_LEMOTE_LL2F] {PORT(3), {} }, | 49 | [MACH_LEMOTE_LL2F] {PORT(3), {} }, |
50 | [MACH_LOONGSON_END] {}, | 50 | [MACH_LOONGSON_END] {}, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct platform_device uart8250_device = { | 53 | static struct platform_device uart8250_device = { |
diff --git a/arch/mips/loongson/common/setup.c b/arch/mips/loongson/common/setup.c index 27d826bc7103..8223f8acfd59 100644 --- a/arch/mips/loongson/common/setup.c +++ b/arch/mips/loongson/common/setup.c | |||
@@ -2,9 +2,9 @@ | |||
2 | * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology | 2 | * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology |
3 | * Author: Fuxin Zhang, zhangfx@lemote.com | 3 | * Author: Fuxin Zhang, zhangfx@lemote.com |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
diff --git a/arch/mips/loongson/common/time.c b/arch/mips/loongson/common/time.c index 9fdd01f6c56a..262a1f65b05e 100644 --- a/arch/mips/loongson/common/time.c +++ b/arch/mips/loongson/common/time.c | |||
@@ -5,9 +5,9 @@ | |||
5 | * Copyright (C) 2009 Lemote Inc. | 5 | * Copyright (C) 2009 Lemote Inc. |
6 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 6 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 9 | * under the terms of the GNU General Public License as published by the |
10 | * Free Software Foundation; either version 2 of the License, or (at your | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
11 | * option) any later version. | 11 | * option) any later version. |
12 | */ | 12 | */ |
13 | #include <asm/mc146818-time.h> | 13 | #include <asm/mc146818-time.h> |
diff --git a/arch/mips/loongson/common/uart_base.c b/arch/mips/loongson/common/uart_base.c index d69ea54bc3d1..e192ad021edc 100644 --- a/arch/mips/loongson/common/uart_base.c +++ b/arch/mips/loongson/common/uart_base.c | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote Inc. | 2 | * Copyright (C) 2009 Lemote Inc. |
3 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 3 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
diff --git a/arch/mips/loongson/fuloong-2e/irq.c b/arch/mips/loongson/fuloong-2e/irq.c index 3cf1fef29f0e..ef5ec8f3de5f 100644 --- a/arch/mips/loongson/fuloong-2e/irq.c +++ b/arch/mips/loongson/fuloong-2e/irq.c | |||
@@ -2,9 +2,9 @@ | |||
2 | * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology | 2 | * Copyright (C) 2007 Lemote Inc. & Insititute of Computing Technology |
3 | * Author: Fuxin Zhang, zhangfx@lemote.com | 3 | * Author: Fuxin Zhang, zhangfx@lemote.com |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
@@ -48,9 +48,9 @@ static struct irqaction cascade_irqaction = { | |||
48 | void __init mach_init_irq(void) | 48 | void __init mach_init_irq(void) |
49 | { | 49 | { |
50 | /* init all controller | 50 | /* init all controller |
51 | * 0-15 ------> i8259 interrupt | 51 | * 0-15 ------> i8259 interrupt |
52 | * 16-23 ------> mips cpu interrupt | 52 | * 16-23 ------> mips cpu interrupt |
53 | * 32-63 ------> bonito irq | 53 | * 32-63 ------> bonito irq |
54 | */ | 54 | */ |
55 | 55 | ||
56 | /* most bonito irq should be level triggered */ | 56 | /* most bonito irq should be level triggered */ |
diff --git a/arch/mips/loongson/fuloong-2e/reset.c b/arch/mips/loongson/fuloong-2e/reset.c index bc39ec62c8c2..da4d2ae2a1f8 100644 --- a/arch/mips/loongson/fuloong-2e/reset.c +++ b/arch/mips/loongson/fuloong-2e/reset.c | |||
@@ -4,8 +4,8 @@ | |||
4 | * Copyright (C) 2009 Lemote Inc. | 4 | * Copyright (C) 2009 Lemote Inc. |
5 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 5 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
9 | * Free Software Foundation; either version 2 of the License, or (at your | 9 | * Free Software Foundation; either version 2 of the License, or (at your |
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
diff --git a/arch/mips/loongson/lemote-2f/ec_kb3310b.h b/arch/mips/loongson/lemote-2f/ec_kb3310b.h index 1595a21b315b..5a3f1860d4d2 100644 --- a/arch/mips/loongson/lemote-2f/ec_kb3310b.h +++ b/arch/mips/loongson/lemote-2f/ec_kb3310b.h | |||
@@ -30,141 +30,141 @@ extern sci_handler yeeloong_report_lid_status; | |||
30 | * 2, fill the PORT_LOW as EC register low part. | 30 | * 2, fill the PORT_LOW as EC register low part. |
31 | * 3, fill the PORT_DATA as EC register write data or get the data from it. | 31 | * 3, fill the PORT_DATA as EC register write data or get the data from it. |
32 | */ | 32 | */ |
33 | #define EC_IO_PORT_HIGH 0x0381 | 33 | #define EC_IO_PORT_HIGH 0x0381 |
34 | #define EC_IO_PORT_LOW 0x0382 | 34 | #define EC_IO_PORT_LOW 0x0382 |
35 | #define EC_IO_PORT_DATA 0x0383 | 35 | #define EC_IO_PORT_DATA 0x0383 |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * EC delay time is 500us for register and status access | 38 | * EC delay time is 500us for register and status access |
39 | */ | 39 | */ |
40 | #define EC_REG_DELAY 500 /* unit : us */ | 40 | #define EC_REG_DELAY 500 /* unit : us */ |
41 | #define EC_CMD_TIMEOUT 0x1000 | 41 | #define EC_CMD_TIMEOUT 0x1000 |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * EC access port for SCI communication | 44 | * EC access port for SCI communication |
45 | */ | 45 | */ |
46 | #define EC_CMD_PORT 0x66 | 46 | #define EC_CMD_PORT 0x66 |
47 | #define EC_STS_PORT 0x66 | 47 | #define EC_STS_PORT 0x66 |
48 | #define EC_DAT_PORT 0x62 | 48 | #define EC_DAT_PORT 0x62 |
49 | #define CMD_INIT_IDLE_MODE 0xdd | 49 | #define CMD_INIT_IDLE_MODE 0xdd |
50 | #define CMD_EXIT_IDLE_MODE 0xdf | 50 | #define CMD_EXIT_IDLE_MODE 0xdf |
51 | #define CMD_INIT_RESET_MODE 0xd8 | 51 | #define CMD_INIT_RESET_MODE 0xd8 |
52 | #define CMD_REBOOT_SYSTEM 0x8c | 52 | #define CMD_REBOOT_SYSTEM 0x8c |
53 | #define CMD_GET_EVENT_NUM 0x84 | 53 | #define CMD_GET_EVENT_NUM 0x84 |
54 | #define CMD_PROGRAM_PIECE 0xda | 54 | #define CMD_PROGRAM_PIECE 0xda |
55 | 55 | ||
56 | /* temperature & fan registers */ | 56 | /* temperature & fan registers */ |
57 | #define REG_TEMPERATURE_VALUE 0xF458 | 57 | #define REG_TEMPERATURE_VALUE 0xF458 |
58 | #define REG_FAN_AUTO_MAN_SWITCH 0xF459 | 58 | #define REG_FAN_AUTO_MAN_SWITCH 0xF459 |
59 | #define BIT_FAN_AUTO 0 | 59 | #define BIT_FAN_AUTO 0 |
60 | #define BIT_FAN_MANUAL 1 | 60 | #define BIT_FAN_MANUAL 1 |
61 | #define REG_FAN_CONTROL 0xF4D2 | 61 | #define REG_FAN_CONTROL 0xF4D2 |
62 | #define BIT_FAN_CONTROL_ON (1 << 0) | 62 | #define BIT_FAN_CONTROL_ON (1 << 0) |
63 | #define BIT_FAN_CONTROL_OFF (0 << 0) | 63 | #define BIT_FAN_CONTROL_OFF (0 << 0) |
64 | #define REG_FAN_STATUS 0xF4DA | 64 | #define REG_FAN_STATUS 0xF4DA |
65 | #define BIT_FAN_STATUS_ON (1 << 0) | 65 | #define BIT_FAN_STATUS_ON (1 << 0) |
66 | #define BIT_FAN_STATUS_OFF (0 << 0) | 66 | #define BIT_FAN_STATUS_OFF (0 << 0) |
67 | #define REG_FAN_SPEED_HIGH 0xFE22 | 67 | #define REG_FAN_SPEED_HIGH 0xFE22 |
68 | #define REG_FAN_SPEED_LOW 0xFE23 | 68 | #define REG_FAN_SPEED_LOW 0xFE23 |
69 | #define REG_FAN_SPEED_LEVEL 0xF4CC | 69 | #define REG_FAN_SPEED_LEVEL 0xF4CC |
70 | /* fan speed divider */ | 70 | /* fan speed divider */ |
71 | #define FAN_SPEED_DIVIDER 480000 /* (60*1000*1000/62.5/2)*/ | 71 | #define FAN_SPEED_DIVIDER 480000 /* (60*1000*1000/62.5/2)*/ |
72 | 72 | ||
73 | /* battery registers */ | 73 | /* battery registers */ |
74 | #define REG_BAT_DESIGN_CAP_HIGH 0xF77D | 74 | #define REG_BAT_DESIGN_CAP_HIGH 0xF77D |
75 | #define REG_BAT_DESIGN_CAP_LOW 0xF77E | 75 | #define REG_BAT_DESIGN_CAP_LOW 0xF77E |
76 | #define REG_BAT_FULLCHG_CAP_HIGH 0xF780 | 76 | #define REG_BAT_FULLCHG_CAP_HIGH 0xF780 |
77 | #define REG_BAT_FULLCHG_CAP_LOW 0xF781 | 77 | #define REG_BAT_FULLCHG_CAP_LOW 0xF781 |
78 | #define REG_BAT_DESIGN_VOL_HIGH 0xF782 | 78 | #define REG_BAT_DESIGN_VOL_HIGH 0xF782 |
79 | #define REG_BAT_DESIGN_VOL_LOW 0xF783 | 79 | #define REG_BAT_DESIGN_VOL_LOW 0xF783 |
80 | #define REG_BAT_CURRENT_HIGH 0xF784 | 80 | #define REG_BAT_CURRENT_HIGH 0xF784 |
81 | #define REG_BAT_CURRENT_LOW 0xF785 | 81 | #define REG_BAT_CURRENT_LOW 0xF785 |
82 | #define REG_BAT_VOLTAGE_HIGH 0xF786 | 82 | #define REG_BAT_VOLTAGE_HIGH 0xF786 |
83 | #define REG_BAT_VOLTAGE_LOW 0xF787 | 83 | #define REG_BAT_VOLTAGE_LOW 0xF787 |
84 | #define REG_BAT_TEMPERATURE_HIGH 0xF788 | 84 | #define REG_BAT_TEMPERATURE_HIGH 0xF788 |
85 | #define REG_BAT_TEMPERATURE_LOW 0xF789 | 85 | #define REG_BAT_TEMPERATURE_LOW 0xF789 |
86 | #define REG_BAT_RELATIVE_CAP_HIGH 0xF492 | 86 | #define REG_BAT_RELATIVE_CAP_HIGH 0xF492 |
87 | #define REG_BAT_RELATIVE_CAP_LOW 0xF493 | 87 | #define REG_BAT_RELATIVE_CAP_LOW 0xF493 |
88 | #define REG_BAT_VENDOR 0xF4C4 | 88 | #define REG_BAT_VENDOR 0xF4C4 |
89 | #define FLAG_BAT_VENDOR_SANYO 0x01 | 89 | #define FLAG_BAT_VENDOR_SANYO 0x01 |
90 | #define FLAG_BAT_VENDOR_SIMPLO 0x02 | 90 | #define FLAG_BAT_VENDOR_SIMPLO 0x02 |
91 | #define REG_BAT_CELL_COUNT 0xF4C6 | 91 | #define REG_BAT_CELL_COUNT 0xF4C6 |
92 | #define FLAG_BAT_CELL_3S1P 0x03 | 92 | #define FLAG_BAT_CELL_3S1P 0x03 |
93 | #define FLAG_BAT_CELL_3S2P 0x06 | 93 | #define FLAG_BAT_CELL_3S2P 0x06 |
94 | #define REG_BAT_CHARGE 0xF4A2 | 94 | #define REG_BAT_CHARGE 0xF4A2 |
95 | #define FLAG_BAT_CHARGE_DISCHARGE 0x01 | 95 | #define FLAG_BAT_CHARGE_DISCHARGE 0x01 |
96 | #define FLAG_BAT_CHARGE_CHARGE 0x02 | 96 | #define FLAG_BAT_CHARGE_CHARGE 0x02 |
97 | #define FLAG_BAT_CHARGE_ACPOWER 0x00 | 97 | #define FLAG_BAT_CHARGE_ACPOWER 0x00 |
98 | #define REG_BAT_STATUS 0xF4B0 | 98 | #define REG_BAT_STATUS 0xF4B0 |
99 | #define BIT_BAT_STATUS_LOW (1 << 5) | 99 | #define BIT_BAT_STATUS_LOW (1 << 5) |
100 | #define BIT_BAT_STATUS_DESTROY (1 << 2) | 100 | #define BIT_BAT_STATUS_DESTROY (1 << 2) |
101 | #define BIT_BAT_STATUS_FULL (1 << 1) | 101 | #define BIT_BAT_STATUS_FULL (1 << 1) |
102 | #define BIT_BAT_STATUS_IN (1 << 0) | 102 | #define BIT_BAT_STATUS_IN (1 << 0) |
103 | #define REG_BAT_CHARGE_STATUS 0xF4B1 | 103 | #define REG_BAT_CHARGE_STATUS 0xF4B1 |
104 | #define BIT_BAT_CHARGE_STATUS_OVERTEMP (1 << 2) | 104 | #define BIT_BAT_CHARGE_STATUS_OVERTEMP (1 << 2) |
105 | #define BIT_BAT_CHARGE_STATUS_PRECHG (1 << 1) | 105 | #define BIT_BAT_CHARGE_STATUS_PRECHG (1 << 1) |
106 | #define REG_BAT_STATE 0xF482 | 106 | #define REG_BAT_STATE 0xF482 |
107 | #define BIT_BAT_STATE_CHARGING (1 << 1) | 107 | #define BIT_BAT_STATE_CHARGING (1 << 1) |
108 | #define BIT_BAT_STATE_DISCHARGING (1 << 0) | 108 | #define BIT_BAT_STATE_DISCHARGING (1 << 0) |
109 | #define REG_BAT_POWER 0xF440 | 109 | #define REG_BAT_POWER 0xF440 |
110 | #define BIT_BAT_POWER_S3 (1 << 2) | 110 | #define BIT_BAT_POWER_S3 (1 << 2) |
111 | #define BIT_BAT_POWER_ON (1 << 1) | 111 | #define BIT_BAT_POWER_ON (1 << 1) |
112 | #define BIT_BAT_POWER_ACIN (1 << 0) | 112 | #define BIT_BAT_POWER_ACIN (1 << 0) |
113 | 113 | ||
114 | /* other registers */ | 114 | /* other registers */ |
115 | /* Audio: rd/wr */ | 115 | /* Audio: rd/wr */ |
116 | #define REG_AUDIO_VOLUME 0xF46C | 116 | #define REG_AUDIO_VOLUME 0xF46C |
117 | #define REG_AUDIO_MUTE 0xF4E7 | 117 | #define REG_AUDIO_MUTE 0xF4E7 |
118 | #define REG_AUDIO_BEEP 0xF4D0 | 118 | #define REG_AUDIO_BEEP 0xF4D0 |
119 | /* USB port power or not: rd/wr */ | 119 | /* USB port power or not: rd/wr */ |
120 | #define REG_USB0_FLAG 0xF461 | 120 | #define REG_USB0_FLAG 0xF461 |
121 | #define REG_USB1_FLAG 0xF462 | 121 | #define REG_USB1_FLAG 0xF462 |
122 | #define REG_USB2_FLAG 0xF463 | 122 | #define REG_USB2_FLAG 0xF463 |
123 | #define BIT_USB_FLAG_ON 1 | 123 | #define BIT_USB_FLAG_ON 1 |
124 | #define BIT_USB_FLAG_OFF 0 | 124 | #define BIT_USB_FLAG_OFF 0 |
125 | /* LID */ | 125 | /* LID */ |
126 | #define REG_LID_DETECT 0xF4BD | 126 | #define REG_LID_DETECT 0xF4BD |
127 | #define BIT_LID_DETECT_ON 1 | 127 | #define BIT_LID_DETECT_ON 1 |
128 | #define BIT_LID_DETECT_OFF 0 | 128 | #define BIT_LID_DETECT_OFF 0 |
129 | /* CRT */ | 129 | /* CRT */ |
130 | #define REG_CRT_DETECT 0xF4AD | 130 | #define REG_CRT_DETECT 0xF4AD |
131 | #define BIT_CRT_DETECT_PLUG 1 | 131 | #define BIT_CRT_DETECT_PLUG 1 |
132 | #define BIT_CRT_DETECT_UNPLUG 0 | 132 | #define BIT_CRT_DETECT_UNPLUG 0 |
133 | /* LCD backlight brightness adjust: 9 levels */ | 133 | /* LCD backlight brightness adjust: 9 levels */ |
134 | #define REG_DISPLAY_BRIGHTNESS 0xF4F5 | 134 | #define REG_DISPLAY_BRIGHTNESS 0xF4F5 |
135 | /* Black screen Status */ | 135 | /* Black screen Status */ |
136 | #define BIT_DISPLAY_LCD_ON 1 | 136 | #define BIT_DISPLAY_LCD_ON 1 |
137 | #define BIT_DISPLAY_LCD_OFF 0 | 137 | #define BIT_DISPLAY_LCD_OFF 0 |
138 | /* LCD backlight control: off/restore */ | 138 | /* LCD backlight control: off/restore */ |
139 | #define REG_BACKLIGHT_CTRL 0xF7BD | 139 | #define REG_BACKLIGHT_CTRL 0xF7BD |
140 | #define BIT_BACKLIGHT_ON 1 | 140 | #define BIT_BACKLIGHT_ON 1 |
141 | #define BIT_BACKLIGHT_OFF 0 | 141 | #define BIT_BACKLIGHT_OFF 0 |
142 | /* Reset the machine auto-clear: rd/wr */ | 142 | /* Reset the machine auto-clear: rd/wr */ |
143 | #define REG_RESET 0xF4EC | 143 | #define REG_RESET 0xF4EC |
144 | #define BIT_RESET_ON 1 | 144 | #define BIT_RESET_ON 1 |
145 | /* Light the led: rd/wr */ | 145 | /* Light the led: rd/wr */ |
146 | #define REG_LED 0xF4C8 | 146 | #define REG_LED 0xF4C8 |
147 | #define BIT_LED_RED_POWER (1 << 0) | 147 | #define BIT_LED_RED_POWER (1 << 0) |
148 | #define BIT_LED_ORANGE_POWER (1 << 1) | 148 | #define BIT_LED_ORANGE_POWER (1 << 1) |
149 | #define BIT_LED_GREEN_CHARGE (1 << 2) | 149 | #define BIT_LED_GREEN_CHARGE (1 << 2) |
150 | #define BIT_LED_RED_CHARGE (1 << 3) | 150 | #define BIT_LED_RED_CHARGE (1 << 3) |
151 | #define BIT_LED_NUMLOCK (1 << 4) | 151 | #define BIT_LED_NUMLOCK (1 << 4) |
152 | /* Test led mode, all led on/off */ | 152 | /* Test led mode, all led on/off */ |
153 | #define REG_LED_TEST 0xF4C2 | 153 | #define REG_LED_TEST 0xF4C2 |
154 | #define BIT_LED_TEST_IN 1 | 154 | #define BIT_LED_TEST_IN 1 |
155 | #define BIT_LED_TEST_OUT 0 | 155 | #define BIT_LED_TEST_OUT 0 |
156 | /* Camera on/off */ | 156 | /* Camera on/off */ |
157 | #define REG_CAMERA_STATUS 0xF46A | 157 | #define REG_CAMERA_STATUS 0xF46A |
158 | #define BIT_CAMERA_STATUS_ON 1 | 158 | #define BIT_CAMERA_STATUS_ON 1 |
159 | #define BIT_CAMERA_STATUS_OFF 0 | 159 | #define BIT_CAMERA_STATUS_OFF 0 |
160 | #define REG_CAMERA_CONTROL 0xF7B7 | 160 | #define REG_CAMERA_CONTROL 0xF7B7 |
161 | #define BIT_CAMERA_CONTROL_OFF 0 | 161 | #define BIT_CAMERA_CONTROL_OFF 0 |
162 | #define BIT_CAMERA_CONTROL_ON 1 | 162 | #define BIT_CAMERA_CONTROL_ON 1 |
163 | /* Wlan Status */ | 163 | /* Wlan Status */ |
164 | #define REG_WLAN 0xF4FA | 164 | #define REG_WLAN 0xF4FA |
165 | #define BIT_WLAN_ON 1 | 165 | #define BIT_WLAN_ON 1 |
166 | #define BIT_WLAN_OFF 0 | 166 | #define BIT_WLAN_OFF 0 |
167 | #define REG_DISPLAY_LCD 0xF79F | 167 | #define REG_DISPLAY_LCD 0xF79F |
168 | 168 | ||
169 | /* SCI Event Number from EC */ | 169 | /* SCI Event Number from EC */ |
170 | enum { | 170 | enum { |
diff --git a/arch/mips/loongson/lemote-2f/irq.c b/arch/mips/loongson/lemote-2f/irq.c index 14b081841b6b..6f8682e44483 100644 --- a/arch/mips/loongson/lemote-2f/irq.c +++ b/arch/mips/loongson/lemote-2f/irq.c | |||
@@ -2,9 +2,9 @@ | |||
2 | * Copyright (C) 2007 Lemote Inc. | 2 | * Copyright (C) 2007 Lemote Inc. |
3 | * Author: Fuxin Zhang, zhangfx@lemote.com | 3 | * Author: Fuxin Zhang, zhangfx@lemote.com |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
10 | 10 | ||
@@ -18,10 +18,10 @@ | |||
18 | #include <loongson.h> | 18 | #include <loongson.h> |
19 | #include <machine.h> | 19 | #include <machine.h> |
20 | 20 | ||
21 | #define LOONGSON_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) /* cpu timer */ | 21 | #define LOONGSON_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) /* cpu timer */ |
22 | #define LOONGSON_NORTH_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 6) /* bonito */ | 22 | #define LOONGSON_NORTH_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 6) /* bonito */ |
23 | #define LOONGSON_UART_IRQ (MIPS_CPU_IRQ_BASE + 3) /* cpu serial port */ | 23 | #define LOONGSON_UART_IRQ (MIPS_CPU_IRQ_BASE + 3) /* cpu serial port */ |
24 | #define LOONGSON_SOUTH_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 2) /* i8259 */ | 24 | #define LOONGSON_SOUTH_BRIDGE_IRQ (MIPS_CPU_IRQ_BASE + 2) /* i8259 */ |
25 | 25 | ||
26 | #define LOONGSON_INT_BIT_INT0 (1 << 11) | 26 | #define LOONGSON_INT_BIT_INT0 (1 << 11) |
27 | #define LOONGSON_INT_BIT_INT1 (1 << 12) | 27 | #define LOONGSON_INT_BIT_INT1 (1 << 12) |
@@ -108,9 +108,9 @@ struct irqaction cascade_irqaction = { | |||
108 | void __init mach_init_irq(void) | 108 | void __init mach_init_irq(void) |
109 | { | 109 | { |
110 | /* init all controller | 110 | /* init all controller |
111 | * 0-15 ------> i8259 interrupt | 111 | * 0-15 ------> i8259 interrupt |
112 | * 16-23 ------> mips cpu interrupt | 112 | * 16-23 ------> mips cpu interrupt |
113 | * 32-63 ------> bonito irq | 113 | * 32-63 ------> bonito irq |
114 | */ | 114 | */ |
115 | 115 | ||
116 | /* setup cs5536 as high level trigger */ | 116 | /* setup cs5536 as high level trigger */ |
diff --git a/arch/mips/loongson/lemote-2f/machtype.c b/arch/mips/loongson/lemote-2f/machtype.c index e860a2705c27..b55e6eece5e0 100644 --- a/arch/mips/loongson/lemote-2f/machtype.c +++ b/arch/mips/loongson/lemote-2f/machtype.c | |||
@@ -2,8 +2,8 @@ | |||
2 | * Copyright (C) 2009 Lemote Inc. | 2 | * Copyright (C) 2009 Lemote Inc. |
3 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 3 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
7 | * Free Software Foundation; either version 2 of the License, or (at your | 7 | * Free Software Foundation; either version 2 of the License, or (at your |
8 | * option) any later version. | 8 | * option) any later version. |
9 | */ | 9 | */ |
@@ -22,11 +22,11 @@ void __init mach_prom_init_machtype(void) | |||
22 | * machines, this will help the users a lot. | 22 | * machines, this will help the users a lot. |
23 | * | 23 | * |
24 | * If no "machtype=" passed, get machine type from "PMON_VER=". | 24 | * If no "machtype=" passed, get machine type from "PMON_VER=". |
25 | * PMON_VER=LM8089 Lemote 8.9'' netbook | 25 | * PMON_VER=LM8089 Lemote 8.9'' netbook |
26 | * LM8101 Lemote 10.1'' netbook | 26 | * LM8101 Lemote 10.1'' netbook |
27 | * (The above two netbooks have the same kernel support) | 27 | * (The above two netbooks have the same kernel support) |
28 | * LM6XXX Lemote FuLoong(2F) box series | 28 | * LM6XXX Lemote FuLoong(2F) box series |
29 | * LM9XXX Lemote LynLoong PC series | 29 | * LM9XXX Lemote LynLoong PC series |
30 | */ | 30 | */ |
31 | if (strstr(arcs_cmdline, "PMON_VER=LM")) { | 31 | if (strstr(arcs_cmdline, "PMON_VER=LM")) { |
32 | if (strstr(arcs_cmdline, "PMON_VER=LM8")) | 32 | if (strstr(arcs_cmdline, "PMON_VER=LM8")) |
diff --git a/arch/mips/loongson/lemote-2f/reset.c b/arch/mips/loongson/lemote-2f/reset.c index 36020a07e180..90962a3a1731 100644 --- a/arch/mips/loongson/lemote-2f/reset.c +++ b/arch/mips/loongson/lemote-2f/reset.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * Copyright (C) 2009 Lemote Inc. | 5 | * Copyright (C) 2009 Lemote Inc. |
6 | * Author: Wu Zhangjin, wuzhangjin@gmail.com | 6 | * Author: Wu Zhangjin, wuzhangjin@gmail.com |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 9 | * under the terms of the GNU General Public License as published by the |
10 | * Free Software Foundation; either version 2 of the License, or (at your | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
11 | * option) any later version. | 11 | * option) any later version. |
12 | */ | 12 | */ |
@@ -90,9 +90,9 @@ void ml2f_reboot(void) | |||
90 | #define EC_SHUTDOWN_IO_PORT_HIGH 0xff2d | 90 | #define EC_SHUTDOWN_IO_PORT_HIGH 0xff2d |
91 | #define EC_SHUTDOWN_IO_PORT_LOW 0xff2e | 91 | #define EC_SHUTDOWN_IO_PORT_LOW 0xff2e |
92 | #define EC_SHUTDOWN_IO_PORT_DATA 0xff2f | 92 | #define EC_SHUTDOWN_IO_PORT_DATA 0xff2f |
93 | #define REG_SHUTDOWN_HIGH 0xFC | 93 | #define REG_SHUTDOWN_HIGH 0xFC |
94 | #define REG_SHUTDOWN_LOW 0x29 | 94 | #define REG_SHUTDOWN_LOW 0x29 |
95 | #define BIT_SHUTDOWN_ON (1 << 1) | 95 | #define BIT_SHUTDOWN_ON (1 << 1) |
96 | 96 | ||
97 | static void ml2f_shutdown(void) | 97 | static void ml2f_shutdown(void) |
98 | { | 98 | { |
diff --git a/arch/mips/loongson1/Platform b/arch/mips/loongson1/Platform index 99bdefe627af..11863441dea3 100644 --- a/arch/mips/loongson1/Platform +++ b/arch/mips/loongson1/Platform | |||
@@ -1,4 +1,4 @@ | |||
1 | cflags-$(CONFIG_CPU_LOONGSON1) += \ | 1 | cflags-$(CONFIG_CPU_LOONGSON1) += \ |
2 | $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ | 2 | $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |
3 | -Wa,-mips32r2 -Wa,--trap | 3 | -Wa,-mips32r2 -Wa,--trap |
4 | 4 | ||
diff --git a/arch/mips/loongson1/common/clock.c b/arch/mips/loongson1/common/clock.c index 07133defa148..b4437f19c3d9 100644 --- a/arch/mips/loongson1/common/clock.c +++ b/arch/mips/loongson1/common/clock.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/loongson1/common/irq.c b/arch/mips/loongson1/common/irq.c index 41bc8ffe7bba..455a7704a90f 100644 --- a/arch/mips/loongson1/common/irq.c +++ b/arch/mips/loongson1/common/irq.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/loongson1/common/platform.c b/arch/mips/loongson1/common/platform.c index 69dad4cfaaf4..fdf8cb5987a4 100644 --- a/arch/mips/loongson1/common/platform.c +++ b/arch/mips/loongson1/common/platform.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
@@ -23,7 +23,7 @@ | |||
23 | .mapbase = LS1X_UART ## _id ## _BASE, \ | 23 | .mapbase = LS1X_UART ## _id ## _BASE, \ |
24 | .irq = LS1X_UART ## _id ## _IRQ, \ | 24 | .irq = LS1X_UART ## _id ## _IRQ, \ |
25 | .iotype = UPIO_MEM, \ | 25 | .iotype = UPIO_MEM, \ |
26 | .flags = UPF_IOREMAP | UPF_FIXED_TYPE, \ | 26 | .flags = UPF_IOREMAP | UPF_FIXED_TYPE, \ |
27 | .type = PORT_16550A, \ | 27 | .type = PORT_16550A, \ |
28 | } | 28 | } |
29 | 29 | ||
diff --git a/arch/mips/loongson1/common/prom.c b/arch/mips/loongson1/common/prom.c index 1f8e49f9886d..2dd9c5648d79 100644 --- a/arch/mips/loongson1/common/prom.c +++ b/arch/mips/loongson1/common/prom.c | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Modified from arch/mips/pnx833x/common/prom.c. | 4 | * Modified from arch/mips/pnx833x/common/prom.c. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/loongson1/common/reset.c b/arch/mips/loongson1/common/reset.c index fb979a784eca..d4f610f9604a 100644 --- a/arch/mips/loongson1/common/reset.c +++ b/arch/mips/loongson1/common/reset.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/loongson1/common/setup.c b/arch/mips/loongson1/common/setup.c index 62128cc27e68..62f41afee241 100644 --- a/arch/mips/loongson1/common/setup.c +++ b/arch/mips/loongson1/common/setup.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/loongson1/ls1b/board.c b/arch/mips/loongson1/ls1b/board.c index 1fbd5264f667..b26b10dac70a 100644 --- a/arch/mips/loongson1/ls1b/board.c +++ b/arch/mips/loongson1/ls1b/board.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | 2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
6 | * Free Software Foundation; either version 2 of the License, or (at your | 6 | * Free Software Foundation; either version 2 of the License, or (at your |
7 | * option) any later version. | 7 | * option) any later version. |
8 | */ | 8 | */ |
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 47c77e7ffbf8..afb5a0bcf7a5 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c | |||
@@ -169,7 +169,7 @@ static int isBranchInstr(mips_instruction * i) | |||
169 | 169 | ||
170 | /* | 170 | /* |
171 | * In the Linux kernel, we support selection of FPR format on the | 171 | * In the Linux kernel, we support selection of FPR format on the |
172 | * basis of the Status.FR bit. If an FPU is not present, the FR bit | 172 | * basis of the Status.FR bit. If an FPU is not present, the FR bit |
173 | * is hardwired to zero, which would imply a 32-bit FPU even for | 173 | * is hardwired to zero, which would imply a 32-bit FPU even for |
174 | * 64-bit CPUs so we rather look at TIF_32BIT_REGS. | 174 | * 64-bit CPUs so we rather look at TIF_32BIT_REGS. |
175 | * FPU emu is slow and bulky and optimizing this function offers fairly | 175 | * FPU emu is slow and bulky and optimizing this function offers fairly |
@@ -234,7 +234,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx, | |||
234 | if (xcp->cp0_cause & CAUSEF_BD) { | 234 | if (xcp->cp0_cause & CAUSEF_BD) { |
235 | /* | 235 | /* |
236 | * The instruction to be emulated is in a branch delay slot | 236 | * The instruction to be emulated is in a branch delay slot |
237 | * which means that we have to emulate the branch instruction | 237 | * which means that we have to emulate the branch instruction |
238 | * BEFORE we do the cop1 instruction. | 238 | * BEFORE we do the cop1 instruction. |
239 | * | 239 | * |
240 | * This branch could be a COP1 branch, but in that case we | 240 | * This branch could be a COP1 branch, but in that case we |
@@ -1335,8 +1335,8 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx, | |||
1335 | else { | 1335 | else { |
1336 | /* | 1336 | /* |
1337 | * The 'ieee754_csr' is an alias of | 1337 | * The 'ieee754_csr' is an alias of |
1338 | * ctx->fcr31. No need to copy ctx->fcr31 to | 1338 | * ctx->fcr31. No need to copy ctx->fcr31 to |
1339 | * ieee754_csr. But ieee754_csr.rm is ieee | 1339 | * ieee754_csr. But ieee754_csr.rm is ieee |
1340 | * library modes. (not mips rounding mode) | 1340 | * library modes. (not mips rounding mode) |
1341 | */ | 1341 | */ |
1342 | /* convert to ieee library modes */ | 1342 | /* convert to ieee library modes */ |
diff --git a/arch/mips/math-emu/dp_add.c b/arch/mips/math-emu/dp_add.c index b422fcad852a..c57c8adc42c4 100644 --- a/arch/mips/math-emu/dp_add.c +++ b/arch/mips/math-emu/dp_add.c | |||
@@ -153,7 +153,7 @@ ieee754dp ieee754dp_add(ieee754dp x, ieee754dp y) | |||
153 | xe = xe; | 153 | xe = xe; |
154 | xs = xs; | 154 | xs = xs; |
155 | 155 | ||
156 | if (xm >> (DP_MBITS + 1 + 3)) { /* carry out */ | 156 | if (xm >> (DP_MBITS + 1 + 3)) { /* carry out */ |
157 | xm = XDPSRS1(xm); | 157 | xm = XDPSRS1(xm); |
158 | xe++; | 158 | xe++; |
159 | } | 159 | } |
diff --git a/arch/mips/math-emu/dp_sqrt.c b/arch/mips/math-emu/dp_sqrt.c index a2a51b87ae8f..b874d60a942b 100644 --- a/arch/mips/math-emu/dp_sqrt.c +++ b/arch/mips/math-emu/dp_sqrt.c | |||
@@ -87,7 +87,7 @@ ieee754dp ieee754dp_sqrt(ieee754dp x) | |||
87 | if (xe > 512) { /* x > 2**-512? */ | 87 | if (xe > 512) { /* x > 2**-512? */ |
88 | xe -= 512; /* x = x / 2**512 */ | 88 | xe -= 512; /* x = x / 2**512 */ |
89 | scalx += 256; | 89 | scalx += 256; |
90 | } else if (xe < -512) { /* x < 2**-512? */ | 90 | } else if (xe < -512) { /* x < 2**-512? */ |
91 | xe += 512; /* x = x * 2**512 */ | 91 | xe += 512; /* x = x * 2**512 */ |
92 | scalx -= 256; | 92 | scalx -= 256; |
93 | } | 93 | } |
@@ -108,13 +108,13 @@ ieee754dp ieee754dp_sqrt(ieee754dp x) | |||
108 | y.bits &= 0xffffffff00000000LL; | 108 | y.bits &= 0xffffffff00000000LL; |
109 | 109 | ||
110 | /* triple to almost 56 sig. bits: y ~= sqrt(x) to within 1 ulp */ | 110 | /* triple to almost 56 sig. bits: y ~= sqrt(x) to within 1 ulp */ |
111 | /* t=y*y; z=t; pt[n0]+=0x00100000; t+=z; z=(x-z)*y; */ | 111 | /* t=y*y; z=t; pt[n0]+=0x00100000; t+=z; z=(x-z)*y; */ |
112 | z = t = ieee754dp_mul(y, y); | 112 | z = t = ieee754dp_mul(y, y); |
113 | t.parts.bexp += 0x001; | 113 | t.parts.bexp += 0x001; |
114 | t = ieee754dp_add(t, z); | 114 | t = ieee754dp_add(t, z); |
115 | z = ieee754dp_mul(ieee754dp_sub(x, z), y); | 115 | z = ieee754dp_mul(ieee754dp_sub(x, z), y); |
116 | 116 | ||
117 | /* t=z/(t+x) ; pt[n0]+=0x00100000; y+=t; */ | 117 | /* t=z/(t+x) ; pt[n0]+=0x00100000; y+=t; */ |
118 | t = ieee754dp_div(z, ieee754dp_add(t, x)); | 118 | t = ieee754dp_div(z, ieee754dp_add(t, x)); |
119 | t.parts.bexp += 0x001; | 119 | t.parts.bexp += 0x001; |
120 | y = ieee754dp_add(y, t); | 120 | y = ieee754dp_add(y, t); |
diff --git a/arch/mips/math-emu/dp_sub.c b/arch/mips/math-emu/dp_sub.c index 0de098cbc77b..91e0a4b5cbc7 100644 --- a/arch/mips/math-emu/dp_sub.c +++ b/arch/mips/math-emu/dp_sub.c | |||
@@ -158,7 +158,7 @@ ieee754dp ieee754dp_sub(ieee754dp x, ieee754dp y) | |||
158 | xe = xe; | 158 | xe = xe; |
159 | xs = xs; | 159 | xs = xs; |
160 | 160 | ||
161 | if (xm >> (DP_MBITS + 1 + 3)) { /* carry out */ | 161 | if (xm >> (DP_MBITS + 1 + 3)) { /* carry out */ |
162 | xm = XDPSRS1(xm); /* shift preserving sticky */ | 162 | xm = XDPSRS1(xm); /* shift preserving sticky */ |
163 | xe++; | 163 | xe++; |
164 | } | 164 | } |
diff --git a/arch/mips/math-emu/ieee754.c b/arch/mips/math-emu/ieee754.c index 30554e1c67b4..0015cf1989da 100644 --- a/arch/mips/math-emu/ieee754.c +++ b/arch/mips/math-emu/ieee754.c | |||
@@ -56,21 +56,21 @@ | |||
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | const struct ieee754dp_konst __ieee754dp_spcvals[] = { | 58 | const struct ieee754dp_konst __ieee754dp_spcvals[] = { |
59 | DPSTR(0, DP_EMIN - 1 + DP_EBIAS, 0, 0), /* + zero */ | 59 | DPSTR(0, DP_EMIN - 1 + DP_EBIAS, 0, 0), /* + zero */ |
60 | DPSTR(1, DP_EMIN - 1 + DP_EBIAS, 0, 0), /* - zero */ | 60 | DPSTR(1, DP_EMIN - 1 + DP_EBIAS, 0, 0), /* - zero */ |
61 | DPSTR(0, DP_EBIAS, 0, 0), /* + 1.0 */ | 61 | DPSTR(0, DP_EBIAS, 0, 0), /* + 1.0 */ |
62 | DPSTR(1, DP_EBIAS, 0, 0), /* - 1.0 */ | 62 | DPSTR(1, DP_EBIAS, 0, 0), /* - 1.0 */ |
63 | DPSTR(0, 3 + DP_EBIAS, 0x40000, 0), /* + 10.0 */ | 63 | DPSTR(0, 3 + DP_EBIAS, 0x40000, 0), /* + 10.0 */ |
64 | DPSTR(1, 3 + DP_EBIAS, 0x40000, 0), /* - 10.0 */ | 64 | DPSTR(1, 3 + DP_EBIAS, 0x40000, 0), /* - 10.0 */ |
65 | DPSTR(0, DP_EMAX + 1 + DP_EBIAS, 0, 0), /* + infinity */ | 65 | DPSTR(0, DP_EMAX + 1 + DP_EBIAS, 0, 0), /* + infinity */ |
66 | DPSTR(1, DP_EMAX + 1 + DP_EBIAS, 0, 0), /* - infinity */ | 66 | DPSTR(1, DP_EMAX + 1 + DP_EBIAS, 0, 0), /* - infinity */ |
67 | DPSTR(0, DP_EMAX+1+DP_EBIAS, 0x7FFFF, 0xFFFFFFFF), /* + indef quiet Nan */ | 67 | DPSTR(0, DP_EMAX+1+DP_EBIAS, 0x7FFFF, 0xFFFFFFFF), /* + indef quiet Nan */ |
68 | DPSTR(0, DP_EMAX + DP_EBIAS, 0xFFFFF, 0xFFFFFFFF), /* + max */ | 68 | DPSTR(0, DP_EMAX + DP_EBIAS, 0xFFFFF, 0xFFFFFFFF), /* + max */ |
69 | DPSTR(1, DP_EMAX + DP_EBIAS, 0xFFFFF, 0xFFFFFFFF), /* - max */ | 69 | DPSTR(1, DP_EMAX + DP_EBIAS, 0xFFFFF, 0xFFFFFFFF), /* - max */ |
70 | DPSTR(0, DP_EMIN + DP_EBIAS, 0, 0), /* + min normal */ | 70 | DPSTR(0, DP_EMIN + DP_EBIAS, 0, 0), /* + min normal */ |
71 | DPSTR(1, DP_EMIN + DP_EBIAS, 0, 0), /* - min normal */ | 71 | DPSTR(1, DP_EMIN + DP_EBIAS, 0, 0), /* - min normal */ |
72 | DPSTR(0, DP_EMIN - 1 + DP_EBIAS, 0, 1), /* + min denormal */ | 72 | DPSTR(0, DP_EMIN - 1 + DP_EBIAS, 0, 1), /* + min denormal */ |
73 | DPSTR(1, DP_EMIN - 1 + DP_EBIAS, 0, 1), /* - min denormal */ | 73 | DPSTR(1, DP_EMIN - 1 + DP_EBIAS, 0, 1), /* - min denormal */ |
74 | DPSTR(0, 31 + DP_EBIAS, 0, 0), /* + 1.0e31 */ | 74 | DPSTR(0, 31 + DP_EBIAS, 0, 0), /* + 1.0e31 */ |
75 | DPSTR(0, 63 + DP_EBIAS, 0, 0), /* + 1.0e63 */ | 75 | DPSTR(0, 63 + DP_EBIAS, 0, 0), /* + 1.0e63 */ |
76 | }; | 76 | }; |
@@ -84,9 +84,9 @@ const struct ieee754sp_konst __ieee754sp_spcvals[] = { | |||
84 | SPSTR(1, 3 + SP_EBIAS, 0x200000), /* - 10.0 */ | 84 | SPSTR(1, 3 + SP_EBIAS, 0x200000), /* - 10.0 */ |
85 | SPSTR(0, SP_EMAX + 1 + SP_EBIAS, 0), /* + infinity */ | 85 | SPSTR(0, SP_EMAX + 1 + SP_EBIAS, 0), /* + infinity */ |
86 | SPSTR(1, SP_EMAX + 1 + SP_EBIAS, 0), /* - infinity */ | 86 | SPSTR(1, SP_EMAX + 1 + SP_EBIAS, 0), /* - infinity */ |
87 | SPSTR(0, SP_EMAX+1+SP_EBIAS, 0x3FFFFF), /* + indef quiet Nan */ | 87 | SPSTR(0, SP_EMAX+1+SP_EBIAS, 0x3FFFFF), /* + indef quiet Nan */ |
88 | SPSTR(0, SP_EMAX + SP_EBIAS, 0x7FFFFF), /* + max normal */ | 88 | SPSTR(0, SP_EMAX + SP_EBIAS, 0x7FFFFF), /* + max normal */ |
89 | SPSTR(1, SP_EMAX + SP_EBIAS, 0x7FFFFF), /* - max normal */ | 89 | SPSTR(1, SP_EMAX + SP_EBIAS, 0x7FFFFF), /* - max normal */ |
90 | SPSTR(0, SP_EMIN + SP_EBIAS, 0), /* + min normal */ | 90 | SPSTR(0, SP_EMIN + SP_EBIAS, 0), /* + min normal */ |
91 | SPSTR(1, SP_EMIN + SP_EBIAS, 0), /* - min normal */ | 91 | SPSTR(1, SP_EMIN + SP_EBIAS, 0), /* - min normal */ |
92 | SPSTR(0, SP_EMIN - 1 + SP_EBIAS, 1), /* + min denormal */ | 92 | SPSTR(0, SP_EMIN - 1 + SP_EBIAS, 1), /* + min denormal */ |
diff --git a/arch/mips/math-emu/ieee754dp.c b/arch/mips/math-emu/ieee754dp.c index 080b5ca03fc6..068e56be8de9 100644 --- a/arch/mips/math-emu/ieee754dp.c +++ b/arch/mips/math-emu/ieee754dp.c | |||
@@ -116,7 +116,7 @@ static u64 get_rounding(int sn, u64 xm) | |||
116 | xm += 0x8; | 116 | xm += 0x8; |
117 | break; | 117 | break; |
118 | case IEEE754_RD: /* toward -Infinity */ | 118 | case IEEE754_RD: /* toward -Infinity */ |
119 | if (sn) /* ?? */ | 119 | if (sn) /* ?? */ |
120 | xm += 0x8; | 120 | xm += 0x8; |
121 | break; | 121 | break; |
122 | } | 122 | } |
diff --git a/arch/mips/math-emu/ieee754int.h b/arch/mips/math-emu/ieee754int.h index 2a7d43f4f161..4b6c6fb35304 100644 --- a/arch/mips/math-emu/ieee754int.h +++ b/arch/mips/math-emu/ieee754int.h | |||
@@ -56,7 +56,7 @@ | |||
56 | 56 | ||
57 | #define CLPAIR(x, y) ((x)*6+(y)) | 57 | #define CLPAIR(x, y) ((x)*6+(y)) |
58 | 58 | ||
59 | #define CLEARCX \ | 59 | #define CLEARCX \ |
60 | (ieee754_csr.cx = 0) | 60 | (ieee754_csr.cx = 0) |
61 | 61 | ||
62 | #define SETCX(x) \ | 62 | #define SETCX(x) \ |
diff --git a/arch/mips/math-emu/ieee754sp.c b/arch/mips/math-emu/ieee754sp.c index 271d00d6113a..15d1e36cfe64 100644 --- a/arch/mips/math-emu/ieee754sp.c +++ b/arch/mips/math-emu/ieee754sp.c | |||
@@ -117,7 +117,7 @@ static unsigned get_rounding(int sn, unsigned xm) | |||
117 | xm += 0x8; | 117 | xm += 0x8; |
118 | break; | 118 | break; |
119 | case IEEE754_RD: /* toward -Infinity */ | 119 | case IEEE754_RD: /* toward -Infinity */ |
120 | if (sn) /* ?? */ | 120 | if (sn) /* ?? */ |
121 | xm += 0x8; | 121 | xm += 0x8; |
122 | break; | 122 | break; |
123 | } | 123 | } |
diff --git a/arch/mips/math-emu/ieee754xcpt.c b/arch/mips/math-emu/ieee754xcpt.c index b99a693c05af..967167116ae8 100644 --- a/arch/mips/math-emu/ieee754xcpt.c +++ b/arch/mips/math-emu/ieee754xcpt.c | |||
@@ -25,7 +25,7 @@ | |||
25 | * Added preprocessor hacks to map to Linux kernel diagnostics. | 25 | * Added preprocessor hacks to map to Linux kernel diagnostics. |
26 | * | 26 | * |
27 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com | 27 | * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com |
28 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. | 28 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. |
29 | *************************************************************************/ | 29 | *************************************************************************/ |
30 | 30 | ||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
diff --git a/arch/mips/math-emu/kernel_linkage.c b/arch/mips/math-emu/kernel_linkage.c index 52e6c58c8de1..1c586575fe17 100644 --- a/arch/mips/math-emu/kernel_linkage.c +++ b/arch/mips/math-emu/kernel_linkage.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Kevin D. Kissell, kevink@mips and Carsten Langgaard, carstenl@mips.com | 2 | * Kevin D. Kissell, kevink@mips and Carsten Langgaard, carstenl@mips.com |
3 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. | 3 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. |
4 | * | 4 | * |
5 | * This program is free software; you can distribute it and/or modify it | 5 | * This program is free software; you can distribute it and/or modify it |
6 | * under the terms of the GNU General Public License (Version 2) as | 6 | * under the terms of the GNU General Public License (Version 2) as |
diff --git a/arch/mips/math-emu/sp_add.c b/arch/mips/math-emu/sp_add.c index ae1a327ccac0..c446e64637e2 100644 --- a/arch/mips/math-emu/sp_add.c +++ b/arch/mips/math-emu/sp_add.c | |||
@@ -148,7 +148,7 @@ ieee754sp ieee754sp_add(ieee754sp x, ieee754sp y) | |||
148 | xe = xe; | 148 | xe = xe; |
149 | xs = xs; | 149 | xs = xs; |
150 | 150 | ||
151 | if (xm >> (SP_MBITS + 1 + 3)) { /* carry out */ | 151 | if (xm >> (SP_MBITS + 1 + 3)) { /* carry out */ |
152 | SPXSRSX1(); | 152 | SPXSRSX1(); |
153 | } | 153 | } |
154 | } else { | 154 | } else { |
diff --git a/arch/mips/math-emu/sp_mul.c b/arch/mips/math-emu/sp_mul.c index 2722a2570ea4..fa4675cf2aad 100644 --- a/arch/mips/math-emu/sp_mul.c +++ b/arch/mips/math-emu/sp_mul.c | |||
@@ -131,7 +131,7 @@ ieee754sp ieee754sp_mul(ieee754sp x, ieee754sp y) | |||
131 | hrm = hxm * hym; /* 16 * 16 => 32 */ | 131 | hrm = hxm * hym; /* 16 * 16 => 32 */ |
132 | 132 | ||
133 | { | 133 | { |
134 | unsigned t = lxm * hym; /* 16 * 16 => 32 */ | 134 | unsigned t = lxm * hym; /* 16 * 16 => 32 */ |
135 | { | 135 | { |
136 | unsigned at = lrm + (t << 16); | 136 | unsigned at = lrm + (t << 16); |
137 | hrm += at < lrm; | 137 | hrm += at < lrm; |
@@ -141,7 +141,7 @@ ieee754sp ieee754sp_mul(ieee754sp x, ieee754sp y) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | { | 143 | { |
144 | unsigned t = hxm * lym; /* 16 * 16 => 32 */ | 144 | unsigned t = hxm * lym; /* 16 * 16 => 32 */ |
145 | { | 145 | { |
146 | unsigned at = lrm + (t << 16); | 146 | unsigned at = lrm + (t << 16); |
147 | hrm += at < lrm; | 147 | hrm += at < lrm; |
diff --git a/arch/mips/math-emu/sp_sub.c b/arch/mips/math-emu/sp_sub.c index 886ed5bcfefb..e595c6f3d0bb 100644 --- a/arch/mips/math-emu/sp_sub.c +++ b/arch/mips/math-emu/sp_sub.c | |||
@@ -153,7 +153,7 @@ ieee754sp ieee754sp_sub(ieee754sp x, ieee754sp y) | |||
153 | xe = xe; | 153 | xe = xe; |
154 | xs = xs; | 154 | xs = xs; |
155 | 155 | ||
156 | if (xm >> (SP_MBITS + 1 + 3)) { /* carry out */ | 156 | if (xm >> (SP_MBITS + 1 + 3)) { /* carry out */ |
157 | SPXSRSX1(); /* shift preserving sticky */ | 157 | SPXSRSX1(); /* shift preserving sticky */ |
158 | } | 158 | } |
159 | } else { | 159 | } else { |
diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile index 90ceb963aaf1..1dcec30ad1c4 100644 --- a/arch/mips/mm/Makefile +++ b/arch/mips/mm/Makefile | |||
@@ -16,9 +16,9 @@ obj-$(CONFIG_CPU_R3000) += c-r3k.o tlb-r3k.o | |||
16 | obj-$(CONFIG_CPU_R8000) += c-r4k.o cex-gen.o tlb-r8k.o | 16 | obj-$(CONFIG_CPU_R8000) += c-r4k.o cex-gen.o tlb-r8k.o |
17 | obj-$(CONFIG_CPU_SB1) += c-r4k.o cerr-sb1.o cex-sb1.o tlb-r4k.o | 17 | obj-$(CONFIG_CPU_SB1) += c-r4k.o cerr-sb1.o cex-sb1.o tlb-r4k.o |
18 | obj-$(CONFIG_CPU_TX39XX) += c-tx39.o tlb-r3k.o | 18 | obj-$(CONFIG_CPU_TX39XX) += c-tx39.o tlb-r3k.o |
19 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += c-octeon.o cex-oct.o tlb-r4k.o | 19 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += c-octeon.o cex-oct.o tlb-r4k.o |
20 | 20 | ||
21 | obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o | 21 | obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o |
22 | obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o | 22 | obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o |
23 | obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o | 23 | obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o |
24 | obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o | 24 | obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o |
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c index 6ec04daf4231..8557fb552863 100644 --- a/arch/mips/mm/c-octeon.c +++ b/arch/mips/mm/c-octeon.c | |||
@@ -106,7 +106,7 @@ static void octeon_flush_icache_all(void) | |||
106 | * Called to flush all memory associated with a memory | 106 | * Called to flush all memory associated with a memory |
107 | * context. | 107 | * context. |
108 | * | 108 | * |
109 | * @mm: Memory context to flush | 109 | * @mm: Memory context to flush |
110 | */ | 110 | */ |
111 | static void octeon_flush_cache_mm(struct mm_struct *mm) | 111 | static void octeon_flush_cache_mm(struct mm_struct *mm) |
112 | { | 112 | { |
diff --git a/arch/mips/mm/c-r3k.c b/arch/mips/mm/c-r3k.c index 031c4c2cdf2e..704dc735a59d 100644 --- a/arch/mips/mm/c-r3k.c +++ b/arch/mips/mm/c-r3k.c | |||
@@ -119,7 +119,7 @@ static void r3k_flush_icache_range(unsigned long start, unsigned long end) | |||
119 | write_c0_status((ST0_ISC|ST0_SWC|flags)&~ST0_IEC); | 119 | write_c0_status((ST0_ISC|ST0_SWC|flags)&~ST0_IEC); |
120 | 120 | ||
121 | for (i = 0; i < size; i += 0x080) { | 121 | for (i = 0; i < size; i += 0x080) { |
122 | asm( "sb\t$0, 0x000(%0)\n\t" | 122 | asm( "sb\t$0, 0x000(%0)\n\t" |
123 | "sb\t$0, 0x004(%0)\n\t" | 123 | "sb\t$0, 0x004(%0)\n\t" |
124 | "sb\t$0, 0x008(%0)\n\t" | 124 | "sb\t$0, 0x008(%0)\n\t" |
125 | "sb\t$0, 0x00c(%0)\n\t" | 125 | "sb\t$0, 0x00c(%0)\n\t" |
@@ -176,7 +176,7 @@ static void r3k_flush_dcache_range(unsigned long start, unsigned long end) | |||
176 | write_c0_status((ST0_ISC|flags)&~ST0_IEC); | 176 | write_c0_status((ST0_ISC|flags)&~ST0_IEC); |
177 | 177 | ||
178 | for (i = 0; i < size; i += 0x080) { | 178 | for (i = 0; i < size; i += 0x080) { |
179 | asm( "sb\t$0, 0x000(%0)\n\t" | 179 | asm( "sb\t$0, 0x000(%0)\n\t" |
180 | "sb\t$0, 0x004(%0)\n\t" | 180 | "sb\t$0, 0x004(%0)\n\t" |
181 | "sb\t$0, 0x008(%0)\n\t" | 181 | "sb\t$0, 0x008(%0)\n\t" |
182 | "sb\t$0, 0x00c(%0)\n\t" | 182 | "sb\t$0, 0x00c(%0)\n\t" |
@@ -285,13 +285,13 @@ static void r3k_flush_cache_sigtramp(unsigned long addr) | |||
285 | write_c0_status(flags&~ST0_IEC); | 285 | write_c0_status(flags&~ST0_IEC); |
286 | 286 | ||
287 | /* Fill the TLB to avoid an exception with caches isolated. */ | 287 | /* Fill the TLB to avoid an exception with caches isolated. */ |
288 | asm( "lw\t$0, 0x000(%0)\n\t" | 288 | asm( "lw\t$0, 0x000(%0)\n\t" |
289 | "lw\t$0, 0x004(%0)\n\t" | 289 | "lw\t$0, 0x004(%0)\n\t" |
290 | : : "r" (addr) ); | 290 | : : "r" (addr) ); |
291 | 291 | ||
292 | write_c0_status((ST0_ISC|ST0_SWC|flags)&~ST0_IEC); | 292 | write_c0_status((ST0_ISC|ST0_SWC|flags)&~ST0_IEC); |
293 | 293 | ||
294 | asm( "sb\t$0, 0x000(%0)\n\t" | 294 | asm( "sb\t$0, 0x000(%0)\n\t" |
295 | "sb\t$0, 0x004(%0)\n\t" | 295 | "sb\t$0, 0x004(%0)\n\t" |
296 | : : "r" (addr) ); | 296 | : : "r" (addr) ); |
297 | 297 | ||
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 0f7d788e8810..d45f8e28b470 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -160,7 +160,7 @@ static void __cpuinit r4k_blast_dcache_setup(void) | |||
160 | "1:\n\t" \ | 160 | "1:\n\t" \ |
161 | ) | 161 | ) |
162 | #define CACHE32_UNROLL32_ALIGN JUMP_TO_ALIGN(10) /* 32 * 32 = 1024 */ | 162 | #define CACHE32_UNROLL32_ALIGN JUMP_TO_ALIGN(10) /* 32 * 32 = 1024 */ |
163 | #define CACHE32_UNROLL32_ALIGN2 JUMP_TO_ALIGN(11) | 163 | #define CACHE32_UNROLL32_ALIGN2 JUMP_TO_ALIGN(11) |
164 | 164 | ||
165 | static inline void blast_r4600_v1_icache32(void) | 165 | static inline void blast_r4600_v1_icache32(void) |
166 | { | 166 | { |
@@ -177,7 +177,7 @@ static inline void tx49_blast_icache32(void) | |||
177 | unsigned long end = start + current_cpu_data.icache.waysize; | 177 | unsigned long end = start + current_cpu_data.icache.waysize; |
178 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | 178 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; |
179 | unsigned long ws_end = current_cpu_data.icache.ways << | 179 | unsigned long ws_end = current_cpu_data.icache.ways << |
180 | current_cpu_data.icache.waybit; | 180 | current_cpu_data.icache.waybit; |
181 | unsigned long ws, addr; | 181 | unsigned long ws, addr; |
182 | 182 | ||
183 | CACHE32_UNROLL32_ALIGN2; | 183 | CACHE32_UNROLL32_ALIGN2; |
@@ -208,7 +208,7 @@ static inline void tx49_blast_icache32_page_indexed(unsigned long page) | |||
208 | unsigned long end = start + PAGE_SIZE; | 208 | unsigned long end = start + PAGE_SIZE; |
209 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | 209 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; |
210 | unsigned long ws_end = current_cpu_data.icache.ways << | 210 | unsigned long ws_end = current_cpu_data.icache.ways << |
211 | current_cpu_data.icache.waybit; | 211 | current_cpu_data.icache.waybit; |
212 | unsigned long ws, addr; | 212 | unsigned long ws, addr; |
213 | 213 | ||
214 | CACHE32_UNROLL32_ALIGN2; | 214 | CACHE32_UNROLL32_ALIGN2; |
@@ -637,7 +637,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | |||
637 | * for the cache instruction on MIPS processors and | 637 | * for the cache instruction on MIPS processors and |
638 | * some processors, among them the RM5200 and RM7000 | 638 | * some processors, among them the RM5200 and RM7000 |
639 | * QED processors will throw an address error for cache | 639 | * QED processors will throw an address error for cache |
640 | * hit ops with insufficient alignment. Solved by | 640 | * hit ops with insufficient alignment. Solved by |
641 | * aligning the address to cache line size. | 641 | * aligning the address to cache line size. |
642 | */ | 642 | */ |
643 | blast_inv_scache_range(addr, addr + size); | 643 | blast_inv_scache_range(addr, addr + size); |
@@ -864,7 +864,7 @@ static void __cpuinit probe_pcache(void) | |||
864 | icache_size = 1 << (12 + ((config & CONF_IC) >> 9)); | 864 | icache_size = 1 << (12 + ((config & CONF_IC) >> 9)); |
865 | c->icache.linesz = 16 << ((config & CONF_IB) >> 5); | 865 | c->icache.linesz = 16 << ((config & CONF_IB) >> 5); |
866 | c->icache.ways = 1; | 866 | c->icache.ways = 1; |
867 | c->icache.waybit = 0; /* doesn't matter */ | 867 | c->icache.waybit = 0; /* doesn't matter */ |
868 | 868 | ||
869 | dcache_size = 1 << (12 + ((config & CONF_DC) >> 6)); | 869 | dcache_size = 1 << (12 + ((config & CONF_DC) >> 6)); |
870 | c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); | 870 | c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); |
@@ -923,7 +923,7 @@ static void __cpuinit probe_pcache(void) | |||
923 | icache_size = 1 << (10 + ((config & CONF_IC) >> 9)); | 923 | icache_size = 1 << (10 + ((config & CONF_IC) >> 9)); |
924 | c->icache.linesz = 16 << ((config & CONF_IB) >> 5); | 924 | c->icache.linesz = 16 << ((config & CONF_IB) >> 5); |
925 | c->icache.ways = 1; | 925 | c->icache.ways = 1; |
926 | c->icache.waybit = 0; /* doesn't matter */ | 926 | c->icache.waybit = 0; /* doesn't matter */ |
927 | 927 | ||
928 | dcache_size = 1 << (10 + ((config & CONF_DC) >> 6)); | 928 | dcache_size = 1 << (10 + ((config & CONF_DC) >> 6)); |
929 | c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); | 929 | c->dcache.linesz = 16 << ((config & CONF_DB) >> 4); |
@@ -986,8 +986,8 @@ static void __cpuinit probe_pcache(void) | |||
986 | c->icache.ways = 1 + ((config1 >> 16) & 7); | 986 | c->icache.ways = 1 + ((config1 >> 16) & 7); |
987 | 987 | ||
988 | icache_size = c->icache.sets * | 988 | icache_size = c->icache.sets * |
989 | c->icache.ways * | 989 | c->icache.ways * |
990 | c->icache.linesz; | 990 | c->icache.linesz; |
991 | c->icache.waybit = __ffs(icache_size/c->icache.ways); | 991 | c->icache.waybit = __ffs(icache_size/c->icache.ways); |
992 | 992 | ||
993 | if (config & 0x8) /* VI bit */ | 993 | if (config & 0x8) /* VI bit */ |
@@ -1006,8 +1006,8 @@ static void __cpuinit probe_pcache(void) | |||
1006 | c->dcache.ways = 1 + ((config1 >> 7) & 7); | 1006 | c->dcache.ways = 1 + ((config1 >> 7) & 7); |
1007 | 1007 | ||
1008 | dcache_size = c->dcache.sets * | 1008 | dcache_size = c->dcache.sets * |
1009 | c->dcache.ways * | 1009 | c->dcache.ways * |
1010 | c->dcache.linesz; | 1010 | c->dcache.linesz; |
1011 | c->dcache.waybit = __ffs(dcache_size/c->dcache.ways); | 1011 | c->dcache.waybit = __ffs(dcache_size/c->dcache.ways); |
1012 | 1012 | ||
1013 | c->options |= MIPS_CPU_PREFETCH; | 1013 | c->options |= MIPS_CPU_PREFETCH; |
@@ -1016,7 +1016,7 @@ static void __cpuinit probe_pcache(void) | |||
1016 | 1016 | ||
1017 | /* | 1017 | /* |
1018 | * Processor configuration sanity check for the R4000SC erratum | 1018 | * Processor configuration sanity check for the R4000SC erratum |
1019 | * #5. With page sizes larger than 32kB there is no possibility | 1019 | * #5. With page sizes larger than 32kB there is no possibility |
1020 | * to get a VCE exception anymore so we don't care about this | 1020 | * to get a VCE exception anymore so we don't care about this |
1021 | * misconfiguration. The case is rather theoretical anyway; | 1021 | * misconfiguration. The case is rather theoretical anyway; |
1022 | * presumably no vendor is shipping his hardware in the "bad" | 1022 | * presumably no vendor is shipping his hardware in the "bad" |
@@ -1088,7 +1088,7 @@ static void __cpuinit probe_pcache(void) | |||
1088 | break; | 1088 | break; |
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | #ifdef CONFIG_CPU_LOONGSON2 | 1091 | #ifdef CONFIG_CPU_LOONGSON2 |
1092 | /* | 1092 | /* |
1093 | * LOONGSON2 has 4 way icache, but when using indexed cache op, | 1093 | * LOONGSON2 has 4 way icache, but when using indexed cache op, |
1094 | * one op will act on all 4 ways | 1094 | * one op will act on all 4 ways |
@@ -1228,7 +1228,7 @@ static void __cpuinit setup_scache(void) | |||
1228 | #ifdef CONFIG_R5000_CPU_SCACHE | 1228 | #ifdef CONFIG_R5000_CPU_SCACHE |
1229 | r5k_sc_init(); | 1229 | r5k_sc_init(); |
1230 | #endif | 1230 | #endif |
1231 | return; | 1231 | return; |
1232 | 1232 | ||
1233 | case CPU_RM7000: | 1233 | case CPU_RM7000: |
1234 | #ifdef CONFIG_RM7000_CPU_SCACHE | 1234 | #ifdef CONFIG_RM7000_CPU_SCACHE |
diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c index 87d23cada6d6..ba9da270289f 100644 --- a/arch/mips/mm/c-tx39.c +++ b/arch/mips/mm/c-tx39.c | |||
@@ -33,9 +33,9 @@ extern int r3k_have_wired_reg; /* in r3k-tlb.c */ | |||
33 | /* This sequence is required to ensure icache is disabled immediately */ | 33 | /* This sequence is required to ensure icache is disabled immediately */ |
34 | #define TX39_STOP_STREAMING() \ | 34 | #define TX39_STOP_STREAMING() \ |
35 | __asm__ __volatile__( \ | 35 | __asm__ __volatile__( \ |
36 | ".set push\n\t" \ | 36 | ".set push\n\t" \ |
37 | ".set noreorder\n\t" \ | 37 | ".set noreorder\n\t" \ |
38 | "b 1f\n\t" \ | 38 | "b 1f\n\t" \ |
39 | "nop\n\t" \ | 39 | "nop\n\t" \ |
40 | "1:\n\t" \ | 40 | "1:\n\t" \ |
41 | ".set pop" \ | 41 | ".set pop" \ |
@@ -361,7 +361,7 @@ void __cpuinit tx39_cache_init(void) | |||
361 | /* TX39/H core (writethru direct-map cache) */ | 361 | /* TX39/H core (writethru direct-map cache) */ |
362 | __flush_cache_vmap = tx39__flush_cache_vmap; | 362 | __flush_cache_vmap = tx39__flush_cache_vmap; |
363 | __flush_cache_vunmap = tx39__flush_cache_vunmap; | 363 | __flush_cache_vunmap = tx39__flush_cache_vunmap; |
364 | flush_cache_all = tx39h_flush_icache_all; | 364 | flush_cache_all = tx39h_flush_icache_all; |
365 | __flush_cache_all = tx39h_flush_icache_all; | 365 | __flush_cache_all = tx39h_flush_icache_all; |
366 | flush_cache_mm = (void *) tx39h_flush_icache_all; | 366 | flush_cache_mm = (void *) tx39h_flush_icache_all; |
367 | flush_cache_range = (void *) tx39h_flush_icache_all; | 367 | flush_cache_range = (void *) tx39h_flush_icache_all; |
@@ -409,8 +409,8 @@ void __cpuinit tx39_cache_init(void) | |||
409 | _dma_cache_inv = tx39_dma_cache_inv; | 409 | _dma_cache_inv = tx39_dma_cache_inv; |
410 | 410 | ||
411 | shm_align_mask = max_t(unsigned long, | 411 | shm_align_mask = max_t(unsigned long, |
412 | (dcache_size / current_cpu_data.dcache.ways) - 1, | 412 | (dcache_size / current_cpu_data.dcache.ways) - 1, |
413 | PAGE_SIZE - 1); | 413 | PAGE_SIZE - 1); |
414 | 414 | ||
415 | break; | 415 | break; |
416 | } | 416 | } |
diff --git a/arch/mips/mm/cerr-sb1.c b/arch/mips/mm/cerr-sb1.c index 3571090ba178..576add33bf5b 100644 --- a/arch/mips/mm/cerr-sb1.c +++ b/arch/mips/mm/cerr-sb1.c | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | /* | 28 | /* |
29 | * We'd like to dump the L2_ECC_TAG register on errors, but errata make | 29 | * We'd like to dump the L2_ECC_TAG register on errors, but errata make |
30 | * that unsafe... So for now we don't. (BCM1250/BCM112x erratum SOC-48.) | 30 | * that unsafe... So for now we don't. (BCM1250/BCM112x erratum SOC-48.) |
31 | */ | 31 | */ |
32 | #undef DUMP_L2_ECC_TAG_ON_ERROR | 32 | #undef DUMP_L2_ECC_TAG_ON_ERROR |
33 | 33 | ||
@@ -48,7 +48,7 @@ | |||
48 | #define CP0_CERRI_EXTERNAL (1 << 26) | 48 | #define CP0_CERRI_EXTERNAL (1 << 26) |
49 | 49 | ||
50 | #define CP0_CERRI_IDX_VALID(c) (!((c) & CP0_CERRI_EXTERNAL)) | 50 | #define CP0_CERRI_IDX_VALID(c) (!((c) & CP0_CERRI_EXTERNAL)) |
51 | #define CP0_CERRI_DATA (CP0_CERRI_DATA_PARITY) | 51 | #define CP0_CERRI_DATA (CP0_CERRI_DATA_PARITY) |
52 | 52 | ||
53 | #define CP0_CERRD_MULTIPLE (1 << 31) | 53 | #define CP0_CERRD_MULTIPLE (1 << 31) |
54 | #define CP0_CERRD_TAG_STATE (1 << 30) | 54 | #define CP0_CERRD_TAG_STATE (1 << 30) |
@@ -56,8 +56,8 @@ | |||
56 | #define CP0_CERRD_DATA_SBE (1 << 28) | 56 | #define CP0_CERRD_DATA_SBE (1 << 28) |
57 | #define CP0_CERRD_DATA_DBE (1 << 27) | 57 | #define CP0_CERRD_DATA_DBE (1 << 27) |
58 | #define CP0_CERRD_EXTERNAL (1 << 26) | 58 | #define CP0_CERRD_EXTERNAL (1 << 26) |
59 | #define CP0_CERRD_LOAD (1 << 25) | 59 | #define CP0_CERRD_LOAD (1 << 25) |
60 | #define CP0_CERRD_STORE (1 << 24) | 60 | #define CP0_CERRD_STORE (1 << 24) |
61 | #define CP0_CERRD_FILLWB (1 << 23) | 61 | #define CP0_CERRD_FILLWB (1 << 23) |
62 | #define CP0_CERRD_COHERENCY (1 << 22) | 62 | #define CP0_CERRD_COHERENCY (1 << 22) |
63 | #define CP0_CERRD_DUPTAG (1 << 21) | 63 | #define CP0_CERRD_DUPTAG (1 << 21) |
@@ -69,10 +69,10 @@ | |||
69 | (CP0_CERRD_LOAD | CP0_CERRD_STORE | CP0_CERRD_FILLWB | CP0_CERRD_COHERENCY | CP0_CERRD_DUPTAG) | 69 | (CP0_CERRD_LOAD | CP0_CERRD_STORE | CP0_CERRD_FILLWB | CP0_CERRD_COHERENCY | CP0_CERRD_DUPTAG) |
70 | #define CP0_CERRD_TYPES \ | 70 | #define CP0_CERRD_TYPES \ |
71 | (CP0_CERRD_TAG_STATE | CP0_CERRD_TAG_ADDRESS | CP0_CERRD_DATA_SBE | CP0_CERRD_DATA_DBE | CP0_CERRD_EXTERNAL) | 71 | (CP0_CERRD_TAG_STATE | CP0_CERRD_TAG_ADDRESS | CP0_CERRD_DATA_SBE | CP0_CERRD_DATA_DBE | CP0_CERRD_EXTERNAL) |
72 | #define CP0_CERRD_DATA (CP0_CERRD_DATA_SBE | CP0_CERRD_DATA_DBE) | 72 | #define CP0_CERRD_DATA (CP0_CERRD_DATA_SBE | CP0_CERRD_DATA_DBE) |
73 | 73 | ||
74 | static uint32_t extract_ic(unsigned short addr, int data); | 74 | static uint32_t extract_ic(unsigned short addr, int data); |
75 | static uint32_t extract_dc(unsigned short addr, int data); | 75 | static uint32_t extract_dc(unsigned short addr, int data); |
76 | 76 | ||
77 | static inline void breakout_errctl(unsigned int val) | 77 | static inline void breakout_errctl(unsigned int val) |
78 | { | 78 | { |
@@ -209,11 +209,11 @@ asmlinkage void sb1_cache_error(void) | |||
209 | "=r" (dpahi), "=r" (dpalo), "=r" (eepc)); | 209 | "=r" (dpahi), "=r" (dpalo), "=r" (eepc)); |
210 | 210 | ||
211 | cerr_dpa = (((uint64_t)dpahi) << 32) | dpalo; | 211 | cerr_dpa = (((uint64_t)dpahi) << 32) | dpalo; |
212 | printk(" c0_errorepc == %08x\n", eepc); | 212 | printk(" c0_errorepc == %08x\n", eepc); |
213 | printk(" c0_errctl == %08x", errctl); | 213 | printk(" c0_errctl == %08x", errctl); |
214 | breakout_errctl(errctl); | 214 | breakout_errctl(errctl); |
215 | if (errctl & CP0_ERRCTL_ICACHE) { | 215 | if (errctl & CP0_ERRCTL_ICACHE) { |
216 | printk(" c0_cerr_i == %08x", cerr_i); | 216 | printk(" c0_cerr_i == %08x", cerr_i); |
217 | breakout_cerri(cerr_i); | 217 | breakout_cerri(cerr_i); |
218 | if (CP0_CERRI_IDX_VALID(cerr_i)) { | 218 | if (CP0_CERRI_IDX_VALID(cerr_i)) { |
219 | /* Check index of EPC, allowing for delay slot */ | 219 | /* Check index of EPC, allowing for delay slot */ |
@@ -229,7 +229,7 @@ asmlinkage void sb1_cache_error(void) | |||
229 | } | 229 | } |
230 | } | 230 | } |
231 | if (errctl & CP0_ERRCTL_DCACHE) { | 231 | if (errctl & CP0_ERRCTL_DCACHE) { |
232 | printk(" c0_cerr_d == %08x", cerr_d); | 232 | printk(" c0_cerr_d == %08x", cerr_d); |
233 | breakout_cerrd(cerr_d); | 233 | breakout_cerrd(cerr_d); |
234 | if (CP0_CERRD_DPA_VALID(cerr_d)) { | 234 | if (CP0_CERRD_DPA_VALID(cerr_d)) { |
235 | printk(" c0_cerr_dpa == %010llx\n", cerr_dpa); | 235 | printk(" c0_cerr_dpa == %010llx\n", cerr_dpa); |
@@ -256,7 +256,7 @@ asmlinkage void sb1_cache_error(void) | |||
256 | /* | 256 | /* |
257 | * Calling panic() when a fatal cache error occurs scrambles the | 257 | * Calling panic() when a fatal cache error occurs scrambles the |
258 | * state of the system (and the cache), making it difficult to | 258 | * state of the system (and the cache), making it difficult to |
259 | * investigate after the fact. However, if you just stall the CPU, | 259 | * investigate after the fact. However, if you just stall the CPU, |
260 | * the other CPU may keep on running, which is typically very | 260 | * the other CPU may keep on running, which is typically very |
261 | * undesirable. | 261 | * undesirable. |
262 | */ | 262 | */ |
@@ -411,7 +411,7 @@ static uint32_t extract_ic(unsigned short addr, int data) | |||
411 | " dmfc0 $1, $28, 1\n\t" | 411 | " dmfc0 $1, $28, 1\n\t" |
412 | " dsrl32 %1, $1, 0 \n\t" | 412 | " dsrl32 %1, $1, 0 \n\t" |
413 | " sll %2, $1, 0 \n\t" | 413 | " sll %2, $1, 0 \n\t" |
414 | " .set pop \n" | 414 | " .set pop \n" |
415 | : "=r" (datahi), "=r" (insta), "=r" (instb) | 415 | : "=r" (datahi), "=r" (insta), "=r" (instb) |
416 | : "r" ((way << 13) | addr | (offset << 3))); | 416 | : "r" ((way << 13) | addr | (offset << 3))); |
417 | predecode = (datahi >> 8) & 0xff; | 417 | predecode = (datahi >> 8) & 0xff; |
@@ -441,8 +441,8 @@ static uint8_t dc_ecc(uint64_t dword) | |||
441 | { | 441 | { |
442 | uint64_t t; | 442 | uint64_t t; |
443 | uint32_t w; | 443 | uint32_t w; |
444 | uint8_t p; | 444 | uint8_t p; |
445 | int i; | 445 | int i; |
446 | 446 | ||
447 | p = 0; | 447 | p = 0; |
448 | for (i = 7; i >= 0; i--) | 448 | for (i = 7; i >= 0; i--) |
diff --git a/arch/mips/mm/cex-gen.S b/arch/mips/mm/cex-gen.S index e743622fd24d..45dff5cd4b8e 100644 --- a/arch/mips/mm/cex-gen.S +++ b/arch/mips/mm/cex-gen.S | |||
@@ -14,17 +14,17 @@ | |||
14 | #include <asm/stackframe.h> | 14 | #include <asm/stackframe.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Game over. Go to the button. Press gently. Swear where allowed by | 17 | * Game over. Go to the button. Press gently. Swear where allowed by |
18 | * legislation. | 18 | * legislation. |
19 | */ | 19 | */ |
20 | LEAF(except_vec2_generic) | 20 | LEAF(except_vec2_generic) |
21 | .set noreorder | 21 | .set noreorder |
22 | .set noat | 22 | .set noat |
23 | .set mips0 | 23 | .set mips0 |
24 | /* | 24 | /* |
25 | * This is a very bad place to be. Our cache error | 25 | * This is a very bad place to be. Our cache error |
26 | * detection has triggered. If we have write-back data | 26 | * detection has triggered. If we have write-back data |
27 | * in the cache, we may not be able to recover. As a | 27 | * in the cache, we may not be able to recover. As a |
28 | * first-order desperate measure, turn off KSEG0 cacheing. | 28 | * first-order desperate measure, turn off KSEG0 cacheing. |
29 | */ | 29 | */ |
30 | mfc0 k0,CP0_CONFIG | 30 | mfc0 k0,CP0_CONFIG |
diff --git a/arch/mips/mm/cex-oct.S b/arch/mips/mm/cex-oct.S index 3db8553fcd34..9029092aa740 100644 --- a/arch/mips/mm/cex-oct.S +++ b/arch/mips/mm/cex-oct.S | |||
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | LEAF(except_vec2_octeon) | 19 | LEAF(except_vec2_octeon) |
20 | 20 | ||
21 | .set push | 21 | .set push |
22 | .set mips64r2 | 22 | .set mips64r2 |
23 | .set noreorder | 23 | .set noreorder |
24 | .set noat | 24 | .set noat |
@@ -27,19 +27,19 @@ | |||
27 | /* due to an errata we need to read the COP0 CacheErr (Dcache) | 27 | /* due to an errata we need to read the COP0 CacheErr (Dcache) |
28 | * before any cache/DRAM access */ | 28 | * before any cache/DRAM access */ |
29 | 29 | ||
30 | rdhwr k0, $0 /* get core_id */ | 30 | rdhwr k0, $0 /* get core_id */ |
31 | PTR_LA k1, cache_err_dcache | 31 | PTR_LA k1, cache_err_dcache |
32 | sll k0, k0, 3 | 32 | sll k0, k0, 3 |
33 | PTR_ADDU k1, k0, k1 /* k1 = &cache_err_dcache[core_id] */ | 33 | PTR_ADDU k1, k0, k1 /* k1 = &cache_err_dcache[core_id] */ |
34 | 34 | ||
35 | dmfc0 k0, CP0_CACHEERR, 1 | 35 | dmfc0 k0, CP0_CACHEERR, 1 |
36 | sd k0, (k1) | 36 | sd k0, (k1) |
37 | dmtc0 $0, CP0_CACHEERR, 1 | 37 | dmtc0 $0, CP0_CACHEERR, 1 |
38 | 38 | ||
39 | /* check whether this is a nested exception */ | 39 | /* check whether this is a nested exception */ |
40 | mfc0 k1, CP0_STATUS | 40 | mfc0 k1, CP0_STATUS |
41 | andi k1, k1, ST0_EXL | 41 | andi k1, k1, ST0_EXL |
42 | beqz k1, 1f | 42 | beqz k1, 1f |
43 | nop | 43 | nop |
44 | j cache_parity_error_octeon_non_recoverable | 44 | j cache_parity_error_octeon_non_recoverable |
45 | nop | 45 | nop |
@@ -48,22 +48,22 @@ | |||
48 | 1: j handle_cache_err | 48 | 1: j handle_cache_err |
49 | nop | 49 | nop |
50 | 50 | ||
51 | .set pop | 51 | .set pop |
52 | END(except_vec2_octeon) | 52 | END(except_vec2_octeon) |
53 | 53 | ||
54 | /* We need to jump to handle_cache_err so that the previous handler | 54 | /* We need to jump to handle_cache_err so that the previous handler |
55 | * can fit within 0x80 bytes. We also move from 0xFFFFFFFFAXXXXXXX | 55 | * can fit within 0x80 bytes. We also move from 0xFFFFFFFFAXXXXXXX |
56 | * space (uncached) to the 0xFFFFFFFF8XXXXXXX space (cached). */ | 56 | * space (uncached) to the 0xFFFFFFFF8XXXXXXX space (cached). */ |
57 | LEAF(handle_cache_err) | 57 | LEAF(handle_cache_err) |
58 | .set push | 58 | .set push |
59 | .set noreorder | 59 | .set noreorder |
60 | .set noat | 60 | .set noat |
61 | 61 | ||
62 | SAVE_ALL | 62 | SAVE_ALL |
63 | KMODE | 63 | KMODE |
64 | jal cache_parity_error_octeon_recoverable | 64 | jal cache_parity_error_octeon_recoverable |
65 | nop | 65 | nop |
66 | j ret_from_exception | 66 | j ret_from_exception |
67 | nop | 67 | nop |
68 | 68 | ||
69 | .set pop | 69 | .set pop |
diff --git a/arch/mips/mm/cex-sb1.S b/arch/mips/mm/cex-sb1.S index 89c412bc4b64..fe1d887e8d70 100644 --- a/arch/mips/mm/cex-sb1.S +++ b/arch/mips/mm/cex-sb1.S | |||
@@ -24,9 +24,9 @@ | |||
24 | #include <asm/cacheops.h> | 24 | #include <asm/cacheops.h> |
25 | #include <asm/sibyte/board.h> | 25 | #include <asm/sibyte/board.h> |
26 | 26 | ||
27 | #define C0_ERRCTL $26 /* CP0: Error info */ | 27 | #define C0_ERRCTL $26 /* CP0: Error info */ |
28 | #define C0_CERR_I $27 /* CP0: Icache error */ | 28 | #define C0_CERR_I $27 /* CP0: Icache error */ |
29 | #define C0_CERR_D $27,1 /* CP0: Dcache error */ | 29 | #define C0_CERR_D $27,1 /* CP0: Dcache error */ |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Based on SiByte sample software cache-err/cerr.S | 32 | * Based on SiByte sample software cache-err/cerr.S |
@@ -88,7 +88,7 @@ attempt_recovery: | |||
88 | /* | 88 | /* |
89 | * k0 has C0_ERRCTL << 1, which puts 'DC' at bit 31. Any | 89 | * k0 has C0_ERRCTL << 1, which puts 'DC' at bit 31. Any |
90 | * Dcache errors we can recover from will take more extensive | 90 | * Dcache errors we can recover from will take more extensive |
91 | * processing. For now, they are considered "unrecoverable". | 91 | * processing. For now, they are considered "unrecoverable". |
92 | * Note that 'DC' becoming set (outside of ERL mode) will | 92 | * Note that 'DC' becoming set (outside of ERL mode) will |
93 | * cause 'IC' to clear; so if there's an Icache error, we'll | 93 | * cause 'IC' to clear; so if there's an Icache error, we'll |
94 | * only find out about it if we recover from this error and | 94 | * only find out about it if we recover from this error and |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 3fab2046c8a4..f9ef83829a52 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com> | 6 | * Copyright (C) 2000 Ani Joshi <ajoshi@unixbox.com> |
7 | * Copyright (C) 2000, 2001, 06 Ralf Baechle <ralf@linux-mips.org> | 7 | * Copyright (C) 2000, 2001, 06 Ralf Baechle <ralf@linux-mips.org> |
8 | * swiped from i386, and cloned for MIPS by Geert, polished by Ralf. | 8 | * swiped from i386, and cloned for MIPS by Geert, polished by Ralf. |
9 | */ | 9 | */ |
10 | 10 | ||
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index ddcec1e1a0cd..0fead53d1c26 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c | |||
@@ -52,7 +52,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ | |||
52 | 52 | ||
53 | #ifdef CONFIG_KPROBES | 53 | #ifdef CONFIG_KPROBES |
54 | /* | 54 | /* |
55 | * This is to notify the fault handler of the kprobes. The | 55 | * This is to notify the fault handler of the kprobes. The |
56 | * exception code is redundant as it is also carried in REGS, | 56 | * exception code is redundant as it is also carried in REGS, |
57 | * but we pass it anyhow. | 57 | * but we pass it anyhow. |
58 | */ | 58 | */ |
@@ -216,7 +216,7 @@ bad_area_nosemaphore: | |||
216 | } | 216 | } |
217 | 217 | ||
218 | no_context: | 218 | no_context: |
219 | /* Are we prepared to handle this kernel fault? */ | 219 | /* Are we prepared to handle this kernel fault? */ |
220 | if (fixup_exception(regs)) { | 220 | if (fixup_exception(regs)) { |
221 | current->thread.cp0_baduaddr = address; | 221 | current->thread.cp0_baduaddr = address; |
222 | return; | 222 | return; |
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c index dcfd573871c1..d4ea5c9c4a93 100644 --- a/arch/mips/mm/gup.c +++ b/arch/mips/mm/gup.c | |||
@@ -249,7 +249,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
249 | * @nr_pages: number of pages from start to pin | 249 | * @nr_pages: number of pages from start to pin |
250 | * @write: whether pages will be written to | 250 | * @write: whether pages will be written to |
251 | * @pages: array that receives pointers to the pages pinned. | 251 | * @pages: array that receives pointers to the pages pinned. |
252 | * Should be at least nr_pages long. | 252 | * Should be at least nr_pages long. |
253 | * | 253 | * |
254 | * Attempt to pin user pages in memory without taking mm->mmap_sem. | 254 | * Attempt to pin user pages in memory without taking mm->mmap_sem. |
255 | * If not successful, it will fall back to taking the lock and | 255 | * If not successful, it will fall back to taking the lock and |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index be9acb2b959d..67929251286c 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -66,7 +66,7 @@ | |||
66 | 66 | ||
67 | /* | 67 | /* |
68 | * We have up to 8 empty zeroed pages so we can map one of the right colour | 68 | * We have up to 8 empty zeroed pages so we can map one of the right colour |
69 | * when needed. This is necessary only on R4000 / R4400 SC and MC versions | 69 | * when needed. This is necessary only on R4000 / R4400 SC and MC versions |
70 | * where we have to avoid VCED / VECI exceptions for good performance at | 70 | * where we have to avoid VCED / VECI exceptions for good performance at |
71 | * any price. Since page is never written to after the initialization we | 71 | * any price. Since page is never written to after the initialization we |
72 | * don't have to care about aliases on other CPUs. | 72 | * don't have to care about aliases on other CPUs. |
@@ -380,7 +380,7 @@ void __init mem_init(void) | |||
380 | high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); | 380 | high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); |
381 | 381 | ||
382 | totalram_pages += free_all_bootmem(); | 382 | totalram_pages += free_all_bootmem(); |
383 | totalram_pages -= setup_zero_pages(); /* Setup zeroed pages. */ | 383 | totalram_pages -= setup_zero_pages(); /* Setup zeroed pages. */ |
384 | 384 | ||
385 | reservedpages = ram = 0; | 385 | reservedpages = ram = 0; |
386 | for (tmp = 0; tmp < max_low_pfn; tmp++) | 386 | for (tmp = 0; tmp < max_low_pfn; tmp++) |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index cacfd31e8ec9..7f840bc08abf 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
@@ -22,7 +22,7 @@ static inline void remap_area_pte(pte_t * pte, unsigned long address, | |||
22 | phys_t end; | 22 | phys_t end; |
23 | unsigned long pfn; | 23 | unsigned long pfn; |
24 | pgprot_t pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE | 24 | pgprot_t pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE |
25 | | __WRITEABLE | flags); | 25 | | __WRITEABLE | flags); |
26 | 26 | ||
27 | address &= ~PMD_MASK; | 27 | address &= ~PMD_MASK; |
28 | end = address + size; | 28 | end = address + size; |
@@ -185,7 +185,7 @@ void __iounmap(const volatile void __iomem *addr) | |||
185 | if (!p) | 185 | if (!p) |
186 | printk(KERN_ERR "iounmap: bad address %p\n", addr); | 186 | printk(KERN_ERR "iounmap: bad address %p\n", addr); |
187 | 187 | ||
188 | kfree(p); | 188 | kfree(p); |
189 | } | 189 | } |
190 | 190 | ||
191 | EXPORT_SYMBOL(__ioremap); | 191 | EXPORT_SYMBOL(__ioremap); |
diff --git a/arch/mips/mm/page.c b/arch/mips/mm/page.c index 8e666c55f4d4..a29fba55b53e 100644 --- a/arch/mips/mm/page.c +++ b/arch/mips/mm/page.c | |||
@@ -271,7 +271,7 @@ void __cpuinit build_clear_page(void) | |||
271 | uasm_i_lui(&buf, AT, 0xa000); | 271 | uasm_i_lui(&buf, AT, 0xa000); |
272 | 272 | ||
273 | off = cache_line_size ? min(8, pref_bias_clear_store / cache_line_size) | 273 | off = cache_line_size ? min(8, pref_bias_clear_store / cache_line_size) |
274 | * cache_line_size : 0; | 274 | * cache_line_size : 0; |
275 | while (off) { | 275 | while (off) { |
276 | build_clear_pref(&buf, -off); | 276 | build_clear_pref(&buf, -off); |
277 | off -= cache_line_size; | 277 | off -= cache_line_size; |
@@ -417,13 +417,13 @@ void __cpuinit build_copy_page(void) | |||
417 | uasm_i_lui(&buf, AT, 0xa000); | 417 | uasm_i_lui(&buf, AT, 0xa000); |
418 | 418 | ||
419 | off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) * | 419 | off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) * |
420 | cache_line_size : 0; | 420 | cache_line_size : 0; |
421 | while (off) { | 421 | while (off) { |
422 | build_copy_load_pref(&buf, -off); | 422 | build_copy_load_pref(&buf, -off); |
423 | off -= cache_line_size; | 423 | off -= cache_line_size; |
424 | } | 424 | } |
425 | off = cache_line_size ? min(8, pref_bias_copy_store / cache_line_size) * | 425 | off = cache_line_size ? min(8, pref_bias_copy_store / cache_line_size) * |
426 | cache_line_size : 0; | 426 | cache_line_size : 0; |
427 | while (off) { | 427 | while (off) { |
428 | build_copy_store_pref(&buf, -off); | 428 | build_copy_store_pref(&buf, -off); |
429 | off -= cache_line_size; | 429 | off -= cache_line_size; |
diff --git a/arch/mips/mm/pgtable-64.c b/arch/mips/mm/pgtable-64.c index ee331bbd8f8a..e8adc0069d66 100644 --- a/arch/mips/mm/pgtable-64.c +++ b/arch/mips/mm/pgtable-64.c | |||
@@ -24,7 +24,7 @@ void pgd_init(unsigned long page) | |||
24 | entry = (unsigned long)invalid_pmd_table; | 24 | entry = (unsigned long)invalid_pmd_table; |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | p = (unsigned long *) page; | 27 | p = (unsigned long *) page; |
28 | end = p + PTRS_PER_PGD; | 28 | end = p + PTRS_PER_PGD; |
29 | 29 | ||
30 | do { | 30 | do { |
@@ -45,7 +45,7 @@ void pmd_init(unsigned long addr, unsigned long pagetable) | |||
45 | { | 45 | { |
46 | unsigned long *p, *end; | 46 | unsigned long *p, *end; |
47 | 47 | ||
48 | p = (unsigned long *) addr; | 48 | p = (unsigned long *) addr; |
49 | end = p + PTRS_PER_PMD; | 49 | end = p + PTRS_PER_PMD; |
50 | 50 | ||
51 | do { | 51 | do { |
diff --git a/arch/mips/mm/sc-ip22.c b/arch/mips/mm/sc-ip22.c index 1eb708ef75ff..c6aaed934d53 100644 --- a/arch/mips/mm/sc-ip22.c +++ b/arch/mips/mm/sc-ip22.c | |||
@@ -159,7 +159,7 @@ static inline int __init indy_sc_probe(void) | |||
159 | } | 159 | } |
160 | 160 | ||
161 | /* XXX Check with wje if the Indy caches can differenciate between | 161 | /* XXX Check with wje if the Indy caches can differenciate between |
162 | writeback + invalidate and just invalidate. */ | 162 | writeback + invalidate and just invalidate. */ |
163 | static struct bcache_ops indy_sc_ops = { | 163 | static struct bcache_ops indy_sc_ops = { |
164 | .bc_enable = indy_sc_enable, | 164 | .bc_enable = indy_sc_enable, |
165 | .bc_disable = indy_sc_disable, | 165 | .bc_disable = indy_sc_disable, |
diff --git a/arch/mips/mm/sc-r5k.c b/arch/mips/mm/sc-r5k.c index 8d90ff25b123..8bc67720e145 100644 --- a/arch/mips/mm/sc-r5k.c +++ b/arch/mips/mm/sc-r5k.c | |||
@@ -58,7 +58,7 @@ static void r5k_dma_cache_inv_sc(unsigned long addr, unsigned long size) | |||
58 | 58 | ||
59 | static void r5k_sc_enable(void) | 59 | static void r5k_sc_enable(void) |
60 | { | 60 | { |
61 | unsigned long flags; | 61 | unsigned long flags; |
62 | 62 | ||
63 | local_irq_save(flags); | 63 | local_irq_save(flags); |
64 | set_c0_config(R5K_CONF_SE); | 64 | set_c0_config(R5K_CONF_SE); |
@@ -68,7 +68,7 @@ static void r5k_sc_enable(void) | |||
68 | 68 | ||
69 | static void r5k_sc_disable(void) | 69 | static void r5k_sc_disable(void) |
70 | { | 70 | { |
71 | unsigned long flags; | 71 | unsigned long flags; |
72 | 72 | ||
73 | local_irq_save(flags); | 73 | local_irq_save(flags); |
74 | blast_r5000_scache(); | 74 | blast_r5000_scache(); |
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 2a7c9725b2a3..493131c81a29 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -424,7 +424,7 @@ void __cpuinit tlb_init(void) | |||
424 | write_c0_pagegrain(pg); | 424 | write_c0_pagegrain(pg); |
425 | } | 425 | } |
426 | 426 | ||
427 | /* From this point on the ARC firmware is dead. */ | 427 | /* From this point on the ARC firmware is dead. */ |
428 | local_flush_tlb_all(); | 428 | local_flush_tlb_all(); |
429 | 429 | ||
430 | /* Did I tell you that ARC SUCKS? */ | 430 | /* Did I tell you that ARC SUCKS? */ |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 1c8ac49ec72c..36b9bd89c799 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Synthesize TLB refill handlers at runtime. | 6 | * Synthesize TLB refill handlers at runtime. |
7 | * | 7 | * |
8 | * Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer | 8 | * Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer |
9 | * Copyright (C) 2005, 2007, 2008, 2009 Maciej W. Rozycki | 9 | * Copyright (C) 2005, 2007, 2008, 2009 Maciej W. Rozycki |
10 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) | 10 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) |
11 | * Copyright (C) 2008, 2009 Cavium Networks, Inc. | 11 | * Copyright (C) 2008, 2009 Cavium Networks, Inc. |
12 | * Copyright (C) 2011 MIPS Technologies, Inc. | 12 | * Copyright (C) 2011 MIPS Technologies, Inc. |
@@ -212,7 +212,7 @@ static void __cpuinit uasm_bgezl_label(struct uasm_label **l, | |||
212 | /* | 212 | /* |
213 | * pgtable bits are assigned dynamically depending on processor feature | 213 | * pgtable bits are assigned dynamically depending on processor feature |
214 | * and statically based on kernel configuration. This spits out the actual | 214 | * and statically based on kernel configuration. This spits out the actual |
215 | * values the kernel is using. Required to make sense from disassembled | 215 | * values the kernel is using. Required to make sense from disassembled |
216 | * TLB exception handlers. | 216 | * TLB exception handlers. |
217 | */ | 217 | */ |
218 | static void output_pgtable_bits_defines(void) | 218 | static void output_pgtable_bits_defines(void) |
@@ -464,8 +464,8 @@ static u32 final_handler[64] __cpuinitdata; | |||
464 | * From the IDT errata for the QED RM5230 (Nevada), processor revision 1.0: | 464 | * From the IDT errata for the QED RM5230 (Nevada), processor revision 1.0: |
465 | * 2. A timing hazard exists for the TLBP instruction. | 465 | * 2. A timing hazard exists for the TLBP instruction. |
466 | * | 466 | * |
467 | * stalling_instruction | 467 | * stalling_instruction |
468 | * TLBP | 468 | * TLBP |
469 | * | 469 | * |
470 | * The JTLB is being read for the TLBP throughout the stall generated by the | 470 | * The JTLB is being read for the TLBP throughout the stall generated by the |
471 | * previous instruction. This is not really correct as the stalling instruction | 471 | * previous instruction. This is not really correct as the stalling instruction |
@@ -476,7 +476,7 @@ static u32 final_handler[64] __cpuinitdata; | |||
476 | * The software work-around is to not allow the instruction preceding the TLBP | 476 | * The software work-around is to not allow the instruction preceding the TLBP |
477 | * to stall - make it an NOP or some other instruction guaranteed not to stall. | 477 | * to stall - make it an NOP or some other instruction guaranteed not to stall. |
478 | * | 478 | * |
479 | * Errata 2 will not be fixed. This errata is also on the R5000. | 479 | * Errata 2 will not be fixed. This errata is also on the R5000. |
480 | * | 480 | * |
481 | * As if we MIPS hackers wouldn't know how to nop pipelines happy ... | 481 | * As if we MIPS hackers wouldn't know how to nop pipelines happy ... |
482 | */ | 482 | */ |
@@ -748,7 +748,7 @@ static __cpuinit void build_huge_update_entries(u32 **p, | |||
748 | */ | 748 | */ |
749 | small_sequence = (HPAGE_SIZE >> 7) < 0x10000; | 749 | small_sequence = (HPAGE_SIZE >> 7) < 0x10000; |
750 | 750 | ||
751 | /* We can clobber tmp. It isn't used after this.*/ | 751 | /* We can clobber tmp. It isn't used after this.*/ |
752 | if (!small_sequence) | 752 | if (!small_sequence) |
753 | uasm_i_lui(p, tmp, HPAGE_SIZE >> (7 + 16)); | 753 | uasm_i_lui(p, tmp, HPAGE_SIZE >> (7 + 16)); |
754 | 754 | ||
@@ -830,12 +830,12 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
830 | /* Clear lower 23 bits of context. */ | 830 | /* Clear lower 23 bits of context. */ |
831 | uasm_i_dins(p, ptr, 0, 0, 23); | 831 | uasm_i_dins(p, ptr, 0, 0, 23); |
832 | 832 | ||
833 | /* 1 0 1 0 1 << 6 xkphys cached */ | 833 | /* 1 0 1 0 1 << 6 xkphys cached */ |
834 | uasm_i_ori(p, ptr, ptr, 0x540); | 834 | uasm_i_ori(p, ptr, ptr, 0x540); |
835 | uasm_i_drotr(p, ptr, ptr, 11); | 835 | uasm_i_drotr(p, ptr, ptr, 11); |
836 | } | 836 | } |
837 | #elif defined(CONFIG_SMP) | 837 | #elif defined(CONFIG_SMP) |
838 | # ifdef CONFIG_MIPS_MT_SMTC | 838 | # ifdef CONFIG_MIPS_MT_SMTC |
839 | /* | 839 | /* |
840 | * SMTC uses TCBind value as "CPU" index | 840 | * SMTC uses TCBind value as "CPU" index |
841 | */ | 841 | */ |
@@ -955,7 +955,7 @@ build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr) | |||
955 | 955 | ||
956 | /* 32 bit SMP has smp_processor_id() stored in CONTEXT. */ | 956 | /* 32 bit SMP has smp_processor_id() stored in CONTEXT. */ |
957 | #ifdef CONFIG_SMP | 957 | #ifdef CONFIG_SMP |
958 | #ifdef CONFIG_MIPS_MT_SMTC | 958 | #ifdef CONFIG_MIPS_MT_SMTC |
959 | /* | 959 | /* |
960 | * SMTC uses TCBind value as "CPU" index | 960 | * SMTC uses TCBind value as "CPU" index |
961 | */ | 961 | */ |
@@ -965,7 +965,7 @@ build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr) | |||
965 | #else | 965 | #else |
966 | /* | 966 | /* |
967 | * smp_processor_id() << 3 is stored in CONTEXT. | 967 | * smp_processor_id() << 3 is stored in CONTEXT. |
968 | */ | 968 | */ |
969 | uasm_i_mfc0(p, ptr, C0_CONTEXT); | 969 | uasm_i_mfc0(p, ptr, C0_CONTEXT); |
970 | UASM_i_LA_mostly(p, tmp, pgdc); | 970 | UASM_i_LA_mostly(p, tmp, pgdc); |
971 | uasm_i_srl(p, ptr, ptr, 23); | 971 | uasm_i_srl(p, ptr, ptr, 23); |
@@ -1153,7 +1153,7 @@ build_fast_tlb_refill_handler (u32 **p, struct uasm_label **l, | |||
1153 | 1153 | ||
1154 | if (pgd_reg == -1) { | 1154 | if (pgd_reg == -1) { |
1155 | vmalloc_branch_delay_filled = 1; | 1155 | vmalloc_branch_delay_filled = 1; |
1156 | /* 1 0 1 0 1 << 6 xkphys cached */ | 1156 | /* 1 0 1 0 1 << 6 xkphys cached */ |
1157 | uasm_i_ori(p, ptr, ptr, 0x540); | 1157 | uasm_i_ori(p, ptr, ptr, 0x540); |
1158 | uasm_i_drotr(p, ptr, ptr, 11); | 1158 | uasm_i_drotr(p, ptr, ptr, 11); |
1159 | } | 1159 | } |
@@ -1171,9 +1171,9 @@ build_fast_tlb_refill_handler (u32 **p, struct uasm_label **l, | |||
1171 | uasm_l_vmalloc_done(l, *p); | 1171 | uasm_l_vmalloc_done(l, *p); |
1172 | 1172 | ||
1173 | /* | 1173 | /* |
1174 | * tmp ptr | 1174 | * tmp ptr |
1175 | * fall-through case = badvaddr *pgd_current | 1175 | * fall-through case = badvaddr *pgd_current |
1176 | * vmalloc case = badvaddr swapper_pg_dir | 1176 | * vmalloc case = badvaddr swapper_pg_dir |
1177 | */ | 1177 | */ |
1178 | 1178 | ||
1179 | if (vmalloc_branch_delay_filled) | 1179 | if (vmalloc_branch_delay_filled) |
@@ -1212,7 +1212,7 @@ build_fast_tlb_refill_handler (u32 **p, struct uasm_label **l, | |||
1212 | uasm_il_bbit1(p, r, scratch, ilog2(_PAGE_HUGE), label_tlb_huge_update); | 1212 | uasm_il_bbit1(p, r, scratch, ilog2(_PAGE_HUGE), label_tlb_huge_update); |
1213 | /* | 1213 | /* |
1214 | * The in the LWX case we don't want to do the load in the | 1214 | * The in the LWX case we don't want to do the load in the |
1215 | * delay slot. It cannot issue in the same cycle and may be | 1215 | * delay slot. It cannot issue in the same cycle and may be |
1216 | * speculative and unneeded. | 1216 | * speculative and unneeded. |
1217 | */ | 1217 | */ |
1218 | if (use_lwx_insns()) | 1218 | if (use_lwx_insns()) |
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c index 39b891056227..942ff6c2eba2 100644 --- a/arch/mips/mm/uasm.c +++ b/arch/mips/mm/uasm.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * support a subset of instructions, and does not try to hide pipeline | 7 | * support a subset of instructions, and does not try to hide pipeline |
8 | * effects like branch delay slots. | 8 | * effects like branch delay slots. |
9 | * | 9 | * |
10 | * Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer | 10 | * Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer |
11 | * Copyright (C) 2005, 2007 Maciej W. Rozycki | 11 | * Copyright (C) 2005, 2007 Maciej W. Rozycki |
12 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) | 12 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) |
13 | */ | 13 | */ |
@@ -119,30 +119,30 @@ static struct insn insn_table[] __uasminitdata = { | |||
119 | { insn_ext, M(spec3_op, 0, 0, 0, 0, ext_op), RS | RT | RD | RE }, | 119 | { insn_ext, M(spec3_op, 0, 0, 0, 0, ext_op), RS | RT | RD | RE }, |
120 | { insn_ins, M(spec3_op, 0, 0, 0, 0, ins_op), RS | RT | RD | RE }, | 120 | { insn_ins, M(spec3_op, 0, 0, 0, 0, ins_op), RS | RT | RD | RE }, |
121 | { insn_j, M(j_op, 0, 0, 0, 0, 0), JIMM }, | 121 | { insn_j, M(j_op, 0, 0, 0, 0, 0), JIMM }, |
122 | { insn_jal, M(jal_op, 0, 0, 0, 0, 0), JIMM }, | 122 | { insn_jal, M(jal_op, 0, 0, 0, 0, 0), JIMM }, |
123 | { insn_j, M(j_op, 0, 0, 0, 0, 0), JIMM }, | 123 | { insn_j, M(j_op, 0, 0, 0, 0, 0), JIMM }, |
124 | { insn_jr, M(spec_op, 0, 0, 0, 0, jr_op), RS }, | 124 | { insn_jr, M(spec_op, 0, 0, 0, 0, jr_op), RS }, |
125 | { insn_ld, M(ld_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 125 | { insn_ld, M(ld_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
126 | { insn_ldx, M(spec3_op, 0, 0, 0, ldx_op, lx_op), RS | RT | RD }, | 126 | { insn_ldx, M(spec3_op, 0, 0, 0, ldx_op, lx_op), RS | RT | RD }, |
127 | { insn_lld, M(lld_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 127 | { insn_lld, M(lld_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
128 | { insn_ll, M(ll_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 128 | { insn_ll, M(ll_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
129 | { insn_lui, M(lui_op, 0, 0, 0, 0, 0), RT | SIMM }, | 129 | { insn_lui, M(lui_op, 0, 0, 0, 0, 0), RT | SIMM }, |
130 | { insn_lw, M(lw_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 130 | { insn_lw, M(lw_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
131 | { insn_lwx, M(spec3_op, 0, 0, 0, lwx_op, lx_op), RS | RT | RD }, | 131 | { insn_lwx, M(spec3_op, 0, 0, 0, lwx_op, lx_op), RS | RT | RD }, |
132 | { insn_mfc0, M(cop0_op, mfc_op, 0, 0, 0, 0), RT | RD | SET}, | 132 | { insn_mfc0, M(cop0_op, mfc_op, 0, 0, 0, 0), RT | RD | SET}, |
133 | { insn_mtc0, M(cop0_op, mtc_op, 0, 0, 0, 0), RT | RD | SET}, | 133 | { insn_mtc0, M(cop0_op, mtc_op, 0, 0, 0, 0), RT | RD | SET}, |
134 | { insn_ori, M(ori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, | 134 | { insn_ori, M(ori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, |
135 | { insn_or, M(spec_op, 0, 0, 0, 0, or_op), RS | RT | RD }, | 135 | { insn_or, M(spec_op, 0, 0, 0, 0, or_op), RS | RT | RD }, |
136 | { insn_pref, M(pref_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 136 | { insn_pref, M(pref_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
137 | { insn_rfe, M(cop0_op, cop_op, 0, 0, 0, rfe_op), 0 }, | 137 | { insn_rfe, M(cop0_op, cop_op, 0, 0, 0, rfe_op), 0 }, |
138 | { insn_rotr, M(spec_op, 1, 0, 0, 0, srl_op), RT | RD | RE }, | 138 | { insn_rotr, M(spec_op, 1, 0, 0, 0, srl_op), RT | RD | RE }, |
139 | { insn_scd, M(scd_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 139 | { insn_scd, M(scd_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
140 | { insn_sc, M(sc_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 140 | { insn_sc, M(sc_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
141 | { insn_sd, M(sd_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 141 | { insn_sd, M(sd_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
142 | { insn_sll, M(spec_op, 0, 0, 0, 0, sll_op), RT | RD | RE }, | 142 | { insn_sll, M(spec_op, 0, 0, 0, 0, sll_op), RT | RD | RE }, |
143 | { insn_sra, M(spec_op, 0, 0, 0, 0, sra_op), RT | RD | RE }, | 143 | { insn_sra, M(spec_op, 0, 0, 0, 0, sra_op), RT | RD | RE }, |
144 | { insn_srl, M(spec_op, 0, 0, 0, 0, srl_op), RT | RD | RE }, | 144 | { insn_srl, M(spec_op, 0, 0, 0, 0, srl_op), RT | RD | RE }, |
145 | { insn_subu, M(spec_op, 0, 0, 0, 0, subu_op), RS | RT | RD }, | 145 | { insn_subu, M(spec_op, 0, 0, 0, 0, subu_op), RS | RT | RD }, |
146 | { insn_sw, M(sw_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 146 | { insn_sw, M(sw_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
147 | { insn_syscall, M(spec_op, 0, 0, 0, 0, syscall_op), SCIMM}, | 147 | { insn_syscall, M(spec_op, 0, 0, 0, 0, syscall_op), SCIMM}, |
148 | { insn_tlbp, M(cop0_op, cop_op, 0, 0, 0, tlbp_op), 0 }, | 148 | { insn_tlbp, M(cop0_op, cop_op, 0, 0, 0, tlbp_op), 0 }, |
@@ -345,7 +345,7 @@ Ip_u2u1msbu3(op) \ | |||
345 | } \ | 345 | } \ |
346 | UASM_EXPORT_SYMBOL(uasm_i##op); | 346 | UASM_EXPORT_SYMBOL(uasm_i##op); |
347 | 347 | ||
348 | #define I_u2u1msbdu3(op) \ | 348 | #define I_u2u1msbdu3(op) \ |
349 | Ip_u2u1msbu3(op) \ | 349 | Ip_u2u1msbu3(op) \ |
350 | { \ | 350 | { \ |
351 | build_insn(buf, insn##op, b, a, d-1, c); \ | 351 | build_insn(buf, insn##op, b, a, d-1, c); \ |
diff --git a/arch/mips/mti-malta/malta-amon.c b/arch/mips/mti-malta/malta-amon.c index 469d9b0cee6d..1e4784458016 100644 --- a/arch/mips/mti-malta/malta-amon.c +++ b/arch/mips/mti-malta/malta-amon.c | |||
@@ -70,12 +70,12 @@ void amon_cpu_start(int cpu, | |||
70 | launch->sp = sp; | 70 | launch->sp = sp; |
71 | launch->a0 = a0; | 71 | launch->a0 = a0; |
72 | 72 | ||
73 | smp_wmb(); /* Target must see parameters before go */ | 73 | smp_wmb(); /* Target must see parameters before go */ |
74 | launch->flags |= LAUNCH_FGO; | 74 | launch->flags |= LAUNCH_FGO; |
75 | smp_wmb(); /* Target must see go before we poll */ | 75 | smp_wmb(); /* Target must see go before we poll */ |
76 | 76 | ||
77 | while ((launch->flags & LAUNCH_FGONE) == 0) | 77 | while ((launch->flags & LAUNCH_FGONE) == 0) |
78 | ; | 78 | ; |
79 | smp_rmb(); /* Target will be updating flags soon */ | 79 | smp_rmb(); /* Target will be updating flags soon */ |
80 | pr_debug("launch: cpu%d gone!\n", cpu); | 80 | pr_debug("launch: cpu%d gone!\n", cpu); |
81 | } | 81 | } |
diff --git a/arch/mips/mti-malta/malta-cmdline.c b/arch/mips/mti-malta/malta-cmdline.c index 1871c30ed2eb..5576a306a145 100644 --- a/arch/mips/mti-malta/malta-cmdline.c +++ b/arch/mips/mti-malta/malta-cmdline.c | |||
@@ -46,7 +46,7 @@ void __init prom_init_cmdline(void) | |||
46 | 46 | ||
47 | cp = &(arcs_cmdline[0]); | 47 | cp = &(arcs_cmdline[0]); |
48 | while(actr < prom_argc) { | 48 | while(actr < prom_argc) { |
49 | strcpy(cp, prom_argv(actr)); | 49 | strcpy(cp, prom_argv(actr)); |
50 | cp += strlen(prom_argv(actr)); | 50 | cp += strlen(prom_argv(actr)); |
51 | *cp++ = ' '; | 51 | *cp++ = ' '; |
52 | actr++; | 52 | actr++; |
diff --git a/arch/mips/mti-malta/malta-display.c b/arch/mips/mti-malta/malta-display.c index 7c8828fcb0ad..9bc58a24e80a 100644 --- a/arch/mips/mti-malta/malta-display.c +++ b/arch/mips/mti-malta/malta-display.c | |||
@@ -37,10 +37,10 @@ void mips_display_message(const char *str) | |||
37 | display = ioremap(ASCII_DISPLAY_POS_BASE, 16*sizeof(int)); | 37 | display = ioremap(ASCII_DISPLAY_POS_BASE, 16*sizeof(int)); |
38 | 38 | ||
39 | for (i = 0; i <= 14; i=i+2) { | 39 | for (i = 0; i <= 14; i=i+2) { |
40 | if (*str) | 40 | if (*str) |
41 | __raw_writel(*str++, display + i); | 41 | __raw_writel(*str++, display + i); |
42 | else | 42 | else |
43 | __raw_writel(' ', display + i); | 43 | __raw_writel(' ', display + i); |
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c index 27a6cdb36e37..c2cbce9e435e 100644 --- a/arch/mips/mti-malta/malta-init.c +++ b/arch/mips/mti-malta/malta-init.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc. | 2 | * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc. |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * Authors: Carsten Langgaard <carstenl@mips.com> | 4 | * Authors: Carsten Langgaard <carstenl@mips.com> |
5 | * Maciej W. Rozycki <macro@mips.com> | 5 | * Maciej W. Rozycki <macro@mips.com> |
@@ -110,20 +110,20 @@ static inline void str2eaddr(unsigned char *ea, unsigned char *str) | |||
110 | 110 | ||
111 | int get_ethernet_addr(char *ethernet_addr) | 111 | int get_ethernet_addr(char *ethernet_addr) |
112 | { | 112 | { |
113 | char *ethaddr_str; | 113 | char *ethaddr_str; |
114 | 114 | ||
115 | ethaddr_str = prom_getenv("ethaddr"); | 115 | ethaddr_str = prom_getenv("ethaddr"); |
116 | if (!ethaddr_str) { | 116 | if (!ethaddr_str) { |
117 | printk("ethaddr not set in boot prom\n"); | 117 | printk("ethaddr not set in boot prom\n"); |
118 | return -1; | 118 | return -1; |
119 | } | 119 | } |
120 | str2eaddr(ethernet_addr, ethaddr_str); | 120 | str2eaddr(ethernet_addr, ethaddr_str); |
121 | 121 | ||
122 | if (init_debug > 1) { | 122 | if (init_debug > 1) { |
123 | int i; | 123 | int i; |
124 | printk("get_ethernet_addr: "); | 124 | printk("get_ethernet_addr: "); |
125 | for (i=0; i<5; i++) | 125 | for (i=0; i<5; i++) |
126 | printk("%02x:", (unsigned char)*(ethernet_addr+i)); | 126 | printk("%02x:", (unsigned char)*(ethernet_addr+i)); |
127 | printk("%02x\n", *(ethernet_addr+i)); | 127 | printk("%02x\n", *(ethernet_addr+i)); |
128 | } | 128 | } |
129 | 129 | ||
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index 647b86383184..e364af70e6cf 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
@@ -84,10 +84,10 @@ static inline int mips_pcibios_iack(void) | |||
84 | 84 | ||
85 | /* Flush Bonito register block */ | 85 | /* Flush Bonito register block */ |
86 | (void) BONITO_PCIMAP_CFG; | 86 | (void) BONITO_PCIMAP_CFG; |
87 | iob(); /* sync */ | 87 | iob(); /* sync */ |
88 | 88 | ||
89 | irq = __raw_readl((u32 *)_pcictrl_bonito_pcicfg); | 89 | irq = __raw_readl((u32 *)_pcictrl_bonito_pcicfg); |
90 | iob(); /* sync */ | 90 | iob(); /* sync */ |
91 | irq &= 0xff; | 91 | irq &= 0xff; |
92 | BONITO_PCIMAP_CFG = 0; | 92 | BONITO_PCIMAP_CFG = 0; |
93 | break; | 93 | break; |
@@ -136,7 +136,7 @@ static void malta_ipi_irqdispatch(void) | |||
136 | 136 | ||
137 | irq = gic_get_int(); | 137 | irq = gic_get_int(); |
138 | if (irq < 0) | 138 | if (irq < 0) |
139 | return; /* interrupt has already been cleared */ | 139 | return; /* interrupt has already been cleared */ |
140 | 140 | ||
141 | do_IRQ(MIPS_GIC_IRQ_BASE + irq); | 141 | do_IRQ(MIPS_GIC_IRQ_BASE + irq); |
142 | } | 142 | } |
@@ -149,7 +149,7 @@ static void corehi_irqdispatch(void) | |||
149 | struct pt_regs *regs = get_irq_regs(); | 149 | struct pt_regs *regs = get_irq_regs(); |
150 | 150 | ||
151 | printk(KERN_EMERG "CoreHI interrupt, shouldn't happen, we die here!\n"); | 151 | printk(KERN_EMERG "CoreHI interrupt, shouldn't happen, we die here!\n"); |
152 | printk(KERN_EMERG "epc : %08lx\nStatus: %08lx\n" | 152 | printk(KERN_EMERG "epc : %08lx\nStatus: %08lx\n" |
153 | "Cause : %08lx\nbadVaddr : %08lx\n", | 153 | "Cause : %08lx\nbadVaddr : %08lx\n", |
154 | regs->cp0_epc, regs->cp0_status, | 154 | regs->cp0_epc, regs->cp0_status, |
155 | regs->cp0_cause, regs->cp0_badvaddr); | 155 | regs->cp0_cause, regs->cp0_badvaddr); |
@@ -249,20 +249,20 @@ static inline unsigned int irq_ffs(unsigned int pending) | |||
249 | * on hardware interrupt 0 (MIPS IRQ 2)) like: | 249 | * on hardware interrupt 0 (MIPS IRQ 2)) like: |
250 | * | 250 | * |
251 | * MIPS IRQ Source | 251 | * MIPS IRQ Source |
252 | * -------- ------ | 252 | * -------- ------ |
253 | * 0 Software (ignored) | 253 | * 0 Software (ignored) |
254 | * 1 Software (ignored) | 254 | * 1 Software (ignored) |
255 | * 2 Combined hardware interrupt (hw0) | 255 | * 2 Combined hardware interrupt (hw0) |
256 | * 3 Hardware (ignored) | 256 | * 3 Hardware (ignored) |
257 | * 4 Hardware (ignored) | 257 | * 4 Hardware (ignored) |
258 | * 5 Hardware (ignored) | 258 | * 5 Hardware (ignored) |
259 | * 6 Hardware (ignored) | 259 | * 6 Hardware (ignored) |
260 | * 7 R4k timer (what we use) | 260 | * 7 R4k timer (what we use) |
261 | * | 261 | * |
262 | * We handle the IRQ according to _our_ priority which is: | 262 | * We handle the IRQ according to _our_ priority which is: |
263 | * | 263 | * |
264 | * Highest ---- R4k Timer | 264 | * Highest ---- R4k Timer |
265 | * Lowest ---- Combined hardware interrupt | 265 | * Lowest ---- Combined hardware interrupt |
266 | * | 266 | * |
267 | * then we just return, if multiple IRQs are pending then we will just take | 267 | * then we just return, if multiple IRQs are pending then we will just take |
268 | * another exception, big deal. | 268 | * another exception, big deal. |
@@ -396,7 +396,7 @@ static int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap); | |||
396 | 396 | ||
397 | static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { | 397 | static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { |
398 | { X, X, X, X, 0 }, | 398 | { X, X, X, X, 0 }, |
399 | { X, X, X, X, 0 }, | 399 | { X, X, X, X, 0 }, |
400 | { X, X, X, X, 0 }, | 400 | { X, X, X, X, 0 }, |
401 | { 0, GIC_CPU_INT0, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, | 401 | { 0, GIC_CPU_INT0, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, |
402 | { 0, GIC_CPU_INT1, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, | 402 | { 0, GIC_CPU_INT1, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, |
@@ -410,7 +410,7 @@ static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = { | |||
410 | { 0, GIC_CPU_INT3, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, | 410 | { 0, GIC_CPU_INT3, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, |
411 | { 0, GIC_CPU_NMI, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, | 411 | { 0, GIC_CPU_NMI, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, |
412 | { 0, GIC_CPU_NMI, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, | 412 | { 0, GIC_CPU_NMI, GIC_POL_POS, GIC_TRIG_LEVEL, GIC_FLAG_TRANSPARENT }, |
413 | { X, X, X, X, 0 }, | 413 | { X, X, X, X, 0 }, |
414 | /* The remainder of this table is initialised by fill_ipi_map */ | 414 | /* The remainder of this table is initialised by fill_ipi_map */ |
415 | }; | 415 | }; |
416 | #undef X | 416 | #undef X |
@@ -634,7 +634,7 @@ void malta_be_init(void) | |||
634 | 634 | ||
635 | static char *tr[8] = { | 635 | static char *tr[8] = { |
636 | "mem", "gcr", "gic", "mmio", | 636 | "mem", "gcr", "gic", "mmio", |
637 | "0x04", "0x05", "0x06", "0x07" | 637 | "0x04", "0x05", "0x06", "0x07" |
638 | }; | 638 | }; |
639 | 639 | ||
640 | static char *mcmd[32] = { | 640 | static char *mcmd[32] = { |
@@ -673,10 +673,10 @@ static char *mcmd[32] = { | |||
673 | }; | 673 | }; |
674 | 674 | ||
675 | static char *core[8] = { | 675 | static char *core[8] = { |
676 | "Invalid/OK", "Invalid/Data", | 676 | "Invalid/OK", "Invalid/Data", |
677 | "Shared/OK", "Shared/Data", | 677 | "Shared/OK", "Shared/Data", |
678 | "Modified/OK", "Modified/Data", | 678 | "Modified/OK", "Modified/Data", |
679 | "Exclusive/OK", "Exclusive/Data" | 679 | "Exclusive/OK", "Exclusive/Data" |
680 | }; | 680 | }; |
681 | 681 | ||
682 | static char *causes[32] = { | 682 | static char *causes[32] = { |
diff --git a/arch/mips/mti-malta/malta-memory.c b/arch/mips/mti-malta/malta-memory.c index a96d281f9221..f3d43aa023a9 100644 --- a/arch/mips/mti-malta/malta-memory.c +++ b/arch/mips/mti-malta/malta-memory.c | |||
@@ -47,7 +47,7 @@ static char *mtypes[3] = { | |||
47 | }; | 47 | }; |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | /* determined physical memory size, not overridden by command line args */ | 50 | /* determined physical memory size, not overridden by command line args */ |
51 | unsigned long physical_memsize = 0L; | 51 | unsigned long physical_memsize = 0L; |
52 | 52 | ||
53 | static struct prom_pmemblock * __init prom_getmdesc(void) | 53 | static struct prom_pmemblock * __init prom_getmdesc(void) |
@@ -158,7 +158,7 @@ void __init prom_meminit(void) | |||
158 | size = p->size; | 158 | size = p->size; |
159 | 159 | ||
160 | add_memory_region(base, size, type); | 160 | add_memory_region(base, size, type); |
161 | p++; | 161 | p++; |
162 | } | 162 | } |
163 | } | 163 | } |
164 | 164 | ||
diff --git a/arch/mips/mti-malta/malta-pci.c b/arch/mips/mti-malta/malta-pci.c index 2147cb34e705..37134ddfeaa5 100644 --- a/arch/mips/mti-malta/malta-pci.c +++ b/arch/mips/mti-malta/malta-pci.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc. | 2 | * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc. |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * Authors: Carsten Langgaard <carstenl@mips.com> | 4 | * Authors: Carsten Langgaard <carstenl@mips.com> |
5 | * Maciej W. Rozycki <macro@mips.com> | 5 | * Maciej W. Rozycki <macro@mips.com> |
@@ -127,7 +127,7 @@ void __init mips_pcibios_init(void) | |||
127 | map = map1; | 127 | map = map1; |
128 | } | 128 | } |
129 | mask = ~(start ^ end); | 129 | mask = ~(start ^ end); |
130 | /* We don't support remapping with a discontiguous mask. */ | 130 | /* We don't support remapping with a discontiguous mask. */ |
131 | BUG_ON((start & GT_PCI_HD_MSK) != (map & GT_PCI_HD_MSK) && | 131 | BUG_ON((start & GT_PCI_HD_MSK) != (map & GT_PCI_HD_MSK) && |
132 | mask != ~((mask & -mask) - 1)); | 132 | mask != ~((mask & -mask) - 1)); |
133 | gt64120_mem_resource.start = start; | 133 | gt64120_mem_resource.start = start; |
@@ -144,7 +144,7 @@ void __init mips_pcibios_init(void) | |||
144 | map = GT_READ(GT_PCI0IOREMAP_OFS); | 144 | map = GT_READ(GT_PCI0IOREMAP_OFS); |
145 | end = (end & GT_PCI_HD_MSK) | (start & ~GT_PCI_HD_MSK); | 145 | end = (end & GT_PCI_HD_MSK) | (start & ~GT_PCI_HD_MSK); |
146 | mask = ~(start ^ end); | 146 | mask = ~(start ^ end); |
147 | /* We don't support remapping with a discontiguous mask. */ | 147 | /* We don't support remapping with a discontiguous mask. */ |
148 | BUG_ON((start & GT_PCI_HD_MSK) != (map & GT_PCI_HD_MSK) && | 148 | BUG_ON((start & GT_PCI_HD_MSK) != (map & GT_PCI_HD_MSK) && |
149 | mask != ~((mask & -mask) - 1)); | 149 | mask != ~((mask & -mask) - 1)); |
150 | gt64120_io_resource.start = map & mask; | 150 | gt64120_io_resource.start = map & mask; |
diff --git a/arch/mips/mti-malta/malta-platform.c b/arch/mips/mti-malta/malta-platform.c index 74732177851c..132f8663825e 100644 --- a/arch/mips/mti-malta/malta-platform.c +++ b/arch/mips/mti-malta/malta-platform.c | |||
@@ -93,7 +93,7 @@ static struct mtd_partition malta_mtd_partitions[] = { | |||
93 | .mask_flags = MTD_WRITEABLE | 93 | .mask_flags = MTD_WRITEABLE |
94 | }, { | 94 | }, { |
95 | .name = "User FS", | 95 | .name = "User FS", |
96 | .offset = 0x100000, | 96 | .offset = 0x100000, |
97 | .size = 0x2e0000 | 97 | .size = 0x2e0000 |
98 | }, { | 98 | }, { |
99 | .name = "Board Config", | 99 | .name = "Board Config", |
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c index 2e28f653f66d..200f64df2c9b 100644 --- a/arch/mips/mti-malta/malta-setup.c +++ b/arch/mips/mti-malta/malta-setup.c | |||
@@ -78,9 +78,9 @@ const char *get_system_type(void) | |||
78 | } | 78 | } |
79 | 79 | ||
80 | #if defined(CONFIG_MIPS_MT_SMTC) | 80 | #if defined(CONFIG_MIPS_MT_SMTC) |
81 | const char display_string[] = " SMTC LINUX ON MALTA "; | 81 | const char display_string[] = " SMTC LINUX ON MALTA "; |
82 | #else | 82 | #else |
83 | const char display_string[] = " LINUX ON MALTA "; | 83 | const char display_string[] = " LINUX ON MALTA "; |
84 | #endif /* CONFIG_MIPS_MT_SMTC */ | 84 | #endif /* CONFIG_MIPS_MT_SMTC */ |
85 | 85 | ||
86 | #ifdef CONFIG_BLK_DEV_FD | 86 | #ifdef CONFIG_BLK_DEV_FD |
diff --git a/arch/mips/mti-malta/malta-smtc.c b/arch/mips/mti-malta/malta-smtc.c index 1efc8c394486..becbf47506a5 100644 --- a/arch/mips/mti-malta/malta-smtc.c +++ b/arch/mips/mti-malta/malta-smtc.c | |||
@@ -126,7 +126,7 @@ int plat_set_irq_affinity(struct irq_data *d, const struct cpumask *affinity, | |||
126 | * to the CPU daughterboard, and on the CoreFPGA2/3 34K models, | 126 | * to the CPU daughterboard, and on the CoreFPGA2/3 34K models, |
127 | * that signal is brought to IP2 of both VPEs. To avoid racing | 127 | * that signal is brought to IP2 of both VPEs. To avoid racing |
128 | * concurrent interrupt service events, IP2 is enabled only on | 128 | * concurrent interrupt service events, IP2 is enabled only on |
129 | * one VPE, by convention VPE0. So long as no bits are ever | 129 | * one VPE, by convention VPE0. So long as no bits are ever |
130 | * cleared in the affinity mask, there will never be any | 130 | * cleared in the affinity mask, there will never be any |
131 | * interrupt forwarding. But as soon as a program or operator | 131 | * interrupt forwarding. But as soon as a program or operator |
132 | * sets affinity for one of the related IRQs, we need to make | 132 | * sets affinity for one of the related IRQs, we need to make |
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c index 115f5bc06003..8607b0dd29f6 100644 --- a/arch/mips/mti-malta/malta-time.c +++ b/arch/mips/mti-malta/malta-time.c | |||
@@ -95,7 +95,7 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
95 | (prid != (PRID_COMP_MIPS | PRID_IMP_25KF))) | 95 | (prid != (PRID_COMP_MIPS | PRID_IMP_25KF))) |
96 | count *= 2; | 96 | count *= 2; |
97 | 97 | ||
98 | count += 5000; /* round */ | 98 | count += 5000; /* round */ |
99 | count -= count%10000; | 99 | count -= count%10000; |
100 | 100 | ||
101 | return count; | 101 | return count; |
@@ -146,15 +146,15 @@ void __init plat_time_init(void) | |||
146 | { | 146 | { |
147 | unsigned int est_freq; | 147 | unsigned int est_freq; |
148 | 148 | ||
149 | /* Set Data mode - binary. */ | 149 | /* Set Data mode - binary. */ |
150 | CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); | 150 | CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); |
151 | 151 | ||
152 | est_freq = estimate_cpu_frequency(); | 152 | est_freq = estimate_cpu_frequency(); |
153 | 153 | ||
154 | printk("CPU frequency %d.%02d MHz\n", est_freq/1000000, | 154 | printk("CPU frequency %d.%02d MHz\n", est_freq/1000000, |
155 | (est_freq%1000000)*100/1000000); | 155 | (est_freq%1000000)*100/1000000); |
156 | 156 | ||
157 | cpu_khz = est_freq / 1000; | 157 | cpu_khz = est_freq / 1000; |
158 | 158 | ||
159 | mips_scroll_message(); | 159 | mips_scroll_message(); |
160 | #ifdef CONFIG_I8253 /* Only Malta has a PIT */ | 160 | #ifdef CONFIG_I8253 /* Only Malta has a PIT */ |
diff --git a/arch/mips/mti-sead3/leds-sead3.c b/arch/mips/mti-sead3/leds-sead3.c index 3db832a818d5..322148c353ed 100644 --- a/arch/mips/mti-sead3/leds-sead3.c +++ b/arch/mips/mti-sead3/leds-sead3.c | |||
@@ -33,12 +33,12 @@ static void sead3_fled_set(struct led_classdev *led_cdev, | |||
33 | 33 | ||
34 | static struct led_classdev sead3_pled = { | 34 | static struct led_classdev sead3_pled = { |
35 | .name = "sead3::pled", | 35 | .name = "sead3::pled", |
36 | .brightness_set = sead3_pled_set, | 36 | .brightness_set = sead3_pled_set, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | static struct led_classdev sead3_fled = { | 39 | static struct led_classdev sead3_fled = { |
40 | .name = "sead3::fled", | 40 | .name = "sead3::fled", |
41 | .brightness_set = sead3_fled_set, | 41 | .brightness_set = sead3_fled_set, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | #ifdef CONFIG_PM | 44 | #ifdef CONFIG_PM |
diff --git a/arch/mips/mti-sead3/sead3-console.c b/arch/mips/mti-sead3/sead3-console.c index b36739108a0f..2ddef19a9adc 100644 --- a/arch/mips/mti-sead3/sead3-console.c +++ b/arch/mips/mti-sead3/sead3-console.c | |||
@@ -10,8 +10,8 @@ | |||
10 | #include <linux/serial_reg.h> | 10 | #include <linux/serial_reg.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | 12 | ||
13 | #define SEAD_UART1_REGS_BASE 0xbf000800 /* ttyS1 = DB9 port */ | 13 | #define SEAD_UART1_REGS_BASE 0xbf000800 /* ttyS1 = DB9 port */ |
14 | #define SEAD_UART0_REGS_BASE 0xbf000900 /* ttyS0 = USB port */ | 14 | #define SEAD_UART0_REGS_BASE 0xbf000900 /* ttyS0 = USB port */ |
15 | #define PORT(base_addr, offset) ((unsigned int __iomem *)(base_addr+(offset)*4)) | 15 | #define PORT(base_addr, offset) ((unsigned int __iomem *)(base_addr+(offset)*4)) |
16 | 16 | ||
17 | static char console_port = 1; | 17 | static char console_port = 1; |
diff --git a/arch/mips/mti-sead3/sead3-display.c b/arch/mips/mti-sead3/sead3-display.c index 8308c7fc188a..e389326cfa42 100644 --- a/arch/mips/mti-sead3/sead3-display.c +++ b/arch/mips/mti-sead3/sead3-display.c | |||
@@ -21,7 +21,7 @@ static unsigned int max_display_count; | |||
21 | #define LCD_SETDDRAM 0x80 | 21 | #define LCD_SETDDRAM 0x80 |
22 | #define LCD_IR_BF 0x80 | 22 | #define LCD_IR_BF 0x80 |
23 | 23 | ||
24 | const char display_string[] = " LINUX ON SEAD3 "; | 24 | const char display_string[] = " LINUX ON SEAD3 "; |
25 | 25 | ||
26 | static void scroll_display_message(unsigned long data); | 26 | static void scroll_display_message(unsigned long data); |
27 | static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0); | 27 | static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0); |
diff --git a/arch/mips/mti-sead3/sead3-i2c-drv.c b/arch/mips/mti-sead3/sead3-i2c-drv.c index 7aa2225e75b9..1f787a6a7878 100644 --- a/arch/mips/mti-sead3/sead3-i2c-drv.c +++ b/arch/mips/mti-sead3/sead3-i2c-drv.c | |||
@@ -13,32 +13,32 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | 14 | ||
15 | #define PIC32_I2CxCON 0x0000 | 15 | #define PIC32_I2CxCON 0x0000 |
16 | #define PIC32_I2CCON_ON (1<<15) | 16 | #define PIC32_I2CCON_ON (1<<15) |
17 | #define PIC32_I2CCON_ACKDT (1<<5) | 17 | #define PIC32_I2CCON_ACKDT (1<<5) |
18 | #define PIC32_I2CCON_ACKEN (1<<4) | 18 | #define PIC32_I2CCON_ACKEN (1<<4) |
19 | #define PIC32_I2CCON_RCEN (1<<3) | 19 | #define PIC32_I2CCON_RCEN (1<<3) |
20 | #define PIC32_I2CCON_PEN (1<<2) | 20 | #define PIC32_I2CCON_PEN (1<<2) |
21 | #define PIC32_I2CCON_RSEN (1<<1) | 21 | #define PIC32_I2CCON_RSEN (1<<1) |
22 | #define PIC32_I2CCON_SEN (1<<0) | 22 | #define PIC32_I2CCON_SEN (1<<0) |
23 | #define PIC32_I2CxCONCLR 0x0004 | 23 | #define PIC32_I2CxCONCLR 0x0004 |
24 | #define PIC32_I2CxCONSET 0x0008 | 24 | #define PIC32_I2CxCONSET 0x0008 |
25 | #define PIC32_I2CxSTAT 0x0010 | 25 | #define PIC32_I2CxSTAT 0x0010 |
26 | #define PIC32_I2CxSTATCLR 0x0014 | 26 | #define PIC32_I2CxSTATCLR 0x0014 |
27 | #define PIC32_I2CSTAT_ACKSTAT (1<<15) | 27 | #define PIC32_I2CSTAT_ACKSTAT (1<<15) |
28 | #define PIC32_I2CSTAT_TRSTAT (1<<14) | 28 | #define PIC32_I2CSTAT_TRSTAT (1<<14) |
29 | #define PIC32_I2CSTAT_BCL (1<<10) | 29 | #define PIC32_I2CSTAT_BCL (1<<10) |
30 | #define PIC32_I2CSTAT_IWCOL (1<<7) | 30 | #define PIC32_I2CSTAT_IWCOL (1<<7) |
31 | #define PIC32_I2CSTAT_I2COV (1<<6) | 31 | #define PIC32_I2CSTAT_I2COV (1<<6) |
32 | #define PIC32_I2CxBRG 0x0040 | 32 | #define PIC32_I2CxBRG 0x0040 |
33 | #define PIC32_I2CxTRN 0x0050 | 33 | #define PIC32_I2CxTRN 0x0050 |
34 | #define PIC32_I2CxRCV 0x0060 | 34 | #define PIC32_I2CxRCV 0x0060 |
35 | 35 | ||
36 | static DEFINE_SPINLOCK(pic32_bus_lock); | 36 | static DEFINE_SPINLOCK(pic32_bus_lock); |
37 | 37 | ||
38 | static void __iomem *bus_xfer = (void __iomem *)0xbf000600; | 38 | static void __iomem *bus_xfer = (void __iomem *)0xbf000600; |
39 | static void __iomem *bus_status = (void __iomem *)0xbf000060; | 39 | static void __iomem *bus_status = (void __iomem *)0xbf000060; |
40 | 40 | ||
41 | #define DELAY() udelay(100) | 41 | #define DELAY() udelay(100) |
42 | 42 | ||
43 | static inline unsigned int ioready(void) | 43 | static inline unsigned int ioready(void) |
44 | { | 44 | { |
diff --git a/arch/mips/mti-sead3/sead3-net.c b/arch/mips/mti-sead3/sead3-net.c index 04d704df6098..dd11e7eb771c 100644 --- a/arch/mips/mti-sead3/sead3-net.c +++ b/arch/mips/mti-sead3/sead3-net.c | |||
@@ -19,8 +19,8 @@ static struct smsc911x_platform_config sead3_smsc911x_data = { | |||
19 | 19 | ||
20 | struct resource sead3_net_resourcess[] = { | 20 | struct resource sead3_net_resourcess[] = { |
21 | { | 21 | { |
22 | .start = 0x1f010000, | 22 | .start = 0x1f010000, |
23 | .end = 0x1f01ffff, | 23 | .end = 0x1f01ffff, |
24 | .flags = IORESOURCE_MEM | 24 | .flags = IORESOURCE_MEM |
25 | }, | 25 | }, |
26 | { | 26 | { |
diff --git a/arch/mips/mti-sead3/sead3-pic32-bus.c b/arch/mips/mti-sead3/sead3-pic32-bus.c index 9f0d89bc800e..eb2bf936d102 100644 --- a/arch/mips/mti-sead3/sead3-pic32-bus.c +++ b/arch/mips/mti-sead3/sead3-pic32-bus.c | |||
@@ -17,16 +17,16 @@ | |||
17 | #define PIC32_SYSRD 0x02 | 17 | #define PIC32_SYSRD 0x02 |
18 | #define PIC32_WR 0x10 | 18 | #define PIC32_WR 0x10 |
19 | #define PIC32_SYSWR 0x20 | 19 | #define PIC32_SYSWR 0x20 |
20 | #define PIC32_IRQ_CLR 0x40 | 20 | #define PIC32_IRQ_CLR 0x40 |
21 | #define PIC32_STATUS 0x80 | 21 | #define PIC32_STATUS 0x80 |
22 | 22 | ||
23 | #define DELAY() udelay(100) /* FIXME: needed? */ | 23 | #define DELAY() udelay(100) /* FIXME: needed? */ |
24 | 24 | ||
25 | /* spinlock to ensure atomic access to PIC32 */ | 25 | /* spinlock to ensure atomic access to PIC32 */ |
26 | static DEFINE_SPINLOCK(pic32_bus_lock); | 26 | static DEFINE_SPINLOCK(pic32_bus_lock); |
27 | 27 | ||
28 | /* FIXME: io_remap these */ | 28 | /* FIXME: io_remap these */ |
29 | static void __iomem *bus_xfer = (void __iomem *)0xbf000600; | 29 | static void __iomem *bus_xfer = (void __iomem *)0xbf000600; |
30 | static void __iomem *bus_status = (void __iomem *)0xbf000060; | 30 | static void __iomem *bus_status = (void __iomem *)0xbf000060; |
31 | 31 | ||
32 | static inline unsigned int ioready(void) | 32 | static inline unsigned int ioready(void) |
diff --git a/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c b/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c index 514675ed0cde..b921e5ec507c 100644 --- a/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c +++ b/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c | |||
@@ -19,40 +19,40 @@ | |||
19 | #define PIC32_I2CxCONCLR 0x0004 | 19 | #define PIC32_I2CxCONCLR 0x0004 |
20 | #define PIC32_I2CxCONSET 0x0008 | 20 | #define PIC32_I2CxCONSET 0x0008 |
21 | #define PIC32_I2CxCONINV 0x000C | 21 | #define PIC32_I2CxCONINV 0x000C |
22 | #define I2CCON_ON (1<<15) | 22 | #define I2CCON_ON (1<<15) |
23 | #define I2CCON_FRZ (1<<14) | 23 | #define I2CCON_FRZ (1<<14) |
24 | #define I2CCON_SIDL (1<<13) | 24 | #define I2CCON_SIDL (1<<13) |
25 | #define I2CCON_SCLREL (1<<12) | 25 | #define I2CCON_SCLREL (1<<12) |
26 | #define I2CCON_STRICT (1<<11) | 26 | #define I2CCON_STRICT (1<<11) |
27 | #define I2CCON_A10M (1<<10) | 27 | #define I2CCON_A10M (1<<10) |
28 | #define I2CCON_DISSLW (1<<9) | 28 | #define I2CCON_DISSLW (1<<9) |
29 | #define I2CCON_SMEN (1<<8) | 29 | #define I2CCON_SMEN (1<<8) |
30 | #define I2CCON_GCEN (1<<7) | 30 | #define I2CCON_GCEN (1<<7) |
31 | #define I2CCON_STREN (1<<6) | 31 | #define I2CCON_STREN (1<<6) |
32 | #define I2CCON_ACKDT (1<<5) | 32 | #define I2CCON_ACKDT (1<<5) |
33 | #define I2CCON_ACKEN (1<<4) | 33 | #define I2CCON_ACKEN (1<<4) |
34 | #define I2CCON_RCEN (1<<3) | 34 | #define I2CCON_RCEN (1<<3) |
35 | #define I2CCON_PEN (1<<2) | 35 | #define I2CCON_PEN (1<<2) |
36 | #define I2CCON_RSEN (1<<1) | 36 | #define I2CCON_RSEN (1<<1) |
37 | #define I2CCON_SEN (1<<0) | 37 | #define I2CCON_SEN (1<<0) |
38 | 38 | ||
39 | #define PIC32_I2CxSTAT 0x0010 | 39 | #define PIC32_I2CxSTAT 0x0010 |
40 | #define PIC32_I2CxSTATCLR 0x0014 | 40 | #define PIC32_I2CxSTATCLR 0x0014 |
41 | #define PIC32_I2CxSTATSET 0x0018 | 41 | #define PIC32_I2CxSTATSET 0x0018 |
42 | #define PIC32_I2CxSTATINV 0x001C | 42 | #define PIC32_I2CxSTATINV 0x001C |
43 | #define I2CSTAT_ACKSTAT (1<<15) | 43 | #define I2CSTAT_ACKSTAT (1<<15) |
44 | #define I2CSTAT_TRSTAT (1<<14) | 44 | #define I2CSTAT_TRSTAT (1<<14) |
45 | #define I2CSTAT_BCL (1<<10) | 45 | #define I2CSTAT_BCL (1<<10) |
46 | #define I2CSTAT_GCSTAT (1<<9) | 46 | #define I2CSTAT_GCSTAT (1<<9) |
47 | #define I2CSTAT_ADD10 (1<<8) | 47 | #define I2CSTAT_ADD10 (1<<8) |
48 | #define I2CSTAT_IWCOL (1<<7) | 48 | #define I2CSTAT_IWCOL (1<<7) |
49 | #define I2CSTAT_I2COV (1<<6) | 49 | #define I2CSTAT_I2COV (1<<6) |
50 | #define I2CSTAT_DA (1<<5) | 50 | #define I2CSTAT_DA (1<<5) |
51 | #define I2CSTAT_P (1<<4) | 51 | #define I2CSTAT_P (1<<4) |
52 | #define I2CSTAT_S (1<<3) | 52 | #define I2CSTAT_S (1<<3) |
53 | #define I2CSTAT_RW (1<<2) | 53 | #define I2CSTAT_RW (1<<2) |
54 | #define I2CSTAT_RBF (1<<1) | 54 | #define I2CSTAT_RBF (1<<1) |
55 | #define I2CSTAT_TBF (1<<0) | 55 | #define I2CSTAT_TBF (1<<0) |
56 | 56 | ||
57 | #define PIC32_I2CxADD 0x0020 | 57 | #define PIC32_I2CxADD 0x0020 |
58 | #define PIC32_I2CxADDCLR 0x0024 | 58 | #define PIC32_I2CxADDCLR 0x0024 |
diff --git a/arch/mips/mti-sead3/sead3-time.c b/arch/mips/mti-sead3/sead3-time.c index 048e781a17a0..239e4e32757f 100644 --- a/arch/mips/mti-sead3/sead3-time.c +++ b/arch/mips/mti-sead3/sead3-time.c | |||
@@ -43,11 +43,11 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
43 | 43 | ||
44 | local_irq_save(flags); | 44 | local_irq_save(flags); |
45 | 45 | ||
46 | orig = readl(status_reg) & 0x2; /* get original sample */ | 46 | orig = readl(status_reg) & 0x2; /* get original sample */ |
47 | /* wait for transition */ | 47 | /* wait for transition */ |
48 | while ((readl(status_reg) & 0x2) == orig) | 48 | while ((readl(status_reg) & 0x2) == orig) |
49 | ; | 49 | ; |
50 | orig = orig ^ 0x2; /* flip the bit */ | 50 | orig = orig ^ 0x2; /* flip the bit */ |
51 | 51 | ||
52 | write_c0_count(0); | 52 | write_c0_count(0); |
53 | 53 | ||
@@ -56,7 +56,7 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
56 | /* wait for transition */ | 56 | /* wait for transition */ |
57 | while ((readl(status_reg) & 0x2) == orig) | 57 | while ((readl(status_reg) & 0x2) == orig) |
58 | ; | 58 | ; |
59 | orig = orig ^ 0x2; /* flip the bit */ | 59 | orig = orig ^ 0x2; /* flip the bit */ |
60 | tick++; | 60 | tick++; |
61 | } | 61 | } |
62 | 62 | ||
@@ -71,7 +71,7 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
71 | (prid != (PRID_COMP_MIPS | PRID_IMP_25KF))) | 71 | (prid != (PRID_COMP_MIPS | PRID_IMP_25KF))) |
72 | freq *= 2; | 72 | freq *= 2; |
73 | 73 | ||
74 | freq += 5000; /* rounding */ | 74 | freq += 5000; /* rounding */ |
75 | freq -= freq%10000; | 75 | freq -= freq%10000; |
76 | 76 | ||
77 | return freq ; | 77 | return freq ; |
diff --git a/arch/mips/netlogic/Platform b/arch/mips/netlogic/Platform index cdfc9abbbb7b..fb8eb4c0c6ec 100644 --- a/arch/mips/netlogic/Platform +++ b/arch/mips/netlogic/Platform | |||
@@ -13,5 +13,5 @@ cflags-$(CONFIG_CPU_XLP) += $(call cc-option,-march=xlp,-march=mips64r2) | |||
13 | # | 13 | # |
14 | # NETLOGIC processor support | 14 | # NETLOGIC processor support |
15 | # | 15 | # |
16 | platform-$(CONFIG_NLM_COMMON) += netlogic/ | 16 | platform-$(CONFIG_NLM_COMMON) += netlogic/ |
17 | load-$(CONFIG_NLM_COMMON) += 0xffffffff80100000 | 17 | load-$(CONFIG_NLM_COMMON) += 0xffffffff80100000 |
diff --git a/arch/mips/netlogic/common/irq.c b/arch/mips/netlogic/common/irq.c index 00dcc7a2bc5a..780832e391ff 100644 --- a/arch/mips/netlogic/common/irq.c +++ b/arch/mips/netlogic/common/irq.c | |||
@@ -69,7 +69,7 @@ | |||
69 | #else | 69 | #else |
70 | #define SMP_IRQ_MASK 0 | 70 | #define SMP_IRQ_MASK 0 |
71 | #endif | 71 | #endif |
72 | #define PERCPU_IRQ_MASK (SMP_IRQ_MASK | (1ull << IRQ_TIMER) | \ | 72 | #define PERCPU_IRQ_MASK (SMP_IRQ_MASK | (1ull << IRQ_TIMER) | \ |
73 | (1ull << IRQ_FMN)) | 73 | (1ull << IRQ_FMN)) |
74 | 74 | ||
75 | struct nlm_pic_irq { | 75 | struct nlm_pic_irq { |
@@ -107,7 +107,7 @@ static void xlp_pic_mask_ack(struct irq_data *d) | |||
107 | struct nlm_pic_irq *pd = irq_data_get_irq_handler_data(d); | 107 | struct nlm_pic_irq *pd = irq_data_get_irq_handler_data(d); |
108 | uint64_t mask = 1ull << pd->picirq; | 108 | uint64_t mask = 1ull << pd->picirq; |
109 | 109 | ||
110 | write_c0_eirr(mask); /* ack by writing EIRR */ | 110 | write_c0_eirr(mask); /* ack by writing EIRR */ |
111 | } | 111 | } |
112 | 112 | ||
113 | static void xlp_pic_unmask(struct irq_data *d) | 113 | static void xlp_pic_unmask(struct irq_data *d) |
diff --git a/arch/mips/netlogic/common/smpboot.S b/arch/mips/netlogic/common/smpboot.S index a0b74874bebe..280ff5855ef7 100644 --- a/arch/mips/netlogic/common/smpboot.S +++ b/arch/mips/netlogic/common/smpboot.S | |||
@@ -49,12 +49,12 @@ | |||
49 | #include <asm/netlogic/xlp-hal/sys.h> | 49 | #include <asm/netlogic/xlp-hal/sys.h> |
50 | #include <asm/netlogic/xlp-hal/cpucontrol.h> | 50 | #include <asm/netlogic/xlp-hal/cpucontrol.h> |
51 | 51 | ||
52 | #define CP0_EBASE $15 | 52 | #define CP0_EBASE $15 |
53 | #define SYS_CPU_COHERENT_BASE(node) CKSEG1ADDR(XLP_DEFAULT_IO_BASE) + \ | 53 | #define SYS_CPU_COHERENT_BASE(node) CKSEG1ADDR(XLP_DEFAULT_IO_BASE) + \ |
54 | XLP_IO_SYS_OFFSET(node) + XLP_IO_PCI_HDRSZ + \ | 54 | XLP_IO_SYS_OFFSET(node) + XLP_IO_PCI_HDRSZ + \ |
55 | SYS_CPU_NONCOHERENT_MODE * 4 | 55 | SYS_CPU_NONCOHERENT_MODE * 4 |
56 | 56 | ||
57 | #define XLP_AX_WORKAROUND /* enable Ax silicon workarounds */ | 57 | #define XLP_AX_WORKAROUND /* enable Ax silicon workarounds */ |
58 | 58 | ||
59 | /* Enable XLP features and workarounds in the LSU */ | 59 | /* Enable XLP features and workarounds in the LSU */ |
60 | .macro xlp_config_lsu | 60 | .macro xlp_config_lsu |
@@ -85,7 +85,7 @@ | |||
85 | li t0, LSU_DEBUG_DATA0 | 85 | li t0, LSU_DEBUG_DATA0 |
86 | li t1, LSU_DEBUG_ADDR | 86 | li t1, LSU_DEBUG_ADDR |
87 | li t2, 0 /* index */ | 87 | li t2, 0 /* index */ |
88 | li t3, 0x1000 /* loop count */ | 88 | li t3, 0x1000 /* loop count */ |
89 | 1: | 89 | 1: |
90 | sll v0, t2, 5 | 90 | sll v0, t2, 5 |
91 | mtcr zero, t0 | 91 | mtcr zero, t0 |
@@ -134,7 +134,7 @@ FEXPORT(nlm_reset_entry) | |||
134 | and k1, k0, k1 | 134 | and k1, k0, k1 |
135 | beqz k1, 1f /* go to real reset entry */ | 135 | beqz k1, 1f /* go to real reset entry */ |
136 | nop | 136 | nop |
137 | li k1, CKSEG1ADDR(RESET_DATA_PHYS) /* NMI */ | 137 | li k1, CKSEG1ADDR(RESET_DATA_PHYS) /* NMI */ |
138 | ld k0, BOOT_NMI_HANDLER(k1) | 138 | ld k0, BOOT_NMI_HANDLER(k1) |
139 | jr k0 | 139 | jr k0 |
140 | nop | 140 | nop |
@@ -235,7 +235,7 @@ EXPORT(nlm_reset_entry_end) | |||
235 | 235 | ||
236 | FEXPORT(xlp_boot_core0_siblings) /* "Master" cpu starts from here */ | 236 | FEXPORT(xlp_boot_core0_siblings) /* "Master" cpu starts from here */ |
237 | xlp_config_lsu | 237 | xlp_config_lsu |
238 | dmtc0 sp, $4, 2 /* SP saved in UserLocal */ | 238 | dmtc0 sp, $4, 2 /* SP saved in UserLocal */ |
239 | SAVE_ALL | 239 | SAVE_ALL |
240 | sync | 240 | sync |
241 | /* find the location to which nlm_boot_siblings was relocated */ | 241 | /* find the location to which nlm_boot_siblings was relocated */ |
@@ -301,13 +301,13 @@ NESTED(nlm_rmiboot_preboot, 16, sp) | |||
301 | */ | 301 | */ |
302 | li t0, 0x400 | 302 | li t0, 0x400 |
303 | mfcr t1, t0 | 303 | mfcr t1, t0 |
304 | li t2, 6 /* XLR thread mode mask */ | 304 | li t2, 6 /* XLR thread mode mask */ |
305 | nor t3, t2, zero | 305 | nor t3, t2, zero |
306 | and t2, t1, t2 /* t2 - current thread mode */ | 306 | and t2, t1, t2 /* t2 - current thread mode */ |
307 | li v0, CKSEG1ADDR(RESET_DATA_PHYS) | 307 | li v0, CKSEG1ADDR(RESET_DATA_PHYS) |
308 | lw v1, BOOT_THREAD_MODE(v0) /* v1 - new thread mode */ | 308 | lw v1, BOOT_THREAD_MODE(v0) /* v1 - new thread mode */ |
309 | sll v1, 1 | 309 | sll v1, 1 |
310 | beq v1, t2, 1f /* same as request value */ | 310 | beq v1, t2, 1f /* same as request value */ |
311 | nop /* nothing to do */ | 311 | nop /* nothing to do */ |
312 | 312 | ||
313 | and t2, t1, t3 /* mask out old thread mode */ | 313 | and t2, t1, t3 /* mask out old thread mode */ |
diff --git a/arch/mips/netlogic/dts/xlp_evp.dts b/arch/mips/netlogic/dts/xlp_evp.dts index e14f42308064..7628b5464fc7 100644 --- a/arch/mips/netlogic/dts/xlp_evp.dts +++ b/arch/mips/netlogic/dts/xlp_evp.dts | |||
@@ -20,7 +20,7 @@ | |||
20 | #address-cells = <2>; | 20 | #address-cells = <2>; |
21 | #size-cells = <1>; | 21 | #size-cells = <1>; |
22 | compatible = "simple-bus"; | 22 | compatible = "simple-bus"; |
23 | ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG | 23 | ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG |
24 | 1 0 0 0x16000000 0x01000000>; // GBU chipselects | 24 | 1 0 0 0x16000000 0x01000000>; // GBU chipselects |
25 | 25 | ||
26 | serial0: serial@30000 { | 26 | serial0: serial@30000 { |
diff --git a/arch/mips/netlogic/xlp/nlm_hal.c b/arch/mips/netlogic/xlp/nlm_hal.c index 529e74742d9f..c68fd4026104 100644 --- a/arch/mips/netlogic/xlp/nlm_hal.c +++ b/arch/mips/netlogic/xlp/nlm_hal.c | |||
@@ -111,8 +111,8 @@ unsigned int nlm_get_core_frequency(int node, int core) | |||
111 | dfsval = nlm_read_sys_reg(sysbase, SYS_CORE_DFS_DIV_VALUE); | 111 | dfsval = nlm_read_sys_reg(sysbase, SYS_CORE_DFS_DIV_VALUE); |
112 | pll_divf = ((rstval >> 10) & 0x7f) + 1; | 112 | pll_divf = ((rstval >> 10) & 0x7f) + 1; |
113 | pll_divr = ((rstval >> 8) & 0x3) + 1; | 113 | pll_divr = ((rstval >> 8) & 0x3) + 1; |
114 | ext_div = ((rstval >> 30) & 0x3) + 1; | 114 | ext_div = ((rstval >> 30) & 0x3) + 1; |
115 | dfs_div = ((dfsval >> (core * 4)) & 0xf) + 1; | 115 | dfs_div = ((dfsval >> (core * 4)) & 0xf) + 1; |
116 | 116 | ||
117 | num = 800000000ULL * pll_divf; | 117 | num = 800000000ULL * pll_divf; |
118 | denom = 3 * pll_divr * ext_div * dfs_div; | 118 | denom = 3 * pll_divr * ext_div * dfs_div; |
diff --git a/arch/mips/netlogic/xlp/usb-init.c b/arch/mips/netlogic/xlp/usb-init.c index dbe083a93538..1d0b66c62fd1 100644 --- a/arch/mips/netlogic/xlp/usb-init.c +++ b/arch/mips/netlogic/xlp/usb-init.c | |||
@@ -52,7 +52,7 @@ static void nlm_usb_intr_en(int node, int port) | |||
52 | port_addr = nlm_get_usb_regbase(node, port); | 52 | port_addr = nlm_get_usb_regbase(node, port); |
53 | val = nlm_read_usb_reg(port_addr, USB_INT_EN); | 53 | val = nlm_read_usb_reg(port_addr, USB_INT_EN); |
54 | val = USB_CTRL_INTERRUPT_EN | USB_OHCI_INTERRUPT_EN | | 54 | val = USB_CTRL_INTERRUPT_EN | USB_OHCI_INTERRUPT_EN | |
55 | USB_OHCI_INTERRUPT1_EN | USB_CTRL_INTERRUPT_EN | | 55 | USB_OHCI_INTERRUPT1_EN | USB_CTRL_INTERRUPT_EN | |
56 | USB_OHCI_INTERRUPT_EN | USB_OHCI_INTERRUPT2_EN; | 56 | USB_OHCI_INTERRUPT_EN | USB_OHCI_INTERRUPT2_EN; |
57 | nlm_write_usb_reg(port_addr, USB_INT_EN, val); | 57 | nlm_write_usb_reg(port_addr, USB_INT_EN, val); |
58 | } | 58 | } |
diff --git a/arch/mips/netlogic/xlr/fmn-config.c b/arch/mips/netlogic/xlr/fmn-config.c index bed2cffa1008..f5bddf95bf24 100644 --- a/arch/mips/netlogic/xlr/fmn-config.c +++ b/arch/mips/netlogic/xlr/fmn-config.c | |||
@@ -164,8 +164,8 @@ static void setup_cpu_fmninfo(struct xlr_fmn_info *cpu, int num_core) | |||
164 | int i, j; | 164 | int i, j; |
165 | 165 | ||
166 | for (i = 0; i < num_core; i++) { | 166 | for (i = 0; i < num_core; i++) { |
167 | cpu[i].start_stn_id = (8 * i); | 167 | cpu[i].start_stn_id = (8 * i); |
168 | cpu[i].end_stn_id = (8 * i + 8); | 168 | cpu[i].end_stn_id = (8 * i + 8); |
169 | 169 | ||
170 | for (j = cpu[i].start_stn_id; j < cpu[i].end_stn_id; j++) | 170 | for (j = cpu[i].start_stn_id; j < cpu[i].end_stn_id; j++) |
171 | xlr_board_fmn_config.bucket_size[j] = 32; | 171 | xlr_board_fmn_config.bucket_size[j] = 32; |
diff --git a/arch/mips/netlogic/xlr/platform-flash.c b/arch/mips/netlogic/xlr/platform-flash.c index 340ab1601c42..6d3c727e0ef8 100644 --- a/arch/mips/netlogic/xlr/platform-flash.c +++ b/arch/mips/netlogic/xlr/platform-flash.c | |||
@@ -36,7 +36,7 @@ static struct mtd_partition xlr_nor_parts[] = { | |||
36 | { | 36 | { |
37 | .name = "User FS", | 37 | .name = "User FS", |
38 | .offset = 0x800000, | 38 | .offset = 0x800000, |
39 | .size = MTDPART_SIZ_FULL, | 39 | .size = MTDPART_SIZ_FULL, |
40 | } | 40 | } |
41 | }; | 41 | }; |
42 | 42 | ||
@@ -46,13 +46,13 @@ static struct mtd_partition xlr_nor_parts[] = { | |||
46 | static struct mtd_partition xlr_nand_parts[] = { | 46 | static struct mtd_partition xlr_nand_parts[] = { |
47 | { | 47 | { |
48 | .name = "Root Filesystem", | 48 | .name = "Root Filesystem", |
49 | .offset = 64 * 64 * 2048, | 49 | .offset = 64 * 64 * 2048, |
50 | .size = 432 * 64 * 2048, | 50 | .size = 432 * 64 * 2048, |
51 | }, | 51 | }, |
52 | { | 52 | { |
53 | .name = "Home Filesystem", | 53 | .name = "Home Filesystem", |
54 | .offset = MTDPART_OFS_APPEND, | 54 | .offset = MTDPART_OFS_APPEND, |
55 | .size = MTDPART_SIZ_FULL, | 55 | .size = MTDPART_SIZ_FULL, |
56 | }, | 56 | }, |
57 | }; | 57 | }; |
58 | 58 | ||
@@ -74,8 +74,8 @@ static struct platform_device xlr_nor_dev = { | |||
74 | .dev = { | 74 | .dev = { |
75 | .platform_data = &xlr_nor_data, | 75 | .platform_data = &xlr_nor_data, |
76 | }, | 76 | }, |
77 | .num_resources = ARRAY_SIZE(xlr_nor_res), | 77 | .num_resources = ARRAY_SIZE(xlr_nor_res), |
78 | .resource = xlr_nor_res, | 78 | .resource = xlr_nor_res, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | const char *xlr_part_probes[] = { "cmdlinepart", NULL }; | 81 | const char *xlr_part_probes[] = { "cmdlinepart", NULL }; |
diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c index 507230eeb768..e287277d32b0 100644 --- a/arch/mips/netlogic/xlr/platform.c +++ b/arch/mips/netlogic/xlr/platform.c | |||
@@ -162,18 +162,18 @@ int xls_platform_usb_init(void) | |||
162 | nlm_write_reg(usb_mmio, 50, 0x1f000000); | 162 | nlm_write_reg(usb_mmio, 50, 0x1f000000); |
163 | 163 | ||
164 | /* Enable ports */ | 164 | /* Enable ports */ |
165 | nlm_write_reg(usb_mmio, 1, 0x07000500); | 165 | nlm_write_reg(usb_mmio, 1, 0x07000500); |
166 | 166 | ||
167 | val = nlm_read_reg(gpio_mmio, 21); | 167 | val = nlm_read_reg(gpio_mmio, 21); |
168 | if (((val >> 22) & 0x01) == 0) { | 168 | if (((val >> 22) & 0x01) == 0) { |
169 | pr_info("Detected USB Device mode - Not supported!\n"); | 169 | pr_info("Detected USB Device mode - Not supported!\n"); |
170 | nlm_write_reg(usb_mmio, 0, 0x01000000); | 170 | nlm_write_reg(usb_mmio, 0, 0x01000000); |
171 | return 0; | 171 | return 0; |
172 | } | 172 | } |
173 | 173 | ||
174 | pr_info("Detected USB Host mode - Adding XLS USB devices.\n"); | 174 | pr_info("Detected USB Host mode - Adding XLS USB devices.\n"); |
175 | /* Clear reset, host mode */ | 175 | /* Clear reset, host mode */ |
176 | nlm_write_reg(usb_mmio, 0, 0x02000000); | 176 | nlm_write_reg(usb_mmio, 0, 0x02000000); |
177 | 177 | ||
178 | /* Memory resource for various XLS usb ports */ | 178 | /* Memory resource for various XLS usb ports */ |
179 | usb_mmio = nlm_mmio_base(NETLOGIC_IO_USB_0_OFFSET); | 179 | usb_mmio = nlm_mmio_base(NETLOGIC_IO_USB_0_OFFSET); |
@@ -221,8 +221,8 @@ static struct resource i2c_resources[] = { | |||
221 | }; | 221 | }; |
222 | 222 | ||
223 | static struct platform_device nlm_xlr_i2c_1 = { | 223 | static struct platform_device nlm_xlr_i2c_1 = { |
224 | .name = "xlr-i2cbus", | 224 | .name = "xlr-i2cbus", |
225 | .id = 1, | 225 | .id = 1, |
226 | .num_resources = 1, | 226 | .num_resources = 1, |
227 | .resource = i2c_resources, | 227 | .resource = i2c_resources, |
228 | }; | 228 | }; |
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c index c5ce6992ac4c..f088efb8fe4c 100644 --- a/arch/mips/netlogic/xlr/setup.c +++ b/arch/mips/netlogic/xlr/setup.c | |||
@@ -163,7 +163,7 @@ static void prom_add_memory(void) | |||
163 | { | 163 | { |
164 | struct nlm_boot_mem_map *bootm; | 164 | struct nlm_boot_mem_map *bootm; |
165 | u64 start, size; | 165 | u64 start, size; |
166 | u64 pref_backup = 512; /* avoid pref walking beyond end */ | 166 | u64 pref_backup = 512; /* avoid pref walking beyond end */ |
167 | int i; | 167 | int i; |
168 | 168 | ||
169 | bootm = (void *)(long)nlm_prom_info.psb_mem_map; | 169 | bootm = (void *)(long)nlm_prom_info.psb_mem_map; |
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index e32db1ff02c7..56f2cf221c7d 100644 --- a/arch/mips/oprofile/common.c +++ b/arch/mips/oprofile/common.c | |||
@@ -27,10 +27,10 @@ static int op_mips_setup(void) | |||
27 | /* Pre-compute the values to stuff in the hardware registers. */ | 27 | /* Pre-compute the values to stuff in the hardware registers. */ |
28 | model->reg_setup(ctr); | 28 | model->reg_setup(ctr); |
29 | 29 | ||
30 | /* Configure the registers on all cpus. */ | 30 | /* Configure the registers on all cpus. */ |
31 | on_each_cpu(model->cpu_setup, NULL, 1); | 31 | on_each_cpu(model->cpu_setup, NULL, 1); |
32 | 32 | ||
33 | return 0; | 33 | return 0; |
34 | } | 34 | } |
35 | 35 | ||
36 | static int op_mips_create_files(struct super_block *sb, struct dentry *root) | 36 | static int op_mips_create_files(struct super_block *sb, struct dentry *root) |
@@ -110,7 +110,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
110 | 110 | ||
111 | ops->create_files = op_mips_create_files; | 111 | ops->create_files = op_mips_create_files; |
112 | ops->setup = op_mips_setup; | 112 | ops->setup = op_mips_setup; |
113 | //ops->shutdown = op_mips_shutdown; | 113 | //ops->shutdown = op_mips_shutdown; |
114 | ops->start = op_mips_start; | 114 | ops->start = op_mips_start; |
115 | ops->stop = op_mips_stop; | 115 | ops->stop = op_mips_stop; |
116 | ops->cpu_type = lmodel->cpu_type; | 116 | ops->cpu_type = lmodel->cpu_type; |
diff --git a/arch/mips/oprofile/op_model_loongson2.c b/arch/mips/oprofile/op_model_loongson2.c index 60d3ea602118..b249ec0bebb2 100644 --- a/arch/mips/oprofile/op_model_loongson2.c +++ b/arch/mips/oprofile/op_model_loongson2.c | |||
@@ -18,13 +18,13 @@ | |||
18 | 18 | ||
19 | #define LOONGSON2_CPU_TYPE "mips/loongson2" | 19 | #define LOONGSON2_CPU_TYPE "mips/loongson2" |
20 | 20 | ||
21 | #define LOONGSON2_PERFCNT_OVERFLOW (1ULL << 31) | 21 | #define LOONGSON2_PERFCNT_OVERFLOW (1ULL << 31) |
22 | 22 | ||
23 | #define LOONGSON2_PERFCTRL_EXL (1UL << 0) | 23 | #define LOONGSON2_PERFCTRL_EXL (1UL << 0) |
24 | #define LOONGSON2_PERFCTRL_KERNEL (1UL << 1) | 24 | #define LOONGSON2_PERFCTRL_KERNEL (1UL << 1) |
25 | #define LOONGSON2_PERFCTRL_SUPERVISOR (1UL << 2) | 25 | #define LOONGSON2_PERFCTRL_SUPERVISOR (1UL << 2) |
26 | #define LOONGSON2_PERFCTRL_USER (1UL << 3) | 26 | #define LOONGSON2_PERFCTRL_USER (1UL << 3) |
27 | #define LOONGSON2_PERFCTRL_ENABLE (1UL << 4) | 27 | #define LOONGSON2_PERFCTRL_ENABLE (1UL << 4) |
28 | #define LOONGSON2_PERFCTRL_EVENT(idx, event) \ | 28 | #define LOONGSON2_PERFCTRL_EVENT(idx, event) \ |
29 | (((event) & 0x0f) << ((idx) ? 9 : 5)) | 29 | (((event) & 0x0f) << ((idx) ? 9 : 5)) |
30 | 30 | ||
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index 786254630403..1cfab95755b9 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -14,25 +14,25 @@ | |||
14 | 14 | ||
15 | #include "op_impl.h" | 15 | #include "op_impl.h" |
16 | 16 | ||
17 | #define M_PERFCTL_EXL (1UL << 0) | 17 | #define M_PERFCTL_EXL (1UL << 0) |
18 | #define M_PERFCTL_KERNEL (1UL << 1) | 18 | #define M_PERFCTL_KERNEL (1UL << 1) |
19 | #define M_PERFCTL_SUPERVISOR (1UL << 2) | 19 | #define M_PERFCTL_SUPERVISOR (1UL << 2) |
20 | #define M_PERFCTL_USER (1UL << 3) | 20 | #define M_PERFCTL_USER (1UL << 3) |
21 | #define M_PERFCTL_INTERRUPT_ENABLE (1UL << 4) | 21 | #define M_PERFCTL_INTERRUPT_ENABLE (1UL << 4) |
22 | #define M_PERFCTL_EVENT(event) (((event) & 0x3ff) << 5) | 22 | #define M_PERFCTL_EVENT(event) (((event) & 0x3ff) << 5) |
23 | #define M_PERFCTL_VPEID(vpe) ((vpe) << 16) | 23 | #define M_PERFCTL_VPEID(vpe) ((vpe) << 16) |
24 | #define M_PERFCTL_MT_EN(filter) ((filter) << 20) | 24 | #define M_PERFCTL_MT_EN(filter) ((filter) << 20) |
25 | #define M_TC_EN_ALL M_PERFCTL_MT_EN(0) | 25 | #define M_TC_EN_ALL M_PERFCTL_MT_EN(0) |
26 | #define M_TC_EN_VPE M_PERFCTL_MT_EN(1) | 26 | #define M_TC_EN_VPE M_PERFCTL_MT_EN(1) |
27 | #define M_TC_EN_TC M_PERFCTL_MT_EN(2) | 27 | #define M_TC_EN_TC M_PERFCTL_MT_EN(2) |
28 | #define M_PERFCTL_TCID(tcid) ((tcid) << 22) | 28 | #define M_PERFCTL_TCID(tcid) ((tcid) << 22) |
29 | #define M_PERFCTL_WIDE (1UL << 30) | 29 | #define M_PERFCTL_WIDE (1UL << 30) |
30 | #define M_PERFCTL_MORE (1UL << 31) | 30 | #define M_PERFCTL_MORE (1UL << 31) |
31 | 31 | ||
32 | #define M_COUNTER_OVERFLOW (1UL << 31) | 32 | #define M_COUNTER_OVERFLOW (1UL << 31) |
33 | 33 | ||
34 | /* Netlogic XLR specific, count events in all threads in a core */ | 34 | /* Netlogic XLR specific, count events in all threads in a core */ |
35 | #define M_PERFCTL_COUNT_ALL_THREADS (1UL << 13) | 35 | #define M_PERFCTL_COUNT_ALL_THREADS (1UL << 13) |
36 | 36 | ||
37 | static int (*save_perf_irq)(void); | 37 | static int (*save_perf_irq)(void); |
38 | 38 | ||
@@ -143,7 +143,7 @@ static struct mipsxx_register_config { | |||
143 | unsigned int counter[4]; | 143 | unsigned int counter[4]; |
144 | } reg; | 144 | } reg; |
145 | 145 | ||
146 | /* Compute all of the registers in preparation for enabling profiling. */ | 146 | /* Compute all of the registers in preparation for enabling profiling. */ |
147 | 147 | ||
148 | static void mipsxx_reg_setup(struct op_counter_config *ctr) | 148 | static void mipsxx_reg_setup(struct op_counter_config *ctr) |
149 | { | 149 | { |
@@ -159,7 +159,7 @@ static void mipsxx_reg_setup(struct op_counter_config *ctr) | |||
159 | continue; | 159 | continue; |
160 | 160 | ||
161 | reg.control[i] = M_PERFCTL_EVENT(ctr[i].event) | | 161 | reg.control[i] = M_PERFCTL_EVENT(ctr[i].event) | |
162 | M_PERFCTL_INTERRUPT_ENABLE; | 162 | M_PERFCTL_INTERRUPT_ENABLE; |
163 | if (ctr[i].kernel) | 163 | if (ctr[i].kernel) |
164 | reg.control[i] |= M_PERFCTL_KERNEL; | 164 | reg.control[i] |= M_PERFCTL_KERNEL; |
165 | if (ctr[i].user) | 165 | if (ctr[i].user) |
@@ -172,7 +172,7 @@ static void mipsxx_reg_setup(struct op_counter_config *ctr) | |||
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | /* Program all of the registers in preparation for enabling profiling. */ | 175 | /* Program all of the registers in preparation for enabling profiling. */ |
176 | 176 | ||
177 | static void mipsxx_cpu_setup(void *args) | 177 | static void mipsxx_cpu_setup(void *args) |
178 | { | 178 | { |
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index 998554f37a17..2cb1d315d225 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile | |||
@@ -54,10 +54,10 @@ obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o | |||
54 | obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o | 54 | obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o |
55 | obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o | 55 | obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o |
56 | obj-$(CONFIG_MIKROTIK_RB532) += pci-rc32434.o ops-rc32434.o fixup-rc32434.o | 56 | obj-$(CONFIG_MIKROTIK_RB532) += pci-rc32434.o ops-rc32434.o fixup-rc32434.o |
57 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += pci-octeon.o pcie-octeon.o | 57 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += pci-octeon.o pcie-octeon.o |
58 | obj-$(CONFIG_CPU_XLR) += pci-xlr.o | 58 | obj-$(CONFIG_CPU_XLR) += pci-xlr.o |
59 | obj-$(CONFIG_CPU_XLP) += pci-xlp.o | 59 | obj-$(CONFIG_CPU_XLP) += pci-xlp.o |
60 | 60 | ||
61 | ifdef CONFIG_PCI_MSI | 61 | ifdef CONFIG_PCI_MSI |
62 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += msi-octeon.o | 62 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += msi-octeon.o |
63 | endif | 63 | endif |
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c index 9553b14002dd..a138e8ee5cfc 100644 --- a/arch/mips/pci/fixup-cobalt.c +++ b/arch/mips/pci/fixup-cobalt.c | |||
@@ -94,14 +94,14 @@ static void qube_raq_galileo_fixup(struct pci_dev *dev) | |||
94 | * --x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x-- | 94 | * --x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x-- |
95 | * | 95 | * |
96 | * On all machines prior to Q2, we had the STOP line disconnected | 96 | * On all machines prior to Q2, we had the STOP line disconnected |
97 | * from Galileo to VIA on PCI. The new Galileo does not function | 97 | * from Galileo to VIA on PCI. The new Galileo does not function |
98 | * correctly unless we have it connected. | 98 | * correctly unless we have it connected. |
99 | * | 99 | * |
100 | * Therefore we must set the disconnect/retry cycle values to | 100 | * Therefore we must set the disconnect/retry cycle values to |
101 | * something sensible when using the new Galileo. | 101 | * something sensible when using the new Galileo. |
102 | */ | 102 | */ |
103 | 103 | ||
104 | printk(KERN_INFO "Galileo: revision %u\n", dev->revision); | 104 | printk(KERN_INFO "Galileo: revision %u\n", dev->revision); |
105 | 105 | ||
106 | #if 0 | 106 | #if 0 |
107 | if (dev->revision >= 0x10) { | 107 | if (dev->revision >= 0x10) { |
@@ -149,30 +149,30 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, | |||
149 | qube_raq_via_board_id_fixup); | 149 | qube_raq_via_board_id_fixup); |
150 | 150 | ||
151 | static char irq_tab_qube1[] __initdata = { | 151 | static char irq_tab_qube1[] __initdata = { |
152 | [COBALT_PCICONF_CPU] = 0, | 152 | [COBALT_PCICONF_CPU] = 0, |
153 | [COBALT_PCICONF_ETH0] = QUBE1_ETH0_IRQ, | 153 | [COBALT_PCICONF_ETH0] = QUBE1_ETH0_IRQ, |
154 | [COBALT_PCICONF_RAQSCSI] = SCSI_IRQ, | 154 | [COBALT_PCICONF_RAQSCSI] = SCSI_IRQ, |
155 | [COBALT_PCICONF_VIA] = 0, | 155 | [COBALT_PCICONF_VIA] = 0, |
156 | [COBALT_PCICONF_PCISLOT] = PCISLOT_IRQ, | 156 | [COBALT_PCICONF_PCISLOT] = PCISLOT_IRQ, |
157 | [COBALT_PCICONF_ETH1] = 0 | 157 | [COBALT_PCICONF_ETH1] = 0 |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static char irq_tab_cobalt[] __initdata = { | 160 | static char irq_tab_cobalt[] __initdata = { |
161 | [COBALT_PCICONF_CPU] = 0, | 161 | [COBALT_PCICONF_CPU] = 0, |
162 | [COBALT_PCICONF_ETH0] = ETH0_IRQ, | 162 | [COBALT_PCICONF_ETH0] = ETH0_IRQ, |
163 | [COBALT_PCICONF_RAQSCSI] = SCSI_IRQ, | 163 | [COBALT_PCICONF_RAQSCSI] = SCSI_IRQ, |
164 | [COBALT_PCICONF_VIA] = 0, | 164 | [COBALT_PCICONF_VIA] = 0, |
165 | [COBALT_PCICONF_PCISLOT] = PCISLOT_IRQ, | 165 | [COBALT_PCICONF_PCISLOT] = PCISLOT_IRQ, |
166 | [COBALT_PCICONF_ETH1] = ETH1_IRQ | 166 | [COBALT_PCICONF_ETH1] = ETH1_IRQ |
167 | }; | 167 | }; |
168 | 168 | ||
169 | static char irq_tab_raq2[] __initdata = { | 169 | static char irq_tab_raq2[] __initdata = { |
170 | [COBALT_PCICONF_CPU] = 0, | 170 | [COBALT_PCICONF_CPU] = 0, |
171 | [COBALT_PCICONF_ETH0] = ETH0_IRQ, | 171 | [COBALT_PCICONF_ETH0] = ETH0_IRQ, |
172 | [COBALT_PCICONF_RAQSCSI] = RAQ2_SCSI_IRQ, | 172 | [COBALT_PCICONF_RAQSCSI] = RAQ2_SCSI_IRQ, |
173 | [COBALT_PCICONF_VIA] = 0, | 173 | [COBALT_PCICONF_VIA] = 0, |
174 | [COBALT_PCICONF_PCISLOT] = PCISLOT_IRQ, | 174 | [COBALT_PCICONF_PCISLOT] = PCISLOT_IRQ, |
175 | [COBALT_PCICONF_ETH1] = ETH1_IRQ | 175 | [COBALT_PCICONF_ETH1] = ETH1_IRQ |
176 | }; | 176 | }; |
177 | 177 | ||
178 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 178 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
diff --git a/arch/mips/pci/fixup-emma2rh.c b/arch/mips/pci/fixup-emma2rh.c index beaec32b02e5..19caf775c206 100644 --- a/arch/mips/pci/fixup-emma2rh.c +++ b/arch/mips/pci/fixup-emma2rh.c | |||
@@ -42,7 +42,7 @@ | |||
42 | * | 42 | * |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #define MAX_SLOT_NUM 10 | 45 | #define MAX_SLOT_NUM 10 |
46 | static unsigned char irq_map[][5] __initdata = { | 46 | static unsigned char irq_map[][5] __initdata = { |
47 | [3] = {0, MARKEINS_PCI_IRQ_INTB, MARKEINS_PCI_IRQ_INTC, | 47 | [3] = {0, MARKEINS_PCI_IRQ_INTB, MARKEINS_PCI_IRQ_INTC, |
48 | MARKEINS_PCI_IRQ_INTD, 0,}, | 48 | MARKEINS_PCI_IRQ_INTD, 0,}, |
diff --git a/arch/mips/pci/fixup-fuloong2e.c b/arch/mips/pci/fixup-fuloong2e.c index 63ab4a042cd6..50da773faede 100644 --- a/arch/mips/pci/fixup-fuloong2e.c +++ b/arch/mips/pci/fixup-fuloong2e.c | |||
@@ -6,9 +6,9 @@ | |||
6 | * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology | 6 | * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology |
7 | * Author: Fuxin Zhang, zhangfx@lemote.com | 7 | * Author: Fuxin Zhang, zhangfx@lemote.com |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
11 | * Free Software Foundation; either version 2 of the License, or (at your | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * option) any later version. | 12 | * option) any later version. |
13 | */ | 13 | */ |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
@@ -152,7 +152,7 @@ static void loongson2e_686b_func1_fixup(struct pci_dev *pdev) | |||
152 | /* disable read prefetch/write post buffers */ | 152 | /* disable read prefetch/write post buffers */ |
153 | pci_write_config_byte(pdev, 0x41, 0x02); | 153 | pci_write_config_byte(pdev, 0x41, 0x02); |
154 | 154 | ||
155 | /* use 3/4 as fifo thresh hold */ | 155 | /* use 3/4 as fifo thresh hold */ |
156 | pci_write_config_byte(pdev, 0x43, 0x0a); | 156 | pci_write_config_byte(pdev, 0x43, 0x0a); |
157 | pci_write_config_byte(pdev, 0x44, 0x00); | 157 | pci_write_config_byte(pdev, 0x44, 0x00); |
158 | 158 | ||
diff --git a/arch/mips/pci/fixup-ip32.c b/arch/mips/pci/fixup-ip32.c index 190fffd08d3e..133685e215ee 100644 --- a/arch/mips/pci/fixup-ip32.c +++ b/arch/mips/pci/fixup-ip32.c | |||
@@ -22,13 +22,13 @@ | |||
22 | #define INTC MACEPCI_SHARED1_IRQ | 22 | #define INTC MACEPCI_SHARED1_IRQ |
23 | #define INTD MACEPCI_SHARED2_IRQ | 23 | #define INTD MACEPCI_SHARED2_IRQ |
24 | static char irq_tab_mace[][5] __initdata = { | 24 | static char irq_tab_mace[][5] __initdata = { |
25 | /* Dummy INT#A INT#B INT#C INT#D */ | 25 | /* Dummy INT#A INT#B INT#C INT#D */ |
26 | {0, 0, 0, 0, 0}, /* This is placeholder row - never used */ | 26 | {0, 0, 0, 0, 0}, /* This is placeholder row - never used */ |
27 | {0, SCSI0, SCSI0, SCSI0, SCSI0}, | 27 | {0, SCSI0, SCSI0, SCSI0, SCSI0}, |
28 | {0, SCSI1, SCSI1, SCSI1, SCSI1}, | 28 | {0, SCSI1, SCSI1, SCSI1, SCSI1}, |
29 | {0, INTA0, INTB, INTC, INTD}, | 29 | {0, INTA0, INTB, INTC, INTD}, |
30 | {0, INTA1, INTC, INTD, INTB}, | 30 | {0, INTA1, INTC, INTD, INTB}, |
31 | {0, INTA2, INTD, INTB, INTC}, | 31 | {0, INTA2, INTD, INTB, INTC}, |
32 | }; | 32 | }; |
33 | 33 | ||
34 | 34 | ||
diff --git a/arch/mips/pci/fixup-lemote2f.c b/arch/mips/pci/fixup-lemote2f.c index 519daaebb5da..95ab9a1bd010 100644 --- a/arch/mips/pci/fixup-lemote2f.c +++ b/arch/mips/pci/fixup-lemote2f.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | /* all the pci device has the PCIA pin, check the datasheet. */ | 32 | /* all the pci device has the PCIA pin, check the datasheet. */ |
33 | static char irq_tab[][5] __initdata = { | 33 | static char irq_tab[][5] __initdata = { |
34 | /* INTA INTB INTC INTD */ | 34 | /* INTA INTB INTC INTD */ |
35 | {0, 0, 0, 0, 0}, /* 11: Unused */ | 35 | {0, 0, 0, 0, 0}, /* 11: Unused */ |
36 | {0, 0, 0, 0, 0}, /* 12: Unused */ | 36 | {0, 0, 0, 0, 0}, /* 12: Unused */ |
37 | {0, 0, 0, 0, 0}, /* 13: Unused */ | 37 | {0, 0, 0, 0, 0}, /* 13: Unused */ |
@@ -69,15 +69,15 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
69 | case 2: | 69 | case 2: |
70 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, | 70 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, |
71 | CS5536_IDE_INTR); | 71 | CS5536_IDE_INTR); |
72 | return CS5536_IDE_INTR; /* for IDE */ | 72 | return CS5536_IDE_INTR; /* for IDE */ |
73 | case 3: | 73 | case 3: |
74 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, | 74 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, |
75 | CS5536_ACC_INTR); | 75 | CS5536_ACC_INTR); |
76 | return CS5536_ACC_INTR; /* for AUDIO */ | 76 | return CS5536_ACC_INTR; /* for AUDIO */ |
77 | case 4: /* for OHCI */ | 77 | case 4: /* for OHCI */ |
78 | case 5: /* for EHCI */ | 78 | case 5: /* for EHCI */ |
79 | case 6: /* for UDC */ | 79 | case 6: /* for UDC */ |
80 | case 7: /* for OTG */ | 80 | case 7: /* for OTG */ |
81 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, | 81 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, |
82 | CS5536_USB_INTR); | 82 | CS5536_USB_INTR); |
83 | return CS5536_USB_INTR; | 83 | return CS5536_USB_INTR; |
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c index 75d03f6be3bd..07ada7f8441e 100644 --- a/arch/mips/pci/fixup-malta.c +++ b/arch/mips/pci/fixup-malta.c | |||
@@ -12,7 +12,7 @@ static char pci_irq[5] = { | |||
12 | }; | 12 | }; |
13 | 13 | ||
14 | static char irq_tab[][5] __initdata = { | 14 | static char irq_tab[][5] __initdata = { |
15 | /* INTA INTB INTC INTD */ | 15 | /* INTA INTB INTC INTD */ |
16 | {0, 0, 0, 0, 0 }, /* 0: GT64120 PCI bridge */ | 16 | {0, 0, 0, 0, 0 }, /* 0: GT64120 PCI bridge */ |
17 | {0, 0, 0, 0, 0 }, /* 1: Unused */ | 17 | {0, 0, 0, 0, 0 }, /* 1: Unused */ |
18 | {0, 0, 0, 0, 0 }, /* 2: Unused */ | 18 | {0, 0, 0, 0, 0 }, /* 2: Unused */ |
@@ -23,7 +23,7 @@ static char irq_tab[][5] __initdata = { | |||
23 | {0, 0, 0, 0, 0 }, /* 7: Unused */ | 23 | {0, 0, 0, 0, 0 }, /* 7: Unused */ |
24 | {0, 0, 0, 0, 0 }, /* 8: Unused */ | 24 | {0, 0, 0, 0, 0 }, /* 8: Unused */ |
25 | {0, 0, 0, 0, 0 }, /* 9: Unused */ | 25 | {0, 0, 0, 0, 0 }, /* 9: Unused */ |
26 | {0, 0, 0, 0, PCID }, /* 10: PIIX4 USB */ | 26 | {0, 0, 0, 0, PCID }, /* 10: PIIX4 USB */ |
27 | {0, PCIB, 0, 0, 0 }, /* 11: AMD 79C973 Ethernet */ | 27 | {0, PCIB, 0, 0, 0 }, /* 11: AMD 79C973 Ethernet */ |
28 | {0, PCIC, 0, 0, 0 }, /* 12: Crystal 4281 Sound */ | 28 | {0, PCIC, 0, 0, 0 }, /* 12: Crystal 4281 Sound */ |
29 | {0, 0, 0, 0, 0 }, /* 13: Unused */ | 29 | {0, 0, 0, 0, 0 }, /* 13: Unused */ |
@@ -31,9 +31,9 @@ static char irq_tab[][5] __initdata = { | |||
31 | {0, 0, 0, 0, 0 }, /* 15: Unused */ | 31 | {0, 0, 0, 0, 0 }, /* 15: Unused */ |
32 | {0, 0, 0, 0, 0 }, /* 16: Unused */ | 32 | {0, 0, 0, 0, 0 }, /* 16: Unused */ |
33 | {0, 0, 0, 0, 0 }, /* 17: Bonito/SOC-it PCI Bridge*/ | 33 | {0, 0, 0, 0, 0 }, /* 17: Bonito/SOC-it PCI Bridge*/ |
34 | {0, PCIA, PCIB, PCIC, PCID }, /* 18: PCI Slot 1 */ | 34 | {0, PCIA, PCIB, PCIC, PCID }, /* 18: PCI Slot 1 */ |
35 | {0, PCIB, PCIC, PCID, PCIA }, /* 19: PCI Slot 2 */ | 35 | {0, PCIB, PCIC, PCID, PCIA }, /* 19: PCI Slot 2 */ |
36 | {0, PCIC, PCID, PCIA, PCIB }, /* 20: PCI Slot 3 */ | 36 | {0, PCIC, PCID, PCIA, PCIB }, /* 20: PCI Slot 3 */ |
37 | {0, PCID, PCIA, PCIB, PCIC } /* 21: PCI Slot 4 */ | 37 | {0, PCID, PCIA, PCIB, PCIC } /* 21: PCI Slot 4 */ |
38 | }; | 38 | }; |
39 | 39 | ||
@@ -54,8 +54,8 @@ static void malta_piix_func0_fixup(struct pci_dev *pdev) | |||
54 | { | 54 | { |
55 | unsigned char reg_val; | 55 | unsigned char reg_val; |
56 | static int piixirqmap[16] = { /* PIIX PIRQC[A:D] irq mappings */ | 56 | static int piixirqmap[16] = { /* PIIX PIRQC[A:D] irq mappings */ |
57 | 0, 0, 0, 3, | 57 | 0, 0, 0, 3, |
58 | 4, 5, 6, 7, | 58 | 4, 5, 6, 7, |
59 | 0, 9, 10, 11, | 59 | 0, 9, 10, 11, |
60 | 12, 0, 14, 15 | 60 | 12, 0, 14, 15 |
61 | }; | 61 | }; |
diff --git a/arch/mips/pci/fixup-pmcmsp.c b/arch/mips/pci/fixup-pmcmsp.c index 65735b1b7665..fab405c21c2f 100644 --- a/arch/mips/pci/fixup-pmcmsp.c +++ b/arch/mips/pci/fixup-pmcmsp.c | |||
@@ -48,117 +48,117 @@ | |||
48 | #if defined(CONFIG_PMC_MSP7120_GW) | 48 | #if defined(CONFIG_PMC_MSP7120_GW) |
49 | /* Garibaldi Board IRQ wiring to PCI slots */ | 49 | /* Garibaldi Board IRQ wiring to PCI slots */ |
50 | static char irq_tab[][5] __initdata = { | 50 | static char irq_tab[][5] __initdata = { |
51 | /* INTA INTB INTC INTD */ | 51 | /* INTA INTB INTC INTD */ |
52 | {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */ | 52 | {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */ |
53 | {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */ | 53 | {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */ |
54 | {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */ | 54 | {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */ |
55 | {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */ | 55 | {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */ |
56 | {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */ | 56 | {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */ |
57 | {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */ | 57 | {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */ |
58 | {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */ | 58 | {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */ |
59 | {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */ | 59 | {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */ |
60 | {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */ | 60 | {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */ |
61 | {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */ | 61 | {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */ |
62 | {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */ | 62 | {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */ |
63 | {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */ | 63 | {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */ |
64 | {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */ | 64 | {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */ |
65 | {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */ | 65 | {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */ |
66 | {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */ | 66 | {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */ |
67 | {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */ | 67 | {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */ |
68 | {0, 0, 0, 0, 0 }, /* 6 (AD[16]): Unused */ | 68 | {0, 0, 0, 0, 0 }, /* 6 (AD[16]): Unused */ |
69 | {0, 0, 0, 0, 0 }, /* 7 (AD[17]): Unused */ | 69 | {0, 0, 0, 0, 0 }, /* 7 (AD[17]): Unused */ |
70 | {0, 0, 0, 0, 0 }, /* 8 (AD[18]): Unused */ | 70 | {0, 0, 0, 0, 0 }, /* 8 (AD[18]): Unused */ |
71 | {0, 0, 0, 0, 0 }, /* 9 (AD[19]): Unused */ | 71 | {0, 0, 0, 0, 0 }, /* 9 (AD[19]): Unused */ |
72 | {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */ | 72 | {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */ |
73 | {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */ | 73 | {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */ |
74 | {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */ | 74 | {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */ |
75 | {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */ | 75 | {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */ |
76 | {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */ | 76 | {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */ |
77 | {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */ | 77 | {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */ |
78 | {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */ | 78 | {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */ |
79 | {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */ | 79 | {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */ |
80 | {0, IRQ4, IRQ4, 0, 0 }, /* 18 (AD[28]): slot 0 */ | 80 | {0, IRQ4, IRQ4, 0, 0 }, /* 18 (AD[28]): slot 0 */ |
81 | {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */ | 81 | {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */ |
82 | {0, IRQ5, IRQ5, 0, 0 }, /* 20 (AD[30]): slot 1 */ | 82 | {0, IRQ5, IRQ5, 0, 0 }, /* 20 (AD[30]): slot 1 */ |
83 | {0, IRQ6, IRQ6, 0, 0 } /* 21 (AD[31]): slot 2 */ | 83 | {0, IRQ6, IRQ6, 0, 0 } /* 21 (AD[31]): slot 2 */ |
84 | }; | 84 | }; |
85 | 85 | ||
86 | #elif defined(CONFIG_PMC_MSP7120_EVAL) | 86 | #elif defined(CONFIG_PMC_MSP7120_EVAL) |
87 | 87 | ||
88 | /* MSP7120 Eval Board IRQ wiring to PCI slots */ | 88 | /* MSP7120 Eval Board IRQ wiring to PCI slots */ |
89 | static char irq_tab[][5] __initdata = { | 89 | static char irq_tab[][5] __initdata = { |
90 | /* INTA INTB INTC INTD */ | 90 | /* INTA INTB INTC INTD */ |
91 | {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */ | 91 | {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */ |
92 | {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */ | 92 | {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */ |
93 | {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */ | 93 | {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */ |
94 | {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */ | 94 | {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */ |
95 | {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */ | 95 | {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */ |
96 | {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */ | 96 | {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */ |
97 | {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */ | 97 | {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */ |
98 | {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */ | 98 | {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */ |
99 | {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */ | 99 | {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */ |
100 | {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */ | 100 | {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */ |
101 | {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */ | 101 | {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */ |
102 | {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */ | 102 | {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */ |
103 | {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */ | 103 | {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */ |
104 | {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */ | 104 | {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */ |
105 | {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */ | 105 | {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */ |
106 | {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */ | 106 | {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */ |
107 | {0, IRQ6, IRQ6, 0, 0 }, /* 6 (AD[16]): slot 3 (mini) */ | 107 | {0, IRQ6, IRQ6, 0, 0 }, /* 6 (AD[16]): slot 3 (mini) */ |
108 | {0, IRQ5, IRQ5, 0, 0 }, /* 7 (AD[17]): slot 2 (mini) */ | 108 | {0, IRQ5, IRQ5, 0, 0 }, /* 7 (AD[17]): slot 2 (mini) */ |
109 | {0, IRQ4, IRQ4, IRQ4, IRQ4}, /* 8 (AD[18]): slot 0 (PCI) */ | 109 | {0, IRQ4, IRQ4, IRQ4, IRQ4}, /* 8 (AD[18]): slot 0 (PCI) */ |
110 | {0, IRQ5, IRQ5, IRQ5, IRQ5}, /* 9 (AD[19]): slot 1 (PCI) */ | 110 | {0, IRQ5, IRQ5, IRQ5, IRQ5}, /* 9 (AD[19]): slot 1 (PCI) */ |
111 | {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */ | 111 | {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */ |
112 | {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */ | 112 | {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */ |
113 | {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */ | 113 | {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */ |
114 | {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */ | 114 | {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */ |
115 | {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */ | 115 | {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */ |
116 | {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */ | 116 | {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */ |
117 | {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */ | 117 | {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */ |
118 | {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */ | 118 | {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */ |
119 | {0, 0, 0, 0, 0 }, /* 18 (AD[28]): Unused */ | 119 | {0, 0, 0, 0, 0 }, /* 18 (AD[28]): Unused */ |
120 | {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */ | 120 | {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */ |
121 | {0, 0, 0, 0, 0 }, /* 20 (AD[30]): Unused */ | 121 | {0, 0, 0, 0, 0 }, /* 20 (AD[30]): Unused */ |
122 | {0, 0, 0, 0, 0 } /* 21 (AD[31]): Unused */ | 122 | {0, 0, 0, 0, 0 } /* 21 (AD[31]): Unused */ |
123 | }; | 123 | }; |
124 | 124 | ||
125 | #else | 125 | #else |
126 | 126 | ||
127 | /* Unknown board -- don't assign any IRQs */ | 127 | /* Unknown board -- don't assign any IRQs */ |
128 | static char irq_tab[][5] __initdata = { | 128 | static char irq_tab[][5] __initdata = { |
129 | /* INTA INTB INTC INTD */ | 129 | /* INTA INTB INTC INTD */ |
130 | {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */ | 130 | {0, 0, 0, 0, 0 }, /* (AD[0]): Unused */ |
131 | {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */ | 131 | {0, 0, 0, 0, 0 }, /* (AD[1]): Unused */ |
132 | {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */ | 132 | {0, 0, 0, 0, 0 }, /* (AD[2]): Unused */ |
133 | {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */ | 133 | {0, 0, 0, 0, 0 }, /* (AD[3]): Unused */ |
134 | {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */ | 134 | {0, 0, 0, 0, 0 }, /* (AD[4]): Unused */ |
135 | {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */ | 135 | {0, 0, 0, 0, 0 }, /* (AD[5]): Unused */ |
136 | {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */ | 136 | {0, 0, 0, 0, 0 }, /* (AD[6]): Unused */ |
137 | {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */ | 137 | {0, 0, 0, 0, 0 }, /* (AD[7]): Unused */ |
138 | {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */ | 138 | {0, 0, 0, 0, 0 }, /* (AD[8]): Unused */ |
139 | {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */ | 139 | {0, 0, 0, 0, 0 }, /* (AD[9]): Unused */ |
140 | {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */ | 140 | {0, 0, 0, 0, 0 }, /* 0 (AD[10]): Unused */ |
141 | {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */ | 141 | {0, 0, 0, 0, 0 }, /* 1 (AD[11]): Unused */ |
142 | {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */ | 142 | {0, 0, 0, 0, 0 }, /* 2 (AD[12]): Unused */ |
143 | {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */ | 143 | {0, 0, 0, 0, 0 }, /* 3 (AD[13]): Unused */ |
144 | {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */ | 144 | {0, 0, 0, 0, 0 }, /* 4 (AD[14]): Unused */ |
145 | {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */ | 145 | {0, 0, 0, 0, 0 }, /* 5 (AD[15]): Unused */ |
146 | {0, 0, 0, 0, 0 }, /* 6 (AD[16]): Unused */ | 146 | {0, 0, 0, 0, 0 }, /* 6 (AD[16]): Unused */ |
147 | {0, 0, 0, 0, 0 }, /* 7 (AD[17]): Unused */ | 147 | {0, 0, 0, 0, 0 }, /* 7 (AD[17]): Unused */ |
148 | {0, 0, 0, 0, 0 }, /* 8 (AD[18]): Unused */ | 148 | {0, 0, 0, 0, 0 }, /* 8 (AD[18]): Unused */ |
149 | {0, 0, 0, 0, 0 }, /* 9 (AD[19]): Unused */ | 149 | {0, 0, 0, 0, 0 }, /* 9 (AD[19]): Unused */ |
150 | {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */ | 150 | {0, 0, 0, 0, 0 }, /* 10 (AD[20]): Unused */ |
151 | {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */ | 151 | {0, 0, 0, 0, 0 }, /* 11 (AD[21]): Unused */ |
152 | {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */ | 152 | {0, 0, 0, 0, 0 }, /* 12 (AD[22]): Unused */ |
153 | {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */ | 153 | {0, 0, 0, 0, 0 }, /* 13 (AD[23]): Unused */ |
154 | {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */ | 154 | {0, 0, 0, 0, 0 }, /* 14 (AD[24]): Unused */ |
155 | {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */ | 155 | {0, 0, 0, 0, 0 }, /* 15 (AD[25]): Unused */ |
156 | {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */ | 156 | {0, 0, 0, 0, 0 }, /* 16 (AD[26]): Unused */ |
157 | {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */ | 157 | {0, 0, 0, 0, 0 }, /* 17 (AD[27]): Unused */ |
158 | {0, 0, 0, 0, 0 }, /* 18 (AD[28]): Unused */ | 158 | {0, 0, 0, 0, 0 }, /* 18 (AD[28]): Unused */ |
159 | {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */ | 159 | {0, 0, 0, 0, 0 }, /* 19 (AD[29]): Unused */ |
160 | {0, 0, 0, 0, 0 }, /* 20 (AD[30]): Unused */ | 160 | {0, 0, 0, 0, 0 }, /* 20 (AD[30]): Unused */ |
161 | {0, 0, 0, 0, 0 } /* 21 (AD[31]): Unused */ | 161 | {0, 0, 0, 0, 0 } /* 21 (AD[31]): Unused */ |
162 | }; | 162 | }; |
163 | #endif | 163 | #endif |
164 | 164 | ||
@@ -168,14 +168,14 @@ static char irq_tab[][5] __initdata = { | |||
168 | * _________________________________________________________________________ | 168 | * _________________________________________________________________________ |
169 | * | 169 | * |
170 | * DESCRIPTION: Perform platform specific device initialization at | 170 | * DESCRIPTION: Perform platform specific device initialization at |
171 | * pci_enable_device() time. | 171 | * pci_enable_device() time. |
172 | * None are needed for the MSP7120 PCI Controller. | 172 | * None are needed for the MSP7120 PCI Controller. |
173 | * | 173 | * |
174 | * INPUTS: dev - structure describing the PCI device | 174 | * INPUTS: dev - structure describing the PCI device |
175 | * | 175 | * |
176 | * OUTPUTS: none | 176 | * OUTPUTS: none |
177 | * | 177 | * |
178 | * RETURNS: PCIBIOS_SUCCESSFUL | 178 | * RETURNS: PCIBIOS_SUCCESSFUL |
179 | * | 179 | * |
180 | ****************************************************************************/ | 180 | ****************************************************************************/ |
181 | int pcibios_plat_dev_init(struct pci_dev *dev) | 181 | int pcibios_plat_dev_init(struct pci_dev *dev) |
@@ -190,16 +190,16 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
190 | * | 190 | * |
191 | * DESCRIPTION: Perform board supplied PCI IRQ mapping routine. | 191 | * DESCRIPTION: Perform board supplied PCI IRQ mapping routine. |
192 | * | 192 | * |
193 | * INPUTS: dev - unused | 193 | * INPUTS: dev - unused |
194 | * slot - PCI slot. Identified by which bit of the AD[] bus | 194 | * slot - PCI slot. Identified by which bit of the AD[] bus |
195 | * drives the IDSEL line. AD[10] is 0, AD[31] is | 195 | * drives the IDSEL line. AD[10] is 0, AD[31] is |
196 | * slot 21. | 196 | * slot 21. |
197 | * pin - numbered using the scheme of the PCI_INTERRUPT_PIN | 197 | * pin - numbered using the scheme of the PCI_INTERRUPT_PIN |
198 | * field of the config header. | 198 | * field of the config header. |
199 | * | 199 | * |
200 | * OUTPUTS: none | 200 | * OUTPUTS: none |
201 | * | 201 | * |
202 | * RETURNS: IRQ number | 202 | * RETURNS: IRQ number |
203 | * | 203 | * |
204 | ****************************************************************************/ | 204 | ****************************************************************************/ |
205 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 205 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
diff --git a/arch/mips/pci/fixup-sni.c b/arch/mips/pci/fixup-sni.c index 5c8a79bb2661..f67ebeeb4200 100644 --- a/arch/mips/pci/fixup-sni.c +++ b/arch/mips/pci/fixup-sni.c | |||
@@ -41,12 +41,12 @@ | |||
41 | * Logic CL-GD5434 VGA is device 3. | 41 | * Logic CL-GD5434 VGA is device 3. |
42 | */ | 42 | */ |
43 | static char irq_tab_rm200[8][5] __initdata = { | 43 | static char irq_tab_rm200[8][5] __initdata = { |
44 | /* INTA INTB INTC INTD */ | 44 | /* INTA INTB INTC INTD */ |
45 | { 0, 0, 0, 0, 0 }, /* EISA bridge */ | 45 | { 0, 0, 0, 0, 0 }, /* EISA bridge */ |
46 | { SCSI, SCSI, SCSI, SCSI, SCSI }, /* SCSI */ | 46 | { SCSI, SCSI, SCSI, SCSI, SCSI }, /* SCSI */ |
47 | { ETH, ETH, ETH, ETH, ETH }, /* Ethernet */ | 47 | { ETH, ETH, ETH, ETH, ETH }, /* Ethernet */ |
48 | { INTB, INTB, INTB, INTB, INTB }, /* VGA */ | 48 | { INTB, INTB, INTB, INTB, INTB }, /* VGA */ |
49 | { 0, 0, 0, 0, 0 }, /* Unused */ | 49 | { 0, 0, 0, 0, 0 }, /* Unused */ |
50 | { 0, INTB, INTC, INTD, INTA }, /* Slot 2 */ | 50 | { 0, INTB, INTC, INTD, INTA }, /* Slot 2 */ |
51 | { 0, INTC, INTD, INTA, INTB }, /* Slot 3 */ | 51 | { 0, INTC, INTD, INTA, INTB }, /* Slot 3 */ |
52 | { 0, INTD, INTA, INTB, INTC }, /* Slot 4 */ | 52 | { 0, INTD, INTA, INTB, INTC }, /* Slot 4 */ |
@@ -58,20 +58,20 @@ static char irq_tab_rm200[8][5] __initdata = { | |||
58 | * The VGA card is optional for RM300 systems. | 58 | * The VGA card is optional for RM300 systems. |
59 | */ | 59 | */ |
60 | static char irq_tab_rm300d[8][5] __initdata = { | 60 | static char irq_tab_rm300d[8][5] __initdata = { |
61 | /* INTA INTB INTC INTD */ | 61 | /* INTA INTB INTC INTD */ |
62 | { 0, 0, 0, 0, 0 }, /* EISA bridge */ | 62 | { 0, 0, 0, 0, 0 }, /* EISA bridge */ |
63 | { SCSI, SCSI, SCSI, SCSI, SCSI }, /* SCSI */ | 63 | { SCSI, SCSI, SCSI, SCSI, SCSI }, /* SCSI */ |
64 | { 0, INTC, INTD, INTA, INTB }, /* Slot 1 */ | 64 | { 0, INTC, INTD, INTA, INTB }, /* Slot 1 */ |
65 | { INTB, INTB, INTB, INTB, INTB }, /* VGA */ | 65 | { INTB, INTB, INTB, INTB, INTB }, /* VGA */ |
66 | { 0, 0, 0, 0, 0 }, /* Unused */ | 66 | { 0, 0, 0, 0, 0 }, /* Unused */ |
67 | { 0, INTB, INTC, INTD, INTA }, /* Slot 2 */ | 67 | { 0, INTB, INTC, INTD, INTA }, /* Slot 2 */ |
68 | { 0, INTC, INTD, INTA, INTB }, /* Slot 3 */ | 68 | { 0, INTC, INTD, INTA, INTB }, /* Slot 3 */ |
69 | { 0, INTD, INTA, INTB, INTC }, /* Slot 4 */ | 69 | { 0, INTD, INTA, INTB, INTC }, /* Slot 4 */ |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static char irq_tab_rm300e[5][5] __initdata = { | 72 | static char irq_tab_rm300e[5][5] __initdata = { |
73 | /* INTA INTB INTC INTD */ | 73 | /* INTA INTB INTC INTD */ |
74 | { 0, 0, 0, 0, 0 }, /* HOST bridge */ | 74 | { 0, 0, 0, 0, 0 }, /* HOST bridge */ |
75 | { SCSI, SCSI, SCSI, SCSI, SCSI }, /* SCSI */ | 75 | { SCSI, SCSI, SCSI, SCSI, SCSI }, /* SCSI */ |
76 | { 0, INTC, INTD, INTA, INTB }, /* Bridge/i960 */ | 76 | { 0, INTC, INTD, INTA, INTB }, /* Bridge/i960 */ |
77 | { 0, INTD, INTA, INTB, INTC }, /* Slot 1 */ | 77 | { 0, INTD, INTA, INTB, INTC }, /* Slot 1 */ |
@@ -97,30 +97,30 @@ static char irq_tab_rm300e[5][5] __initdata = { | |||
97 | #define INTD PCIT_IRQ_INTD | 97 | #define INTD PCIT_IRQ_INTD |
98 | 98 | ||
99 | static char irq_tab_pcit[13][5] __initdata = { | 99 | static char irq_tab_pcit[13][5] __initdata = { |
100 | /* INTA INTB INTC INTD */ | 100 | /* INTA INTB INTC INTD */ |
101 | { 0, 0, 0, 0, 0 }, /* HOST bridge */ | 101 | { 0, 0, 0, 0, 0 }, /* HOST bridge */ |
102 | { SCSI0, SCSI0, SCSI0, SCSI0, SCSI0 }, /* SCSI */ | 102 | { SCSI0, SCSI0, SCSI0, SCSI0, SCSI0 }, /* SCSI */ |
103 | { SCSI1, SCSI1, SCSI1, SCSI1, SCSI1 }, /* SCSI */ | 103 | { SCSI1, SCSI1, SCSI1, SCSI1, SCSI1 }, /* SCSI */ |
104 | { ETH, ETH, ETH, ETH, ETH }, /* Ethernet */ | 104 | { ETH, ETH, ETH, ETH, ETH }, /* Ethernet */ |
105 | { 0, INTA, INTB, INTC, INTD }, /* PCI-PCI bridge */ | 105 | { 0, INTA, INTB, INTC, INTD }, /* PCI-PCI bridge */ |
106 | { 0, 0, 0, 0, 0 }, /* Unused */ | 106 | { 0, 0, 0, 0, 0 }, /* Unused */ |
107 | { 0, 0, 0, 0, 0 }, /* Unused */ | 107 | { 0, 0, 0, 0, 0 }, /* Unused */ |
108 | { 0, 0, 0, 0, 0 }, /* Unused */ | 108 | { 0, 0, 0, 0, 0 }, /* Unused */ |
109 | { 0, INTA, INTB, INTC, INTD }, /* Slot 1 */ | 109 | { 0, INTA, INTB, INTC, INTD }, /* Slot 1 */ |
110 | { 0, INTB, INTC, INTD, INTA }, /* Slot 2 */ | 110 | { 0, INTB, INTC, INTD, INTA }, /* Slot 2 */ |
111 | { 0, INTC, INTD, INTA, INTB }, /* Slot 3 */ | 111 | { 0, INTC, INTD, INTA, INTB }, /* Slot 3 */ |
112 | { 0, INTD, INTA, INTB, INTC }, /* Slot 4 */ | 112 | { 0, INTD, INTA, INTB, INTC }, /* Slot 4 */ |
113 | { 0, INTA, INTB, INTC, INTD }, /* Slot 5 */ | 113 | { 0, INTA, INTB, INTC, INTD }, /* Slot 5 */ |
114 | }; | 114 | }; |
115 | 115 | ||
116 | static char irq_tab_pcit_cplus[13][5] __initdata = { | 116 | static char irq_tab_pcit_cplus[13][5] __initdata = { |
117 | /* INTA INTB INTC INTD */ | 117 | /* INTA INTB INTC INTD */ |
118 | { 0, 0, 0, 0, 0 }, /* HOST bridge */ | 118 | { 0, 0, 0, 0, 0 }, /* HOST bridge */ |
119 | { 0, INTB, INTC, INTD, INTA }, /* PCI Slot 9 */ | 119 | { 0, INTB, INTC, INTD, INTA }, /* PCI Slot 9 */ |
120 | { 0, 0, 0, 0, 0 }, /* PCI-EISA */ | 120 | { 0, 0, 0, 0, 0 }, /* PCI-EISA */ |
121 | { 0, 0, 0, 0, 0 }, /* Unused */ | 121 | { 0, 0, 0, 0, 0 }, /* Unused */ |
122 | { 0, INTA, INTB, INTC, INTD }, /* PCI-PCI bridge */ | 122 | { 0, INTA, INTB, INTC, INTD }, /* PCI-PCI bridge */ |
123 | { 0, INTB, INTC, INTD, INTA }, /* fixup */ | 123 | { 0, INTB, INTC, INTD, INTA }, /* fixup */ |
124 | }; | 124 | }; |
125 | 125 | ||
126 | static inline int is_rm300_revd(void) | 126 | static inline int is_rm300_revd(void) |
@@ -146,18 +146,18 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
146 | } | 146 | } |
147 | return irq_tab_pcit_cplus[slot][pin]; | 147 | return irq_tab_pcit_cplus[slot][pin]; |
148 | case SNI_BRD_PCI_TOWER: | 148 | case SNI_BRD_PCI_TOWER: |
149 | return irq_tab_pcit[slot][pin]; | 149 | return irq_tab_pcit[slot][pin]; |
150 | 150 | ||
151 | case SNI_BRD_PCI_MTOWER: | 151 | case SNI_BRD_PCI_MTOWER: |
152 | if (is_rm300_revd()) | 152 | if (is_rm300_revd()) |
153 | return irq_tab_rm300d[slot][pin]; | 153 | return irq_tab_rm300d[slot][pin]; |
154 | /* fall through */ | 154 | /* fall through */ |
155 | 155 | ||
156 | case SNI_BRD_PCI_DESKTOP: | 156 | case SNI_BRD_PCI_DESKTOP: |
157 | return irq_tab_rm200[slot][pin]; | 157 | return irq_tab_rm200[slot][pin]; |
158 | 158 | ||
159 | case SNI_BRD_PCI_MTOWER_CPLUS: | 159 | case SNI_BRD_PCI_MTOWER_CPLUS: |
160 | return irq_tab_rm300e[slot][pin]; | 160 | return irq_tab_rm300e[slot][pin]; |
161 | } | 161 | } |
162 | 162 | ||
163 | return 0; | 163 | return 0; |
diff --git a/arch/mips/pci/fixup-tb0219.c b/arch/mips/pci/fixup-tb0219.c index 8084b17d4406..d0b0083fbd27 100644 --- a/arch/mips/pci/fixup-tb0219.c +++ b/arch/mips/pci/fixup-tb0219.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * fixup-tb0219.c, The TANBAC TB0219 specific PCI fixups. | 2 | * fixup-tb0219.c, The TANBAC TB0219 specific PCI fixups. |
3 | * | 3 | * |
4 | * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp> | 4 | * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp> |
5 | * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org> | 5 | * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
diff --git a/arch/mips/pci/fixup-tb0287.c b/arch/mips/pci/fixup-tb0287.c index 2fe29db43725..8c5039ed75d7 100644 --- a/arch/mips/pci/fixup-tb0287.c +++ b/arch/mips/pci/fixup-tb0287.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * fixup-tb0287.c, The TANBAC TB0287 specific PCI fixups. | 2 | * fixup-tb0287.c, The TANBAC TB0287 specific PCI fixups. |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2005 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/pci/fixup-wrppmc.c b/arch/mips/pci/fixup-wrppmc.c index 3d277549d5df..29737edd121f 100644 --- a/arch/mips/pci/fixup-wrppmc.c +++ b/arch/mips/pci/fixup-wrppmc.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #define PCI_SLOT_MAXNR 32 /* Each PCI bus has 32 physical slots */ | 20 | #define PCI_SLOT_MAXNR 32 /* Each PCI bus has 32 physical slots */ |
21 | 21 | ||
22 | static char pci_irq_tab[PCI_SLOT_MAXNR][5] __initdata = { | 22 | static char pci_irq_tab[PCI_SLOT_MAXNR][5] __initdata = { |
23 | /* 0 INTA INTB INTC INTD */ | 23 | /* 0 INTA INTB INTC INTD */ |
24 | [0] = {0, 0, 0, 0, 0}, /* Slot 0: GT64120 PCI bridge */ | 24 | [0] = {0, 0, 0, 0, 0}, /* Slot 0: GT64120 PCI bridge */ |
25 | [6] = {0, WRPPMC_PCI_INTA_IRQ, 0, 0, 0}, | 25 | [6] = {0, WRPPMC_PCI_INTA_IRQ, 0, 0, 0}, |
26 | }; | 26 | }; |
diff --git a/arch/mips/pci/ops-bcm63xx.c b/arch/mips/pci/ops-bcm63xx.c index 4a156629e958..6144bb337e44 100644 --- a/arch/mips/pci/ops-bcm63xx.c +++ b/arch/mips/pci/ops-bcm63xx.c | |||
@@ -174,8 +174,8 @@ static int bcm63xx_pci_write(struct pci_bus *bus, unsigned int devfn, | |||
174 | } | 174 | } |
175 | 175 | ||
176 | struct pci_ops bcm63xx_pci_ops = { | 176 | struct pci_ops bcm63xx_pci_ops = { |
177 | .read = bcm63xx_pci_read, | 177 | .read = bcm63xx_pci_read, |
178 | .write = bcm63xx_pci_write | 178 | .write = bcm63xx_pci_write |
179 | }; | 179 | }; |
180 | 180 | ||
181 | #ifdef CONFIG_CARDBUS | 181 | #ifdef CONFIG_CARDBUS |
@@ -370,8 +370,8 @@ static int bcm63xx_cb_read(struct pci_bus *bus, unsigned int devfn, | |||
370 | return fake_cb_bridge_read(where, size, val); | 370 | return fake_cb_bridge_read(where, size, val); |
371 | } | 371 | } |
372 | 372 | ||
373 | /* a configuration cycle for the device behind the cardbus | 373 | /* a configuration cycle for the device behind the cardbus |
374 | * bridge is actually done as a type 0 cycle on the primary | 374 | * bridge is actually done as a type 0 cycle on the primary |
375 | * bus. This means that only one device can be on the cardbus | 375 | * bus. This means that only one device can be on the cardbus |
376 | * bus */ | 376 | * bus */ |
377 | if (fake_cb_bridge_regs.bus_assigned && | 377 | if (fake_cb_bridge_regs.bus_assigned && |
@@ -403,8 +403,8 @@ static int bcm63xx_cb_write(struct pci_bus *bus, unsigned int devfn, | |||
403 | } | 403 | } |
404 | 404 | ||
405 | struct pci_ops bcm63xx_cb_ops = { | 405 | struct pci_ops bcm63xx_cb_ops = { |
406 | .read = bcm63xx_cb_read, | 406 | .read = bcm63xx_cb_read, |
407 | .write = bcm63xx_cb_write, | 407 | .write = bcm63xx_cb_write, |
408 | }; | 408 | }; |
409 | 409 | ||
410 | /* | 410 | /* |
@@ -523,6 +523,6 @@ static int bcm63xx_pcie_write(struct pci_bus *bus, unsigned int devfn, | |||
523 | 523 | ||
524 | 524 | ||
525 | struct pci_ops bcm63xx_pcie_ops = { | 525 | struct pci_ops bcm63xx_pcie_ops = { |
526 | .read = bcm63xx_pcie_read, | 526 | .read = bcm63xx_pcie_read, |
527 | .write = bcm63xx_pcie_write | 527 | .write = bcm63xx_pcie_write |
528 | }; | 528 | }; |
diff --git a/arch/mips/pci/ops-bonito64.c b/arch/mips/pci/ops-bonito64.c index 1b3e03f20c54..830352e3aeda 100644 --- a/arch/mips/pci/ops-bonito64.c +++ b/arch/mips/pci/ops-bonito64.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include <asm/mips-boards/bonito64.h> | 27 | #include <asm/mips-boards/bonito64.h> |
28 | 28 | ||
29 | #define PCI_ACCESS_READ 0 | 29 | #define PCI_ACCESS_READ 0 |
30 | #define PCI_ACCESS_WRITE 1 | 30 | #define PCI_ACCESS_WRITE 1 |
31 | 31 | ||
32 | #define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(_pcictrl_bonito_pcicfg + (offset)) | 32 | #define CFG_SPACE_REG(offset) (void *)CKSEG1ADDR(_pcictrl_bonito_pcicfg + (offset)) |
@@ -137,7 +137,7 @@ static int bonito64_pcibios_write(struct pci_bus *bus, unsigned int devfn, | |||
137 | data = val; | 137 | data = val; |
138 | else { | 138 | else { |
139 | if (bonito64_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, | 139 | if (bonito64_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, |
140 | where, &data)) | 140 | where, &data)) |
141 | return -1; | 141 | return -1; |
142 | 142 | ||
143 | if (size == 1) | 143 | if (size == 1) |
diff --git a/arch/mips/pci/ops-gt64xxx_pci0.c b/arch/mips/pci/ops-gt64xxx_pci0.c index 3d896c5f413f..effcbda9f528 100644 --- a/arch/mips/pci/ops-gt64xxx_pci0.c +++ b/arch/mips/pci/ops-gt64xxx_pci0.c | |||
@@ -23,21 +23,21 @@ | |||
23 | 23 | ||
24 | #include <asm/gt64120.h> | 24 | #include <asm/gt64120.h> |
25 | 25 | ||
26 | #define PCI_ACCESS_READ 0 | 26 | #define PCI_ACCESS_READ 0 |
27 | #define PCI_ACCESS_WRITE 1 | 27 | #define PCI_ACCESS_WRITE 1 |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * PCI configuration cycle AD bus definition | 30 | * PCI configuration cycle AD bus definition |
31 | */ | 31 | */ |
32 | /* Type 0 */ | 32 | /* Type 0 */ |
33 | #define PCI_CFG_TYPE0_REG_SHF 0 | 33 | #define PCI_CFG_TYPE0_REG_SHF 0 |
34 | #define PCI_CFG_TYPE0_FUNC_SHF 8 | 34 | #define PCI_CFG_TYPE0_FUNC_SHF 8 |
35 | 35 | ||
36 | /* Type 1 */ | 36 | /* Type 1 */ |
37 | #define PCI_CFG_TYPE1_REG_SHF 0 | 37 | #define PCI_CFG_TYPE1_REG_SHF 0 |
38 | #define PCI_CFG_TYPE1_FUNC_SHF 8 | 38 | #define PCI_CFG_TYPE1_FUNC_SHF 8 |
39 | #define PCI_CFG_TYPE1_DEV_SHF 11 | 39 | #define PCI_CFG_TYPE1_DEV_SHF 11 |
40 | #define PCI_CFG_TYPE1_BUS_SHF 16 | 40 | #define PCI_CFG_TYPE1_BUS_SHF 16 |
41 | 41 | ||
42 | static int gt64xxx_pci0_pcibios_config_access(unsigned char access_type, | 42 | static int gt64xxx_pci0_pcibios_config_access(unsigned char access_type, |
43 | struct pci_bus *bus, unsigned int devfn, int where, u32 * data) | 43 | struct pci_bus *bus, unsigned int devfn, int where, u32 * data) |
@@ -50,7 +50,7 @@ static int gt64xxx_pci0_pcibios_config_access(unsigned char access_type, | |||
50 | 50 | ||
51 | /* Clear cause register bits */ | 51 | /* Clear cause register bits */ |
52 | GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT | | 52 | GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT | |
53 | GT_INTRCAUSE_TARABORT0_BIT)); | 53 | GT_INTRCAUSE_TARABORT0_BIT)); |
54 | 54 | ||
55 | /* Setup address */ | 55 | /* Setup address */ |
56 | GT_WRITE(GT_PCI0_CFGADDR_OFS, | 56 | GT_WRITE(GT_PCI0_CFGADDR_OFS, |
@@ -87,7 +87,7 @@ static int gt64xxx_pci0_pcibios_config_access(unsigned char access_type, | |||
87 | 87 | ||
88 | /* Clear bits */ | 88 | /* Clear bits */ |
89 | GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT | | 89 | GT_WRITE(GT_INTRCAUSE_OFS, ~(GT_INTRCAUSE_MASABORT0_BIT | |
90 | GT_INTRCAUSE_TARABORT0_BIT)); | 90 | GT_INTRCAUSE_TARABORT0_BIT)); |
91 | 91 | ||
92 | return -1; | 92 | return -1; |
93 | } | 93 | } |
@@ -106,7 +106,7 @@ static int gt64xxx_pci0_pcibios_read(struct pci_bus *bus, unsigned int devfn, | |||
106 | u32 data = 0; | 106 | u32 data = 0; |
107 | 107 | ||
108 | if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, | 108 | if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, |
109 | where, &data)) | 109 | where, &data)) |
110 | return PCIBIOS_DEVICE_NOT_FOUND; | 110 | return PCIBIOS_DEVICE_NOT_FOUND; |
111 | 111 | ||
112 | if (size == 1) | 112 | if (size == 1) |
@@ -128,7 +128,7 @@ static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn, | |||
128 | data = val; | 128 | data = val; |
129 | else { | 129 | else { |
130 | if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, | 130 | if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, |
131 | devfn, where, &data)) | 131 | devfn, where, &data)) |
132 | return PCIBIOS_DEVICE_NOT_FOUND; | 132 | return PCIBIOS_DEVICE_NOT_FOUND; |
133 | 133 | ||
134 | if (size == 1) | 134 | if (size == 1) |
@@ -140,7 +140,7 @@ static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn, | |||
140 | } | 140 | } |
141 | 141 | ||
142 | if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, | 142 | if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, |
143 | where, &data)) | 143 | where, &data)) |
144 | return PCIBIOS_DEVICE_NOT_FOUND; | 144 | return PCIBIOS_DEVICE_NOT_FOUND; |
145 | 145 | ||
146 | return PCIBIOS_SUCCESSFUL; | 146 | return PCIBIOS_SUCCESSFUL; |
diff --git a/arch/mips/pci/ops-lantiq.c b/arch/mips/pci/ops-lantiq.c index 1f2afb55cc71..16e7c2526d77 100644 --- a/arch/mips/pci/ops-lantiq.c +++ b/arch/mips/pci/ops-lantiq.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #define LTQ_PCI_CFG_DEVNUM_SHF 11 | 23 | #define LTQ_PCI_CFG_DEVNUM_SHF 11 |
24 | #define LTQ_PCI_CFG_FUNNUM_SHF 8 | 24 | #define LTQ_PCI_CFG_FUNNUM_SHF 8 |
25 | 25 | ||
26 | #define PCI_ACCESS_READ 0 | 26 | #define PCI_ACCESS_READ 0 |
27 | #define PCI_ACCESS_WRITE 1 | 27 | #define PCI_ACCESS_WRITE 1 |
28 | 28 | ||
29 | static int ltq_pci_config_access(unsigned char access_type, struct pci_bus *bus, | 29 | static int ltq_pci_config_access(unsigned char access_type, struct pci_bus *bus, |
diff --git a/arch/mips/pci/ops-loongson2.c b/arch/mips/pci/ops-loongson2.c index afd221122d22..98254afa0287 100644 --- a/arch/mips/pci/ops-loongson2.c +++ b/arch/mips/pci/ops-loongson2.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <cs5536/cs5536.h> | 24 | #include <cs5536/cs5536.h> |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #define PCI_ACCESS_READ 0 | 27 | #define PCI_ACCESS_READ 0 |
28 | #define PCI_ACCESS_WRITE 1 | 28 | #define PCI_ACCESS_WRITE 1 |
29 | 29 | ||
30 | #define CFG_SPACE_REG(offset) \ | 30 | #define CFG_SPACE_REG(offset) \ |
diff --git a/arch/mips/pci/ops-msc.c b/arch/mips/pci/ops-msc.c index 5d9fbb0f4670..92a8543361bb 100644 --- a/arch/mips/pci/ops-msc.c +++ b/arch/mips/pci/ops-msc.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc. | 2 | * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc. |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * Authors: Carsten Langgaard <carstenl@mips.com> | 4 | * Authors: Carsten Langgaard <carstenl@mips.com> |
5 | * Maciej W. Rozycki <macro@mips.com> | 5 | * Maciej W. Rozycki <macro@mips.com> |
6 | * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) | 6 | * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) |
7 | * | 7 | * |
8 | * This program is free software; you can distribute it and/or modify it | 8 | * This program is free software; you can distribute it and/or modify it |
@@ -28,21 +28,21 @@ | |||
28 | 28 | ||
29 | #include <asm/mips-boards/msc01_pci.h> | 29 | #include <asm/mips-boards/msc01_pci.h> |
30 | 30 | ||
31 | #define PCI_ACCESS_READ 0 | 31 | #define PCI_ACCESS_READ 0 |
32 | #define PCI_ACCESS_WRITE 1 | 32 | #define PCI_ACCESS_WRITE 1 |
33 | 33 | ||
34 | /* | 34 | /* |
35 | * PCI configuration cycle AD bus definition | 35 | * PCI configuration cycle AD bus definition |
36 | */ | 36 | */ |
37 | /* Type 0 */ | 37 | /* Type 0 */ |
38 | #define PCI_CFG_TYPE0_REG_SHF 0 | 38 | #define PCI_CFG_TYPE0_REG_SHF 0 |
39 | #define PCI_CFG_TYPE0_FUNC_SHF 8 | 39 | #define PCI_CFG_TYPE0_FUNC_SHF 8 |
40 | 40 | ||
41 | /* Type 1 */ | 41 | /* Type 1 */ |
42 | #define PCI_CFG_TYPE1_REG_SHF 0 | 42 | #define PCI_CFG_TYPE1_REG_SHF 0 |
43 | #define PCI_CFG_TYPE1_FUNC_SHF 8 | 43 | #define PCI_CFG_TYPE1_FUNC_SHF 8 |
44 | #define PCI_CFG_TYPE1_DEV_SHF 11 | 44 | #define PCI_CFG_TYPE1_DEV_SHF 11 |
45 | #define PCI_CFG_TYPE1_BUS_SHF 16 | 45 | #define PCI_CFG_TYPE1_BUS_SHF 16 |
46 | 46 | ||
47 | static int msc_pcibios_config_access(unsigned char access_type, | 47 | static int msc_pcibios_config_access(unsigned char access_type, |
48 | struct pci_bus *bus, unsigned int devfn, int where, u32 * data) | 48 | struct pci_bus *bus, unsigned int devfn, int where, u32 * data) |
@@ -97,7 +97,7 @@ static int msc_pcibios_read(struct pci_bus *bus, unsigned int devfn, | |||
97 | return PCIBIOS_BAD_REGISTER_NUMBER; | 97 | return PCIBIOS_BAD_REGISTER_NUMBER; |
98 | 98 | ||
99 | if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, | 99 | if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, |
100 | &data)) | 100 | &data)) |
101 | return -1; | 101 | return -1; |
102 | 102 | ||
103 | if (size == 1) | 103 | if (size == 1) |
@@ -124,7 +124,7 @@ static int msc_pcibios_write(struct pci_bus *bus, unsigned int devfn, | |||
124 | data = val; | 124 | data = val; |
125 | else { | 125 | else { |
126 | if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, | 126 | if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, |
127 | where, &data)) | 127 | where, &data)) |
128 | return -1; | 128 | return -1; |
129 | 129 | ||
130 | if (size == 1) | 130 | if (size == 1) |
diff --git a/arch/mips/pci/ops-nile4.c b/arch/mips/pci/ops-nile4.c index 99929cf88419..499e35c3eb35 100644 --- a/arch/mips/pci/ops-nile4.c +++ b/arch/mips/pci/ops-nile4.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <asm/lasat/lasat.h> | 6 | #include <asm/lasat/lasat.h> |
7 | #include <asm/nile4.h> | 7 | #include <asm/nile4.h> |
8 | 8 | ||
9 | #define PCI_ACCESS_READ 0 | 9 | #define PCI_ACCESS_READ 0 |
10 | #define PCI_ACCESS_WRITE 1 | 10 | #define PCI_ACCESS_WRITE 1 |
11 | 11 | ||
12 | #define LO(reg) (reg / 4) | 12 | #define LO(reg) (reg / 4) |
diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c index 389bf669d56e..d0b6f8399b07 100644 --- a/arch/mips/pci/ops-pmcmsp.c +++ b/arch/mips/pci/ops-pmcmsp.c | |||
@@ -9,8 +9,8 @@ | |||
9 | * Much of the code is derived from the original DDB5074 port by | 9 | * Much of the code is derived from the original DDB5074 port by |
10 | * Geert Uytterhoeven <geert@sonycom.com> | 10 | * Geert Uytterhoeven <geert@sonycom.com> |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
14 | * Free Software Foundation; either version 2 of the License, or (at your | 14 | * Free Software Foundation; either version 2 of the License, or (at your |
15 | * option) any later version. | 15 | * option) any later version. |
16 | * | 16 | * |
@@ -57,18 +57,18 @@ static void pci_proc_init(void); | |||
57 | * _________________________________________________________________________ | 57 | * _________________________________________________________________________ |
58 | * | 58 | * |
59 | * DESCRIPTION: Prints the count of how many times each PCI | 59 | * DESCRIPTION: Prints the count of how many times each PCI |
60 | * interrupt has asserted. Can be invoked by the | 60 | * interrupt has asserted. Can be invoked by the |
61 | * /proc filesystem. | 61 | * /proc filesystem. |
62 | * | 62 | * |
63 | * INPUTS: page - part of STDOUT calculation | 63 | * INPUTS: page - part of STDOUT calculation |
64 | * off - part of STDOUT calculation | 64 | * off - part of STDOUT calculation |
65 | * count - part of STDOUT calculation | 65 | * count - part of STDOUT calculation |
66 | * data - unused | 66 | * data - unused |
67 | * | 67 | * |
68 | * OUTPUTS: start - new start location | 68 | * OUTPUTS: start - new start location |
69 | * eof - end of file pointer | 69 | * eof - end of file pointer |
70 | * | 70 | * |
71 | * RETURNS: len - STDOUT length | 71 | * RETURNS: len - STDOUT length |
72 | * | 72 | * |
73 | ****************************************************************************/ | 73 | ****************************************************************************/ |
74 | static int read_msp_pci_counts(char *page, char **start, off_t off, | 74 | static int read_msp_pci_counts(char *page, char **start, off_t off, |
@@ -106,21 +106,21 @@ static int read_msp_pci_counts(char *page, char **start, off_t off, | |||
106 | * _________________________________________________________________________ | 106 | * _________________________________________________________________________ |
107 | * | 107 | * |
108 | * DESCRIPTION: Generates a configuration write cycle for debug purposes. | 108 | * DESCRIPTION: Generates a configuration write cycle for debug purposes. |
109 | * The IDSEL line asserted and location and data written are | 109 | * The IDSEL line asserted and location and data written are |
110 | * immaterial. Just want to be able to prove that a | 110 | * immaterial. Just want to be able to prove that a |
111 | * configuration write can be correctly generated on the | 111 | * configuration write can be correctly generated on the |
112 | * PCI bus. Intent is that this function by invocable from | 112 | * PCI bus. Intent is that this function by invocable from |
113 | * the /proc filesystem. | 113 | * the /proc filesystem. |
114 | * | 114 | * |
115 | * INPUTS: page - part of STDOUT calculation | 115 | * INPUTS: page - part of STDOUT calculation |
116 | * off - part of STDOUT calculation | 116 | * off - part of STDOUT calculation |
117 | * count - part of STDOUT calculation | 117 | * count - part of STDOUT calculation |
118 | * data - unused | 118 | * data - unused |
119 | * | 119 | * |
120 | * OUTPUTS: start - new start location | 120 | * OUTPUTS: start - new start location |
121 | * eof - end of file pointer | 121 | * eof - end of file pointer |
122 | * | 122 | * |
123 | * RETURNS: len - STDOUT length | 123 | * RETURNS: len - STDOUT length |
124 | * | 124 | * |
125 | ****************************************************************************/ | 125 | ****************************************************************************/ |
126 | static int gen_pci_cfg_wr(char *page, char **start, off_t off, | 126 | static int gen_pci_cfg_wr(char *page, char **start, off_t off, |
@@ -190,11 +190,11 @@ static int gen_pci_cfg_wr(char *page, char **start, off_t off, | |||
190 | * | 190 | * |
191 | * DESCRIPTION: Create entries in the /proc filesystem for debug access. | 191 | * DESCRIPTION: Create entries in the /proc filesystem for debug access. |
192 | * | 192 | * |
193 | * INPUTS: none | 193 | * INPUTS: none |
194 | * | 194 | * |
195 | * OUTPUTS: none | 195 | * OUTPUTS: none |
196 | * | 196 | * |
197 | * RETURNS: none | 197 | * RETURNS: none |
198 | * | 198 | * |
199 | ****************************************************************************/ | 199 | ****************************************************************************/ |
200 | static void pci_proc_init(void) | 200 | static void pci_proc_init(void) |
@@ -214,44 +214,44 @@ static DEFINE_SPINLOCK(bpci_lock); | |||
214 | * _________________________________________________________________________ | 214 | * _________________________________________________________________________ |
215 | * | 215 | * |
216 | * DESCRIPTION: Defines the address range that pciauto() will use to | 216 | * DESCRIPTION: Defines the address range that pciauto() will use to |
217 | * assign to the I/O BARs of PCI devices. | 217 | * assign to the I/O BARs of PCI devices. |
218 | * | 218 | * |
219 | * Use the start and end addresses of the MSP7120 PCI Host | 219 | * Use the start and end addresses of the MSP7120 PCI Host |
220 | * Controller I/O space, in the form that they appear on the | 220 | * Controller I/O space, in the form that they appear on the |
221 | * PCI bus AFTER MSP7120 has performed address translation. | 221 | * PCI bus AFTER MSP7120 has performed address translation. |
222 | * | 222 | * |
223 | * For I/O accesses, MSP7120 ignores OATRAN and maps I/O | 223 | * For I/O accesses, MSP7120 ignores OATRAN and maps I/O |
224 | * accesses into the bottom 0xFFF region of address space, | 224 | * accesses into the bottom 0xFFF region of address space, |
225 | * so that is the range to put into the pci_io_resource | 225 | * so that is the range to put into the pci_io_resource |
226 | * struct. | 226 | * struct. |
227 | * | 227 | * |
228 | * In MSP4200, the start address was 0x04 instead of the | 228 | * In MSP4200, the start address was 0x04 instead of the |
229 | * expected 0x00. Will just assume there was a good reason | 229 | * expected 0x00. Will just assume there was a good reason |
230 | * for this! | 230 | * for this! |
231 | * | 231 | * |
232 | * NOTES: Linux, by default, will assign I/O space to the lowest | 232 | * NOTES: Linux, by default, will assign I/O space to the lowest |
233 | * region of address space. Since MSP7120 and Linux, | 233 | * region of address space. Since MSP7120 and Linux, |
234 | * by default, have no offset in between how they map, the | 234 | * by default, have no offset in between how they map, the |
235 | * io_offset element of pci_controller struct should be set | 235 | * io_offset element of pci_controller struct should be set |
236 | * to zero. | 236 | * to zero. |
237 | * ELEMENTS: | 237 | * ELEMENTS: |
238 | * name - String used for a meaningful name. | 238 | * name - String used for a meaningful name. |
239 | * | 239 | * |
240 | * start - Start address of MSP7120's I/O space, as MSP7120 presents | 240 | * start - Start address of MSP7120's I/O space, as MSP7120 presents |
241 | * the address on the PCI bus. | 241 | * the address on the PCI bus. |
242 | * | 242 | * |
243 | * end - End address of MSP7120's I/O space, as MSP7120 presents | 243 | * end - End address of MSP7120's I/O space, as MSP7120 presents |
244 | * the address on the PCI bus. | 244 | * the address on the PCI bus. |
245 | * | 245 | * |
246 | * flags - Attributes indicating the type of resource. In this case, | 246 | * flags - Attributes indicating the type of resource. In this case, |
247 | * indicate I/O space. | 247 | * indicate I/O space. |
248 | * | 248 | * |
249 | ****************************************************************************/ | 249 | ****************************************************************************/ |
250 | static struct resource pci_io_resource = { | 250 | static struct resource pci_io_resource = { |
251 | .name = "pci IO space", | 251 | .name = "pci IO space", |
252 | .start = 0x04, | 252 | .start = 0x04, |
253 | .end = 0x0FFF, | 253 | .end = 0x0FFF, |
254 | .flags = IORESOURCE_IO /* I/O space */ | 254 | .flags = IORESOURCE_IO /* I/O space */ |
255 | }; | 255 | }; |
256 | 256 | ||
257 | /***************************************************************************** | 257 | /***************************************************************************** |
@@ -260,26 +260,26 @@ static struct resource pci_io_resource = { | |||
260 | * _________________________________________________________________________ | 260 | * _________________________________________________________________________ |
261 | * | 261 | * |
262 | * DESCRIPTION: Defines the address range that pciauto() will use to | 262 | * DESCRIPTION: Defines the address range that pciauto() will use to |
263 | * assign to the memory BARs of PCI devices. | 263 | * assign to the memory BARs of PCI devices. |
264 | * | 264 | * |
265 | * The .start and .end values are dependent upon how address | 265 | * The .start and .end values are dependent upon how address |
266 | * translation is performed by the OATRAN regiser. | 266 | * translation is performed by the OATRAN regiser. |
267 | * | 267 | * |
268 | * The values to use for .start and .end are the values | 268 | * The values to use for .start and .end are the values |
269 | * in the form they appear on the PCI bus AFTER MSP7120 has | 269 | * in the form they appear on the PCI bus AFTER MSP7120 has |
270 | * performed OATRAN address translation. | 270 | * performed OATRAN address translation. |
271 | * | 271 | * |
272 | * ELEMENTS: | 272 | * ELEMENTS: |
273 | * name - String used for a meaningful name. | 273 | * name - String used for a meaningful name. |
274 | * | 274 | * |
275 | * start - Start address of MSP7120's memory space, as MSP7120 presents | 275 | * start - Start address of MSP7120's memory space, as MSP7120 presents |
276 | * the address on the PCI bus. | 276 | * the address on the PCI bus. |
277 | * | 277 | * |
278 | * end - End address of MSP7120's memory space, as MSP7120 presents | 278 | * end - End address of MSP7120's memory space, as MSP7120 presents |
279 | * the address on the PCI bus. | 279 | * the address on the PCI bus. |
280 | * | 280 | * |
281 | * flags - Attributes indicating the type of resource. In this case, | 281 | * flags - Attributes indicating the type of resource. In this case, |
282 | * indicate memory space. | 282 | * indicate memory space. |
283 | * | 283 | * |
284 | ****************************************************************************/ | 284 | ****************************************************************************/ |
285 | static struct resource pci_mem_resource = { | 285 | static struct resource pci_mem_resource = { |
@@ -295,17 +295,17 @@ static struct resource pci_mem_resource = { | |||
295 | * _________________________________________________________________________ | 295 | * _________________________________________________________________________ |
296 | * | 296 | * |
297 | * DESCRIPTION: PCI status interrupt handler. Updates the count of how | 297 | * DESCRIPTION: PCI status interrupt handler. Updates the count of how |
298 | * many times each status bit has been set, then clears | 298 | * many times each status bit has been set, then clears |
299 | * the status bits. If the appropriate macros are defined, | 299 | * the status bits. If the appropriate macros are defined, |
300 | * these counts can be viewed via the /proc filesystem. | 300 | * these counts can be viewed via the /proc filesystem. |
301 | * | 301 | * |
302 | * INPUTS: irq - unused | 302 | * INPUTS: irq - unused |
303 | * dev_id - unused | 303 | * dev_id - unused |
304 | * pt_regs - unused | 304 | * pt_regs - unused |
305 | * | 305 | * |
306 | * OUTPUTS: none | 306 | * OUTPUTS: none |
307 | * | 307 | * |
308 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 308 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
309 | * | 309 | * |
310 | ****************************************************************************/ | 310 | ****************************************************************************/ |
311 | static irqreturn_t bpci_interrupt(int irq, void *dev_id) | 311 | static irqreturn_t bpci_interrupt(int irq, void *dev_id) |
@@ -335,41 +335,41 @@ static irqreturn_t bpci_interrupt(int irq, void *dev_id) | |||
335 | * _________________________________________________________________________ | 335 | * _________________________________________________________________________ |
336 | * | 336 | * |
337 | * DESCRIPTION: Performs a PCI configuration access (rd or wr), then | 337 | * DESCRIPTION: Performs a PCI configuration access (rd or wr), then |
338 | * checks that the access succeeded by querying MSP7120's | 338 | * checks that the access succeeded by querying MSP7120's |
339 | * PCI status bits. | 339 | * PCI status bits. |
340 | * | 340 | * |
341 | * INPUTS: | 341 | * INPUTS: |
342 | * access_type - kind of PCI configuration cycle to perform | 342 | * access_type - kind of PCI configuration cycle to perform |
343 | * (read or write). Legal values are | 343 | * (read or write). Legal values are |
344 | * PCI_ACCESS_WRITE and PCI_ACCESS_READ. | 344 | * PCI_ACCESS_WRITE and PCI_ACCESS_READ. |
345 | * | 345 | * |
346 | * bus - pointer to the bus number of the device to | 346 | * bus - pointer to the bus number of the device to |
347 | * be targeted for the configuration cycle. | 347 | * be targeted for the configuration cycle. |
348 | * The only element of the pci_bus structure | 348 | * The only element of the pci_bus structure |
349 | * used is bus->number. This argument determines | 349 | * used is bus->number. This argument determines |
350 | * if the configuration access will be Type 0 or | 350 | * if the configuration access will be Type 0 or |
351 | * Type 1. Since MSP7120 assumes itself to be the | 351 | * Type 1. Since MSP7120 assumes itself to be the |
352 | * PCI Host, any non-zero bus->number generates | 352 | * PCI Host, any non-zero bus->number generates |
353 | * a Type 1 access. | 353 | * a Type 1 access. |
354 | * | 354 | * |
355 | * devfn - this is an 8-bit field. The lower three bits | 355 | * devfn - this is an 8-bit field. The lower three bits |
356 | * specify the function number of the device to | 356 | * specify the function number of the device to |
357 | * be targeted for the configuration cycle, with | 357 | * be targeted for the configuration cycle, with |
358 | * all three-bit combinations being legal. The | 358 | * all three-bit combinations being legal. The |
359 | * upper five bits specify the device number, | 359 | * upper five bits specify the device number, |
360 | * with legal values being 10 to 31. | 360 | * with legal values being 10 to 31. |
361 | * | 361 | * |
362 | * where - address within the Configuration Header | 362 | * where - address within the Configuration Header |
363 | * space to access. | 363 | * space to access. |
364 | * | 364 | * |
365 | * data - for write accesses, contains the data to | 365 | * data - for write accesses, contains the data to |
366 | * write. | 366 | * write. |
367 | * | 367 | * |
368 | * OUTPUTS: | 368 | * OUTPUTS: |
369 | * data - for read accesses, contains the value read. | 369 | * data - for read accesses, contains the value read. |
370 | * | 370 | * |
371 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 371 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
372 | * -1 - access failure | 372 | * -1 - access failure |
373 | * | 373 | * |
374 | ****************************************************************************/ | 374 | ****************************************************************************/ |
375 | int msp_pcibios_config_access(unsigned char access_type, | 375 | int msp_pcibios_config_access(unsigned char access_type, |
@@ -429,7 +429,7 @@ int msp_pcibios_config_access(unsigned char access_type, | |||
429 | * for this Block Copy, called Block Copy 0 Fault (BC0F) and | 429 | * for this Block Copy, called Block Copy 0 Fault (BC0F) and |
430 | * Block Copy 1 Fault (BC1F). MSP4200 and MSP7120 don't have this | 430 | * Block Copy 1 Fault (BC1F). MSP4200 and MSP7120 don't have this |
431 | * dedicated Block Copy block, so these two interrupts are now | 431 | * dedicated Block Copy block, so these two interrupts are now |
432 | * marked reserved. In case the Block Copy is resurrected in a | 432 | * marked reserved. In case the Block Copy is resurrected in a |
433 | * future design, maintain the code that treats these two interrupts | 433 | * future design, maintain the code that treats these two interrupts |
434 | * specially. | 434 | * specially. |
435 | * | 435 | * |
@@ -439,7 +439,7 @@ int msp_pcibios_config_access(unsigned char access_type, | |||
439 | preg->if_status = ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F); | 439 | preg->if_status = ~(BPCI_IFSTATUS_BC0F | BPCI_IFSTATUS_BC1F); |
440 | 440 | ||
441 | /* Setup address that is to appear on PCI bus */ | 441 | /* Setup address that is to appear on PCI bus */ |
442 | preg->config_addr = BPCI_CFGADDR_ENABLE | | 442 | preg->config_addr = BPCI_CFGADDR_ENABLE | |
443 | (bus_num << BPCI_CFGADDR_BUSNUM_SHF) | | 443 | (bus_num << BPCI_CFGADDR_BUSNUM_SHF) | |
444 | (dev_fn << BPCI_CFGADDR_FUNCTNUM_SHF) | | 444 | (dev_fn << BPCI_CFGADDR_FUNCTNUM_SHF) | |
445 | (where & 0xFC); | 445 | (where & 0xFC); |
@@ -494,21 +494,21 @@ int msp_pcibios_config_access(unsigned char access_type, | |||
494 | * _________________________________________________________________________ | 494 | * _________________________________________________________________________ |
495 | * | 495 | * |
496 | * DESCRIPTION: Read a byte from PCI configuration address spac | 496 | * DESCRIPTION: Read a byte from PCI configuration address spac |
497 | * Since the hardware can't address 8 bit chunks | 497 | * Since the hardware can't address 8 bit chunks |
498 | * directly, read a 32-bit chunk, then mask off extraneous | 498 | * directly, read a 32-bit chunk, then mask off extraneous |
499 | * bits. | 499 | * bits. |
500 | * | 500 | * |
501 | * INPUTS bus - structure containing attributes for the PCI bus | 501 | * INPUTS bus - structure containing attributes for the PCI bus |
502 | * that the read is destined for. | 502 | * that the read is destined for. |
503 | * devfn - device/function combination that the read is | 503 | * devfn - device/function combination that the read is |
504 | * destined for. | 504 | * destined for. |
505 | * where - register within the Configuration Header space | 505 | * where - register within the Configuration Header space |
506 | * to access. | 506 | * to access. |
507 | * | 507 | * |
508 | * OUTPUTS val - read data | 508 | * OUTPUTS val - read data |
509 | * | 509 | * |
510 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 510 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
511 | * -1 - read access failure | 511 | * -1 - read access failure |
512 | * | 512 | * |
513 | ****************************************************************************/ | 513 | ****************************************************************************/ |
514 | static int | 514 | static int |
@@ -541,22 +541,22 @@ msp_pcibios_read_config_byte(struct pci_bus *bus, | |||
541 | * _________________________________________________________________________ | 541 | * _________________________________________________________________________ |
542 | * | 542 | * |
543 | * DESCRIPTION: Read a word (16 bits) from PCI configuration address space. | 543 | * DESCRIPTION: Read a word (16 bits) from PCI configuration address space. |
544 | * Since the hardware can't address 16 bit chunks | 544 | * Since the hardware can't address 16 bit chunks |
545 | * directly, read a 32-bit chunk, then mask off extraneous | 545 | * directly, read a 32-bit chunk, then mask off extraneous |
546 | * bits. | 546 | * bits. |
547 | * | 547 | * |
548 | * INPUTS bus - structure containing attributes for the PCI bus | 548 | * INPUTS bus - structure containing attributes for the PCI bus |
549 | * that the read is destined for. | 549 | * that the read is destined for. |
550 | * devfn - device/function combination that the read is | 550 | * devfn - device/function combination that the read is |
551 | * destined for. | 551 | * destined for. |
552 | * where - register within the Configuration Header space | 552 | * where - register within the Configuration Header space |
553 | * to access. | 553 | * to access. |
554 | * | 554 | * |
555 | * OUTPUTS val - read data | 555 | * OUTPUTS val - read data |
556 | * | 556 | * |
557 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 557 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
558 | * PCIBIOS_BAD_REGISTER_NUMBER - bad register address | 558 | * PCIBIOS_BAD_REGISTER_NUMBER - bad register address |
559 | * -1 - read access failure | 559 | * -1 - read access failure |
560 | * | 560 | * |
561 | ****************************************************************************/ | 561 | ****************************************************************************/ |
562 | static int | 562 | static int |
@@ -600,20 +600,20 @@ msp_pcibios_read_config_word(struct pci_bus *bus, | |||
600 | * _________________________________________________________________________ | 600 | * _________________________________________________________________________ |
601 | * | 601 | * |
602 | * DESCRIPTION: Read a double word (32 bits) from PCI configuration | 602 | * DESCRIPTION: Read a double word (32 bits) from PCI configuration |
603 | * address space. | 603 | * address space. |
604 | * | 604 | * |
605 | * INPUTS bus - structure containing attributes for the PCI bus | 605 | * INPUTS bus - structure containing attributes for the PCI bus |
606 | * that the read is destined for. | 606 | * that the read is destined for. |
607 | * devfn - device/function combination that the read is | 607 | * devfn - device/function combination that the read is |
608 | * destined for. | 608 | * destined for. |
609 | * where - register within the Configuration Header space | 609 | * where - register within the Configuration Header space |
610 | * to access. | 610 | * to access. |
611 | * | 611 | * |
612 | * OUTPUTS val - read data | 612 | * OUTPUTS val - read data |
613 | * | 613 | * |
614 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 614 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
615 | * PCIBIOS_BAD_REGISTER_NUMBER - bad register address | 615 | * PCIBIOS_BAD_REGISTER_NUMBER - bad register address |
616 | * -1 - read access failure | 616 | * -1 - read access failure |
617 | * | 617 | * |
618 | ****************************************************************************/ | 618 | ****************************************************************************/ |
619 | static int | 619 | static int |
@@ -652,21 +652,21 @@ msp_pcibios_read_config_dword(struct pci_bus *bus, | |||
652 | * _________________________________________________________________________ | 652 | * _________________________________________________________________________ |
653 | * | 653 | * |
654 | * DESCRIPTION: Write a byte to PCI configuration address space. | 654 | * DESCRIPTION: Write a byte to PCI configuration address space. |
655 | * Since the hardware can't address 8 bit chunks | 655 | * Since the hardware can't address 8 bit chunks |
656 | * directly, a read-modify-write is performed. | 656 | * directly, a read-modify-write is performed. |
657 | * | 657 | * |
658 | * INPUTS bus - structure containing attributes for the PCI bus | 658 | * INPUTS bus - structure containing attributes for the PCI bus |
659 | * that the write is destined for. | 659 | * that the write is destined for. |
660 | * devfn - device/function combination that the write is | 660 | * devfn - device/function combination that the write is |
661 | * destined for. | 661 | * destined for. |
662 | * where - register within the Configuration Header space | 662 | * where - register within the Configuration Header space |
663 | * to access. | 663 | * to access. |
664 | * val - value to write | 664 | * val - value to write |
665 | * | 665 | * |
666 | * OUTPUTS none | 666 | * OUTPUTS none |
667 | * | 667 | * |
668 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 668 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
669 | * -1 - write access failure | 669 | * -1 - write access failure |
670 | * | 670 | * |
671 | ****************************************************************************/ | 671 | ****************************************************************************/ |
672 | static int | 672 | static int |
@@ -700,22 +700,22 @@ msp_pcibios_write_config_byte(struct pci_bus *bus, | |||
700 | * _________________________________________________________________________ | 700 | * _________________________________________________________________________ |
701 | * | 701 | * |
702 | * DESCRIPTION: Write a word (16-bits) to PCI configuration address space. | 702 | * DESCRIPTION: Write a word (16-bits) to PCI configuration address space. |
703 | * Since the hardware can't address 16 bit chunks | 703 | * Since the hardware can't address 16 bit chunks |
704 | * directly, a read-modify-write is performed. | 704 | * directly, a read-modify-write is performed. |
705 | * | 705 | * |
706 | * INPUTS bus - structure containing attributes for the PCI bus | 706 | * INPUTS bus - structure containing attributes for the PCI bus |
707 | * that the write is destined for. | 707 | * that the write is destined for. |
708 | * devfn - device/function combination that the write is | 708 | * devfn - device/function combination that the write is |
709 | * destined for. | 709 | * destined for. |
710 | * where - register within the Configuration Header space | 710 | * where - register within the Configuration Header space |
711 | * to access. | 711 | * to access. |
712 | * val - value to write | 712 | * val - value to write |
713 | * | 713 | * |
714 | * OUTPUTS none | 714 | * OUTPUTS none |
715 | * | 715 | * |
716 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 716 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
717 | * PCIBIOS_BAD_REGISTER_NUMBER - bad register address | 717 | * PCIBIOS_BAD_REGISTER_NUMBER - bad register address |
718 | * -1 - write access failure | 718 | * -1 - write access failure |
719 | * | 719 | * |
720 | ****************************************************************************/ | 720 | ****************************************************************************/ |
721 | static int | 721 | static int |
@@ -753,21 +753,21 @@ msp_pcibios_write_config_word(struct pci_bus *bus, | |||
753 | * _________________________________________________________________________ | 753 | * _________________________________________________________________________ |
754 | * | 754 | * |
755 | * DESCRIPTION: Write a double word (32-bits) to PCI configuration address | 755 | * DESCRIPTION: Write a double word (32-bits) to PCI configuration address |
756 | * space. | 756 | * space. |
757 | * | 757 | * |
758 | * INPUTS bus - structure containing attributes for the PCI bus | 758 | * INPUTS bus - structure containing attributes for the PCI bus |
759 | * that the write is destined for. | 759 | * that the write is destined for. |
760 | * devfn - device/function combination that the write is | 760 | * devfn - device/function combination that the write is |
761 | * destined for. | 761 | * destined for. |
762 | * where - register within the Configuration Header space | 762 | * where - register within the Configuration Header space |
763 | * to access. | 763 | * to access. |
764 | * val - value to write | 764 | * val - value to write |
765 | * | 765 | * |
766 | * OUTPUTS none | 766 | * OUTPUTS none |
767 | * | 767 | * |
768 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 768 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
769 | * PCIBIOS_BAD_REGISTER_NUMBER - bad register address | 769 | * PCIBIOS_BAD_REGISTER_NUMBER - bad register address |
770 | * -1 - write access failure | 770 | * -1 - write access failure |
771 | * | 771 | * |
772 | ****************************************************************************/ | 772 | ****************************************************************************/ |
773 | static int | 773 | static int |
@@ -794,22 +794,22 @@ msp_pcibios_write_config_dword(struct pci_bus *bus, | |||
794 | * _________________________________________________________________________ | 794 | * _________________________________________________________________________ |
795 | * | 795 | * |
796 | * DESCRIPTION: Interface the PCI configuration read request with | 796 | * DESCRIPTION: Interface the PCI configuration read request with |
797 | * the appropriate function, based on how many bytes | 797 | * the appropriate function, based on how many bytes |
798 | * the read request is. | 798 | * the read request is. |
799 | * | 799 | * |
800 | * INPUTS bus - structure containing attributes for the PCI bus | 800 | * INPUTS bus - structure containing attributes for the PCI bus |
801 | * that the write is destined for. | 801 | * that the write is destined for. |
802 | * devfn - device/function combination that the write is | 802 | * devfn - device/function combination that the write is |
803 | * destined for. | 803 | * destined for. |
804 | * where - register within the Configuration Header space | 804 | * where - register within the Configuration Header space |
805 | * to access. | 805 | * to access. |
806 | * size - in units of bytes, should be 1, 2, or 4. | 806 | * size - in units of bytes, should be 1, 2, or 4. |
807 | * | 807 | * |
808 | * OUTPUTS val - value read, with any extraneous bytes masked | 808 | * OUTPUTS val - value read, with any extraneous bytes masked |
809 | * to zero. | 809 | * to zero. |
810 | * | 810 | * |
811 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 811 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
812 | * -1 - failure | 812 | * -1 - failure |
813 | * | 813 | * |
814 | ****************************************************************************/ | 814 | ****************************************************************************/ |
815 | int | 815 | int |
@@ -845,22 +845,22 @@ msp_pcibios_read_config(struct pci_bus *bus, | |||
845 | * _________________________________________________________________________ | 845 | * _________________________________________________________________________ |
846 | * | 846 | * |
847 | * DESCRIPTION: Interface the PCI configuration write request with | 847 | * DESCRIPTION: Interface the PCI configuration write request with |
848 | * the appropriate function, based on how many bytes | 848 | * the appropriate function, based on how many bytes |
849 | * the read request is. | 849 | * the read request is. |
850 | * | 850 | * |
851 | * INPUTS bus - structure containing attributes for the PCI bus | 851 | * INPUTS bus - structure containing attributes for the PCI bus |
852 | * that the write is destined for. | 852 | * that the write is destined for. |
853 | * devfn - device/function combination that the write is | 853 | * devfn - device/function combination that the write is |
854 | * destined for. | 854 | * destined for. |
855 | * where - register within the Configuration Header space | 855 | * where - register within the Configuration Header space |
856 | * to access. | 856 | * to access. |
857 | * size - in units of bytes, should be 1, 2, or 4. | 857 | * size - in units of bytes, should be 1, 2, or 4. |
858 | * val - value to write | 858 | * val - value to write |
859 | * | 859 | * |
860 | * OUTPUTS: none | 860 | * OUTPUTS: none |
861 | * | 861 | * |
862 | * RETURNS: PCIBIOS_SUCCESSFUL - success | 862 | * RETURNS: PCIBIOS_SUCCESSFUL - success |
863 | * -1 - failure | 863 | * -1 - failure |
864 | * | 864 | * |
865 | ****************************************************************************/ | 865 | ****************************************************************************/ |
866 | int | 866 | int |
@@ -897,11 +897,11 @@ msp_pcibios_write_config(struct pci_bus *bus, | |||
897 | * _________________________________________________________________________ | 897 | * _________________________________________________________________________ |
898 | * | 898 | * |
899 | * DESCRIPTION: structure to abstract the hardware specific PCI | 899 | * DESCRIPTION: structure to abstract the hardware specific PCI |
900 | * configuration accesses. | 900 | * configuration accesses. |
901 | * | 901 | * |
902 | * ELEMENTS: | 902 | * ELEMENTS: |
903 | * read - function for Linux to generate PCI Configuration reads. | 903 | * read - function for Linux to generate PCI Configuration reads. |
904 | * write - function for Linux to generate PCI Configuration writes. | 904 | * write - function for Linux to generate PCI Configuration writes. |
905 | * | 905 | * |
906 | ****************************************************************************/ | 906 | ****************************************************************************/ |
907 | struct pci_ops msp_pci_ops = { | 907 | struct pci_ops msp_pci_ops = { |
@@ -917,27 +917,27 @@ struct pci_ops msp_pci_ops = { | |||
917 | * Describes the attributes of the MSP7120 PCI Host Controller | 917 | * Describes the attributes of the MSP7120 PCI Host Controller |
918 | * | 918 | * |
919 | * ELEMENTS: | 919 | * ELEMENTS: |
920 | * pci_ops - abstracts the hardware specific PCI configuration | 920 | * pci_ops - abstracts the hardware specific PCI configuration |
921 | * accesses. | 921 | * accesses. |
922 | * | 922 | * |
923 | * mem_resource - address range pciauto() uses to assign to PCI device | 923 | * mem_resource - address range pciauto() uses to assign to PCI device |
924 | * memory BARs. | 924 | * memory BARs. |
925 | * | 925 | * |
926 | * mem_offset - offset between how MSP7120 outbound PCI memory | 926 | * mem_offset - offset between how MSP7120 outbound PCI memory |
927 | * transaction addresses appear on the PCI bus and how Linux | 927 | * transaction addresses appear on the PCI bus and how Linux |
928 | * wants to configure memory BARs of the PCI devices. | 928 | * wants to configure memory BARs of the PCI devices. |
929 | * MSP7120 does nothing funky, so just set to zero. | 929 | * MSP7120 does nothing funky, so just set to zero. |
930 | * | 930 | * |
931 | * io_resource - address range pciauto() uses to assign to PCI device | 931 | * io_resource - address range pciauto() uses to assign to PCI device |
932 | * I/O BARs. | 932 | * I/O BARs. |
933 | * | 933 | * |
934 | * io_offset - offset between how MSP7120 outbound PCI I/O | 934 | * io_offset - offset between how MSP7120 outbound PCI I/O |
935 | * transaction addresses appear on the PCI bus and how | 935 | * transaction addresses appear on the PCI bus and how |
936 | * Linux defaults to configure I/O BARs of the PCI devices. | 936 | * Linux defaults to configure I/O BARs of the PCI devices. |
937 | * MSP7120 maps outbound I/O accesses into the bottom | 937 | * MSP7120 maps outbound I/O accesses into the bottom |
938 | * bottom 4K of PCI address space (and ignores OATRAN). | 938 | * bottom 4K of PCI address space (and ignores OATRAN). |
939 | * Since the Linux default is to configure I/O BARs to the | 939 | * Since the Linux default is to configure I/O BARs to the |
940 | * bottom 4K, no special offset is needed. Just set to zero. | 940 | * bottom 4K, no special offset is needed. Just set to zero. |
941 | * | 941 | * |
942 | ****************************************************************************/ | 942 | ****************************************************************************/ |
943 | static struct pci_controller msp_pci_controller = { | 943 | static struct pci_controller msp_pci_controller = { |
@@ -955,7 +955,7 @@ static struct pci_controller msp_pci_controller = { | |||
955 | * _________________________________________________________________________ | 955 | * _________________________________________________________________________ |
956 | * | 956 | * |
957 | * DESCRIPTION: Initialize the PCI Host Controller and register it with | 957 | * DESCRIPTION: Initialize the PCI Host Controller and register it with |
958 | * Linux so Linux can seize control of the PCI bus. | 958 | * Linux so Linux can seize control of the PCI bus. |
959 | * | 959 | * |
960 | ****************************************************************************/ | 960 | ****************************************************************************/ |
961 | void __init msp_pci_init(void) | 961 | void __init msp_pci_init(void) |
@@ -979,7 +979,7 @@ void __init msp_pci_init(void) | |||
979 | *(unsigned long *)QFLUSH_REG_1 = 3; | 979 | *(unsigned long *)QFLUSH_REG_1 = 3; |
980 | 980 | ||
981 | /* Configure PCI Host Controller. */ | 981 | /* Configure PCI Host Controller. */ |
982 | preg->if_status = ~0; /* Clear cause register bits */ | 982 | preg->if_status = ~0; /* Clear cause register bits */ |
983 | preg->config_addr = 0; /* Clear config access */ | 983 | preg->config_addr = 0; /* Clear config access */ |
984 | preg->oatran = MSP_PCI_OATRAN; /* PCI outbound addr translation */ | 984 | preg->oatran = MSP_PCI_OATRAN; /* PCI outbound addr translation */ |
985 | preg->if_mask = 0xF8BF87C0; /* Enable all PCI status interrupts */ | 985 | preg->if_mask = 0xF8BF87C0; /* Enable all PCI status interrupts */ |
diff --git a/arch/mips/pci/ops-rc32434.c b/arch/mips/pci/ops-rc32434.c index d1f8fa210ca1..7c7182e2350a 100644 --- a/arch/mips/pci/ops-rc32434.c +++ b/arch/mips/pci/ops-rc32434.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <asm/mach-rc32434/rc32434.h> | 35 | #include <asm/mach-rc32434/rc32434.h> |
36 | #include <asm/mach-rc32434/pci.h> | 36 | #include <asm/mach-rc32434/pci.h> |
37 | 37 | ||
38 | #define PCI_ACCESS_READ 0 | 38 | #define PCI_ACCESS_READ 0 |
39 | #define PCI_ACCESS_WRITE 1 | 39 | #define PCI_ACCESS_WRITE 1 |
40 | 40 | ||
41 | 41 | ||
diff --git a/arch/mips/pci/ops-sni.c b/arch/mips/pci/ops-sni.c index 97ed25b92edf..35daa7fe6571 100644 --- a/arch/mips/pci/ops-sni.c +++ b/arch/mips/pci/ops-sni.c | |||
@@ -14,8 +14,8 @@ | |||
14 | 14 | ||
15 | /* | 15 | /* |
16 | * It seems that on the RM200 only lower 3 bits of the 5 bit PCI device | 16 | * It seems that on the RM200 only lower 3 bits of the 5 bit PCI device |
17 | * address are decoded. We therefore manually have to reject attempts at | 17 | * address are decoded. We therefore manually have to reject attempts at |
18 | * reading outside this range. Being on the paranoid side we only do this | 18 | * reading outside this range. Being on the paranoid side we only do this |
19 | * test for bus 0 and hope forwarding and decoding work properly for any | 19 | * test for bus 0 and hope forwarding and decoding work properly for any |
20 | * subordinated busses. | 20 | * subordinated busses. |
21 | * | 21 | * |
@@ -31,8 +31,8 @@ static int set_config_address(unsigned int busno, unsigned int devfn, int reg) | |||
31 | 31 | ||
32 | *(volatile u32 *)PCIMT_CONFIG_ADDRESS = | 32 | *(volatile u32 *)PCIMT_CONFIG_ADDRESS = |
33 | ((busno & 0xff) << 16) | | 33 | ((busno & 0xff) << 16) | |
34 | ((devfn & 0xff) << 8) | | 34 | ((devfn & 0xff) << 8) | |
35 | (reg & 0xfc); | 35 | (reg & 0xfc); |
36 | 36 | ||
37 | return PCIBIOS_SUCCESSFUL; | 37 | return PCIBIOS_SUCCESSFUL; |
38 | } | 38 | } |
diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c index 0d69d6f4ea44..3d5df514d024 100644 --- a/arch/mips/pci/ops-tx4927.c +++ b/arch/mips/pci/ops-tx4927.c | |||
@@ -2,16 +2,16 @@ | |||
2 | * Define the pci_ops for the PCIC on Toshiba TX4927, TX4938, etc. | 2 | * Define the pci_ops for the PCIC on Toshiba TX4927, TX4938, etc. |
3 | * | 3 | * |
4 | * Based on linux/arch/mips/pci/ops-tx4938.c, | 4 | * Based on linux/arch/mips/pci/ops-tx4938.c, |
5 | * linux/arch/mips/pci/fixup-rbtx4938.c, | 5 | * linux/arch/mips/pci/fixup-rbtx4938.c, |
6 | * linux/arch/mips/txx9/rbtx4938/setup.c, | 6 | * linux/arch/mips/txx9/rbtx4938/setup.c, |
7 | * and RBTX49xx patch from CELF patch archive. | 7 | * and RBTX49xx patch from CELF patch archive. |
8 | * | 8 | * |
9 | * 2003-2005 (c) MontaVista Software, Inc. | 9 | * 2003-2005 (c) MontaVista Software, Inc. |
10 | * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) | 10 | * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) |
11 | * (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007 | 11 | * (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007 |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or modify it | 13 | * This program is free software; you can redistribute it and/or modify it |
14 | * under the terms of the GNU General Public License as published by the | 14 | * under the terms of the GNU General Public License as published by the |
15 | * Free Software Foundation; either version 2 of the License, or (at your | 15 | * Free Software Foundation; either version 2 of the License, or (at your |
16 | * option) any later version. | 16 | * option) any later version. |
17 | */ | 17 | */ |
diff --git a/arch/mips/pci/ops-vr41xx.c b/arch/mips/pci/ops-vr41xx.c index 28962a7c6606..551128c7d927 100644 --- a/arch/mips/pci/ops-vr41xx.c +++ b/arch/mips/pci/ops-vr41xx.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #define PCICONFAREG (void __iomem *)KSEG1ADDR(0x0f000c18) | 33 | #define PCICONFAREG (void __iomem *)KSEG1ADDR(0x0f000c18) |
34 | 34 | ||
35 | static inline int set_pci_configuration_address(unsigned char number, | 35 | static inline int set_pci_configuration_address(unsigned char number, |
36 | unsigned int devfn, int where) | 36 | unsigned int devfn, int where) |
37 | { | 37 | { |
38 | if (number == 0) { | 38 | if (number == 0) { |
39 | /* | 39 | /* |
@@ -59,7 +59,7 @@ static inline int set_pci_configuration_address(unsigned char number, | |||
59 | } | 59 | } |
60 | 60 | ||
61 | static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, | 61 | static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, |
62 | int size, uint32_t *val) | 62 | int size, uint32_t *val) |
63 | { | 63 | { |
64 | uint32_t data; | 64 | uint32_t data; |
65 | 65 | ||
@@ -87,7 +87,7 @@ static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, | |||
87 | } | 87 | } |
88 | 88 | ||
89 | static int pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, | 89 | static int pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, |
90 | int size, uint32_t val) | 90 | int size, uint32_t val) |
91 | { | 91 | { |
92 | uint32_t data; | 92 | uint32_t data; |
93 | int shift; | 93 | int shift; |
diff --git a/arch/mips/pci/pci-alchemy.c b/arch/mips/pci/pci-alchemy.c index c4ea6cc55f94..38a80c83fd67 100644 --- a/arch/mips/pci/pci-alchemy.c +++ b/arch/mips/pci/pci-alchemy.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #define PCI_ACCESS_WRITE 1 | 29 | #define PCI_ACCESS_WRITE 1 |
30 | 30 | ||
31 | struct alchemy_pci_context { | 31 | struct alchemy_pci_context { |
32 | struct pci_controller alchemy_pci_ctrl; /* leave as first member! */ | 32 | struct pci_controller alchemy_pci_ctrl; /* leave as first member! */ |
33 | void __iomem *regs; /* ctrl base */ | 33 | void __iomem *regs; /* ctrl base */ |
34 | /* tools for wired entry for config space access */ | 34 | /* tools for wired entry for config space access */ |
35 | unsigned long last_elo0; | 35 | unsigned long last_elo0; |
@@ -381,7 +381,7 @@ static int alchemy_pci_probe(struct platform_device *pdev) | |||
381 | 381 | ||
382 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 382 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
383 | if (!r) { | 383 | if (!r) { |
384 | dev_err(&pdev->dev, "no pcictl ctrl regs resource\n"); | 384 | dev_err(&pdev->dev, "no pcictl ctrl regs resource\n"); |
385 | ret = -ENODEV; | 385 | ret = -ENODEV; |
386 | goto out1; | 386 | goto out1; |
387 | } | 387 | } |
@@ -482,7 +482,7 @@ out: | |||
482 | 482 | ||
483 | static struct platform_driver alchemy_pcictl_driver = { | 483 | static struct platform_driver alchemy_pcictl_driver = { |
484 | .probe = alchemy_pci_probe, | 484 | .probe = alchemy_pci_probe, |
485 | .driver = { | 485 | .driver = { |
486 | .name = "alchemy-pci", | 486 | .name = "alchemy-pci", |
487 | .owner = THIS_MODULE, | 487 | .owner = THIS_MODULE, |
488 | }, | 488 | }, |
diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c index c11c75be2d7e..279585d6eca0 100644 --- a/arch/mips/pci/pci-ar724x.c +++ b/arch/mips/pci/pci-ar724x.c | |||
@@ -177,22 +177,22 @@ static struct pci_ops ar724x_pci_ops = { | |||
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct resource ar724x_io_resource = { | 179 | static struct resource ar724x_io_resource = { |
180 | .name = "PCI IO space", | 180 | .name = "PCI IO space", |
181 | .start = 0, | 181 | .start = 0, |
182 | .end = 0, | 182 | .end = 0, |
183 | .flags = IORESOURCE_IO, | 183 | .flags = IORESOURCE_IO, |
184 | }; | 184 | }; |
185 | 185 | ||
186 | static struct resource ar724x_mem_resource = { | 186 | static struct resource ar724x_mem_resource = { |
187 | .name = "PCI memory space", | 187 | .name = "PCI memory space", |
188 | .start = AR724X_PCI_MEM_BASE, | 188 | .start = AR724X_PCI_MEM_BASE, |
189 | .end = AR724X_PCI_MEM_BASE + AR724X_PCI_MEM_SIZE - 1, | 189 | .end = AR724X_PCI_MEM_BASE + AR724X_PCI_MEM_SIZE - 1, |
190 | .flags = IORESOURCE_MEM, | 190 | .flags = IORESOURCE_MEM, |
191 | }; | 191 | }; |
192 | 192 | ||
193 | static struct pci_controller ar724x_pci_controller = { | 193 | static struct pci_controller ar724x_pci_controller = { |
194 | .pci_ops = &ar724x_pci_ops, | 194 | .pci_ops = &ar724x_pci_ops, |
195 | .io_resource = &ar724x_io_resource, | 195 | .io_resource = &ar724x_io_resource, |
196 | .mem_resource = &ar724x_mem_resource, | 196 | .mem_resource = &ar724x_mem_resource, |
197 | }; | 197 | }; |
198 | 198 | ||
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c index 37b52dc3d27e..e2e69e1e9fe1 100644 --- a/arch/mips/pci/pci-bcm1480.c +++ b/arch/mips/pci/pci-bcm1480.c | |||
@@ -54,8 +54,8 @@ | |||
54 | 54 | ||
55 | static void *cfg_space; | 55 | static void *cfg_space; |
56 | 56 | ||
57 | #define PCI_BUS_ENABLED 1 | 57 | #define PCI_BUS_ENABLED 1 |
58 | #define PCI_DEVICE_MODE 2 | 58 | #define PCI_DEVICE_MODE 2 |
59 | 59 | ||
60 | static int bcm1480_bus_status; | 60 | static int bcm1480_bus_status; |
61 | 61 | ||
@@ -194,7 +194,7 @@ struct pci_controller bcm1480_controller = { | |||
194 | .pci_ops = &bcm1480_pci_ops, | 194 | .pci_ops = &bcm1480_pci_ops, |
195 | .mem_resource = &bcm1480_mem_resource, | 195 | .mem_resource = &bcm1480_mem_resource, |
196 | .io_resource = &bcm1480_io_resource, | 196 | .io_resource = &bcm1480_io_resource, |
197 | .io_offset = A_BCM1480_PHYS_PCI_IO_MATCH_BYTES, | 197 | .io_offset = A_BCM1480_PHYS_PCI_IO_MATCH_BYTES, |
198 | }; | 198 | }; |
199 | 199 | ||
200 | 200 | ||
@@ -227,7 +227,7 @@ static int __init bcm1480_pcibios_init(void) | |||
227 | PCI_COMMAND)); | 227 | PCI_COMMAND)); |
228 | if (!(cmdreg & PCI_COMMAND_MASTER)) { | 228 | if (!(cmdreg & PCI_COMMAND_MASTER)) { |
229 | printk | 229 | printk |
230 | ("PCI: Skipping PCI probe. Bus is not initialized.\n"); | 230 | ("PCI: Skipping PCI probe. Bus is not initialized.\n"); |
231 | iounmap(cfg_space); | 231 | iounmap(cfg_space); |
232 | return 1; /* XXX */ | 232 | return 1; /* XXX */ |
233 | } | 233 | } |
diff --git a/arch/mips/pci/pci-bcm1480ht.c b/arch/mips/pci/pci-bcm1480ht.c index 50cc6e9e8240..1263c5e7dbe1 100644 --- a/arch/mips/pci/pci-bcm1480ht.c +++ b/arch/mips/pci/pci-bcm1480ht.c | |||
@@ -53,8 +53,8 @@ | |||
53 | 53 | ||
54 | static void *ht_cfg_space; | 54 | static void *ht_cfg_space; |
55 | 55 | ||
56 | #define PCI_BUS_ENABLED 1 | 56 | #define PCI_BUS_ENABLED 1 |
57 | #define PCI_DEVICE_MODE 2 | 57 | #define PCI_DEVICE_MODE 2 |
58 | 58 | ||
59 | static int bcm1480ht_bus_status; | 59 | static int bcm1480ht_bus_status; |
60 | 60 | ||
@@ -191,7 +191,7 @@ struct pci_controller bcm1480ht_controller = { | |||
191 | .io_resource = &bcm1480ht_io_resource, | 191 | .io_resource = &bcm1480ht_io_resource, |
192 | .index = 1, | 192 | .index = 1, |
193 | .get_busno = bcm1480ht_pcibios_get_busno, | 193 | .get_busno = bcm1480ht_pcibios_get_busno, |
194 | .io_offset = A_BCM1480_PHYS_HT_IO_MATCH_BYTES, | 194 | .io_offset = A_BCM1480_PHYS_HT_IO_MATCH_BYTES, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | static int __init bcm1480ht_pcibios_init(void) | 197 | static int __init bcm1480ht_pcibios_init(void) |
diff --git a/arch/mips/pci/pci-bcm47xx.c b/arch/mips/pci/pci-bcm47xx.c index c682468010c5..76f16eaed0ad 100644 --- a/arch/mips/pci/pci-bcm47xx.c +++ b/arch/mips/pci/pci-bcm47xx.c | |||
@@ -91,7 +91,7 @@ static int bcm47xx_pcibios_plat_dev_init_bcma(struct pci_dev *dev) | |||
91 | int pcibios_plat_dev_init(struct pci_dev *dev) | 91 | int pcibios_plat_dev_init(struct pci_dev *dev) |
92 | { | 92 | { |
93 | #ifdef CONFIG_BCM47XX_SSB | 93 | #ifdef CONFIG_BCM47XX_SSB |
94 | if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_SSB) | 94 | if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_SSB) |
95 | return bcm47xx_pcibios_plat_dev_init_ssb(dev); | 95 | return bcm47xx_pcibios_plat_dev_init_ssb(dev); |
96 | else | 96 | else |
97 | #endif | 97 | #endif |
diff --git a/arch/mips/pci/pci-bcm63xx.c b/arch/mips/pci/pci-bcm63xx.c index ca179b6ff39b..88e781c6b5ba 100644 --- a/arch/mips/pci/pci-bcm63xx.c +++ b/arch/mips/pci/pci-bcm63xx.c | |||
@@ -25,21 +25,21 @@ | |||
25 | int bcm63xx_pci_enabled; | 25 | int bcm63xx_pci_enabled; |
26 | 26 | ||
27 | static struct resource bcm_pci_mem_resource = { | 27 | static struct resource bcm_pci_mem_resource = { |
28 | .name = "bcm63xx PCI memory space", | 28 | .name = "bcm63xx PCI memory space", |
29 | .start = BCM_PCI_MEM_BASE_PA, | 29 | .start = BCM_PCI_MEM_BASE_PA, |
30 | .end = BCM_PCI_MEM_END_PA, | 30 | .end = BCM_PCI_MEM_END_PA, |
31 | .flags = IORESOURCE_MEM | 31 | .flags = IORESOURCE_MEM |
32 | }; | 32 | }; |
33 | 33 | ||
34 | static struct resource bcm_pci_io_resource = { | 34 | static struct resource bcm_pci_io_resource = { |
35 | .name = "bcm63xx PCI IO space", | 35 | .name = "bcm63xx PCI IO space", |
36 | .start = BCM_PCI_IO_BASE_PA, | 36 | .start = BCM_PCI_IO_BASE_PA, |
37 | #ifdef CONFIG_CARDBUS | 37 | #ifdef CONFIG_CARDBUS |
38 | .end = BCM_PCI_IO_HALF_PA, | 38 | .end = BCM_PCI_IO_HALF_PA, |
39 | #else | 39 | #else |
40 | .end = BCM_PCI_IO_END_PA, | 40 | .end = BCM_PCI_IO_END_PA, |
41 | #endif | 41 | #endif |
42 | .flags = IORESOURCE_IO | 42 | .flags = IORESOURCE_IO |
43 | }; | 43 | }; |
44 | 44 | ||
45 | struct pci_controller bcm63xx_controller = { | 45 | struct pci_controller bcm63xx_controller = { |
@@ -55,17 +55,17 @@ struct pci_controller bcm63xx_controller = { | |||
55 | */ | 55 | */ |
56 | #ifdef CONFIG_CARDBUS | 56 | #ifdef CONFIG_CARDBUS |
57 | static struct resource bcm_cb_mem_resource = { | 57 | static struct resource bcm_cb_mem_resource = { |
58 | .name = "bcm63xx Cardbus memory space", | 58 | .name = "bcm63xx Cardbus memory space", |
59 | .start = BCM_CB_MEM_BASE_PA, | 59 | .start = BCM_CB_MEM_BASE_PA, |
60 | .end = BCM_CB_MEM_END_PA, | 60 | .end = BCM_CB_MEM_END_PA, |
61 | .flags = IORESOURCE_MEM | 61 | .flags = IORESOURCE_MEM |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static struct resource bcm_cb_io_resource = { | 64 | static struct resource bcm_cb_io_resource = { |
65 | .name = "bcm63xx Cardbus IO space", | 65 | .name = "bcm63xx Cardbus IO space", |
66 | .start = BCM_PCI_IO_HALF_PA + 1, | 66 | .start = BCM_PCI_IO_HALF_PA + 1, |
67 | .end = BCM_PCI_IO_END_PA, | 67 | .end = BCM_PCI_IO_END_PA, |
68 | .flags = IORESOURCE_IO | 68 | .flags = IORESOURCE_IO |
69 | }; | 69 | }; |
70 | 70 | ||
71 | struct pci_controller bcm63xx_cb_controller = { | 71 | struct pci_controller bcm63xx_cb_controller = { |
@@ -76,17 +76,17 @@ struct pci_controller bcm63xx_cb_controller = { | |||
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | static struct resource bcm_pcie_mem_resource = { | 78 | static struct resource bcm_pcie_mem_resource = { |
79 | .name = "bcm63xx PCIe memory space", | 79 | .name = "bcm63xx PCIe memory space", |
80 | .start = BCM_PCIE_MEM_BASE_PA, | 80 | .start = BCM_PCIE_MEM_BASE_PA, |
81 | .end = BCM_PCIE_MEM_END_PA, | 81 | .end = BCM_PCIE_MEM_END_PA, |
82 | .flags = IORESOURCE_MEM, | 82 | .flags = IORESOURCE_MEM, |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static struct resource bcm_pcie_io_resource = { | 85 | static struct resource bcm_pcie_io_resource = { |
86 | .name = "bcm63xx PCIe IO space", | 86 | .name = "bcm63xx PCIe IO space", |
87 | .start = 0, | 87 | .start = 0, |
88 | .end = 0, | 88 | .end = 0, |
89 | .flags = 0, | 89 | .flags = 0, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | struct pci_controller bcm63xx_pcie_controller = { | 92 | struct pci_controller bcm63xx_pcie_controller = { |
@@ -111,7 +111,7 @@ static void bcm63xx_int_cfg_writel(u32 val, u32 reg) | |||
111 | u32 tmp; | 111 | u32 tmp; |
112 | 112 | ||
113 | tmp = reg & MPI_PCICFGCTL_CFGADDR_MASK; | 113 | tmp = reg & MPI_PCICFGCTL_CFGADDR_MASK; |
114 | tmp |= MPI_PCICFGCTL_WRITEEN_MASK; | 114 | tmp |= MPI_PCICFGCTL_WRITEEN_MASK; |
115 | bcm_mpi_writel(tmp, MPI_PCICFGCTL_REG); | 115 | bcm_mpi_writel(tmp, MPI_PCICFGCTL_REG); |
116 | bcm_mpi_writel(val, MPI_PCICFGDATA_REG); | 116 | bcm_mpi_writel(val, MPI_PCICFGDATA_REG); |
117 | } | 117 | } |
@@ -211,7 +211,7 @@ static int __init bcm63xx_register_pci(void) | |||
211 | * first bytes to access it from CPU. | 211 | * first bytes to access it from CPU. |
212 | * | 212 | * |
213 | * this means that no io access from CPU should happen while | 213 | * this means that no io access from CPU should happen while |
214 | * we do a configuration cycle, but there's no way we can add | 214 | * we do a configuration cycle, but there's no way we can add |
215 | * a spinlock for each io access, so this is currently kind of | 215 | * a spinlock for each io access, so this is currently kind of |
216 | * broken on SMP. | 216 | * broken on SMP. |
217 | */ | 217 | */ |
@@ -244,9 +244,9 @@ static int __init bcm63xx_register_pci(void) | |||
244 | bcm_mpi_writel(0, MPI_L2PMEMREMAP2_REG); | 244 | bcm_mpi_writel(0, MPI_L2PMEMREMAP2_REG); |
245 | #endif | 245 | #endif |
246 | 246 | ||
247 | /* setup local bus to PCI access (IO memory), we have only 1 | 247 | /* setup local bus to PCI access (IO memory), we have only 1 |
248 | * IO window for both PCI and cardbus, but it cannot handle | 248 | * IO window for both PCI and cardbus, but it cannot handle |
249 | * both at the same time, assume standard PCI for now, if | 249 | * both at the same time, assume standard PCI for now, if |
250 | * cardbus card has IO zone, PCI fixup will change window to | 250 | * cardbus card has IO zone, PCI fixup will change window to |
251 | * cardbus */ | 251 | * cardbus */ |
252 | val = BCM_PCI_IO_BASE_PA & MPI_L2P_BASE_MASK; | 252 | val = BCM_PCI_IO_BASE_PA & MPI_L2P_BASE_MASK; |
@@ -284,7 +284,7 @@ static int __init bcm63xx_register_pci(void) | |||
284 | bcm_mpi_writel(0, MPI_SP1_RANGE_REG); | 284 | bcm_mpi_writel(0, MPI_SP1_RANGE_REG); |
285 | } | 285 | } |
286 | 286 | ||
287 | /* change host bridge retry counter to infinite number of | 287 | /* change host bridge retry counter to infinite number of |
288 | * retry, needed for some broadcom wifi cards with Silicon | 288 | * retry, needed for some broadcom wifi cards with Silicon |
289 | * Backplane bus where access to srom seems very slow */ | 289 | * Backplane bus where access to srom seems very slow */ |
290 | val = bcm63xx_int_cfg_readl(BCMPCI_REG_TIMERS); | 290 | val = bcm63xx_int_cfg_readl(BCMPCI_REG_TIMERS); |
diff --git a/arch/mips/pci/pci-bcm63xx.h b/arch/mips/pci/pci-bcm63xx.h index e6736d558ac7..ffab4da7bd00 100644 --- a/arch/mips/pci/pci-bcm63xx.h +++ b/arch/mips/pci/pci-bcm63xx.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <bcm63xx_dev_pci.h> | 7 | #include <bcm63xx_dev_pci.h> |
8 | 8 | ||
9 | /* | 9 | /* |
10 | * Cardbus shares the PCI bus, but has no IDSEL, so a special id is | 10 | * Cardbus shares the PCI bus, but has no IDSEL, so a special id is |
11 | * reserved for it. If you have a standard PCI device at this id, you | 11 | * reserved for it. If you have a standard PCI device at this id, you |
12 | * need to change the following definition. | 12 | * need to change the following definition. |
13 | */ | 13 | */ |
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c index 7f4f49b09b5b..6eb65e44d9e4 100644 --- a/arch/mips/pci/pci-ip27.c +++ b/arch/mips/pci/pci-ip27.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | /* | 31 | /* |
32 | * XXX: No kmalloc available when we do our crosstalk scan, | 32 | * XXX: No kmalloc available when we do our crosstalk scan, |
33 | * we should try to move it later in the boot process. | 33 | * we should try to move it later in the boot process. |
34 | */ | 34 | */ |
35 | static struct bridge_controller bridges[MAX_PCI_BUSSES]; | 35 | static struct bridge_controller bridges[MAX_PCI_BUSSES]; |
36 | 36 | ||
@@ -103,7 +103,7 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid) | |||
103 | * swap pio's to pci mem and io space (big windows) | 103 | * swap pio's to pci mem and io space (big windows) |
104 | */ | 104 | */ |
105 | bridge->b_wid_control |= BRIDGE_CTRL_IO_SWAP | | 105 | bridge->b_wid_control |= BRIDGE_CTRL_IO_SWAP | |
106 | BRIDGE_CTRL_MEM_SWAP; | 106 | BRIDGE_CTRL_MEM_SWAP; |
107 | #ifdef CONFIG_PAGE_SIZE_4KB | 107 | #ifdef CONFIG_PAGE_SIZE_4KB |
108 | bridge->b_wid_control &= ~BRIDGE_CTRL_PAGE_SIZE; | 108 | bridge->b_wid_control &= ~BRIDGE_CTRL_PAGE_SIZE; |
109 | #else /* 16kB or larger */ | 109 | #else /* 16kB or larger */ |
@@ -123,7 +123,7 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid) | |||
123 | bridge->b_device[slot].reg |= BRIDGE_DEV_SWAP_DIR; | 123 | bridge->b_device[slot].reg |= BRIDGE_DEV_SWAP_DIR; |
124 | bc->pci_int[slot] = -1; | 124 | bc->pci_int[slot] = -1; |
125 | } | 125 | } |
126 | bridge->b_wid_tflush; /* wait until Bridge PIO complete */ | 126 | bridge->b_wid_tflush; /* wait until Bridge PIO complete */ |
127 | 127 | ||
128 | bc->base = bridge; | 128 | bc->base = bridge; |
129 | 129 | ||
@@ -184,7 +184,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
184 | } | 184 | } |
185 | 185 | ||
186 | /* | 186 | /* |
187 | * Device might live on a subordinate PCI bus. XXX Walk up the chain of buses | 187 | * Device might live on a subordinate PCI bus. XXX Walk up the chain of buses |
188 | * to find the slot number in sense of the bridge device register. | 188 | * to find the slot number in sense of the bridge device register. |
189 | * XXX This also means multiple devices might rely on conflicting bridge | 189 | * XXX This also means multiple devices might rely on conflicting bridge |
190 | * settings. | 190 | * settings. |
diff --git a/arch/mips/pci/pci-ip32.c b/arch/mips/pci/pci-ip32.c index 532b561b4442..b1e061f7fdc7 100644 --- a/arch/mips/pci/pci-ip32.c +++ b/arch/mips/pci/pci-ip32.c | |||
@@ -18,9 +18,9 @@ | |||
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Handle errors from the bridge. This includes master and target aborts, | 20 | * Handle errors from the bridge. This includes master and target aborts, |
21 | * various command and address errors, and the interrupt test. This gets | 21 | * various command and address errors, and the interrupt test. This gets |
22 | * registered on the bridge error irq. It's conceivable that some of these | 22 | * registered on the bridge error irq. It's conceivable that some of these |
23 | * conditions warrant a panic. Anybody care to say which ones? | 23 | * conditions warrant a panic. Anybody care to say which ones? |
24 | */ | 24 | */ |
25 | static irqreturn_t macepci_error(int irq, void *dev) | 25 | static irqreturn_t macepci_error(int irq, void *dev) |
26 | { | 26 | { |
diff --git a/arch/mips/pci/pci-lasat.c b/arch/mips/pci/pci-lasat.c index a98e543a514a..40d2797d2bc4 100644 --- a/arch/mips/pci/pci-lasat.c +++ b/arch/mips/pci/pci-lasat.c | |||
@@ -51,15 +51,15 @@ static int __init lasat_pci_setup(void) | |||
51 | 51 | ||
52 | arch_initcall(lasat_pci_setup); | 52 | arch_initcall(lasat_pci_setup); |
53 | 53 | ||
54 | #define LASAT_IRQ_ETH1 (LASAT_IRQ_BASE + 0) | 54 | #define LASAT_IRQ_ETH1 (LASAT_IRQ_BASE + 0) |
55 | #define LASAT_IRQ_ETH0 (LASAT_IRQ_BASE + 1) | 55 | #define LASAT_IRQ_ETH0 (LASAT_IRQ_BASE + 1) |
56 | #define LASAT_IRQ_HDC (LASAT_IRQ_BASE + 2) | 56 | #define LASAT_IRQ_HDC (LASAT_IRQ_BASE + 2) |
57 | #define LASAT_IRQ_COMP (LASAT_IRQ_BASE + 3) | 57 | #define LASAT_IRQ_COMP (LASAT_IRQ_BASE + 3) |
58 | #define LASAT_IRQ_HDLC (LASAT_IRQ_BASE + 4) | 58 | #define LASAT_IRQ_HDLC (LASAT_IRQ_BASE + 4) |
59 | #define LASAT_IRQ_PCIA (LASAT_IRQ_BASE + 5) | 59 | #define LASAT_IRQ_PCIA (LASAT_IRQ_BASE + 5) |
60 | #define LASAT_IRQ_PCIB (LASAT_IRQ_BASE + 6) | 60 | #define LASAT_IRQ_PCIB (LASAT_IRQ_BASE + 6) |
61 | #define LASAT_IRQ_PCIC (LASAT_IRQ_BASE + 7) | 61 | #define LASAT_IRQ_PCIC (LASAT_IRQ_BASE + 7) |
62 | #define LASAT_IRQ_PCID (LASAT_IRQ_BASE + 8) | 62 | #define LASAT_IRQ_PCID (LASAT_IRQ_BASE + 8) |
63 | 63 | ||
64 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 64 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
65 | { | 65 | { |
@@ -69,13 +69,13 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
69 | case 3: | 69 | case 3: |
70 | return LASAT_IRQ_PCIA + (((slot-1) + (pin-1)) % 4); | 70 | return LASAT_IRQ_PCIA + (((slot-1) + (pin-1)) % 4); |
71 | case 4: | 71 | case 4: |
72 | return LASAT_IRQ_ETH1; /* Ethernet 1 (LAN 2) */ | 72 | return LASAT_IRQ_ETH1; /* Ethernet 1 (LAN 2) */ |
73 | case 5: | 73 | case 5: |
74 | return LASAT_IRQ_ETH0; /* Ethernet 0 (LAN 1) */ | 74 | return LASAT_IRQ_ETH0; /* Ethernet 0 (LAN 1) */ |
75 | case 6: | 75 | case 6: |
76 | return LASAT_IRQ_HDC; /* IDE controller */ | 76 | return LASAT_IRQ_HDC; /* IDE controller */ |
77 | default: | 77 | default: |
78 | return 0xff; /* Illegal */ | 78 | return 0xff; /* Illegal */ |
79 | } | 79 | } |
80 | 80 | ||
81 | return -1; | 81 | return -1; |
diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c index 5b5ed76c6f47..95c2ea815cac 100644 --- a/arch/mips/pci/pci-octeon.c +++ b/arch/mips/pci/pci-octeon.c | |||
@@ -30,8 +30,8 @@ | |||
30 | * addresses. Use PCI endian swapping 1 so no address swapping is | 30 | * addresses. Use PCI endian swapping 1 so no address swapping is |
31 | * necessary. The Linux io routines will endian swap the data. | 31 | * necessary. The Linux io routines will endian swap the data. |
32 | */ | 32 | */ |
33 | #define OCTEON_PCI_IOSPACE_BASE 0x80011a0400000000ull | 33 | #define OCTEON_PCI_IOSPACE_BASE 0x80011a0400000000ull |
34 | #define OCTEON_PCI_IOSPACE_SIZE (1ull<<32) | 34 | #define OCTEON_PCI_IOSPACE_SIZE (1ull<<32) |
35 | 35 | ||
36 | /* Octeon't PCI controller uses did=3, subdid=3 for PCI memory. */ | 36 | /* Octeon't PCI controller uses did=3, subdid=3 for PCI memory. */ |
37 | #define OCTEON_PCI_MEMSPACE_OFFSET (0x00011b0000000000ull) | 37 | #define OCTEON_PCI_MEMSPACE_OFFSET (0x00011b0000000000ull) |
@@ -68,10 +68,10 @@ enum octeon_dma_bar_type octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_INVALID; | |||
68 | * | 68 | * |
69 | * @dev: The Linux PCI device structure for the device to map | 69 | * @dev: The Linux PCI device structure for the device to map |
70 | * @slot: The slot number for this device on __BUS 0__. Linux | 70 | * @slot: The slot number for this device on __BUS 0__. Linux |
71 | * enumerates through all the bridges and figures out the | 71 | * enumerates through all the bridges and figures out the |
72 | * slot on Bus 0 where this device eventually hooks to. | 72 | * slot on Bus 0 where this device eventually hooks to. |
73 | * @pin: The PCI interrupt pin read from the device, then swizzled | 73 | * @pin: The PCI interrupt pin read from the device, then swizzled |
74 | * as it goes through each bridge. | 74 | * as it goes through each bridge. |
75 | * Returns Interrupt number for the device | 75 | * Returns Interrupt number for the device |
76 | */ | 76 | */ |
77 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 77 | int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
@@ -120,8 +120,8 @@ int pcibios_plat_dev_init(struct pci_dev *dev) | |||
120 | /* Enable the PCIe normal error reporting */ | 120 | /* Enable the PCIe normal error reporting */ |
121 | config = PCI_EXP_DEVCTL_CERE; /* Correctable Error Reporting */ | 121 | config = PCI_EXP_DEVCTL_CERE; /* Correctable Error Reporting */ |
122 | config |= PCI_EXP_DEVCTL_NFERE; /* Non-Fatal Error Reporting */ | 122 | config |= PCI_EXP_DEVCTL_NFERE; /* Non-Fatal Error Reporting */ |
123 | config |= PCI_EXP_DEVCTL_FERE; /* Fatal Error Reporting */ | 123 | config |= PCI_EXP_DEVCTL_FERE; /* Fatal Error Reporting */ |
124 | config |= PCI_EXP_DEVCTL_URRE; /* Unsupported Request */ | 124 | config |= PCI_EXP_DEVCTL_URRE; /* Unsupported Request */ |
125 | pcie_capability_set_word(dev, PCI_EXP_DEVCTL, config); | 125 | pcie_capability_set_word(dev, PCI_EXP_DEVCTL, config); |
126 | 126 | ||
127 | /* Find the Advanced Error Reporting capability */ | 127 | /* Find the Advanced Error Reporting capability */ |
@@ -226,10 +226,10 @@ const char *octeon_get_pci_interrupts(void) | |||
226 | * | 226 | * |
227 | * @dev: The Linux PCI device structure for the device to map | 227 | * @dev: The Linux PCI device structure for the device to map |
228 | * @slot: The slot number for this device on __BUS 0__. Linux | 228 | * @slot: The slot number for this device on __BUS 0__. Linux |
229 | * enumerates through all the bridges and figures out the | 229 | * enumerates through all the bridges and figures out the |
230 | * slot on Bus 0 where this device eventually hooks to. | 230 | * slot on Bus 0 where this device eventually hooks to. |
231 | * @pin: The PCI interrupt pin read from the device, then swizzled | 231 | * @pin: The PCI interrupt pin read from the device, then swizzled |
232 | * as it goes through each bridge. | 232 | * as it goes through each bridge. |
233 | * Returns Interrupt number for the device | 233 | * Returns Interrupt number for the device |
234 | */ | 234 | */ |
235 | int __init octeon_pci_pcibios_map_irq(const struct pci_dev *dev, | 235 | int __init octeon_pci_pcibios_map_irq(const struct pci_dev *dev, |
@@ -404,8 +404,8 @@ static void octeon_pci_initialize(void) | |||
404 | ctl_status_2.s.bb1_siz = 1; /* BAR1 is 2GB */ | 404 | ctl_status_2.s.bb1_siz = 1; /* BAR1 is 2GB */ |
405 | ctl_status_2.s.bb_ca = 1; /* Don't use L2 with big bars */ | 405 | ctl_status_2.s.bb_ca = 1; /* Don't use L2 with big bars */ |
406 | ctl_status_2.s.bb_es = 1; /* Big bar in byte swap mode */ | 406 | ctl_status_2.s.bb_es = 1; /* Big bar in byte swap mode */ |
407 | ctl_status_2.s.bb1 = 1; /* BAR1 is big */ | 407 | ctl_status_2.s.bb1 = 1; /* BAR1 is big */ |
408 | ctl_status_2.s.bb0 = 1; /* BAR0 is big */ | 408 | ctl_status_2.s.bb0 = 1; /* BAR0 is big */ |
409 | } | 409 | } |
410 | 410 | ||
411 | octeon_npi_write32(CVMX_NPI_PCI_CTL_STATUS_2, ctl_status_2.u32); | 411 | octeon_npi_write32(CVMX_NPI_PCI_CTL_STATUS_2, ctl_status_2.u32); |
@@ -446,7 +446,7 @@ static void octeon_pci_initialize(void) | |||
446 | * count. [1..31] and 0=32. NOTE: If the user | 446 | * count. [1..31] and 0=32. NOTE: If the user |
447 | * programs these bits beyond the Designed Maximum | 447 | * programs these bits beyond the Designed Maximum |
448 | * outstanding count, then the designed maximum table | 448 | * outstanding count, then the designed maximum table |
449 | * depth will be used instead. No additional | 449 | * depth will be used instead. No additional |
450 | * Deferred/Split transactions will be accepted if | 450 | * Deferred/Split transactions will be accepted if |
451 | * this outstanding maximum count is | 451 | * this outstanding maximum count is |
452 | * reached. Furthermore, no additional deferred/split | 452 | * reached. Furthermore, no additional deferred/split |
@@ -456,7 +456,7 @@ static void octeon_pci_initialize(void) | |||
456 | cfg19.s.tdomc = 4; | 456 | cfg19.s.tdomc = 4; |
457 | /* | 457 | /* |
458 | * Master Deferred Read Request Outstanding Max Count | 458 | * Master Deferred Read Request Outstanding Max Count |
459 | * (PCI only). CR4C[26:24] Max SAC cycles MAX DAC | 459 | * (PCI only). CR4C[26:24] Max SAC cycles MAX DAC |
460 | * cycles 000 8 4 001 1 0 010 2 1 011 3 1 100 4 2 101 | 460 | * cycles 000 8 4 001 1 0 010 2 1 011 3 1 100 4 2 101 |
461 | * 5 2 110 6 3 111 7 3 For example, if these bits are | 461 | * 5 2 110 6 3 111 7 3 For example, if these bits are |
462 | * programmed to 100, the core can support 2 DAC | 462 | * programmed to 100, the core can support 2 DAC |
@@ -550,7 +550,7 @@ static void octeon_pci_initialize(void) | |||
550 | 550 | ||
551 | /* | 551 | /* |
552 | * Affects PCI performance when OCTEON services reads to its | 552 | * Affects PCI performance when OCTEON services reads to its |
553 | * BAR1/BAR2. Refer to Section 10.6.1. The recommended values are | 553 | * BAR1/BAR2. Refer to Section 10.6.1. The recommended values are |
554 | * 0x22, 0x33, and 0x33 for PCI_READ_CMD_6, PCI_READ_CMD_C, and | 554 | * 0x22, 0x33, and 0x33 for PCI_READ_CMD_6, PCI_READ_CMD_C, and |
555 | * PCI_READ_CMD_E, respectively. Unfortunately due to errata DDR-700, | 555 | * PCI_READ_CMD_E, respectively. Unfortunately due to errata DDR-700, |
556 | * these values need to be changed so they won't possibly prefetch off | 556 | * these values need to be changed so they won't possibly prefetch off |
diff --git a/arch/mips/pci/pci-rc32434.c b/arch/mips/pci/pci-rc32434.c index 5f3a69cebad1..b128cb973ebe 100644 --- a/arch/mips/pci/pci-rc32434.c +++ b/arch/mips/pci/pci-rc32434.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/mach-rc32434/rc32434.h> | 33 | #include <asm/mach-rc32434/rc32434.h> |
34 | #include <asm/mach-rc32434/pci.h> | 34 | #include <asm/mach-rc32434/pci.h> |
35 | 35 | ||
36 | #define PCI_ACCESS_READ 0 | 36 | #define PCI_ACCESS_READ 0 |
37 | #define PCI_ACCESS_WRITE 1 | 37 | #define PCI_ACCESS_WRITE 1 |
38 | 38 | ||
39 | /* define an unsigned array for the PCI registers */ | 39 | /* define an unsigned array for the PCI registers */ |
@@ -82,11 +82,11 @@ extern struct pci_ops rc32434_pci_ops; | |||
82 | #define PCI_MEM2_START (PCI_ADDR_START + CPUTOPCI_MEM_WIN) | 82 | #define PCI_MEM2_START (PCI_ADDR_START + CPUTOPCI_MEM_WIN) |
83 | #define PCI_MEM2_END (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) - 1) | 83 | #define PCI_MEM2_END (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) - 1) |
84 | #define PCI_IO1_START (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN)) | 84 | #define PCI_IO1_START (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN)) |
85 | #define PCI_IO1_END \ | 85 | #define PCI_IO1_END \ |
86 | (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) + CPUTOPCI_IO_WIN - 1) | 86 | (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) + CPUTOPCI_IO_WIN - 1) |
87 | #define PCI_IO2_START \ | 87 | #define PCI_IO2_START \ |
88 | (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) + CPUTOPCI_IO_WIN) | 88 | (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) + CPUTOPCI_IO_WIN) |
89 | #define PCI_IO2_END \ | 89 | #define PCI_IO2_END \ |
90 | (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) + (2 * CPUTOPCI_IO_WIN) - 1) | 90 | (PCI_ADDR_START + (2 * CPUTOPCI_MEM_WIN) + (2 * CPUTOPCI_IO_WIN) - 1) |
91 | 91 | ||
92 | struct pci_controller rc32434_controller2; | 92 | struct pci_controller rc32434_controller2; |
diff --git a/arch/mips/pci/pci-sb1250.c b/arch/mips/pci/pci-sb1250.c index dd97f3a83baa..cdefcc4cb8d4 100644 --- a/arch/mips/pci/pci-sb1250.c +++ b/arch/mips/pci/pci-sb1250.c | |||
@@ -55,9 +55,9 @@ | |||
55 | 55 | ||
56 | static void *cfg_space; | 56 | static void *cfg_space; |
57 | 57 | ||
58 | #define PCI_BUS_ENABLED 1 | 58 | #define PCI_BUS_ENABLED 1 |
59 | #define LDT_BUS_ENABLED 2 | 59 | #define LDT_BUS_ENABLED 2 |
60 | #define PCI_DEVICE_MODE 4 | 60 | #define PCI_DEVICE_MODE 4 |
61 | 61 | ||
62 | static int sb1250_bus_status; | 62 | static int sb1250_bus_status; |
63 | 63 | ||
@@ -239,7 +239,7 @@ static int __init sb1250_pcibios_init(void) | |||
239 | PCI_COMMAND)); | 239 | PCI_COMMAND)); |
240 | if (!(cmdreg & PCI_COMMAND_MASTER)) { | 240 | if (!(cmdreg & PCI_COMMAND_MASTER)) { |
241 | printk | 241 | printk |
242 | ("PCI: Skipping PCI probe. Bus is not initialized.\n"); | 242 | ("PCI: Skipping PCI probe. Bus is not initialized.\n"); |
243 | iounmap(cfg_space); | 243 | iounmap(cfg_space); |
244 | return 0; | 244 | return 0; |
245 | } | 245 | } |
diff --git a/arch/mips/pci/pci-vr41xx.c b/arch/mips/pci/pci-vr41xx.c index 444b8d8004ad..157c7715b7c8 100644 --- a/arch/mips/pci/pci-vr41xx.c +++ b/arch/mips/pci/pci-vr41xx.c | |||
@@ -69,17 +69,17 @@ static struct pci_target_address_window pci_target_window1 = { | |||
69 | }; | 69 | }; |
70 | 70 | ||
71 | static struct resource pci_mem_resource = { | 71 | static struct resource pci_mem_resource = { |
72 | .name = "PCI Memory resources", | 72 | .name = "PCI Memory resources", |
73 | .start = PCI_MEM_RESOURCE_START, | 73 | .start = PCI_MEM_RESOURCE_START, |
74 | .end = PCI_MEM_RESOURCE_END, | 74 | .end = PCI_MEM_RESOURCE_END, |
75 | .flags = IORESOURCE_MEM, | 75 | .flags = IORESOURCE_MEM, |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static struct resource pci_io_resource = { | 78 | static struct resource pci_io_resource = { |
79 | .name = "PCI I/O resources", | 79 | .name = "PCI I/O resources", |
80 | .start = PCI_IO_RESOURCE_START, | 80 | .start = PCI_IO_RESOURCE_START, |
81 | .end = PCI_IO_RESOURCE_END, | 81 | .end = PCI_IO_RESOURCE_END, |
82 | .flags = IORESOURCE_IO, | 82 | .flags = IORESOURCE_IO, |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static struct pci_controller_unit_setup vr41xx_pci_controller_unit_setup = { | 85 | static struct pci_controller_unit_setup vr41xx_pci_controller_unit_setup = { |
@@ -97,7 +97,7 @@ static struct pci_controller_unit_setup vr41xx_pci_controller_unit_setup = { | |||
97 | }; | 97 | }; |
98 | 98 | ||
99 | static struct pci_controller vr41xx_pci_controller = { | 99 | static struct pci_controller vr41xx_pci_controller = { |
100 | .pci_ops = &vr41xx_pci_ops, | 100 | .pci_ops = &vr41xx_pci_ops, |
101 | .mem_resource = &pci_mem_resource, | 101 | .mem_resource = &pci_mem_resource, |
102 | .io_resource = &pci_io_resource, | 102 | .io_resource = &pci_io_resource, |
103 | }; | 103 | }; |
@@ -148,7 +148,7 @@ static int __init vr41xx_pciu_init(void) | |||
148 | else if ((vtclock / 2) < pci_clock_max) | 148 | else if ((vtclock / 2) < pci_clock_max) |
149 | pciu_write(PCICLKSELREG, HALF_VTCLOCK); | 149 | pciu_write(PCICLKSELREG, HALF_VTCLOCK); |
150 | else if (current_cpu_data.processor_id >= PRID_VR4131_REV2_1 && | 150 | else if (current_cpu_data.processor_id >= PRID_VR4131_REV2_1 && |
151 | (vtclock / 3) < pci_clock_max) | 151 | (vtclock / 3) < pci_clock_max) |
152 | pciu_write(PCICLKSELREG, ONE_THIRD_VTCLOCK); | 152 | pciu_write(PCICLKSELREG, ONE_THIRD_VTCLOCK); |
153 | else if ((vtclock / 4) < pci_clock_max) | 153 | else if ((vtclock / 4) < pci_clock_max) |
154 | pciu_write(PCICLKSELREG, QUARTER_VTCLOCK); | 154 | pciu_write(PCICLKSELREG, QUARTER_VTCLOCK); |
@@ -281,7 +281,7 @@ static int __init vr41xx_pciu_init(void) | |||
281 | pciu_write(PCIAPCNTREG, val); | 281 | pciu_write(PCIAPCNTREG, val); |
282 | 282 | ||
283 | pciu_write(COMMANDREG, PCI_COMMAND_IO | PCI_COMMAND_MEMORY | | 283 | pciu_write(COMMANDREG, PCI_COMMAND_IO | PCI_COMMAND_MEMORY | |
284 | PCI_COMMAND_MASTER | PCI_COMMAND_PARITY | | 284 | PCI_COMMAND_MASTER | PCI_COMMAND_PARITY | |
285 | PCI_COMMAND_SERR); | 285 | PCI_COMMAND_SERR); |
286 | 286 | ||
287 | /* Clear bus error */ | 287 | /* Clear bus error */ |
diff --git a/arch/mips/pci/pci-vr41xx.h b/arch/mips/pci/pci-vr41xx.h index 6b1ae2eb1c06..e6b4a1b969f7 100644 --- a/arch/mips/pci/pci-vr41xx.h +++ b/arch/mips/pci/pci-vr41xx.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pci-vr41xx.h, Include file for PCI Control Unit of the NEC VR4100 series. | 2 | * pci-vr41xx.h, Include file for PCI Control Unit of the NEC VR4100 series. |
3 | * | 3 | * |
4 | * Copyright (C) 2002 MontaVista Software Inc. | 4 | * Copyright (C) 2002 MontaVista Software Inc. |
5 | * Author: Yoichi Yuasa <source@mvista.com> | 5 | * Author: Yoichi Yuasa <source@mvista.com> |
6 | * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org> | 6 | * Copyright (C) 2004-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
7 | * | 7 | * |
diff --git a/arch/mips/pci/pci-xlp.c b/arch/mips/pci/pci-xlp.c index 140557a20488..ad55f2cfeec1 100644 --- a/arch/mips/pci/pci-xlp.c +++ b/arch/mips/pci/pci-xlp.c | |||
@@ -55,7 +55,7 @@ | |||
55 | 55 | ||
56 | static void *pci_config_base; | 56 | static void *pci_config_base; |
57 | 57 | ||
58 | #define pci_cfg_addr(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) | 58 | #define pci_cfg_addr(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) |
59 | 59 | ||
60 | /* PCI ops */ | 60 | /* PCI ops */ |
61 | static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn, | 61 | static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn, |
@@ -135,26 +135,26 @@ struct pci_ops nlm_pci_ops = { | |||
135 | }; | 135 | }; |
136 | 136 | ||
137 | static struct resource nlm_pci_mem_resource = { | 137 | static struct resource nlm_pci_mem_resource = { |
138 | .name = "XLP PCI MEM", | 138 | .name = "XLP PCI MEM", |
139 | .start = 0xd0000000UL, /* 256MB PCI mem @ 0xd000_0000 */ | 139 | .start = 0xd0000000UL, /* 256MB PCI mem @ 0xd000_0000 */ |
140 | .end = 0xdfffffffUL, | 140 | .end = 0xdfffffffUL, |
141 | .flags = IORESOURCE_MEM, | 141 | .flags = IORESOURCE_MEM, |
142 | }; | 142 | }; |
143 | 143 | ||
144 | static struct resource nlm_pci_io_resource = { | 144 | static struct resource nlm_pci_io_resource = { |
145 | .name = "XLP IO MEM", | 145 | .name = "XLP IO MEM", |
146 | .start = 0x14000000UL, /* 64MB PCI IO @ 0x1000_0000 */ | 146 | .start = 0x14000000UL, /* 64MB PCI IO @ 0x1000_0000 */ |
147 | .end = 0x17ffffffUL, | 147 | .end = 0x17ffffffUL, |
148 | .flags = IORESOURCE_IO, | 148 | .flags = IORESOURCE_IO, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | struct pci_controller nlm_pci_controller = { | 151 | struct pci_controller nlm_pci_controller = { |
152 | .index = 0, | 152 | .index = 0, |
153 | .pci_ops = &nlm_pci_ops, | 153 | .pci_ops = &nlm_pci_ops, |
154 | .mem_resource = &nlm_pci_mem_resource, | 154 | .mem_resource = &nlm_pci_mem_resource, |
155 | .mem_offset = 0x00000000UL, | 155 | .mem_offset = 0x00000000UL, |
156 | .io_resource = &nlm_pci_io_resource, | 156 | .io_resource = &nlm_pci_io_resource, |
157 | .io_offset = 0x00000000UL, | 157 | .io_offset = 0x00000000UL, |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static int get_irq_vector(const struct pci_dev *dev) | 160 | static int get_irq_vector(const struct pci_dev *dev) |
@@ -232,7 +232,7 @@ static int __init pcibios_init(void) | |||
232 | pci_config_base = ioremap(XLP_DEFAULT_PCI_ECFG_BASE, 64 << 20); | 232 | pci_config_base = ioremap(XLP_DEFAULT_PCI_ECFG_BASE, 64 << 20); |
233 | 233 | ||
234 | /* Extend IO port for memory mapped io */ | 234 | /* Extend IO port for memory mapped io */ |
235 | ioport_resource.start = 0; | 235 | ioport_resource.start = 0; |
236 | ioport_resource.end = ~0; | 236 | ioport_resource.end = ~0; |
237 | 237 | ||
238 | xlp_enable_pci_bswap(); | 238 | xlp_enable_pci_bswap(); |
diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci-xlr.c index 0c18ccc79623..4427abbd48b5 100644 --- a/arch/mips/pci/pci-xlr.c +++ b/arch/mips/pci/pci-xlr.c | |||
@@ -56,7 +56,7 @@ | |||
56 | 56 | ||
57 | static void *pci_config_base; | 57 | static void *pci_config_base; |
58 | 58 | ||
59 | #define pci_cfg_addr(bus, devfn, off) (((bus) << 16) | ((devfn) << 8) | (off)) | 59 | #define pci_cfg_addr(bus, devfn, off) (((bus) << 16) | ((devfn) << 8) | (off)) |
60 | 60 | ||
61 | /* PCI ops */ | 61 | /* PCI ops */ |
62 | static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn, | 62 | static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn, |
@@ -136,26 +136,26 @@ struct pci_ops nlm_pci_ops = { | |||
136 | }; | 136 | }; |
137 | 137 | ||
138 | static struct resource nlm_pci_mem_resource = { | 138 | static struct resource nlm_pci_mem_resource = { |
139 | .name = "XLR PCI MEM", | 139 | .name = "XLR PCI MEM", |
140 | .start = 0xd0000000UL, /* 256MB PCI mem @ 0xd000_0000 */ | 140 | .start = 0xd0000000UL, /* 256MB PCI mem @ 0xd000_0000 */ |
141 | .end = 0xdfffffffUL, | 141 | .end = 0xdfffffffUL, |
142 | .flags = IORESOURCE_MEM, | 142 | .flags = IORESOURCE_MEM, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | static struct resource nlm_pci_io_resource = { | 145 | static struct resource nlm_pci_io_resource = { |
146 | .name = "XLR IO MEM", | 146 | .name = "XLR IO MEM", |
147 | .start = 0x10000000UL, /* 16MB PCI IO @ 0x1000_0000 */ | 147 | .start = 0x10000000UL, /* 16MB PCI IO @ 0x1000_0000 */ |
148 | .end = 0x100fffffUL, | 148 | .end = 0x100fffffUL, |
149 | .flags = IORESOURCE_IO, | 149 | .flags = IORESOURCE_IO, |
150 | }; | 150 | }; |
151 | 151 | ||
152 | struct pci_controller nlm_pci_controller = { | 152 | struct pci_controller nlm_pci_controller = { |
153 | .index = 0, | 153 | .index = 0, |
154 | .pci_ops = &nlm_pci_ops, | 154 | .pci_ops = &nlm_pci_ops, |
155 | .mem_resource = &nlm_pci_mem_resource, | 155 | .mem_resource = &nlm_pci_mem_resource, |
156 | .mem_offset = 0x00000000UL, | 156 | .mem_offset = 0x00000000UL, |
157 | .io_resource = &nlm_pci_io_resource, | 157 | .io_resource = &nlm_pci_io_resource, |
158 | .io_offset = 0x00000000UL, | 158 | .io_offset = 0x00000000UL, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | /* | 161 | /* |
@@ -259,7 +259,7 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) | |||
259 | MSI_ADDR_REDIRECTION_CPU; | 259 | MSI_ADDR_REDIRECTION_CPU; |
260 | 260 | ||
261 | msg.data = MSI_DATA_TRIGGER_EDGE | | 261 | msg.data = MSI_DATA_TRIGGER_EDGE | |
262 | MSI_DATA_LEVEL_ASSERT | | 262 | MSI_DATA_LEVEL_ASSERT | |
263 | MSI_DATA_DELIVERY_FIXED; | 263 | MSI_DATA_DELIVERY_FIXED; |
264 | 264 | ||
265 | ret = irq_set_msi_desc(irq, desc); | 265 | ret = irq_set_msi_desc(irq, desc); |
@@ -344,7 +344,7 @@ static int __init pcibios_init(void) | |||
344 | pci_config_base = ioremap(DEFAULT_PCI_CONFIG_BASE, 16 << 20); | 344 | pci_config_base = ioremap(DEFAULT_PCI_CONFIG_BASE, 16 << 20); |
345 | 345 | ||
346 | /* Extend IO port for memory mapped io */ | 346 | /* Extend IO port for memory mapped io */ |
347 | ioport_resource.start = 0; | 347 | ioport_resource.start = 0; |
348 | ioport_resource.end = ~0; | 348 | ioport_resource.end = ~0; |
349 | 349 | ||
350 | set_io_port_base(CKSEG1); | 350 | set_io_port_base(CKSEG1); |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index a1843448fad3..e8a14a6514cf 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This program is free software; you can redistribute it and/or modify it | 2 | * This program is free software; you can redistribute it and/or modify it |
3 | * under the terms of the GNU General Public License as published by the | 3 | * under the terms of the GNU General Public License as published by the |
4 | * Free Software Foundation; either version 2 of the License, or (at your | 4 | * Free Software Foundation; either version 2 of the License, or (at your |
5 | * option) any later version. | 5 | * option) any later version. |
6 | * | 6 | * |
diff --git a/arch/mips/pci/pcie-octeon.c b/arch/mips/pci/pcie-octeon.c index fdb4d558c0cc..5e36c33e5543 100644 --- a/arch/mips/pci/pcie-octeon.c +++ b/arch/mips/pci/pcie-octeon.c | |||
@@ -43,7 +43,7 @@ union cvmx_pcie_address { | |||
43 | uint64_t upper:2; /* Normally 2 for XKPHYS */ | 43 | uint64_t upper:2; /* Normally 2 for XKPHYS */ |
44 | uint64_t reserved_49_61:13; /* Must be zero */ | 44 | uint64_t reserved_49_61:13; /* Must be zero */ |
45 | uint64_t io:1; /* 1 for IO space access */ | 45 | uint64_t io:1; /* 1 for IO space access */ |
46 | uint64_t did:5; /* PCIe DID = 3 */ | 46 | uint64_t did:5; /* PCIe DID = 3 */ |
47 | uint64_t subdid:3; /* PCIe SubDID = 1 */ | 47 | uint64_t subdid:3; /* PCIe SubDID = 1 */ |
48 | uint64_t reserved_36_39:4; /* Must be zero */ | 48 | uint64_t reserved_36_39:4; /* Must be zero */ |
49 | uint64_t es:2; /* Endian swap = 1 */ | 49 | uint64_t es:2; /* Endian swap = 1 */ |
@@ -74,7 +74,7 @@ union cvmx_pcie_address { | |||
74 | uint64_t upper:2; /* Normally 2 for XKPHYS */ | 74 | uint64_t upper:2; /* Normally 2 for XKPHYS */ |
75 | uint64_t reserved_49_61:13; /* Must be zero */ | 75 | uint64_t reserved_49_61:13; /* Must be zero */ |
76 | uint64_t io:1; /* 1 for IO space access */ | 76 | uint64_t io:1; /* 1 for IO space access */ |
77 | uint64_t did:5; /* PCIe DID = 3 */ | 77 | uint64_t did:5; /* PCIe DID = 3 */ |
78 | uint64_t subdid:3; /* PCIe SubDID = 2 */ | 78 | uint64_t subdid:3; /* PCIe SubDID = 2 */ |
79 | uint64_t reserved_36_39:4; /* Must be zero */ | 79 | uint64_t reserved_36_39:4; /* Must be zero */ |
80 | uint64_t es:2; /* Endian swap = 1 */ | 80 | uint64_t es:2; /* Endian swap = 1 */ |
@@ -85,7 +85,7 @@ union cvmx_pcie_address { | |||
85 | uint64_t upper:2; /* Normally 2 for XKPHYS */ | 85 | uint64_t upper:2; /* Normally 2 for XKPHYS */ |
86 | uint64_t reserved_49_61:13; /* Must be zero */ | 86 | uint64_t reserved_49_61:13; /* Must be zero */ |
87 | uint64_t io:1; /* 1 for IO space access */ | 87 | uint64_t io:1; /* 1 for IO space access */ |
88 | uint64_t did:5; /* PCIe DID = 3 */ | 88 | uint64_t did:5; /* PCIe DID = 3 */ |
89 | uint64_t subdid:3; /* PCIe SubDID = 3-6 */ | 89 | uint64_t subdid:3; /* PCIe SubDID = 3-6 */ |
90 | uint64_t reserved_36_39:4; /* Must be zero */ | 90 | uint64_t reserved_36_39:4; /* Must be zero */ |
91 | uint64_t address:36; /* PCIe Mem address */ | 91 | uint64_t address:36; /* PCIe Mem address */ |
@@ -166,7 +166,7 @@ static inline uint64_t cvmx_pcie_get_mem_size(int pcie_port) | |||
166 | * Read a PCIe config space register indirectly. This is used for | 166 | * Read a PCIe config space register indirectly. This is used for |
167 | * registers of the form PCIEEP_CFG??? and PCIERC?_CFG???. | 167 | * registers of the form PCIEEP_CFG??? and PCIERC?_CFG???. |
168 | * | 168 | * |
169 | * @pcie_port: PCIe port to read from | 169 | * @pcie_port: PCIe port to read from |
170 | * @cfg_offset: Address to read | 170 | * @cfg_offset: Address to read |
171 | * | 171 | * |
172 | * Returns Value read | 172 | * Returns Value read |
@@ -194,9 +194,9 @@ static uint32_t cvmx_pcie_cfgx_read(int pcie_port, uint32_t cfg_offset) | |||
194 | * Write a PCIe config space register indirectly. This is used for | 194 | * Write a PCIe config space register indirectly. This is used for |
195 | * registers of the form PCIEEP_CFG??? and PCIERC?_CFG???. | 195 | * registers of the form PCIEEP_CFG??? and PCIERC?_CFG???. |
196 | * | 196 | * |
197 | * @pcie_port: PCIe port to write to | 197 | * @pcie_port: PCIe port to write to |
198 | * @cfg_offset: Address to write | 198 | * @cfg_offset: Address to write |
199 | * @val: Value to write | 199 | * @val: Value to write |
200 | */ | 200 | */ |
201 | static void cvmx_pcie_cfgx_write(int pcie_port, uint32_t cfg_offset, | 201 | static void cvmx_pcie_cfgx_write(int pcie_port, uint32_t cfg_offset, |
202 | uint32_t val) | 202 | uint32_t val) |
@@ -222,7 +222,7 @@ static void cvmx_pcie_cfgx_write(int pcie_port, uint32_t cfg_offset, | |||
222 | * @pcie_port: PCIe port to access | 222 | * @pcie_port: PCIe port to access |
223 | * @bus: Sub bus | 223 | * @bus: Sub bus |
224 | * @dev: Device ID | 224 | * @dev: Device ID |
225 | * @fn: Device sub function | 225 | * @fn: Device sub function |
226 | * @reg: Register to access | 226 | * @reg: Register to access |
227 | * | 227 | * |
228 | * Returns 64bit Octeon IO address | 228 | * Returns 64bit Octeon IO address |
@@ -259,7 +259,7 @@ static inline uint64_t __cvmx_pcie_build_config_addr(int pcie_port, int bus, | |||
259 | * @pcie_port: PCIe port the device is on | 259 | * @pcie_port: PCIe port the device is on |
260 | * @bus: Sub bus | 260 | * @bus: Sub bus |
261 | * @dev: Device ID | 261 | * @dev: Device ID |
262 | * @fn: Device sub function | 262 | * @fn: Device sub function |
263 | * @reg: Register to access | 263 | * @reg: Register to access |
264 | * | 264 | * |
265 | * Returns Result of the read | 265 | * Returns Result of the read |
@@ -281,7 +281,7 @@ static uint8_t cvmx_pcie_config_read8(int pcie_port, int bus, int dev, | |||
281 | * @pcie_port: PCIe port the device is on | 281 | * @pcie_port: PCIe port the device is on |
282 | * @bus: Sub bus | 282 | * @bus: Sub bus |
283 | * @dev: Device ID | 283 | * @dev: Device ID |
284 | * @fn: Device sub function | 284 | * @fn: Device sub function |
285 | * @reg: Register to access | 285 | * @reg: Register to access |
286 | * | 286 | * |
287 | * Returns Result of the read | 287 | * Returns Result of the read |
@@ -303,7 +303,7 @@ static uint16_t cvmx_pcie_config_read16(int pcie_port, int bus, int dev, | |||
303 | * @pcie_port: PCIe port the device is on | 303 | * @pcie_port: PCIe port the device is on |
304 | * @bus: Sub bus | 304 | * @bus: Sub bus |
305 | * @dev: Device ID | 305 | * @dev: Device ID |
306 | * @fn: Device sub function | 306 | * @fn: Device sub function |
307 | * @reg: Register to access | 307 | * @reg: Register to access |
308 | * | 308 | * |
309 | * Returns Result of the read | 309 | * Returns Result of the read |
@@ -325,7 +325,7 @@ static uint32_t cvmx_pcie_config_read32(int pcie_port, int bus, int dev, | |||
325 | * @pcie_port: PCIe port the device is on | 325 | * @pcie_port: PCIe port the device is on |
326 | * @bus: Sub bus | 326 | * @bus: Sub bus |
327 | * @dev: Device ID | 327 | * @dev: Device ID |
328 | * @fn: Device sub function | 328 | * @fn: Device sub function |
329 | * @reg: Register to access | 329 | * @reg: Register to access |
330 | * @val: Value to write | 330 | * @val: Value to write |
331 | */ | 331 | */ |
@@ -344,7 +344,7 @@ static void cvmx_pcie_config_write8(int pcie_port, int bus, int dev, int fn, | |||
344 | * @pcie_port: PCIe port the device is on | 344 | * @pcie_port: PCIe port the device is on |
345 | * @bus: Sub bus | 345 | * @bus: Sub bus |
346 | * @dev: Device ID | 346 | * @dev: Device ID |
347 | * @fn: Device sub function | 347 | * @fn: Device sub function |
348 | * @reg: Register to access | 348 | * @reg: Register to access |
349 | * @val: Value to write | 349 | * @val: Value to write |
350 | */ | 350 | */ |
@@ -363,7 +363,7 @@ static void cvmx_pcie_config_write16(int pcie_port, int bus, int dev, int fn, | |||
363 | * @pcie_port: PCIe port the device is on | 363 | * @pcie_port: PCIe port the device is on |
364 | * @bus: Sub bus | 364 | * @bus: Sub bus |
365 | * @dev: Device ID | 365 | * @dev: Device ID |
366 | * @fn: Device sub function | 366 | * @fn: Device sub function |
367 | * @reg: Register to access | 367 | * @reg: Register to access |
368 | * @val: Value to write | 368 | * @val: Value to write |
369 | */ | 369 | */ |
@@ -883,14 +883,14 @@ retry: | |||
883 | 883 | ||
884 | /* Store merge control (NPEI_MEM_ACCESS_CTL[TIMER,MAX_WORD]) */ | 884 | /* Store merge control (NPEI_MEM_ACCESS_CTL[TIMER,MAX_WORD]) */ |
885 | npei_mem_access_ctl.u64 = cvmx_read_csr(CVMX_PEXP_NPEI_MEM_ACCESS_CTL); | 885 | npei_mem_access_ctl.u64 = cvmx_read_csr(CVMX_PEXP_NPEI_MEM_ACCESS_CTL); |
886 | npei_mem_access_ctl.s.max_word = 0; /* Allow 16 words to combine */ | 886 | npei_mem_access_ctl.s.max_word = 0; /* Allow 16 words to combine */ |
887 | npei_mem_access_ctl.s.timer = 127; /* Wait up to 127 cycles for more data */ | 887 | npei_mem_access_ctl.s.timer = 127; /* Wait up to 127 cycles for more data */ |
888 | cvmx_write_csr(CVMX_PEXP_NPEI_MEM_ACCESS_CTL, npei_mem_access_ctl.u64); | 888 | cvmx_write_csr(CVMX_PEXP_NPEI_MEM_ACCESS_CTL, npei_mem_access_ctl.u64); |
889 | 889 | ||
890 | /* Setup Mem access SubDIDs */ | 890 | /* Setup Mem access SubDIDs */ |
891 | mem_access_subid.u64 = 0; | 891 | mem_access_subid.u64 = 0; |
892 | mem_access_subid.s.port = pcie_port; /* Port the request is sent to. */ | 892 | mem_access_subid.s.port = pcie_port; /* Port the request is sent to. */ |
893 | mem_access_subid.s.nmerge = 1; /* Due to an errata on pass 1 chips, no merging is allowed. */ | 893 | mem_access_subid.s.nmerge = 1; /* Due to an errata on pass 1 chips, no merging is allowed. */ |
894 | mem_access_subid.s.esr = 1; /* Endian-swap for Reads. */ | 894 | mem_access_subid.s.esr = 1; /* Endian-swap for Reads. */ |
895 | mem_access_subid.s.esw = 1; /* Endian-swap for Writes. */ | 895 | mem_access_subid.s.esw = 1; /* Endian-swap for Writes. */ |
896 | mem_access_subid.s.nsr = 0; /* Enable Snooping for Reads. Octeon doesn't care, but devices might want this more conservative setting */ | 896 | mem_access_subid.s.nsr = 0; /* Enable Snooping for Reads. Octeon doesn't care, but devices might want this more conservative setting */ |
@@ -926,7 +926,7 @@ retry: | |||
926 | 926 | ||
927 | bar1_index.u32 = 0; | 927 | bar1_index.u32 = 0; |
928 | bar1_index.s.addr_idx = (CVMX_PCIE_BAR1_PHYS_BASE >> 22); | 928 | bar1_index.s.addr_idx = (CVMX_PCIE_BAR1_PHYS_BASE >> 22); |
929 | bar1_index.s.ca = 1; /* Not Cached */ | 929 | bar1_index.s.ca = 1; /* Not Cached */ |
930 | bar1_index.s.end_swp = 1; /* Endian Swap mode */ | 930 | bar1_index.s.end_swp = 1; /* Endian Swap mode */ |
931 | bar1_index.s.addr_v = 1; /* Valid entry */ | 931 | bar1_index.s.addr_v = 1; /* Valid entry */ |
932 | 932 | ||
@@ -1342,11 +1342,11 @@ static int __cvmx_pcie_rc_initialize_gen2(int pcie_port) | |||
1342 | /* Setup Mem access SubDIDs */ | 1342 | /* Setup Mem access SubDIDs */ |
1343 | mem_access_subid.u64 = 0; | 1343 | mem_access_subid.u64 = 0; |
1344 | mem_access_subid.s.port = pcie_port; /* Port the request is sent to. */ | 1344 | mem_access_subid.s.port = pcie_port; /* Port the request is sent to. */ |
1345 | mem_access_subid.s.nmerge = 0; /* Allow merging as it works on CN6XXX. */ | 1345 | mem_access_subid.s.nmerge = 0; /* Allow merging as it works on CN6XXX. */ |
1346 | mem_access_subid.s.esr = 1; /* Endian-swap for Reads. */ | 1346 | mem_access_subid.s.esr = 1; /* Endian-swap for Reads. */ |
1347 | mem_access_subid.s.esw = 1; /* Endian-swap for Writes. */ | 1347 | mem_access_subid.s.esw = 1; /* Endian-swap for Writes. */ |
1348 | mem_access_subid.s.wtype = 0; /* "No snoop" and "Relaxed ordering" are not set */ | 1348 | mem_access_subid.s.wtype = 0; /* "No snoop" and "Relaxed ordering" are not set */ |
1349 | mem_access_subid.s.rtype = 0; /* "No snoop" and "Relaxed ordering" are not set */ | 1349 | mem_access_subid.s.rtype = 0; /* "No snoop" and "Relaxed ordering" are not set */ |
1350 | /* PCIe Adddress Bits <63:34>. */ | 1350 | /* PCIe Adddress Bits <63:34>. */ |
1351 | if (OCTEON_IS_MODEL(OCTEON_CN68XX)) | 1351 | if (OCTEON_IS_MODEL(OCTEON_CN68XX)) |
1352 | mem_access_subid.cn68xx.ba = 0; | 1352 | mem_access_subid.cn68xx.ba = 0; |
@@ -1409,7 +1409,7 @@ static int __cvmx_pcie_rc_initialize_gen2(int pcie_port) | |||
1409 | 1409 | ||
1410 | bar1_index.u64 = 0; | 1410 | bar1_index.u64 = 0; |
1411 | bar1_index.s.addr_idx = (CVMX_PCIE_BAR1_PHYS_BASE >> 22); | 1411 | bar1_index.s.addr_idx = (CVMX_PCIE_BAR1_PHYS_BASE >> 22); |
1412 | bar1_index.s.ca = 1; /* Not Cached */ | 1412 | bar1_index.s.ca = 1; /* Not Cached */ |
1413 | bar1_index.s.end_swp = 1; /* Endian Swap mode */ | 1413 | bar1_index.s.end_swp = 1; /* Endian Swap mode */ |
1414 | bar1_index.s.addr_v = 1; /* Valid entry */ | 1414 | bar1_index.s.addr_v = 1; /* Valid entry */ |
1415 | 1415 | ||
@@ -1458,10 +1458,10 @@ static int cvmx_pcie_rc_initialize(int pcie_port) | |||
1458 | * | 1458 | * |
1459 | * @dev: The Linux PCI device structure for the device to map | 1459 | * @dev: The Linux PCI device structure for the device to map |
1460 | * @slot: The slot number for this device on __BUS 0__. Linux | 1460 | * @slot: The slot number for this device on __BUS 0__. Linux |
1461 | * enumerates through all the bridges and figures out the | 1461 | * enumerates through all the bridges and figures out the |
1462 | * slot on Bus 0 where this device eventually hooks to. | 1462 | * slot on Bus 0 where this device eventually hooks to. |
1463 | * @pin: The PCI interrupt pin read from the device, then swizzled | 1463 | * @pin: The PCI interrupt pin read from the device, then swizzled |
1464 | * as it goes through each bridge. | 1464 | * as it goes through each bridge. |
1465 | * Returns Interrupt number for the device | 1465 | * Returns Interrupt number for the device |
1466 | */ | 1466 | */ |
1467 | int __init octeon_pcie_pcibios_map_irq(const struct pci_dev *dev, | 1467 | int __init octeon_pcie_pcibios_map_irq(const struct pci_dev *dev, |
@@ -1503,7 +1503,7 @@ int __init octeon_pcie_pcibios_map_irq(const struct pci_dev *dev, | |||
1503 | return pin - 1 + OCTEON_IRQ_PCI_INT0; | 1503 | return pin - 1 + OCTEON_IRQ_PCI_INT0; |
1504 | } | 1504 | } |
1505 | 1505 | ||
1506 | static void set_cfg_read_retry(u32 retry_cnt) | 1506 | static void set_cfg_read_retry(u32 retry_cnt) |
1507 | { | 1507 | { |
1508 | union cvmx_pemx_ctl_status pemx_ctl; | 1508 | union cvmx_pemx_ctl_status pemx_ctl; |
1509 | pemx_ctl.u64 = cvmx_read_csr(CVMX_PEMX_CTL_STATUS(1)); | 1509 | pemx_ctl.u64 = cvmx_read_csr(CVMX_PEMX_CTL_STATUS(1)); |
@@ -1931,7 +1931,7 @@ static int __init octeon_pcie_setup(void) | |||
1931 | OCTEON_IS_MODEL(OCTEON_CN63XX_PASS2_0)) { | 1931 | OCTEON_IS_MODEL(OCTEON_CN63XX_PASS2_0)) { |
1932 | sriox_status_reg.u64 = cvmx_read_csr(CVMX_SRIOX_STATUS_REG(0)); | 1932 | sriox_status_reg.u64 = cvmx_read_csr(CVMX_SRIOX_STATUS_REG(0)); |
1933 | if (sriox_status_reg.s.srio) { | 1933 | if (sriox_status_reg.s.srio) { |
1934 | srio_war15205 += 1; /* Port is SRIO */ | 1934 | srio_war15205 += 1; /* Port is SRIO */ |
1935 | port = 0; | 1935 | port = 0; |
1936 | } | 1936 | } |
1937 | } | 1937 | } |
@@ -2004,7 +2004,7 @@ static int __init octeon_pcie_setup(void) | |||
2004 | OCTEON_IS_MODEL(OCTEON_CN63XX_PASS2_0)) { | 2004 | OCTEON_IS_MODEL(OCTEON_CN63XX_PASS2_0)) { |
2005 | sriox_status_reg.u64 = cvmx_read_csr(CVMX_SRIOX_STATUS_REG(1)); | 2005 | sriox_status_reg.u64 = cvmx_read_csr(CVMX_SRIOX_STATUS_REG(1)); |
2006 | if (sriox_status_reg.s.srio) { | 2006 | if (sriox_status_reg.s.srio) { |
2007 | srio_war15205 += 1; /* Port is SRIO */ | 2007 | srio_war15205 += 1; /* Port is SRIO */ |
2008 | port = 1; | 2008 | port = 1; |
2009 | } | 2009 | } |
2010 | } | 2010 | } |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq.c b/arch/mips/pmc-sierra/msp71xx/msp_irq.c index d3c3d81757a5..9da5619c00a5 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_irq.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_irq.c | |||
@@ -41,9 +41,9 @@ static inline void sec_int_dispatch(void) { do_IRQ(MSP_INT_SEC); } | |||
41 | 41 | ||
42 | /* | 42 | /* |
43 | * The PMC-Sierra MSP interrupts are arranged in a 3 level cascaded | 43 | * The PMC-Sierra MSP interrupts are arranged in a 3 level cascaded |
44 | * hierarchical system. The first level are the direct MIPS interrupts | 44 | * hierarchical system. The first level are the direct MIPS interrupts |
45 | * and are assigned the interrupt range 0-7. The second level is the SLM | 45 | * and are assigned the interrupt range 0-7. The second level is the SLM |
46 | * interrupt controller and is assigned the range 8-39. The third level | 46 | * interrupt controller and is assigned the range 8-39. The third level |
47 | * comprises the Peripherial block, the PCI block, the PCI MSI block and | 47 | * comprises the Peripherial block, the PCI block, the PCI MSI block and |
48 | * the SLP. The PCI interrupts and the SLP errors are handled by the | 48 | * the SLP. The PCI interrupts and the SLP errors are handled by the |
49 | * relevant subsystems so the core interrupt code needs only concern | 49 | * relevant subsystems so the core interrupt code needs only concern |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c b/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c index 2e6f7cab24c1..e49b499f66db 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * This file define the irq handler for MSP CIC subsystem interrupts. | 4 | * This file define the irq handler for MSP CIC subsystem interrupts. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
@@ -171,7 +171,7 @@ void __init msp_cic_irq_init(void) | |||
171 | /* Mask/clear interrupts. */ | 171 | /* Mask/clear interrupts. */ |
172 | *CIC_VPE0_MSK_REG = 0x00000000; | 172 | *CIC_VPE0_MSK_REG = 0x00000000; |
173 | *CIC_VPE1_MSK_REG = 0x00000000; | 173 | *CIC_VPE1_MSK_REG = 0x00000000; |
174 | *CIC_STS_REG = 0xFFFFFFFF; | 174 | *CIC_STS_REG = 0xFFFFFFFF; |
175 | /* | 175 | /* |
176 | * The MSP7120 RG and EVBD boards use IRQ[6:4] for PCI. | 176 | * The MSP7120 RG and EVBD boards use IRQ[6:4] for PCI. |
177 | * These inputs map to EXT_INT_POL[6:4] inside the CIC. | 177 | * These inputs map to EXT_INT_POL[6:4] inside the CIC. |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq_per.c b/arch/mips/pmc-sierra/msp71xx/msp_irq_per.c index 598b6a66b970..d1fd530479d4 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_irq_per.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_irq_per.c | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * This file define the irq handler for MSP PER subsystem interrupts. | 4 | * This file define the irq handler for MSP PER subsystem interrupts. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c index 83a1c5eae3f8..5f66a76311c3 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c | |||
@@ -4,8 +4,8 @@ | |||
4 | * Copyright 2005-2006 PMC-Sierra, Inc, derived from irq_cpu.c | 4 | * Copyright 2005-2006 PMC-Sierra, Inc, derived from irq_cpu.c |
5 | * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com | 5 | * Author: Andrew Hughes, Andrew_Hughes@pmc-sierra.com |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
9 | * Free Software Foundation; either version 2 of the License, or (at your | 9 | * Free Software Foundation; either version 2 of the License, or (at your |
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_pci.c b/arch/mips/pmc-sierra/msp71xx/msp_pci.c index f764fe7748d6..428dea23c35c 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_pci.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_pci.c | |||
@@ -36,7 +36,7 @@ static int __init msp_pci_setup(void) | |||
36 | #if 0 /* Linux 2.6 initialization code to be completed */ | 36 | #if 0 /* Linux 2.6 initialization code to be completed */ |
37 | if (getdeviceid() & DEV_ID_SINGLE_PC) { | 37 | if (getdeviceid() & DEV_ID_SINGLE_PC) { |
38 | /* If single card mode */ | 38 | /* If single card mode */ |
39 | slmRegs *sreg = (slmRegs *) SREG_BASE; | 39 | slmRegs *sreg = (slmRegs *) SREG_BASE; |
40 | 40 | ||
41 | sreg->single_pc_enable = SINGLE_PCCARD; | 41 | sreg->single_pc_enable = SINGLE_PCCARD; |
42 | } | 42 | } |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_prom.c b/arch/mips/pmc-sierra/msp71xx/msp_prom.c index db00deb59b9c..0edb89a63516 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_prom.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_prom.c | |||
@@ -99,7 +99,7 @@ static inline int str2eaddr(unsigned char *ea, unsigned char *str) | |||
99 | } | 99 | } |
100 | } | 100 | } |
101 | 101 | ||
102 | if (index == 5) { | 102 | if (index == 5) { |
103 | ea[index++] = num; | 103 | ea[index++] = num; |
104 | return 0; | 104 | return 0; |
105 | } else | 105 | } else |
@@ -285,7 +285,7 @@ EXPORT_SYMBOL(identify_revision); | |||
285 | char *prom_getenv(char *env_name) | 285 | char *prom_getenv(char *env_name) |
286 | { | 286 | { |
287 | /* | 287 | /* |
288 | * Return a pointer to the given environment variable. prom_envp | 288 | * Return a pointer to the given environment variable. prom_envp |
289 | * points to a null terminated array of pointers to variables. | 289 | * points to a null terminated array of pointers to variables. |
290 | * Environment variables are stored in the form of "memsize=64" | 290 | * Environment variables are stored in the form of "memsize=64" |
291 | */ | 291 | */ |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_serial.c b/arch/mips/pmc-sierra/msp71xx/msp_serial.c index a1c7c7da2336..d304be22b963 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_serial.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_serial.c | |||
@@ -90,8 +90,8 @@ static int msp_serial_handle_irq(struct uart_port *p) | |||
90 | 90 | ||
91 | void __init msp_serial_setup(void) | 91 | void __init msp_serial_setup(void) |
92 | { | 92 | { |
93 | char *s; | 93 | char *s; |
94 | char *endp; | 94 | char *endp; |
95 | struct uart_port up; | 95 | struct uart_port up; |
96 | unsigned int uartclk; | 96 | unsigned int uartclk; |
97 | 97 | ||
@@ -104,19 +104,19 @@ void __init msp_serial_setup(void) | |||
104 | ppfinit("UART clock set to %d\n", uartclk); | 104 | ppfinit("UART clock set to %d\n", uartclk); |
105 | 105 | ||
106 | /* Initialize first serial port */ | 106 | /* Initialize first serial port */ |
107 | up.mapbase = MSP_UART0_BASE; | 107 | up.mapbase = MSP_UART0_BASE; |
108 | up.membase = ioremap_nocache(up.mapbase, MSP_UART_REG_LEN); | 108 | up.membase = ioremap_nocache(up.mapbase, MSP_UART_REG_LEN); |
109 | up.irq = MSP_INT_UART0; | 109 | up.irq = MSP_INT_UART0; |
110 | up.uartclk = uartclk; | 110 | up.uartclk = uartclk; |
111 | up.regshift = 2; | 111 | up.regshift = 2; |
112 | up.iotype = UPIO_MEM; | 112 | up.iotype = UPIO_MEM; |
113 | up.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; | 113 | up.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; |
114 | up.type = PORT_16550A; | 114 | up.type = PORT_16550A; |
115 | up.line = 0; | 115 | up.line = 0; |
116 | up.serial_out = msp_serial_out; | 116 | up.serial_out = msp_serial_out; |
117 | up.serial_in = msp_serial_in; | 117 | up.serial_in = msp_serial_in; |
118 | up.handle_irq = msp_serial_handle_irq; | 118 | up.handle_irq = msp_serial_handle_irq; |
119 | up.private_data = kzalloc(sizeof(struct msp_uart_data), GFP_KERNEL); | 119 | up.private_data = kzalloc(sizeof(struct msp_uart_data), GFP_KERNEL); |
120 | if (!up.private_data) { | 120 | if (!up.private_data) { |
121 | pr_err("failed to allocate uart private data\n"); | 121 | pr_err("failed to allocate uart private data\n"); |
122 | return; | 122 | return; |
@@ -142,10 +142,10 @@ void __init msp_serial_setup(void) | |||
142 | return; /* No second serial port, good-bye. */ | 142 | return; /* No second serial port, good-bye. */ |
143 | } | 143 | } |
144 | 144 | ||
145 | up.mapbase = MSP_UART1_BASE; | 145 | up.mapbase = MSP_UART1_BASE; |
146 | up.membase = ioremap_nocache(up.mapbase, MSP_UART_REG_LEN); | 146 | up.membase = ioremap_nocache(up.mapbase, MSP_UART_REG_LEN); |
147 | up.irq = MSP_INT_UART1; | 147 | up.irq = MSP_INT_UART1; |
148 | up.line = 1; | 148 | up.line = 1; |
149 | up.private_data = (void*)UART1_STATUS_REG; | 149 | up.private_data = (void*)UART1_STATUS_REG; |
150 | if (early_serial_setup(&up)) { | 150 | if (early_serial_setup(&up)) { |
151 | kfree(up.private_data); | 151 | kfree(up.private_data); |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_setup.c b/arch/mips/pmc-sierra/msp71xx/msp_setup.c index 7a834b2f8a5f..1651cfdbfe7b 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_setup.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_setup.c | |||
@@ -4,8 +4,8 @@ | |||
4 | * Copyright 2005-2007 PMC-Sierra, Inc, | 4 | * Copyright 2005-2007 PMC-Sierra, Inc, |
5 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | 5 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
9 | * Free Software Foundation; either version 2 of the License, or (at your | 9 | * Free Software Foundation; either version 2 of the License, or (at your |
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
@@ -168,7 +168,7 @@ void __init prom_init(void) | |||
168 | family = identify_family(); | 168 | family = identify_family(); |
169 | revision = identify_revision(); | 169 | revision = identify_revision(); |
170 | 170 | ||
171 | switch (family) { | 171 | switch (family) { |
172 | case FAMILY_FPGA: | 172 | case FAMILY_FPGA: |
173 | if (FPGA_IS_MSP4200(revision)) { | 173 | if (FPGA_IS_MSP4200(revision)) { |
174 | /* Old-style revision ID */ | 174 | /* Old-style revision ID */ |
@@ -219,7 +219,7 @@ void __init prom_init(void) | |||
219 | 219 | ||
220 | /* | 220 | /* |
221 | * Sub-system setup follows. | 221 | * Sub-system setup follows. |
222 | * Setup functions can either be called here or using the | 222 | * Setup functions can either be called here or using the |
223 | * subsys_initcall mechanism (i.e. see msp_pci_setup). The | 223 | * subsys_initcall mechanism (i.e. see msp_pci_setup). The |
224 | * order in which they are called can be changed by using the | 224 | * order in which they are called can be changed by using the |
225 | * link order in arch/mips/pmc-sierra/msp71xx/Makefile. | 225 | * link order in arch/mips/pmc-sierra/msp71xx/Makefile. |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_time.c b/arch/mips/pmc-sierra/msp71xx/msp_time.c index 8b42f307a7a7..8f12ecc55ace 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_time.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_time.c | |||
@@ -45,7 +45,7 @@ static int tim_installed; | |||
45 | 45 | ||
46 | void __init plat_time_init(void) | 46 | void __init plat_time_init(void) |
47 | { | 47 | { |
48 | char *endp, *s; | 48 | char *endp, *s; |
49 | unsigned long cpu_rate = 0; | 49 | unsigned long cpu_rate = 0; |
50 | 50 | ||
51 | if (cpu_rate == 0) { | 51 | if (cpu_rate == 0) { |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_usb.c b/arch/mips/pmc-sierra/msp71xx/msp_usb.c index 9a1aef89bd4c..4dab915696e7 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_usb.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_usb.c | |||
@@ -40,14 +40,14 @@ | |||
40 | #if defined(CONFIG_USB_EHCI_HCD) | 40 | #if defined(CONFIG_USB_EHCI_HCD) |
41 | static struct resource msp_usbhost0_resources[] = { | 41 | static struct resource msp_usbhost0_resources[] = { |
42 | [0] = { /* EHCI-HS operational and capabilities registers */ | 42 | [0] = { /* EHCI-HS operational and capabilities registers */ |
43 | .start = MSP_USB0_HS_START, | 43 | .start = MSP_USB0_HS_START, |
44 | .end = MSP_USB0_HS_END, | 44 | .end = MSP_USB0_HS_END, |
45 | .flags = IORESOURCE_MEM, | 45 | .flags = IORESOURCE_MEM, |
46 | }, | 46 | }, |
47 | [1] = { | 47 | [1] = { |
48 | .start = MSP_INT_USB, | 48 | .start = MSP_INT_USB, |
49 | .end = MSP_INT_USB, | 49 | .end = MSP_INT_USB, |
50 | .flags = IORESOURCE_IRQ, | 50 | .flags = IORESOURCE_IRQ, |
51 | }, | 51 | }, |
52 | [2] = { /* MSBus-to-AMBA bridge register space */ | 52 | [2] = { /* MSBus-to-AMBA bridge register space */ |
53 | .start = MSP_USB0_MAB_START, | 53 | .start = MSP_USB0_MAB_START, |
@@ -71,8 +71,8 @@ static struct mspusb_device msp_usbhost0_device = { | |||
71 | .dma_mask = &msp_usbhost0_dma_mask, | 71 | .dma_mask = &msp_usbhost0_dma_mask, |
72 | .coherent_dma_mask = 0xffffffffUL, | 72 | .coherent_dma_mask = 0xffffffffUL, |
73 | }, | 73 | }, |
74 | .num_resources = ARRAY_SIZE(msp_usbhost0_resources), | 74 | .num_resources = ARRAY_SIZE(msp_usbhost0_resources), |
75 | .resource = msp_usbhost0_resources, | 75 | .resource = msp_usbhost0_resources, |
76 | }, | 76 | }, |
77 | }; | 77 | }; |
78 | 78 | ||
@@ -121,14 +121,14 @@ static struct mspusb_device msp_usbhost1_device = { | |||
121 | #if defined(CONFIG_USB_GADGET) | 121 | #if defined(CONFIG_USB_GADGET) |
122 | static struct resource msp_usbdev0_resources[] = { | 122 | static struct resource msp_usbdev0_resources[] = { |
123 | [0] = { /* EHCI-HS operational and capabilities registers */ | 123 | [0] = { /* EHCI-HS operational and capabilities registers */ |
124 | .start = MSP_USB0_HS_START, | 124 | .start = MSP_USB0_HS_START, |
125 | .end = MSP_USB0_HS_END, | 125 | .end = MSP_USB0_HS_END, |
126 | .flags = IORESOURCE_MEM, | 126 | .flags = IORESOURCE_MEM, |
127 | }, | 127 | }, |
128 | [1] = { | 128 | [1] = { |
129 | .start = MSP_INT_USB, | 129 | .start = MSP_INT_USB, |
130 | .end = MSP_INT_USB, | 130 | .end = MSP_INT_USB, |
131 | .flags = IORESOURCE_IRQ, | 131 | .flags = IORESOURCE_IRQ, |
132 | }, | 132 | }, |
133 | [2] = { /* MSBus-to-AMBA bridge register space */ | 133 | [2] = { /* MSBus-to-AMBA bridge register space */ |
134 | .start = MSP_USB0_MAB_START, | 134 | .start = MSP_USB0_MAB_START, |
@@ -153,22 +153,22 @@ static struct mspusb_device msp_usbdev0_device = { | |||
153 | .dma_mask = &msp_usbdev_dma_mask, | 153 | .dma_mask = &msp_usbdev_dma_mask, |
154 | .coherent_dma_mask = 0xffffffffUL, | 154 | .coherent_dma_mask = 0xffffffffUL, |
155 | }, | 155 | }, |
156 | .num_resources = ARRAY_SIZE(msp_usbdev0_resources), | 156 | .num_resources = ARRAY_SIZE(msp_usbdev0_resources), |
157 | .resource = msp_usbdev0_resources, | 157 | .resource = msp_usbdev0_resources, |
158 | }, | 158 | }, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | #ifdef CONFIG_MSP_HAS_DUAL_USB | 161 | #ifdef CONFIG_MSP_HAS_DUAL_USB |
162 | static struct resource msp_usbdev1_resources[] = { | 162 | static struct resource msp_usbdev1_resources[] = { |
163 | [0] = { /* EHCI-HS operational and capabilities registers */ | 163 | [0] = { /* EHCI-HS operational and capabilities registers */ |
164 | .start = MSP_USB1_HS_START, | 164 | .start = MSP_USB1_HS_START, |
165 | .end = MSP_USB1_HS_END, | 165 | .end = MSP_USB1_HS_END, |
166 | .flags = IORESOURCE_MEM, | 166 | .flags = IORESOURCE_MEM, |
167 | }, | 167 | }, |
168 | [1] = { | 168 | [1] = { |
169 | .start = MSP_INT_USB, | 169 | .start = MSP_INT_USB, |
170 | .end = MSP_INT_USB, | 170 | .end = MSP_INT_USB, |
171 | .flags = IORESOURCE_IRQ, | 171 | .flags = IORESOURCE_IRQ, |
172 | }, | 172 | }, |
173 | [2] = { /* MSBus-to-AMBA bridge register space */ | 173 | [2] = { /* MSBus-to-AMBA bridge register space */ |
174 | .start = MSP_USB1_MAB_START, | 174 | .start = MSP_USB1_MAB_START, |
@@ -191,8 +191,8 @@ static struct mspusb_device msp_usbdev1_device = { | |||
191 | .dma_mask = &msp_usbdev_dma_mask, | 191 | .dma_mask = &msp_usbdev_dma_mask, |
192 | .coherent_dma_mask = 0xffffffffUL, | 192 | .coherent_dma_mask = 0xffffffffUL, |
193 | }, | 193 | }, |
194 | .num_resources = ARRAY_SIZE(msp_usbdev1_resources), | 194 | .num_resources = ARRAY_SIZE(msp_usbdev1_resources), |
195 | .resource = msp_usbdev1_resources, | 195 | .resource = msp_usbdev1_resources, |
196 | }, | 196 | }, |
197 | }; | 197 | }; |
198 | 198 | ||
@@ -211,7 +211,7 @@ static int __init msp_usb_setup(void) | |||
211 | /* | 211 | /* |
212 | * Could this perhaps be integrated into the "features" env var? | 212 | * Could this perhaps be integrated into the "features" env var? |
213 | * Use the features key "U", and follow with "H" for host-mode, | 213 | * Use the features key "U", and follow with "H" for host-mode, |
214 | * "D" for device-mode. If it works for Ethernet, why not USB... | 214 | * "D" for device-mode. If it works for Ethernet, why not USB... |
215 | * -- hammtrev, 2007/03/22 | 215 | * -- hammtrev, 2007/03/22 |
216 | */ | 216 | */ |
217 | snprintf((char *)&envstr[0], sizeof(envstr), "usbmode"); | 217 | snprintf((char *)&envstr[0], sizeof(envstr), "usbmode"); |
@@ -237,7 +237,7 @@ static int __init msp_usb_setup(void) | |||
237 | #endif | 237 | #endif |
238 | #else | 238 | #else |
239 | ppfinit("%s: echi_hcd not supported\n", __FILE__); | 239 | ppfinit("%s: echi_hcd not supported\n", __FILE__); |
240 | #endif /* CONFIG_USB_EHCI_HCD */ | 240 | #endif /* CONFIG_USB_EHCI_HCD */ |
241 | } else { | 241 | } else { |
242 | #if defined(CONFIG_USB_GADGET) | 242 | #if defined(CONFIG_USB_GADGET) |
243 | /* get device mode structure */ | 243 | /* get device mode structure */ |
@@ -251,7 +251,7 @@ static int __init msp_usb_setup(void) | |||
251 | #endif | 251 | #endif |
252 | #else | 252 | #else |
253 | ppfinit("%s: usb_gadget not supported\n", __FILE__); | 253 | ppfinit("%s: usb_gadget not supported\n", __FILE__); |
254 | #endif /* CONFIG_USB_GADGET */ | 254 | #endif /* CONFIG_USB_GADGET */ |
255 | } | 255 | } |
256 | /* add device */ | 256 | /* add device */ |
257 | platform_add_devices(msp_devs, ARRAY_SIZE(msp_devs)); | 257 | platform_add_devices(msp_devs, ARRAY_SIZE(msp_devs)); |
diff --git a/arch/mips/pnx833x/Platform b/arch/mips/pnx833x/Platform index 7e6ec4dbc8dd..794526caab12 100644 --- a/arch/mips/pnx833x/Platform +++ b/arch/mips/pnx833x/Platform | |||
@@ -1,5 +1,5 @@ | |||
1 | # NXP STB225 | 1 | # NXP STB225 |
2 | platform-$(CONFIG_SOC_PNX833X) += pnx833x/ | 2 | platform-$(CONFIG_SOC_PNX833X) += pnx833x/ |
3 | cflags-$(CONFIG_SOC_PNX833X) += -Iarch/mips/include/asm/mach-pnx833x | 3 | cflags-$(CONFIG_SOC_PNX833X) += -Iarch/mips/include/asm/mach-pnx833x |
4 | load-$(CONFIG_NXP_STB220) += 0xffffffff80001000 | 4 | load-$(CONFIG_NXP_STB220) += 0xffffffff80001000 |
5 | load-$(CONFIG_NXP_STB225) += 0xffffffff80001000 | 5 | load-$(CONFIG_NXP_STB225) += 0xffffffff80001000 |
diff --git a/arch/mips/pnx833x/common/interrupts.c b/arch/mips/pnx833x/common/interrupts.c index a86d5d5fceb0..a4a90596c0ad 100644 --- a/arch/mips/pnx833x/common/interrupts.c +++ b/arch/mips/pnx833x/common/interrupts.c | |||
@@ -35,64 +35,64 @@ static int mips_cpu_timer_irq; | |||
35 | static const unsigned int irq_prio[PNX833X_PIC_NUM_IRQ] = | 35 | static const unsigned int irq_prio[PNX833X_PIC_NUM_IRQ] = |
36 | { | 36 | { |
37 | 0, /* unused */ | 37 | 0, /* unused */ |
38 | 4, /* PNX833X_PIC_I2C0_INT 1 */ | 38 | 4, /* PNX833X_PIC_I2C0_INT 1 */ |
39 | 4, /* PNX833X_PIC_I2C1_INT 2 */ | 39 | 4, /* PNX833X_PIC_I2C1_INT 2 */ |
40 | 1, /* PNX833X_PIC_UART0_INT 3 */ | 40 | 1, /* PNX833X_PIC_UART0_INT 3 */ |
41 | 1, /* PNX833X_PIC_UART1_INT 4 */ | 41 | 1, /* PNX833X_PIC_UART1_INT 4 */ |
42 | 6, /* PNX833X_PIC_TS_IN0_DV_INT 5 */ | 42 | 6, /* PNX833X_PIC_TS_IN0_DV_INT 5 */ |
43 | 6, /* PNX833X_PIC_TS_IN0_DMA_INT 6 */ | 43 | 6, /* PNX833X_PIC_TS_IN0_DMA_INT 6 */ |
44 | 7, /* PNX833X_PIC_GPIO_INT 7 */ | 44 | 7, /* PNX833X_PIC_GPIO_INT 7 */ |
45 | 4, /* PNX833X_PIC_AUDIO_DEC_INT 8 */ | 45 | 4, /* PNX833X_PIC_AUDIO_DEC_INT 8 */ |
46 | 5, /* PNX833X_PIC_VIDEO_DEC_INT 9 */ | 46 | 5, /* PNX833X_PIC_VIDEO_DEC_INT 9 */ |
47 | 4, /* PNX833X_PIC_CONFIG_INT 10 */ | 47 | 4, /* PNX833X_PIC_CONFIG_INT 10 */ |
48 | 4, /* PNX833X_PIC_AOI_INT 11 */ | 48 | 4, /* PNX833X_PIC_AOI_INT 11 */ |
49 | 9, /* PNX833X_PIC_SYNC_INT 12 */ | 49 | 9, /* PNX833X_PIC_SYNC_INT 12 */ |
50 | 9, /* PNX8335_PIC_SATA_INT 13 */ | 50 | 9, /* PNX8335_PIC_SATA_INT 13 */ |
51 | 4, /* PNX833X_PIC_OSD_INT 14 */ | 51 | 4, /* PNX833X_PIC_OSD_INT 14 */ |
52 | 9, /* PNX833X_PIC_DISP1_INT 15 */ | 52 | 9, /* PNX833X_PIC_DISP1_INT 15 */ |
53 | 4, /* PNX833X_PIC_DEINTERLACER_INT 16 */ | 53 | 4, /* PNX833X_PIC_DEINTERLACER_INT 16 */ |
54 | 9, /* PNX833X_PIC_DISPLAY2_INT 17 */ | 54 | 9, /* PNX833X_PIC_DISPLAY2_INT 17 */ |
55 | 4, /* PNX833X_PIC_VC_INT 18 */ | 55 | 4, /* PNX833X_PIC_VC_INT 18 */ |
56 | 4, /* PNX833X_PIC_SC_INT 19 */ | 56 | 4, /* PNX833X_PIC_SC_INT 19 */ |
57 | 9, /* PNX833X_PIC_IDE_INT 20 */ | 57 | 9, /* PNX833X_PIC_IDE_INT 20 */ |
58 | 9, /* PNX833X_PIC_IDE_DMA_INT 21 */ | 58 | 9, /* PNX833X_PIC_IDE_DMA_INT 21 */ |
59 | 6, /* PNX833X_PIC_TS_IN1_DV_INT 22 */ | 59 | 6, /* PNX833X_PIC_TS_IN1_DV_INT 22 */ |
60 | 6, /* PNX833X_PIC_TS_IN1_DMA_INT 23 */ | 60 | 6, /* PNX833X_PIC_TS_IN1_DMA_INT 23 */ |
61 | 4, /* PNX833X_PIC_SGDX_DMA_INT 24 */ | 61 | 4, /* PNX833X_PIC_SGDX_DMA_INT 24 */ |
62 | 4, /* PNX833X_PIC_TS_OUT_INT 25 */ | 62 | 4, /* PNX833X_PIC_TS_OUT_INT 25 */ |
63 | 4, /* PNX833X_PIC_IR_INT 26 */ | 63 | 4, /* PNX833X_PIC_IR_INT 26 */ |
64 | 3, /* PNX833X_PIC_VMSP1_INT 27 */ | 64 | 3, /* PNX833X_PIC_VMSP1_INT 27 */ |
65 | 3, /* PNX833X_PIC_VMSP2_INT 28 */ | 65 | 3, /* PNX833X_PIC_VMSP2_INT 28 */ |
66 | 4, /* PNX833X_PIC_PIBC_INT 29 */ | 66 | 4, /* PNX833X_PIC_PIBC_INT 29 */ |
67 | 4, /* PNX833X_PIC_TS_IN0_TRD_INT 30 */ | 67 | 4, /* PNX833X_PIC_TS_IN0_TRD_INT 30 */ |
68 | 4, /* PNX833X_PIC_SGDX_TPD_INT 31 */ | 68 | 4, /* PNX833X_PIC_SGDX_TPD_INT 31 */ |
69 | 5, /* PNX833X_PIC_USB_INT 32 */ | 69 | 5, /* PNX833X_PIC_USB_INT 32 */ |
70 | 4, /* PNX833X_PIC_TS_IN1_TRD_INT 33 */ | 70 | 4, /* PNX833X_PIC_TS_IN1_TRD_INT 33 */ |
71 | 4, /* PNX833X_PIC_CLOCK_INT 34 */ | 71 | 4, /* PNX833X_PIC_CLOCK_INT 34 */ |
72 | 4, /* PNX833X_PIC_SGDX_PARSER_INT 35 */ | 72 | 4, /* PNX833X_PIC_SGDX_PARSER_INT 35 */ |
73 | 4, /* PNX833X_PIC_VMSP_DMA_INT 36 */ | 73 | 4, /* PNX833X_PIC_VMSP_DMA_INT 36 */ |
74 | #if defined(CONFIG_SOC_PNX8335) | 74 | #if defined(CONFIG_SOC_PNX8335) |
75 | 4, /* PNX8335_PIC_MIU_INT 37 */ | 75 | 4, /* PNX8335_PIC_MIU_INT 37 */ |
76 | 4, /* PNX8335_PIC_AVCHIP_IRQ_INT 38 */ | 76 | 4, /* PNX8335_PIC_AVCHIP_IRQ_INT 38 */ |
77 | 9, /* PNX8335_PIC_SYNC_HD_INT 39 */ | 77 | 9, /* PNX8335_PIC_SYNC_HD_INT 39 */ |
78 | 9, /* PNX8335_PIC_DISP_HD_INT 40 */ | 78 | 9, /* PNX8335_PIC_DISP_HD_INT 40 */ |
79 | 9, /* PNX8335_PIC_DISP_SCALER_INT 41 */ | 79 | 9, /* PNX8335_PIC_DISP_SCALER_INT 41 */ |
80 | 4, /* PNX8335_PIC_OSD_HD1_INT 42 */ | 80 | 4, /* PNX8335_PIC_OSD_HD1_INT 42 */ |
81 | 4, /* PNX8335_PIC_DTL_WRITER_Y_INT 43 */ | 81 | 4, /* PNX8335_PIC_DTL_WRITER_Y_INT 43 */ |
82 | 4, /* PNX8335_PIC_DTL_WRITER_C_INT 44 */ | 82 | 4, /* PNX8335_PIC_DTL_WRITER_C_INT 44 */ |
83 | 4, /* PNX8335_PIC_DTL_EMULATOR_Y_IR_INT 45 */ | 83 | 4, /* PNX8335_PIC_DTL_EMULATOR_Y_IR_INT 45 */ |
84 | 4, /* PNX8335_PIC_DTL_EMULATOR_C_IR_INT 46 */ | 84 | 4, /* PNX8335_PIC_DTL_EMULATOR_C_IR_INT 46 */ |
85 | 4, /* PNX8335_PIC_DENC_TTX_INT 47 */ | 85 | 4, /* PNX8335_PIC_DENC_TTX_INT 47 */ |
86 | 4, /* PNX8335_PIC_MMI_SIF0_INT 48 */ | 86 | 4, /* PNX8335_PIC_MMI_SIF0_INT 48 */ |
87 | 4, /* PNX8335_PIC_MMI_SIF1_INT 49 */ | 87 | 4, /* PNX8335_PIC_MMI_SIF1_INT 49 */ |
88 | 4, /* PNX8335_PIC_MMI_CDMMU_INT 50 */ | 88 | 4, /* PNX8335_PIC_MMI_CDMMU_INT 50 */ |
89 | 4, /* PNX8335_PIC_PIBCS_INT 51 */ | 89 | 4, /* PNX8335_PIC_PIBCS_INT 51 */ |
90 | 12, /* PNX8335_PIC_ETHERNET_INT 52 */ | 90 | 12, /* PNX8335_PIC_ETHERNET_INT 52 */ |
91 | 3, /* PNX8335_PIC_VMSP1_0_INT 53 */ | 91 | 3, /* PNX8335_PIC_VMSP1_0_INT 53 */ |
92 | 3, /* PNX8335_PIC_VMSP1_1_INT 54 */ | 92 | 3, /* PNX8335_PIC_VMSP1_1_INT 54 */ |
93 | 4, /* PNX8335_PIC_VMSP1_DMA_INT 55 */ | 93 | 4, /* PNX8335_PIC_VMSP1_DMA_INT 55 */ |
94 | 4, /* PNX8335_PIC_TDGR_DE_INT 56 */ | 94 | 4, /* PNX8335_PIC_TDGR_DE_INT 56 */ |
95 | 4, /* PNX8335_PIC_IR1_IRQ_INT 57 */ | 95 | 4, /* PNX8335_PIC_IR1_IRQ_INT 57 */ |
96 | #endif | 96 | #endif |
97 | }; | 97 | }; |
98 | 98 | ||
diff --git a/arch/mips/pnx833x/common/platform.c b/arch/mips/pnx833x/common/platform.c index 05a1d922cd60..d22dc0d6f289 100644 --- a/arch/mips/pnx833x/common/platform.c +++ b/arch/mips/pnx833x/common/platform.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Daniel Laird <daniel.j.laird@nxp.com> | 6 | * Daniel Laird <daniel.j.laird@nxp.com> |
7 | * | 7 | * |
8 | * Based on software written by: | 8 | * Based on software written by: |
9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. | 9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
@@ -42,7 +42,7 @@ | |||
42 | #include <irq-mapping.h> | 42 | #include <irq-mapping.h> |
43 | #include <pnx833x.h> | 43 | #include <pnx833x.h> |
44 | 44 | ||
45 | static u64 uart_dmamask = DMA_BIT_MASK(32); | 45 | static u64 uart_dmamask = DMA_BIT_MASK(32); |
46 | 46 | ||
47 | static struct resource pnx833x_uart_resources[] = { | 47 | static struct resource pnx833x_uart_resources[] = { |
48 | [0] = { | 48 | [0] = { |
@@ -69,7 +69,7 @@ static struct resource pnx833x_uart_resources[] = { | |||
69 | 69 | ||
70 | struct pnx8xxx_port pnx8xxx_ports[] = { | 70 | struct pnx8xxx_port pnx8xxx_ports[] = { |
71 | [0] = { | 71 | [0] = { |
72 | .port = { | 72 | .port = { |
73 | .type = PORT_PNX8XXX, | 73 | .type = PORT_PNX8XXX, |
74 | .iotype = UPIO_MEM, | 74 | .iotype = UPIO_MEM, |
75 | .membase = (void __iomem *)PNX833X_UART0_PORTS_START, | 75 | .membase = (void __iomem *)PNX833X_UART0_PORTS_START, |
@@ -82,7 +82,7 @@ struct pnx8xxx_port pnx8xxx_ports[] = { | |||
82 | }, | 82 | }, |
83 | }, | 83 | }, |
84 | [1] = { | 84 | [1] = { |
85 | .port = { | 85 | .port = { |
86 | .type = PORT_PNX8XXX, | 86 | .type = PORT_PNX8XXX, |
87 | .iotype = UPIO_MEM, | 87 | .iotype = UPIO_MEM, |
88 | .membase = (void __iomem *)PNX833X_UART1_PORTS_START, | 88 | .membase = (void __iomem *)PNX833X_UART1_PORTS_START, |
@@ -108,7 +108,7 @@ static struct platform_device pnx833x_uart_device = { | |||
108 | .resource = pnx833x_uart_resources, | 108 | .resource = pnx833x_uart_resources, |
109 | }; | 109 | }; |
110 | 110 | ||
111 | static u64 ehci_dmamask = DMA_BIT_MASK(32); | 111 | static u64 ehci_dmamask = DMA_BIT_MASK(32); |
112 | 112 | ||
113 | static struct resource pnx833x_usb_ehci_resources[] = { | 113 | static struct resource pnx833x_usb_ehci_resources[] = { |
114 | [0] = { | 114 | [0] = { |
@@ -183,7 +183,7 @@ static struct platform_device pnx833x_i2c0_device = { | |||
183 | .dev = { | 183 | .dev = { |
184 | .platform_data = &pnx833x_i2c_dev[0], | 184 | .platform_data = &pnx833x_i2c_dev[0], |
185 | }, | 185 | }, |
186 | .num_resources = ARRAY_SIZE(pnx833x_i2c0_resources), | 186 | .num_resources = ARRAY_SIZE(pnx833x_i2c0_resources), |
187 | .resource = pnx833x_i2c0_resources, | 187 | .resource = pnx833x_i2c0_resources, |
188 | }; | 188 | }; |
189 | 189 | ||
@@ -193,7 +193,7 @@ static struct platform_device pnx833x_i2c1_device = { | |||
193 | .dev = { | 193 | .dev = { |
194 | .platform_data = &pnx833x_i2c_dev[1], | 194 | .platform_data = &pnx833x_i2c_dev[1], |
195 | }, | 195 | }, |
196 | .num_resources = ARRAY_SIZE(pnx833x_i2c1_resources), | 196 | .num_resources = ARRAY_SIZE(pnx833x_i2c1_resources), |
197 | .resource = pnx833x_i2c1_resources, | 197 | .resource = pnx833x_i2c1_resources, |
198 | }; | 198 | }; |
199 | #endif | 199 | #endif |
@@ -217,7 +217,7 @@ static struct platform_device pnx833x_ethernet_device = { | |||
217 | .name = "ip3902-eth", | 217 | .name = "ip3902-eth", |
218 | .id = -1, | 218 | .id = -1, |
219 | .dev = { | 219 | .dev = { |
220 | .dma_mask = ðernet_dmamask, | 220 | .dma_mask = ðernet_dmamask, |
221 | .coherent_dma_mask = DMA_BIT_MASK(32), | 221 | .coherent_dma_mask = DMA_BIT_MASK(32), |
222 | }, | 222 | }, |
223 | .num_resources = ARRAY_SIZE(pnx833x_ethernet_resources), | 223 | .num_resources = ARRAY_SIZE(pnx833x_ethernet_resources), |
@@ -238,8 +238,8 @@ static struct resource pnx833x_sata_resources[] = { | |||
238 | }; | 238 | }; |
239 | 239 | ||
240 | static struct platform_device pnx833x_sata_device = { | 240 | static struct platform_device pnx833x_sata_device = { |
241 | .name = "pnx833x-sata", | 241 | .name = "pnx833x-sata", |
242 | .id = -1, | 242 | .id = -1, |
243 | .num_resources = ARRAY_SIZE(pnx833x_sata_resources), | 243 | .num_resources = ARRAY_SIZE(pnx833x_sata_resources), |
244 | .resource = pnx833x_sata_resources, | 244 | .resource = pnx833x_sata_resources, |
245 | }; | 245 | }; |
@@ -265,7 +265,7 @@ static struct platform_nand_data pnx833x_flash_nand_data = { | |||
265 | .chip_delay = 25, | 265 | .chip_delay = 25, |
266 | }, | 266 | }, |
267 | .ctrl = { | 267 | .ctrl = { |
268 | .cmd_ctrl = pnx833x_flash_nand_cmd_ctrl | 268 | .cmd_ctrl = pnx833x_flash_nand_cmd_ctrl |
269 | } | 269 | } |
270 | }; | 270 | }; |
271 | 271 | ||
@@ -274,17 +274,17 @@ static struct platform_nand_data pnx833x_flash_nand_data = { | |||
274 | * 12 bytes more seems to be the standard that allows for NAND access. | 274 | * 12 bytes more seems to be the standard that allows for NAND access. |
275 | */ | 275 | */ |
276 | static struct resource pnx833x_flash_nand_resource = { | 276 | static struct resource pnx833x_flash_nand_resource = { |
277 | .start = PNX8335_NAND_BASE, | 277 | .start = PNX8335_NAND_BASE, |
278 | .end = PNX8335_NAND_BASE + 12, | 278 | .end = PNX8335_NAND_BASE + 12, |
279 | .flags = IORESOURCE_MEM, | 279 | .flags = IORESOURCE_MEM, |
280 | }; | 280 | }; |
281 | 281 | ||
282 | static struct platform_device pnx833x_flash_nand = { | 282 | static struct platform_device pnx833x_flash_nand = { |
283 | .name = "gen_nand", | 283 | .name = "gen_nand", |
284 | .id = -1, | 284 | .id = -1, |
285 | .num_resources = 1, | 285 | .num_resources = 1, |
286 | .resource = &pnx833x_flash_nand_resource, | 286 | .resource = &pnx833x_flash_nand_resource, |
287 | .dev = { | 287 | .dev = { |
288 | .platform_data = &pnx833x_flash_nand_data, | 288 | .platform_data = &pnx833x_flash_nand_data, |
289 | }, | 289 | }, |
290 | }; | 290 | }; |
diff --git a/arch/mips/pnx833x/common/prom.c b/arch/mips/pnx833x/common/prom.c index 29969f90a6b0..dfafdd732ca1 100644 --- a/arch/mips/pnx833x/common/prom.c +++ b/arch/mips/pnx833x/common/prom.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Daniel Laird <daniel.j.laird@nxp.com> | 6 | * Daniel Laird <daniel.j.laird@nxp.com> |
7 | * | 7 | * |
8 | * Based on software written by: | 8 | * Based on software written by: |
9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. | 9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/pnx833x/common/reset.c b/arch/mips/pnx833x/common/reset.c index e0ea96d29fde..5cc9a9b3601c 100644 --- a/arch/mips/pnx833x/common/reset.c +++ b/arch/mips/pnx833x/common/reset.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Daniel Laird <daniel.j.laird@nxp.com> | 6 | * Daniel Laird <daniel.j.laird@nxp.com> |
7 | * | 7 | * |
8 | * Based on software written by: | 8 | * Based on software written by: |
9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. | 9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/pnx833x/common/setup.c b/arch/mips/pnx833x/common/setup.c index e51fbc4b644d..99b4d94236cc 100644 --- a/arch/mips/pnx833x/common/setup.c +++ b/arch/mips/pnx833x/common/setup.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Daniel Laird <daniel.j.laird@nxp.com> | 6 | * Daniel Laird <daniel.j.laird@nxp.com> |
7 | * | 7 | * |
8 | * Based on software written by: | 8 | * Based on software written by: |
9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. | 9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/pnx833x/stb22x/board.c b/arch/mips/pnx833x/stb22x/board.c index 4b328ac43050..2ac5203438d8 100644 --- a/arch/mips/pnx833x/stb22x/board.c +++ b/arch/mips/pnx833x/stb22x/board.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Daniel Laird <daniel.j.laird@nxp.com> | 6 | * Daniel Laird <daniel.j.laird@nxp.com> |
7 | * | 7 | * |
8 | * Based on software written by: | 8 | * Based on software written by: |
9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. | 9 | * Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/power/cpu.c b/arch/mips/power/cpu.c index 26a6ef19d71f..521e5963df05 100644 --- a/arch/mips/power/cpu.c +++ b/arch/mips/power/cpu.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2009 Lemote Inc. | 6 | * Copyright (C) 2009 Lemote Inc. |
7 | * Author: Hu Hongbing <huhb@lemote.com> | 7 | * Author: Hu Hongbing <huhb@lemote.com> |
8 | * Wu Zhangjin <wuzhangjin@gmail.com> | 8 | * Wu Zhangjin <wuzhangjin@gmail.com> |
9 | */ | 9 | */ |
10 | #include <asm/suspend.h> | 10 | #include <asm/suspend.h> |
11 | #include <asm/fpu.h> | 11 | #include <asm/fpu.h> |
diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate.S index 61e2558a2dcb..7e0277a1048f 100644 --- a/arch/mips/power/hibernate.S +++ b/arch/mips/power/hibernate.S | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2009 Lemote Inc. | 6 | * Copyright (C) 2009 Lemote Inc. |
7 | * Author: Hu Hongbing <huhb@lemote.com> | 7 | * Author: Hu Hongbing <huhb@lemote.com> |
8 | * Wu Zhangjin <wuzhangjin@gmail.com> | 8 | * Wu Zhangjin <wuzhangjin@gmail.com> |
9 | */ | 9 | */ |
10 | #include <asm/asm-offsets.h> | 10 | #include <asm/asm-offsets.h> |
11 | #include <asm/regdef.h> | 11 | #include <asm/regdef.h> |
diff --git a/arch/mips/powertv/asic/asic-calliope.c b/arch/mips/powertv/asic/asic-calliope.c index 7773f3d956b0..2f539b43f56b 100644 --- a/arch/mips/powertv/asic/asic-calliope.c +++ b/arch/mips/powertv/asic/asic-calliope.c | |||
@@ -17,10 +17,10 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | * | 19 | * |
20 | * Author: Ken Eppinett | 20 | * Author: Ken Eppinett |
21 | * David Schleef <ds@schleef.org> | 21 | * David Schleef <ds@schleef.org> |
22 | * | 22 | * |
23 | * Description: Defines the platform resources for the SA settop. | 23 | * Description: Defines the platform resources for the SA settop. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
@@ -90,12 +90,12 @@ const struct register_map calliope_register_map __initconst = { | |||
90 | .usb2_stbus_mess_size = {.phys = CALLIOPE_ADDR(0x9BFF04)}, | 90 | .usb2_stbus_mess_size = {.phys = CALLIOPE_ADDR(0x9BFF04)}, |
91 | .usb2_stbus_chunk_size = {.phys = CALLIOPE_ADDR(0x9BFF08)}, | 91 | .usb2_stbus_chunk_size = {.phys = CALLIOPE_ADDR(0x9BFF08)}, |
92 | 92 | ||
93 | .pcie_regs = {.phys = 0x000000}, /* -doesn't exist- */ | 93 | .pcie_regs = {.phys = 0x000000}, /* -doesn't exist- */ |
94 | .tim_ch = {.phys = CALLIOPE_ADDR(0xA02C10)}, | 94 | .tim_ch = {.phys = CALLIOPE_ADDR(0xA02C10)}, |
95 | .tim_cl = {.phys = CALLIOPE_ADDR(0xA02C14)}, | 95 | .tim_cl = {.phys = CALLIOPE_ADDR(0xA02C14)}, |
96 | .gpio_dout = {.phys = CALLIOPE_ADDR(0xA02c20)}, | 96 | .gpio_dout = {.phys = CALLIOPE_ADDR(0xA02c20)}, |
97 | .gpio_din = {.phys = CALLIOPE_ADDR(0xA02c24)}, | 97 | .gpio_din = {.phys = CALLIOPE_ADDR(0xA02c24)}, |
98 | .gpio_dir = {.phys = CALLIOPE_ADDR(0xA02c2C)}, | 98 | .gpio_dir = {.phys = CALLIOPE_ADDR(0xA02c2C)}, |
99 | .watchdog = {.phys = CALLIOPE_ADDR(0xA02c30)}, | 99 | .watchdog = {.phys = CALLIOPE_ADDR(0xA02c30)}, |
100 | .front_panel = {.phys = 0x000000}, /* -not used- */ | 100 | .front_panel = {.phys = 0x000000}, /* -not used- */ |
101 | }; | 101 | }; |
diff --git a/arch/mips/powertv/asic/asic-cronus.c b/arch/mips/powertv/asic/asic-cronus.c index da076db7b7ed..7f8f3429b35a 100644 --- a/arch/mips/powertv/asic/asic-cronus.c +++ b/arch/mips/powertv/asic/asic-cronus.c | |||
@@ -17,10 +17,10 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | * | 19 | * |
20 | * Author: Ken Eppinett | 20 | * Author: Ken Eppinett |
21 | * David Schleef <ds@schleef.org> | 21 | * David Schleef <ds@schleef.org> |
22 | * | 22 | * |
23 | * Description: Defines the platform resources for the SA settop. | 23 | * Description: Defines the platform resources for the SA settop. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
diff --git a/arch/mips/powertv/asic/asic-gaia.c b/arch/mips/powertv/asic/asic-gaia.c index 47683b370e74..1265b49012e6 100644 --- a/arch/mips/powertv/asic/asic-gaia.c +++ b/arch/mips/powertv/asic/asic-gaia.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | * | 19 | * |
20 | * Author: David VomLehn | 20 | * Author: David VomLehn |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/arch/mips/powertv/asic/asic-zeus.c b/arch/mips/powertv/asic/asic-zeus.c index 6ff4b10f09da..14e7de137e03 100644 --- a/arch/mips/powertv/asic/asic-zeus.c +++ b/arch/mips/powertv/asic/asic-zeus.c | |||
@@ -17,10 +17,10 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | * | 19 | * |
20 | * Author: Ken Eppinett | 20 | * Author: Ken Eppinett |
21 | * David Schleef <ds@schleef.org> | 21 | * David Schleef <ds@schleef.org> |
22 | * | 22 | * |
23 | * Description: Defines the platform resources for the SA settop. | 23 | * Description: Defines the platform resources for the SA settop. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
diff --git a/arch/mips/powertv/asic/asic_devices.c b/arch/mips/powertv/asic/asic_devices.c index bce1872249ba..d38b095fd0d0 100644 --- a/arch/mips/powertv/asic/asic_devices.c +++ b/arch/mips/powertv/asic/asic_devices.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * Description: Defines the platform resources for Gaia-based settops. | 3 | * Description: Defines the platform resources for Gaia-based settops. |
4 | * | 4 | * |
5 | * Copyright (C) 2005-2009 Scientific-Atlanta, Inc. | 5 | * Copyright (C) 2005-2009 Scientific-Atlanta, Inc. |
6 | * | 6 | * |
@@ -90,12 +90,12 @@ struct resource asic_resource = { | |||
90 | 90 | ||
91 | /* | 91 | /* |
92 | * Allow override of bootloader-specified model | 92 | * Allow override of bootloader-specified model |
93 | * Returns zero on success, a negative errno value on failure. This parameter | 93 | * Returns zero on success, a negative errno value on failure. This parameter |
94 | * allows overriding of the bootloader-specified model. | 94 | * allows overriding of the bootloader-specified model. |
95 | */ | 95 | */ |
96 | static char __initdata cmdline[COMMAND_LINE_SIZE]; | 96 | static char __initdata cmdline[COMMAND_LINE_SIZE]; |
97 | 97 | ||
98 | #define FORCEFAMILY_PARAM "forcefamily" | 98 | #define FORCEFAMILY_PARAM "forcefamily" |
99 | 99 | ||
100 | /* | 100 | /* |
101 | * check_forcefamily - check for, and parse, forcefamily command line parameter | 101 | * check_forcefamily - check for, and parse, forcefamily command line parameter |
@@ -486,7 +486,7 @@ static void __init pmem_setup_resource(void) | |||
486 | resource->start = phys_to_dma(pmemaddr - 0x80000000); | 486 | resource->start = phys_to_dma(pmemaddr - 0x80000000); |
487 | resource->end = resource->start + pmemlen - 1; | 487 | resource->end = resource->start + pmemlen - 1; |
488 | 488 | ||
489 | pr_info("persistent memory: start=0x%x end=0x%x\n", | 489 | pr_info("persistent memory: start=0x%x end=0x%x\n", |
490 | resource->start, resource->end); | 490 | resource->start, resource->end); |
491 | } | 491 | } |
492 | } | 492 | } |
diff --git a/arch/mips/powertv/asic/asic_int.c b/arch/mips/powertv/asic/asic_int.c index 99d82e10000b..f44cd9295cae 100644 --- a/arch/mips/powertv/asic/asic_int.c +++ b/arch/mips/powertv/asic/asic_int.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Carsten Langgaard, carstenl@mips.com | 2 | * Carsten Langgaard, carstenl@mips.com |
3 | * Copyright (C) 2000, 2001, 2004 MIPS Technologies, Inc. | 3 | * Copyright (C) 2000, 2001, 2004 MIPS Technologies, Inc. |
4 | * Copyright (C) 2001 Ralf Baechle | 4 | * Copyright (C) 2001 Ralf Baechle |
5 | * Portions copyright (C) 2009 Cisco Systems, Inc. | 5 | * Portions copyright (C) 2009 Cisco Systems, Inc. |
6 | * | 6 | * |
7 | * This program is free software; you can distribute it and/or modify it | 7 | * This program is free software; you can distribute it and/or modify it |
8 | * under the terms of the GNU General Public License (Version 2) as | 8 | * under the terms of the GNU General Public License (Version 2) as |
@@ -64,7 +64,7 @@ static void asic_irqdispatch(void) | |||
64 | 64 | ||
65 | irq = get_int(); | 65 | irq = get_int(); |
66 | if (irq < 0) | 66 | if (irq < 0) |
67 | return; /* interrupt has already been cleared */ | 67 | return; /* interrupt has already been cleared */ |
68 | 68 | ||
69 | do_IRQ(irq); | 69 | do_IRQ(irq); |
70 | } | 70 | } |
diff --git a/arch/mips/powertv/asic/irq_asic.c b/arch/mips/powertv/asic/irq_asic.c index fa9ae9584710..9344902dc586 100644 --- a/arch/mips/powertv/asic/irq_asic.c +++ b/arch/mips/powertv/asic/irq_asic.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * Modified from arch/mips/kernel/irq-rm7000.c: | 5 | * Modified from arch/mips/kernel/irq-rm7000.c: |
6 | * Copyright (C) 2003 Ralf Baechle | 6 | * Copyright (C) 2003 Ralf Baechle |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms of the GNU General Public License as published by the | 9 | * under the terms of the GNU General Public License as published by the |
10 | * Free Software Foundation; either version 2 of the License, or (at your | 10 | * Free Software Foundation; either version 2 of the License, or (at your |
11 | * option) any later version. | 11 | * option) any later version. |
12 | */ | 12 | */ |
diff --git a/arch/mips/powertv/asic/prealloc-calliope.c b/arch/mips/powertv/asic/prealloc-calliope.c index 3fc5d46687a9..98dc51650577 100644 --- a/arch/mips/powertv/asic/prealloc-calliope.c +++ b/arch/mips/powertv/asic/prealloc-calliope.c | |||
@@ -17,8 +17,8 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | * | 19 | * |
20 | * Author: Ken Eppinett | 20 | * Author: Ken Eppinett |
21 | * David Schleef <ds@schleef.org> | 21 | * David Schleef <ds@schleef.org> |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
@@ -153,7 +153,7 @@ struct resource non_dvr_calliope_resources[] __initdata = | |||
153 | * End of Resource marker | 153 | * End of Resource marker |
154 | */ | 154 | */ |
155 | { | 155 | { |
156 | .flags = 0, | 156 | .flags = 0, |
157 | }, | 157 | }, |
158 | }; | 158 | }; |
159 | 159 | ||
@@ -260,7 +260,7 @@ struct resource non_dvr_vze_calliope_resources[] __initdata = | |||
260 | * End of Resource marker | 260 | * End of Resource marker |
261 | */ | 261 | */ |
262 | { | 262 | { |
263 | .flags = 0, | 263 | .flags = 0, |
264 | }, | 264 | }, |
265 | }; | 265 | }; |
266 | 266 | ||
@@ -380,6 +380,6 @@ struct resource non_dvr_vzf_calliope_resources[] __initdata = | |||
380 | * End of Resource marker | 380 | * End of Resource marker |
381 | */ | 381 | */ |
382 | { | 382 | { |
383 | .flags = 0, | 383 | .flags = 0, |
384 | }, | 384 | }, |
385 | }; | 385 | }; |
diff --git a/arch/mips/powertv/asic/prealloc-cronus.c b/arch/mips/powertv/asic/prealloc-cronus.c index c532b50521ec..7c6ce7596935 100644 --- a/arch/mips/powertv/asic/prealloc-cronus.c +++ b/arch/mips/powertv/asic/prealloc-cronus.c | |||
@@ -17,8 +17,8 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | * | 19 | * |
20 | * Author: Ken Eppinett | 20 | * Author: Ken Eppinett |
21 | * David Schleef <ds@schleef.org> | 21 | * David Schleef <ds@schleef.org> |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
@@ -78,7 +78,7 @@ struct resource dvr_cronus_resources[] __initdata = | |||
78 | * | 78 | * |
79 | * This memory area is used for allocating buffers for Video decoding | 79 | * This memory area is used for allocating buffers for Video decoding |
80 | * purposes. Allocation/De-allocation within this buffer is managed | 80 | * purposes. Allocation/De-allocation within this buffer is managed |
81 | * by the STAVMEM driver of the STAPI. They could be Decimated | 81 | * by the STAVMEM driver of the STAPI. They could be Decimated |
82 | * Picture Buffers, Intermediate Buffers, as deemed necessary for | 82 | * Picture Buffers, Intermediate Buffers, as deemed necessary for |
83 | * video decoding purposes, for any video decoders on Zeus. | 83 | * video decoding purposes, for any video decoders on Zeus. |
84 | */ | 84 | */ |
@@ -185,7 +185,7 @@ struct resource dvr_cronus_resources[] __initdata = | |||
185 | * End of Resource marker | 185 | * End of Resource marker |
186 | */ | 186 | */ |
187 | { | 187 | { |
188 | .flags = 0, | 188 | .flags = 0, |
189 | }, | 189 | }, |
190 | }; | 190 | }; |
191 | 191 | ||
@@ -241,7 +241,7 @@ struct resource non_dvr_cronus_resources[] __initdata = | |||
241 | * | 241 | * |
242 | * This memory area is used for allocating buffers for Video decoding | 242 | * This memory area is used for allocating buffers for Video decoding |
243 | * purposes. Allocation/De-allocation within this buffer is managed | 243 | * purposes. Allocation/De-allocation within this buffer is managed |
244 | * by the STAVMEM driver of the STAPI. They could be Decimated | 244 | * by the STAVMEM driver of the STAPI. They could be Decimated |
245 | * Picture Buffers, Intermediate Buffers, as deemed necessary for | 245 | * Picture Buffers, Intermediate Buffers, as deemed necessary for |
246 | * video decoding purposes, for any video decoders on Zeus. | 246 | * video decoding purposes, for any video decoders on Zeus. |
247 | */ | 247 | */ |
@@ -335,6 +335,6 @@ struct resource non_dvr_cronus_resources[] __initdata = | |||
335 | * End of Resource marker | 335 | * End of Resource marker |
336 | */ | 336 | */ |
337 | { | 337 | { |
338 | .flags = 0, | 338 | .flags = 0, |
339 | }, | 339 | }, |
340 | }; | 340 | }; |
diff --git a/arch/mips/powertv/asic/prealloc-cronuslite.c b/arch/mips/powertv/asic/prealloc-cronuslite.c index b5537e49e7f5..a7937ba7b4c0 100644 --- a/arch/mips/powertv/asic/prealloc-cronuslite.c +++ b/arch/mips/powertv/asic/prealloc-cronuslite.c | |||
@@ -17,8 +17,8 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | * | 19 | * |
20 | * Author: Ken Eppinett | 20 | * Author: Ken Eppinett |
21 | * David Schleef <ds@schleef.org> | 21 | * David Schleef <ds@schleef.org> |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
@@ -65,7 +65,7 @@ struct resource non_dvr_cronuslite_resources[] __initdata = | |||
65 | * | 65 | * |
66 | * This memory area is used for allocating buffers for Video decoding | 66 | * This memory area is used for allocating buffers for Video decoding |
67 | * purposes. Allocation/De-allocation within this buffer is managed | 67 | * purposes. Allocation/De-allocation within this buffer is managed |
68 | * by the STAVMEM driver of the STAPI. They could be Decimated | 68 | * by the STAVMEM driver of the STAPI. They could be Decimated |
69 | * Picture Buffers, Intermediate Buffers, as deemed necessary for | 69 | * Picture Buffers, Intermediate Buffers, as deemed necessary for |
70 | * video decoding purposes, for any video decoders on Zeus. | 70 | * video decoding purposes, for any video decoders on Zeus. |
71 | */ | 71 | */ |
@@ -169,6 +169,6 @@ struct resource non_dvr_cronuslite_resources[] __initdata = | |||
169 | * End of Resource marker | 169 | * End of Resource marker |
170 | */ | 170 | */ |
171 | { | 171 | { |
172 | .flags = 0, | 172 | .flags = 0, |
173 | }, | 173 | }, |
174 | }; | 174 | }; |
diff --git a/arch/mips/powertv/asic/prealloc-gaia.c b/arch/mips/powertv/asic/prealloc-gaia.c index 8ac8c7aeb986..2303bbfe6b82 100644 --- a/arch/mips/powertv/asic/prealloc-gaia.c +++ b/arch/mips/powertv/asic/prealloc-gaia.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | * | 19 | * |
20 | * Author: David VomLehn | 20 | * Author: David VomLehn |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
@@ -33,22 +33,22 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | { | 35 | { |
36 | .name = "ST231aImage", /* Delta-Mu 1 image and ram */ | 36 | .name = "ST231aImage", /* Delta-Mu 1 image and ram */ |
37 | .start = 0x24000000, | 37 | .start = 0x24000000, |
38 | .end = 0x241FFFFF, /* 2MiB */ | 38 | .end = 0x241FFFFF, /* 2MiB */ |
39 | .flags = IORESOURCE_MEM, | 39 | .flags = IORESOURCE_MEM, |
40 | }, | 40 | }, |
41 | { | 41 | { |
42 | .name = "ST231aMonitor", /* 8KiB block ST231a monitor */ | 42 | .name = "ST231aMonitor", /* 8KiB block ST231a monitor */ |
43 | .start = 0x24200000, | 43 | .start = 0x24200000, |
44 | .end = 0x24201FFF, | 44 | .end = 0x24201FFF, |
45 | .flags = IORESOURCE_MEM, | 45 | .flags = IORESOURCE_MEM, |
46 | }, | 46 | }, |
47 | { | 47 | { |
48 | .name = "MediaMemory1", | 48 | .name = "MediaMemory1", |
49 | .start = 0x24202000, | 49 | .start = 0x24202000, |
50 | .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */ | 50 | .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */ |
51 | .flags = IORESOURCE_MEM, | 51 | .flags = IORESOURCE_MEM, |
52 | }, | 52 | }, |
53 | /* | 53 | /* |
54 | * | 54 | * |
@@ -56,22 +56,22 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
56 | * | 56 | * |
57 | */ | 57 | */ |
58 | { | 58 | { |
59 | .name = "ST231bImage", /* Delta-Mu 2 image and ram */ | 59 | .name = "ST231bImage", /* Delta-Mu 2 image and ram */ |
60 | .start = 0x60000000, | 60 | .start = 0x60000000, |
61 | .end = 0x601FFFFF, /* 2MiB */ | 61 | .end = 0x601FFFFF, /* 2MiB */ |
62 | .flags = IORESOURCE_IO, | 62 | .flags = IORESOURCE_IO, |
63 | }, | 63 | }, |
64 | { | 64 | { |
65 | .name = "ST231bMonitor", /* 8KiB block ST231b monitor */ | 65 | .name = "ST231bMonitor", /* 8KiB block ST231b monitor */ |
66 | .start = 0x60200000, | 66 | .start = 0x60200000, |
67 | .end = 0x60201FFF, | 67 | .end = 0x60201FFF, |
68 | .flags = IORESOURCE_IO, | 68 | .flags = IORESOURCE_IO, |
69 | }, | 69 | }, |
70 | { | 70 | { |
71 | .name = "MediaMemory2", | 71 | .name = "MediaMemory2", |
72 | .start = 0x60202000, | 72 | .start = 0x60202000, |
73 | .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */ | 73 | .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */ |
74 | .flags = IORESOURCE_IO, | 74 | .flags = IORESOURCE_IO, |
75 | }, | 75 | }, |
76 | /* | 76 | /* |
77 | * | 77 | * |
@@ -87,28 +87,28 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
87 | * | 87 | * |
88 | */ | 88 | */ |
89 | { | 89 | { |
90 | .name = "DSP_Image_Buff", | 90 | .name = "DSP_Image_Buff", |
91 | .start = 0x00000000, | 91 | .start = 0x00000000, |
92 | .end = 0x000FFFFF, | 92 | .end = 0x000FFFFF, |
93 | .flags = IORESOURCE_MEM, | 93 | .flags = IORESOURCE_MEM, |
94 | }, | 94 | }, |
95 | { | 95 | { |
96 | .name = "ADSC_CPU_PCM_Buff", | 96 | .name = "ADSC_CPU_PCM_Buff", |
97 | .start = 0x00000000, | 97 | .start = 0x00000000, |
98 | .end = 0x00009FFF, | 98 | .end = 0x00009FFF, |
99 | .flags = IORESOURCE_MEM, | 99 | .flags = IORESOURCE_MEM, |
100 | }, | 100 | }, |
101 | { | 101 | { |
102 | .name = "ADSC_AUX_Buff", | 102 | .name = "ADSC_AUX_Buff", |
103 | .start = 0x00000000, | 103 | .start = 0x00000000, |
104 | .end = 0x00003FFF, | 104 | .end = 0x00003FFF, |
105 | .flags = IORESOURCE_MEM, | 105 | .flags = IORESOURCE_MEM, |
106 | }, | 106 | }, |
107 | { | 107 | { |
108 | .name = "ADSC_Main_Buff", | 108 | .name = "ADSC_Main_Buff", |
109 | .start = 0x00000000, | 109 | .start = 0x00000000, |
110 | .end = 0x00003FFF, | 110 | .end = 0x00003FFF, |
111 | .flags = IORESOURCE_MEM, | 111 | .flags = IORESOURCE_MEM, |
112 | }, | 112 | }, |
113 | /* | 113 | /* |
114 | * | 114 | * |
@@ -119,16 +119,16 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
119 | * Arbitrary Based Buffers: | 119 | * Arbitrary Based Buffers: |
120 | * This memory area is used for allocating buffers for Video decoding | 120 | * This memory area is used for allocating buffers for Video decoding |
121 | * purposes. Allocation/De-allocation within this buffer is managed | 121 | * purposes. Allocation/De-allocation within this buffer is managed |
122 | * by the STAVMEM driver of the STAPI. They could be Decimated | 122 | * by the STAVMEM driver of the STAPI. They could be Decimated |
123 | * Picture Buffers, Intermediate Buffers, as deemed necessary for | 123 | * Picture Buffers, Intermediate Buffers, as deemed necessary for |
124 | * video decoding purposes, for any video decoders on Zeus. | 124 | * video decoding purposes, for any video decoders on Zeus. |
125 | * | 125 | * |
126 | */ | 126 | */ |
127 | { | 127 | { |
128 | .name = "AVMEMPartition0", | 128 | .name = "AVMEMPartition0", |
129 | .start = 0x63580000, | 129 | .start = 0x63580000, |
130 | .end = 0x64180000 - 1, /* 12 MB total */ | 130 | .end = 0x64180000 - 1, /* 12 MB total */ |
131 | .flags = IORESOURCE_IO, | 131 | .flags = IORESOURCE_IO, |
132 | }, | 132 | }, |
133 | /* | 133 | /* |
134 | * | 134 | * |
@@ -141,10 +141,10 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
141 | * | 141 | * |
142 | */ | 142 | */ |
143 | { | 143 | { |
144 | .name = "Docsis", | 144 | .name = "Docsis", |
145 | .start = 0x62000000, | 145 | .start = 0x62000000, |
146 | .end = 0x62700000 - 1, /* 7 MB total */ | 146 | .end = 0x62700000 - 1, /* 7 MB total */ |
147 | .flags = IORESOURCE_IO, | 147 | .flags = IORESOURCE_IO, |
148 | }, | 148 | }, |
149 | /* | 149 | /* |
150 | * | 150 | * |
@@ -157,10 +157,10 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
157 | * | 157 | * |
158 | */ | 158 | */ |
159 | { | 159 | { |
160 | .name = "GraphicsHeap", | 160 | .name = "GraphicsHeap", |
161 | .start = 0x62700000, | 161 | .start = 0x62700000, |
162 | .end = 0x63500000 - 1, /* 14 MB total */ | 162 | .end = 0x63500000 - 1, /* 14 MB total */ |
163 | .flags = IORESOURCE_IO, | 163 | .flags = IORESOURCE_IO, |
164 | }, | 164 | }, |
165 | /* | 165 | /* |
166 | * | 166 | * |
@@ -173,10 +173,10 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
173 | * | 173 | * |
174 | */ | 174 | */ |
175 | { | 175 | { |
176 | .name = "MulticomSHM", | 176 | .name = "MulticomSHM", |
177 | .start = 0x26000000, | 177 | .start = 0x26000000, |
178 | .end = 0x26020000 - 1, | 178 | .end = 0x26020000 - 1, |
179 | .flags = IORESOURCE_MEM, | 179 | .flags = IORESOURCE_MEM, |
180 | }, | 180 | }, |
181 | /* | 181 | /* |
182 | * | 182 | * |
@@ -189,10 +189,10 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
189 | * | 189 | * |
190 | */ | 190 | */ |
191 | { | 191 | { |
192 | .name = "BMM_Buffer", | 192 | .name = "BMM_Buffer", |
193 | .start = 0x00000000, | 193 | .start = 0x00000000, |
194 | .end = 0x00280000 - 1, | 194 | .end = 0x00280000 - 1, |
195 | .flags = IORESOURCE_MEM, | 195 | .flags = IORESOURCE_MEM, |
196 | }, | 196 | }, |
197 | /* | 197 | /* |
198 | * | 198 | * |
@@ -205,10 +205,10 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
205 | * | 205 | * |
206 | */ | 206 | */ |
207 | { | 207 | { |
208 | .name = "DisplayBins0", | 208 | .name = "DisplayBins0", |
209 | .start = 0x00000000, | 209 | .start = 0x00000000, |
210 | .end = 0x00000FFF, /* 4 KB total */ | 210 | .end = 0x00000FFF, /* 4 KB total */ |
211 | .flags = IORESOURCE_MEM, | 211 | .flags = IORESOURCE_MEM, |
212 | }, | 212 | }, |
213 | /* | 213 | /* |
214 | * | 214 | * |
@@ -221,10 +221,10 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
221 | * | 221 | * |
222 | */ | 222 | */ |
223 | { | 223 | { |
224 | .name = "DisplayBins1", | 224 | .name = "DisplayBins1", |
225 | .start = 0x64AD4000, | 225 | .start = 0x64AD4000, |
226 | .end = 0x64AD5000 - 1, /* 4 KB total */ | 226 | .end = 0x64AD5000 - 1, /* 4 KB total */ |
227 | .flags = IORESOURCE_IO, | 227 | .flags = IORESOURCE_IO, |
228 | }, | 228 | }, |
229 | /* | 229 | /* |
230 | * | 230 | * |
@@ -237,11 +237,11 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
237 | * | 237 | * |
238 | */ | 238 | */ |
239 | { | 239 | { |
240 | .name = "ITFS", | 240 | .name = "ITFS", |
241 | .start = 0x64180000, | 241 | .start = 0x64180000, |
242 | /* 815,104 bytes each for 2 ITFS partitions. */ | 242 | /* 815,104 bytes each for 2 ITFS partitions. */ |
243 | .end = 0x6430DFFF, | 243 | .end = 0x6430DFFF, |
244 | .flags = IORESOURCE_IO, | 244 | .flags = IORESOURCE_IO, |
245 | }, | 245 | }, |
246 | /* | 246 | /* |
247 | * | 247 | * |
@@ -254,17 +254,17 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
254 | * | 254 | * |
255 | */ | 255 | */ |
256 | { | 256 | { |
257 | .name = "AvfsDmaMem", | 257 | .name = "AvfsDmaMem", |
258 | .start = 0x6430E000, | 258 | .start = 0x6430E000, |
259 | /* (945K * 8) = (128K *3) 5 playbacks / 3 server */ | 259 | /* (945K * 8) = (128K *3) 5 playbacks / 3 server */ |
260 | .end = 0x64AD0000 - 1, | 260 | .end = 0x64AD0000 - 1, |
261 | .flags = IORESOURCE_IO, | 261 | .flags = IORESOURCE_IO, |
262 | }, | 262 | }, |
263 | { | 263 | { |
264 | .name = "AvfsFileSys", | 264 | .name = "AvfsFileSys", |
265 | .start = 0x64AD0000, | 265 | .start = 0x64AD0000, |
266 | .end = 0x64AD1000 - 1, /* 4K */ | 266 | .end = 0x64AD1000 - 1, /* 4K */ |
267 | .flags = IORESOURCE_IO, | 267 | .flags = IORESOURCE_IO, |
268 | }, | 268 | }, |
269 | /* | 269 | /* |
270 | * | 270 | * |
@@ -277,10 +277,10 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
277 | * | 277 | * |
278 | */ | 278 | */ |
279 | { | 279 | { |
280 | .name = "SmartCardInfo", | 280 | .name = "SmartCardInfo", |
281 | .start = 0x64AD1000, | 281 | .start = 0x64AD1000, |
282 | .end = 0x64AD3800 - 1, | 282 | .end = 0x64AD3800 - 1, |
283 | .flags = IORESOURCE_IO, | 283 | .flags = IORESOURCE_IO, |
284 | }, | 284 | }, |
285 | /* | 285 | /* |
286 | * | 286 | * |
@@ -290,22 +290,22 @@ struct resource dvr_gaia_resources[] __initdata = { | |||
290 | * NP IPC - must be video bank 2 | 290 | * NP IPC - must be video bank 2 |
291 | */ | 291 | */ |
292 | { | 292 | { |
293 | .name = "NP_Reset_Vector", | 293 | .name = "NP_Reset_Vector", |
294 | .start = 0x27c00000, | 294 | .start = 0x27c00000, |
295 | .end = 0x27c01000 - 1, | 295 | .end = 0x27c01000 - 1, |
296 | .flags = IORESOURCE_MEM, | 296 | .flags = IORESOURCE_MEM, |
297 | }, | 297 | }, |
298 | { | 298 | { |
299 | .name = "NP_Image", | 299 | .name = "NP_Image", |
300 | .start = 0x27020000, | 300 | .start = 0x27020000, |
301 | .end = 0x27060000 - 1, | 301 | .end = 0x27060000 - 1, |
302 | .flags = IORESOURCE_MEM, | 302 | .flags = IORESOURCE_MEM, |
303 | }, | 303 | }, |
304 | { | 304 | { |
305 | .name = "NP_IPC", | 305 | .name = "NP_IPC", |
306 | .start = 0x63500000, | 306 | .start = 0x63500000, |
307 | .end = 0x63580000 - 1, | 307 | .end = 0x63580000 - 1, |
308 | .flags = IORESOURCE_IO, | 308 | .flags = IORESOURCE_IO, |
309 | }, | 309 | }, |
310 | /* | 310 | /* |
311 | * Add other resources here | 311 | * Add other resources here |
@@ -323,22 +323,22 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
323 | * | 323 | * |
324 | */ | 324 | */ |
325 | { | 325 | { |
326 | .name = "ST231aImage", /* Delta-Mu 1 image and ram */ | 326 | .name = "ST231aImage", /* Delta-Mu 1 image and ram */ |
327 | .start = 0x24000000, | 327 | .start = 0x24000000, |
328 | .end = 0x241FFFFF, /* 2MiB */ | 328 | .end = 0x241FFFFF, /* 2MiB */ |
329 | .flags = IORESOURCE_MEM, | 329 | .flags = IORESOURCE_MEM, |
330 | }, | 330 | }, |
331 | { | 331 | { |
332 | .name = "ST231aMonitor", /* 8KiB block ST231a monitor */ | 332 | .name = "ST231aMonitor", /* 8KiB block ST231a monitor */ |
333 | .start = 0x24200000, | 333 | .start = 0x24200000, |
334 | .end = 0x24201FFF, | 334 | .end = 0x24201FFF, |
335 | .flags = IORESOURCE_MEM, | 335 | .flags = IORESOURCE_MEM, |
336 | }, | 336 | }, |
337 | { | 337 | { |
338 | .name = "MediaMemory1", | 338 | .name = "MediaMemory1", |
339 | .start = 0x24202000, | 339 | .start = 0x24202000, |
340 | .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */ | 340 | .end = 0x25FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */ |
341 | .flags = IORESOURCE_MEM, | 341 | .flags = IORESOURCE_MEM, |
342 | }, | 342 | }, |
343 | /* | 343 | /* |
344 | * | 344 | * |
@@ -346,22 +346,22 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
346 | * | 346 | * |
347 | */ | 347 | */ |
348 | { | 348 | { |
349 | .name = "ST231bImage", /* Delta-Mu 2 image and ram */ | 349 | .name = "ST231bImage", /* Delta-Mu 2 image and ram */ |
350 | .start = 0x60000000, | 350 | .start = 0x60000000, |
351 | .end = 0x601FFFFF, /* 2MiB */ | 351 | .end = 0x601FFFFF, /* 2MiB */ |
352 | .flags = IORESOURCE_IO, | 352 | .flags = IORESOURCE_IO, |
353 | }, | 353 | }, |
354 | { | 354 | { |
355 | .name = "ST231bMonitor", /* 8KiB block ST231b monitor */ | 355 | .name = "ST231bMonitor", /* 8KiB block ST231b monitor */ |
356 | .start = 0x60200000, | 356 | .start = 0x60200000, |
357 | .end = 0x60201FFF, | 357 | .end = 0x60201FFF, |
358 | .flags = IORESOURCE_IO, | 358 | .flags = IORESOURCE_IO, |
359 | }, | 359 | }, |
360 | { | 360 | { |
361 | .name = "MediaMemory2", | 361 | .name = "MediaMemory2", |
362 | .start = 0x60202000, | 362 | .start = 0x60202000, |
363 | .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */ | 363 | .end = 0x61FFFFFF, /*~29.9MiB (32MiB - (2MiB + 8KiB)) */ |
364 | .flags = IORESOURCE_IO, | 364 | .flags = IORESOURCE_IO, |
365 | }, | 365 | }, |
366 | /* | 366 | /* |
367 | * | 367 | * |
@@ -377,28 +377,28 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
377 | * | 377 | * |
378 | */ | 378 | */ |
379 | { | 379 | { |
380 | .name = "DSP_Image_Buff", | 380 | .name = "DSP_Image_Buff", |
381 | .start = 0x00000000, | 381 | .start = 0x00000000, |
382 | .end = 0x000FFFFF, | 382 | .end = 0x000FFFFF, |
383 | .flags = IORESOURCE_MEM, | 383 | .flags = IORESOURCE_MEM, |
384 | }, | 384 | }, |
385 | { | 385 | { |
386 | .name = "ADSC_CPU_PCM_Buff", | 386 | .name = "ADSC_CPU_PCM_Buff", |
387 | .start = 0x00000000, | 387 | .start = 0x00000000, |
388 | .end = 0x00009FFF, | 388 | .end = 0x00009FFF, |
389 | .flags = IORESOURCE_MEM, | 389 | .flags = IORESOURCE_MEM, |
390 | }, | 390 | }, |
391 | { | 391 | { |
392 | .name = "ADSC_AUX_Buff", | 392 | .name = "ADSC_AUX_Buff", |
393 | .start = 0x00000000, | 393 | .start = 0x00000000, |
394 | .end = 0x00003FFF, | 394 | .end = 0x00003FFF, |
395 | .flags = IORESOURCE_MEM, | 395 | .flags = IORESOURCE_MEM, |
396 | }, | 396 | }, |
397 | { | 397 | { |
398 | .name = "ADSC_Main_Buff", | 398 | .name = "ADSC_Main_Buff", |
399 | .start = 0x00000000, | 399 | .start = 0x00000000, |
400 | .end = 0x00003FFF, | 400 | .end = 0x00003FFF, |
401 | .flags = IORESOURCE_MEM, | 401 | .flags = IORESOURCE_MEM, |
402 | }, | 402 | }, |
403 | /* | 403 | /* |
404 | * | 404 | * |
@@ -409,16 +409,16 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
409 | * Arbitrary Based Buffers: | 409 | * Arbitrary Based Buffers: |
410 | * This memory area is used for allocating buffers for Video decoding | 410 | * This memory area is used for allocating buffers for Video decoding |
411 | * purposes. Allocation/De-allocation within this buffer is managed | 411 | * purposes. Allocation/De-allocation within this buffer is managed |
412 | * by the STAVMEM driver of the STAPI. They could be Decimated | 412 | * by the STAVMEM driver of the STAPI. They could be Decimated |
413 | * Picture Buffers, Intermediate Buffers, as deemed necessary for | 413 | * Picture Buffers, Intermediate Buffers, as deemed necessary for |
414 | * video decoding purposes, for any video decoders on Zeus. | 414 | * video decoding purposes, for any video decoders on Zeus. |
415 | * | 415 | * |
416 | */ | 416 | */ |
417 | { | 417 | { |
418 | .name = "AVMEMPartition0", | 418 | .name = "AVMEMPartition0", |
419 | .start = 0x63580000, | 419 | .start = 0x63580000, |
420 | .end = 0x64180000 - 1, /* 12 MB total */ | 420 | .end = 0x64180000 - 1, /* 12 MB total */ |
421 | .flags = IORESOURCE_IO, | 421 | .flags = IORESOURCE_IO, |
422 | }, | 422 | }, |
423 | /* | 423 | /* |
424 | * | 424 | * |
@@ -431,10 +431,10 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
431 | * | 431 | * |
432 | */ | 432 | */ |
433 | { | 433 | { |
434 | .name = "Docsis", | 434 | .name = "Docsis", |
435 | .start = 0x62000000, | 435 | .start = 0x62000000, |
436 | .end = 0x62700000 - 1, /* 7 MB total */ | 436 | .end = 0x62700000 - 1, /* 7 MB total */ |
437 | .flags = IORESOURCE_IO, | 437 | .flags = IORESOURCE_IO, |
438 | }, | 438 | }, |
439 | /* | 439 | /* |
440 | * | 440 | * |
@@ -447,10 +447,10 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
447 | * | 447 | * |
448 | */ | 448 | */ |
449 | { | 449 | { |
450 | .name = "GraphicsHeap", | 450 | .name = "GraphicsHeap", |
451 | .start = 0x62700000, | 451 | .start = 0x62700000, |
452 | .end = 0x63500000 - 1, /* 14 MB total */ | 452 | .end = 0x63500000 - 1, /* 14 MB total */ |
453 | .flags = IORESOURCE_IO, | 453 | .flags = IORESOURCE_IO, |
454 | }, | 454 | }, |
455 | /* | 455 | /* |
456 | * | 456 | * |
@@ -463,10 +463,10 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
463 | * | 463 | * |
464 | */ | 464 | */ |
465 | { | 465 | { |
466 | .name = "MulticomSHM", | 466 | .name = "MulticomSHM", |
467 | .start = 0x26000000, | 467 | .start = 0x26000000, |
468 | .end = 0x26020000 - 1, | 468 | .end = 0x26020000 - 1, |
469 | .flags = IORESOURCE_MEM, | 469 | .flags = IORESOURCE_MEM, |
470 | }, | 470 | }, |
471 | /* | 471 | /* |
472 | * | 472 | * |
@@ -479,10 +479,10 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
479 | * | 479 | * |
480 | */ | 480 | */ |
481 | { | 481 | { |
482 | .name = "BMM_Buffer", | 482 | .name = "BMM_Buffer", |
483 | .start = 0x00000000, | 483 | .start = 0x00000000, |
484 | .end = 0x000AA000 - 1, | 484 | .end = 0x000AA000 - 1, |
485 | .flags = IORESOURCE_MEM, | 485 | .flags = IORESOURCE_MEM, |
486 | }, | 486 | }, |
487 | /* | 487 | /* |
488 | * | 488 | * |
@@ -495,10 +495,10 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
495 | * | 495 | * |
496 | */ | 496 | */ |
497 | { | 497 | { |
498 | .name = "DisplayBins0", | 498 | .name = "DisplayBins0", |
499 | .start = 0x00000000, | 499 | .start = 0x00000000, |
500 | .end = 0x00000FFF, /* 4 KB total */ | 500 | .end = 0x00000FFF, /* 4 KB total */ |
501 | .flags = IORESOURCE_MEM, | 501 | .flags = IORESOURCE_MEM, |
502 | }, | 502 | }, |
503 | /* | 503 | /* |
504 | * | 504 | * |
@@ -511,10 +511,10 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
511 | * | 511 | * |
512 | */ | 512 | */ |
513 | { | 513 | { |
514 | .name = "DisplayBins1", | 514 | .name = "DisplayBins1", |
515 | .start = 0x64AD4000, | 515 | .start = 0x64AD4000, |
516 | .end = 0x64AD5000 - 1, /* 4 KB total */ | 516 | .end = 0x64AD5000 - 1, /* 4 KB total */ |
517 | .flags = IORESOURCE_IO, | 517 | .flags = IORESOURCE_IO, |
518 | }, | 518 | }, |
519 | /* | 519 | /* |
520 | * | 520 | * |
@@ -523,10 +523,10 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
523 | * | 523 | * |
524 | */ | 524 | */ |
525 | { | 525 | { |
526 | .name = "AvfsDmaMem", | 526 | .name = "AvfsDmaMem", |
527 | .start = 0x6430E000, | 527 | .start = 0x6430E000, |
528 | .end = 0x645D2C00 - 1, /* 945K * 3 for playback */ | 528 | .end = 0x645D2C00 - 1, /* 945K * 3 for playback */ |
529 | .flags = IORESOURCE_IO, | 529 | .flags = IORESOURCE_IO, |
530 | }, | 530 | }, |
531 | /* | 531 | /* |
532 | * | 532 | * |
@@ -539,10 +539,10 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
539 | * | 539 | * |
540 | */ | 540 | */ |
541 | { | 541 | { |
542 | .name = "DiagPersistentMemory", | 542 | .name = "DiagPersistentMemory", |
543 | .start = 0x00000000, | 543 | .start = 0x00000000, |
544 | .end = 0x10000 - 1, | 544 | .end = 0x10000 - 1, |
545 | .flags = IORESOURCE_MEM, | 545 | .flags = IORESOURCE_MEM, |
546 | }, | 546 | }, |
547 | /* | 547 | /* |
548 | * | 548 | * |
@@ -555,10 +555,10 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
555 | * | 555 | * |
556 | */ | 556 | */ |
557 | { | 557 | { |
558 | .name = "SmartCardInfo", | 558 | .name = "SmartCardInfo", |
559 | .start = 0x64AD1000, | 559 | .start = 0x64AD1000, |
560 | .end = 0x64AD3800 - 1, | 560 | .end = 0x64AD3800 - 1, |
561 | .flags = IORESOURCE_IO, | 561 | .flags = IORESOURCE_IO, |
562 | }, | 562 | }, |
563 | /* | 563 | /* |
564 | * | 564 | * |
@@ -568,22 +568,22 @@ struct resource non_dvr_gaia_resources[] __initdata = { | |||
568 | * NP IPC - must be video bank 2 | 568 | * NP IPC - must be video bank 2 |
569 | */ | 569 | */ |
570 | { | 570 | { |
571 | .name = "NP_Reset_Vector", | 571 | .name = "NP_Reset_Vector", |
572 | .start = 0x27c00000, | 572 | .start = 0x27c00000, |
573 | .end = 0x27c01000 - 1, | 573 | .end = 0x27c01000 - 1, |
574 | .flags = IORESOURCE_MEM, | 574 | .flags = IORESOURCE_MEM, |
575 | }, | 575 | }, |
576 | { | 576 | { |
577 | .name = "NP_Image", | 577 | .name = "NP_Image", |
578 | .start = 0x27020000, | 578 | .start = 0x27020000, |
579 | .end = 0x27060000 - 1, | 579 | .end = 0x27060000 - 1, |
580 | .flags = IORESOURCE_MEM, | 580 | .flags = IORESOURCE_MEM, |
581 | }, | 581 | }, |
582 | { | 582 | { |
583 | .name = "NP_IPC", | 583 | .name = "NP_IPC", |
584 | .start = 0x63500000, | 584 | .start = 0x63500000, |
585 | .end = 0x63580000 - 1, | 585 | .end = 0x63580000 - 1, |
586 | .flags = IORESOURCE_IO, | 586 | .flags = IORESOURCE_IO, |
587 | }, | 587 | }, |
588 | { }, | 588 | { }, |
589 | }; | 589 | }; |
diff --git a/arch/mips/powertv/asic/prealloc-zeus.c b/arch/mips/powertv/asic/prealloc-zeus.c index 96480a2395c0..6e76f09c68d6 100644 --- a/arch/mips/powertv/asic/prealloc-zeus.c +++ b/arch/mips/powertv/asic/prealloc-zeus.c | |||
@@ -17,8 +17,8 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | * | 19 | * |
20 | * Author: Ken Eppinett | 20 | * Author: Ken Eppinett |
21 | * David Schleef <ds@schleef.org> | 21 | * David Schleef <ds@schleef.org> |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
@@ -78,7 +78,7 @@ struct resource dvr_zeus_resources[] __initdata = | |||
78 | * | 78 | * |
79 | * This memory area is used for allocating buffers for Video decoding | 79 | * This memory area is used for allocating buffers for Video decoding |
80 | * purposes. Allocation/De-allocation within this buffer is managed | 80 | * purposes. Allocation/De-allocation within this buffer is managed |
81 | * by the STAVMEM driver of the STAPI. They could be Decimated | 81 | * by the STAVMEM driver of the STAPI. They could be Decimated |
82 | * Picture Buffers, Intermediate Buffers, as deemed necessary for | 82 | * Picture Buffers, Intermediate Buffers, as deemed necessary for |
83 | * video decoding purposes, for any video decoders on Zeus. | 83 | * video decoding purposes, for any video decoders on Zeus. |
84 | */ | 84 | */ |
@@ -175,7 +175,7 @@ struct resource dvr_zeus_resources[] __initdata = | |||
175 | * End of Resource marker | 175 | * End of Resource marker |
176 | */ | 176 | */ |
177 | { | 177 | { |
178 | .flags = 0, | 178 | .flags = 0, |
179 | }, | 179 | }, |
180 | }; | 180 | }; |
181 | 181 | ||
@@ -299,6 +299,6 @@ struct resource non_dvr_zeus_resources[] __initdata = | |||
299 | * End of Resource marker | 299 | * End of Resource marker |
300 | */ | 300 | */ |
301 | { | 301 | { |
302 | .flags = 0, | 302 | .flags = 0, |
303 | }, | 303 | }, |
304 | }; | 304 | }; |
diff --git a/arch/mips/powertv/init.c b/arch/mips/powertv/init.c index c6979353980b..5bd9d8f468cc 100644 --- a/arch/mips/powertv/init.c +++ b/arch/mips/powertv/init.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc. | 2 | * Copyright (C) 1999, 2000, 2004, 2005 MIPS Technologies, Inc. |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * Authors: Carsten Langgaard <carstenl@mips.com> | 4 | * Authors: Carsten Langgaard <carstenl@mips.com> |
5 | * Maciej W. Rozycki <macro@mips.com> | 5 | * Maciej W. Rozycki <macro@mips.com> |
diff --git a/arch/mips/powertv/ioremap.c b/arch/mips/powertv/ioremap.c index a77c6f62fe23..d060478aab03 100644 --- a/arch/mips/powertv/ioremap.c +++ b/arch/mips/powertv/ioremap.c | |||
@@ -19,9 +19,9 @@ | |||
19 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
21 | * | 21 | * |
22 | * Author: David VomLehn <dvomlehn@cisco.com> | 22 | * Author: David VomLehn <dvomlehn@cisco.com> |
23 | * | 23 | * |
24 | * Description: Defines the platform resources for the SA settop. | 24 | * Description: Defines the platform resources for the SA settop. |
25 | * | 25 | * |
26 | * NOTE: The bootloader allocates persistent memory at an address which is | 26 | * NOTE: The bootloader allocates persistent memory at an address which is |
27 | * 16 MiB below the end of the highest address in KSEG0. All fixed | 27 | * 16 MiB below the end of the highest address in KSEG0. All fixed |
diff --git a/arch/mips/powertv/memory.c b/arch/mips/powertv/memory.c index fb3d29660c42..6e5f1bdc59b5 100644 --- a/arch/mips/powertv/memory.c +++ b/arch/mips/powertv/memory.c | |||
@@ -60,7 +60,7 @@ unsigned long ptv_memsize; | |||
60 | * struct low_mem_reserved - Items in low memory that are reserved | 60 | * struct low_mem_reserved - Items in low memory that are reserved |
61 | * @start: Physical address of item | 61 | * @start: Physical address of item |
62 | * @size: Size, in bytes, of this item | 62 | * @size: Size, in bytes, of this item |
63 | * @is_aliased: True if this is RAM aliased from another location. If false, | 63 | * @is_aliased: True if this is RAM aliased from another location. If false, |
64 | * it is something other than aliased RAM and the RAM in the | 64 | * it is something other than aliased RAM and the RAM in the |
65 | * unaliased address is still visible outside of low memory. | 65 | * unaliased address is still visible outside of low memory. |
66 | */ | 66 | */ |
diff --git a/arch/mips/powertv/powertv-usb.c b/arch/mips/powertv/powertv-usb.c index b0e2afa89395..d845eace58e9 100644 --- a/arch/mips/powertv/powertv-usb.c +++ b/arch/mips/powertv/powertv-usb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * powertv-usb.c | 2 | * powertv-usb.c |
3 | * | 3 | * |
4 | * Description: ASIC-specific USB device setup and shutdown | 4 | * Description: ASIC-specific USB device setup and shutdown |
5 | * | 5 | * |
6 | * Copyright (C) 2005-2009 Scientific-Atlanta, Inc. | 6 | * Copyright (C) 2005-2009 Scientific-Atlanta, Inc. |
7 | * Copyright (C) 2009 Cisco Systems, Inc. | 7 | * Copyright (C) 2009 Cisco Systems, Inc. |
@@ -20,8 +20,8 @@ | |||
20 | * along with this program; if not, write to the Free Software | 20 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 21 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
22 | * | 22 | * |
23 | * Author: Ken Eppinett | 23 | * Author: Ken Eppinett |
24 | * David Schleef <ds@schleef.org> | 24 | * David Schleef <ds@schleef.org> |
25 | * | 25 | * |
26 | * NOTE: The bootloader allocates persistent memory at an address which is | 26 | * NOTE: The bootloader allocates persistent memory at an address which is |
27 | * 16 MiB below the end of the highest address in KSEG0. All fixed | 27 | * 16 MiB below the end of the highest address in KSEG0. All fixed |
@@ -70,15 +70,15 @@ | |||
70 | #define MCC2_GMII_RX2_CLOCK_SELECT (1 << 16) | 70 | #define MCC2_GMII_RX2_CLOCK_SELECT (1 << 16) |
71 | 71 | ||
72 | #define ETHER_CLK_CONFIG (MCC2_GMII_GCLK_TO_PAD | \ | 72 | #define ETHER_CLK_CONFIG (MCC2_GMII_GCLK_TO_PAD | \ |
73 | MCC2_ETHER125_0_CLOCK_SELECT | \ | 73 | MCC2_ETHER125_0_CLOCK_SELECT | \ |
74 | MCC2_RMII_0_CLOCK_SELECT | \ | 74 | MCC2_RMII_0_CLOCK_SELECT | \ |
75 | MCC2_GMII_TX0_CLOCK_SELECT | \ | 75 | MCC2_GMII_TX0_CLOCK_SELECT | \ |
76 | MCC2_GMII_RX0_CLOCK_SELECT | \ | 76 | MCC2_GMII_RX0_CLOCK_SELECT | \ |
77 | MCC2_ETHER125_1_CLOCK_SELECT | \ | 77 | MCC2_ETHER125_1_CLOCK_SELECT | \ |
78 | MCC2_RMII_1_CLOCK_SELECT | \ | 78 | MCC2_RMII_1_CLOCK_SELECT | \ |
79 | MCC2_GMII_TX1_CLOCK_SELECT | \ | 79 | MCC2_GMII_TX1_CLOCK_SELECT | \ |
80 | MCC2_GMII_RX1_CLOCK_SELECT | \ | 80 | MCC2_GMII_RX1_CLOCK_SELECT | \ |
81 | MCC2_ETHER125_2_CLOCK_SELECT | \ | 81 | MCC2_ETHER125_2_CLOCK_SELECT | \ |
82 | MCC2_RMII_2_CLOCK_SELECT | \ | 82 | MCC2_RMII_2_CLOCK_SELECT | \ |
83 | MCC2_GMII_TX2_CLOCK_SELECT | \ | 83 | MCC2_GMII_TX2_CLOCK_SELECT | \ |
84 | MCC2_GMII_RX2_CLOCK_SELECT) | 84 | MCC2_GMII_RX2_CLOCK_SELECT) |
@@ -98,9 +98,9 @@ | |||
98 | 98 | ||
99 | #define QAM_FS_DISABLE_DIVIDE_BY_3 (1 << 5) | 99 | #define QAM_FS_DISABLE_DIVIDE_BY_3 (1 << 5) |
100 | #define QAM_FS_ENABLE_PROGRAM (1 << 4) | 100 | #define QAM_FS_ENABLE_PROGRAM (1 << 4) |
101 | #define QAM_FS_ENABLE_OUTPUT (1 << 3) | 101 | #define QAM_FS_ENABLE_OUTPUT (1 << 3) |
102 | #define QAM_FS_SELECT_TEST_BYPASS (1 << 2) | 102 | #define QAM_FS_SELECT_TEST_BYPASS (1 << 2) |
103 | #define QAM_FS_DISABLE_DIGITAL_STANDBY (1 << 1) | 103 | #define QAM_FS_DISABLE_DIGITAL_STANDBY (1 << 1) |
104 | #define QAM_FS_CHOOSE_FS (1 << 0) | 104 | #define QAM_FS_CHOOSE_FS (1 << 0) |
105 | 105 | ||
106 | /* Definitions for fs432x4a_ctl register */ | 106 | /* Definitions for fs432x4a_ctl register */ |
@@ -142,14 +142,14 @@ | |||
142 | static struct resource ehci_resources[] = { | 142 | static struct resource ehci_resources[] = { |
143 | { | 143 | { |
144 | .parent = &asic_resource, | 144 | .parent = &asic_resource, |
145 | .start = 0, | 145 | .start = 0, |
146 | .end = 0xff, | 146 | .end = 0xff, |
147 | .flags = IORESOURCE_MEM, | 147 | .flags = IORESOURCE_MEM, |
148 | }, | 148 | }, |
149 | { | 149 | { |
150 | .start = irq_usbehci, | 150 | .start = irq_usbehci, |
151 | .end = irq_usbehci, | 151 | .end = irq_usbehci, |
152 | .flags = IORESOURCE_IRQ, | 152 | .flags = IORESOURCE_IRQ, |
153 | }, | 153 | }, |
154 | }; | 154 | }; |
155 | 155 | ||
@@ -169,14 +169,14 @@ static struct platform_device ehci_device = { | |||
169 | static struct resource ohci_resources[] = { | 169 | static struct resource ohci_resources[] = { |
170 | { | 170 | { |
171 | .parent = &asic_resource, | 171 | .parent = &asic_resource, |
172 | .start = 0, | 172 | .start = 0, |
173 | .end = 0xff, | 173 | .end = 0xff, |
174 | .flags = IORESOURCE_MEM, | 174 | .flags = IORESOURCE_MEM, |
175 | }, | 175 | }, |
176 | { | 176 | { |
177 | .start = irq_usbohci, | 177 | .start = irq_usbohci, |
178 | .end = irq_usbohci, | 178 | .end = irq_usbohci, |
179 | .flags = IORESOURCE_IRQ, | 179 | .flags = IORESOURCE_IRQ, |
180 | }, | 180 | }, |
181 | }; | 181 | }; |
182 | 182 | ||
@@ -207,9 +207,9 @@ static DEFINE_SPINLOCK(usb_regs_lock); | |||
207 | * | 207 | * |
208 | * QAM frequency selection code, which affects the frequency at which USB | 208 | * QAM frequency selection code, which affects the frequency at which USB |
209 | * runs. The frequency is calculated as: | 209 | * runs. The frequency is calculated as: |
210 | * 2^15 * ndiv * Fin | 210 | * 2^15 * ndiv * Fin |
211 | * Fout = ------------------------------------------------------------ | 211 | * Fout = ------------------------------------------------------------ |
212 | * (sdiv * (ipe * (1 + md/32) - (ipe - 2^15)*(1 + (md + 1)/32))) | 212 | * (sdiv * (ipe * (1 + md/32) - (ipe - 2^15)*(1 + (md + 1)/32))) |
213 | * where: | 213 | * where: |
214 | * Fin 54 MHz | 214 | * Fin 54 MHz |
215 | * ndiv QAM_FS_NSDIV_54MHZ ? 8 : 16 | 215 | * ndiv QAM_FS_NSDIV_54MHZ ? 8 : 16 |
diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c index 716e9a12f0e7..3af00b2a26ee 100644 --- a/arch/mips/rb532/devices.c +++ b/arch/mips/rb532/devices.c | |||
@@ -215,9 +215,9 @@ static struct resource rb532_wdt_res[] = { | |||
215 | }; | 215 | }; |
216 | 216 | ||
217 | static struct platform_device rb532_wdt = { | 217 | static struct platform_device rb532_wdt = { |
218 | .name = "rc32434_wdt", | 218 | .name = "rc32434_wdt", |
219 | .id = -1, | 219 | .id = -1, |
220 | .resource = rb532_wdt_res, | 220 | .resource = rb532_wdt_res, |
221 | .num_resources = ARRAY_SIZE(rb532_wdt_res), | 221 | .num_resources = ARRAY_SIZE(rb532_wdt_res), |
222 | }; | 222 | }; |
223 | 223 | ||
@@ -235,8 +235,8 @@ static struct plat_serial8250_port rb532_uart_res[] = { | |||
235 | }; | 235 | }; |
236 | 236 | ||
237 | static struct platform_device rb532_uart = { | 237 | static struct platform_device rb532_uart = { |
238 | .name = "serial8250", | 238 | .name = "serial8250", |
239 | .id = PLAT8250_DEV_PLATFORM, | 239 | .id = PLAT8250_DEV_PLATFORM, |
240 | .dev.platform_data = &rb532_uart_res, | 240 | .dev.platform_data = &rb532_uart_res, |
241 | }; | 241 | }; |
242 | 242 | ||
@@ -273,7 +273,7 @@ static void __init parse_mac_addr(char *macstr) | |||
273 | 273 | ||
274 | 274 | ||
275 | /* NAND definitions */ | 275 | /* NAND definitions */ |
276 | #define NAND_CHIP_DELAY 25 | 276 | #define NAND_CHIP_DELAY 25 |
277 | 277 | ||
278 | static void __init rb532_nand_setup(void) | 278 | static void __init rb532_nand_setup(void) |
279 | { | 279 | { |
diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c index 6ec41df3cb99..a18007613c30 100644 --- a/arch/mips/rb532/gpio.c +++ b/arch/mips/rb532/gpio.c | |||
@@ -44,10 +44,10 @@ struct rb532_gpio_chip { | |||
44 | 44 | ||
45 | static struct resource rb532_gpio_reg0_res[] = { | 45 | static struct resource rb532_gpio_reg0_res[] = { |
46 | { | 46 | { |
47 | .name = "gpio_reg0", | 47 | .name = "gpio_reg0", |
48 | .start = REGBASE + GPIOBASE, | 48 | .start = REGBASE + GPIOBASE, |
49 | .end = REGBASE + GPIOBASE + sizeof(struct rb532_gpio_reg) - 1, | 49 | .end = REGBASE + GPIOBASE + sizeof(struct rb532_gpio_reg) - 1, |
50 | .flags = IORESOURCE_MEM, | 50 | .flags = IORESOURCE_MEM, |
51 | } | 51 | } |
52 | }; | 52 | }; |
53 | 53 | ||
diff --git a/arch/mips/rb532/irq.c b/arch/mips/rb532/irq.c index f298430cff07..3a431e802bbc 100644 --- a/arch/mips/rb532/irq.c +++ b/arch/mips/rb532/irq.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * | 21 | * |
22 | * Copyright 2002 MontaVista Software Inc. | 22 | * Copyright 2002 MontaVista Software Inc. |
23 | * Author: MontaVista Software, Inc. | 23 | * Author: MontaVista Software, Inc. |
24 | * stevel@mvista.com or source@mvista.com | 24 | * stevel@mvista.com or source@mvista.com |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/bitops.h> | 27 | #include <linux/bitops.h> |
@@ -51,7 +51,7 @@ struct intr_group { | |||
51 | volatile u32 *base_addr; | 51 | volatile u32 *base_addr; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | #define RC32434_NR_IRQS (GROUP4_IRQ_BASE + 32) | 54 | #define RC32434_NR_IRQS (GROUP4_IRQ_BASE + 32) |
55 | 55 | ||
56 | #if (NR_IRQS < RC32434_NR_IRQS) | 56 | #if (NR_IRQS < RC32434_NR_IRQS) |
57 | #error Too little irqs defined. Did you override <asm/irq.h> ? | 57 | #error Too little irqs defined. Did you override <asm/irq.h> ? |
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c index 4a6057b35b9d..a0a79222ce0b 100644 --- a/arch/mips/sgi-ip22/ip22-eisa.c +++ b/arch/mips/sgi-ip22/ip22-eisa.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Basic EISA bus support for the SGI Indigo-2. | 2 | * Basic EISA bus support for the SGI Indigo-2. |
3 | * | 3 | * |
4 | * (C) 2002 Pascal Dameme <netinet@freesurf.fr> | 4 | * (C) 2002 Pascal Dameme <netinet@freesurf.fr> |
5 | * and Marc Zyngier <mzyngier@freesurf.fr> | 5 | * and Marc Zyngier <mzyngier@freesurf.fr> |
6 | * | 6 | * |
7 | * This code is released under both the GPL version 2 and BSD | 7 | * This code is released under both the GPL version 2 and BSD |
8 | * licenses. Either license may be used. | 8 | * licenses. Either license may be used. |
@@ -40,13 +40,13 @@ | |||
40 | 40 | ||
41 | /* I2 has four EISA slots. */ | 41 | /* I2 has four EISA slots. */ |
42 | #define IP22_EISA_MAX_SLOTS 4 | 42 | #define IP22_EISA_MAX_SLOTS 4 |
43 | #define EISA_MAX_IRQ 16 | 43 | #define EISA_MAX_IRQ 16 |
44 | 44 | ||
45 | #define EIU_MODE_REG 0x0001ffc0 | 45 | #define EIU_MODE_REG 0x0001ffc0 |
46 | #define EIU_STAT_REG 0x0001ffc4 | 46 | #define EIU_STAT_REG 0x0001ffc4 |
47 | #define EIU_PREMPT_REG 0x0001ffc8 | 47 | #define EIU_PREMPT_REG 0x0001ffc8 |
48 | #define EIU_QUIET_REG 0x0001ffcc | 48 | #define EIU_QUIET_REG 0x0001ffcc |
49 | #define EIU_INTRPT_ACK 0x00010004 | 49 | #define EIU_INTRPT_ACK 0x00010004 |
50 | 50 | ||
51 | static char __init *decode_eisa_sig(unsigned long addr) | 51 | static char __init *decode_eisa_sig(unsigned long addr) |
52 | { | 52 | { |
diff --git a/arch/mips/sgi-ip22/ip22-gio.c b/arch/mips/sgi-ip22/ip22-gio.c index f5ebc092aed5..ab0e379dc7e0 100644 --- a/arch/mips/sgi-ip22/ip22-gio.c +++ b/arch/mips/sgi-ip22/ip22-gio.c | |||
@@ -15,7 +15,7 @@ static struct bus_type gio_bus_type; | |||
15 | 15 | ||
16 | static struct { | 16 | static struct { |
17 | const char *name; | 17 | const char *name; |
18 | __u8 id; | 18 | __u8 id; |
19 | } gio_name_table[] = { | 19 | } gio_name_table[] = { |
20 | { .name = "SGI Impact", .id = 0x10 }, | 20 | { .name = "SGI Impact", .id = 0x10 }, |
21 | { .name = "Phobos G160", .id = 0x35 }, | 21 | { .name = "Phobos G160", .id = 0x35 }, |
@@ -376,15 +376,15 @@ static void ip22_check_gio(int slotno, unsigned long addr) | |||
376 | } | 376 | } |
377 | 377 | ||
378 | static struct bus_type gio_bus_type = { | 378 | static struct bus_type gio_bus_type = { |
379 | .name = "gio", | 379 | .name = "gio", |
380 | .dev_attrs = gio_dev_attrs, | 380 | .dev_attrs = gio_dev_attrs, |
381 | .match = gio_bus_match, | 381 | .match = gio_bus_match, |
382 | .probe = gio_device_probe, | 382 | .probe = gio_device_probe, |
383 | .remove = gio_device_remove, | 383 | .remove = gio_device_remove, |
384 | .suspend = gio_device_suspend, | 384 | .suspend = gio_device_suspend, |
385 | .resume = gio_device_resume, | 385 | .resume = gio_device_resume, |
386 | .shutdown = gio_device_shutdown, | 386 | .shutdown = gio_device_shutdown, |
387 | .uevent = gio_device_uevent, | 387 | .uevent = gio_device_uevent, |
388 | }; | 388 | }; |
389 | 389 | ||
390 | static struct resource gio_bus_resource = { | 390 | static struct resource gio_bus_resource = { |
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c index 3f2b7633f946..3db64d51798d 100644 --- a/arch/mips/sgi-ip22/ip22-int.c +++ b/arch/mips/sgi-ip22/ip22-int.c | |||
@@ -1,12 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * ip22-int.c: Routines for generic manipulation of the INT[23] ASIC | 2 | * ip22-int.c: Routines for generic manipulation of the INT[23] ASIC |
3 | * found on INDY and Indigo2 workstations. | 3 | * found on INDY and Indigo2 workstations. |
4 | * | 4 | * |
5 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) | 5 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) |
6 | * Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org) | 6 | * Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org) |
7 | * Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu) | 7 | * Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu) |
8 | * - Indigo2 changes | 8 | * - Indigo2 changes |
9 | * - Interrupt handling fixes | 9 | * - Interrupt handling fixes |
10 | * Copyright (C) 2001, 2003 Ladislav Michl (ladis@linux-mips.org) | 10 | * Copyright (C) 2001, 2003 Ladislav Michl (ladis@linux-mips.org) |
11 | */ | 11 | */ |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
@@ -195,24 +195,24 @@ extern void indy_8254timer_irq(void); | |||
195 | * at all) like: | 195 | * at all) like: |
196 | * | 196 | * |
197 | * MIPS IRQ Source | 197 | * MIPS IRQ Source |
198 | * -------- ------ | 198 | * -------- ------ |
199 | * 0 Software (ignored) | 199 | * 0 Software (ignored) |
200 | * 1 Software (ignored) | 200 | * 1 Software (ignored) |
201 | * 2 Local IRQ level zero | 201 | * 2 Local IRQ level zero |
202 | * 3 Local IRQ level one | 202 | * 3 Local IRQ level one |
203 | * 4 8254 Timer zero | 203 | * 4 8254 Timer zero |
204 | * 5 8254 Timer one | 204 | * 5 8254 Timer one |
205 | * 6 Bus Error | 205 | * 6 Bus Error |
206 | * 7 R4k timer (what we use) | 206 | * 7 R4k timer (what we use) |
207 | * | 207 | * |
208 | * We handle the IRQ according to _our_ priority which is: | 208 | * We handle the IRQ according to _our_ priority which is: |
209 | * | 209 | * |
210 | * Highest ---- R4k Timer | 210 | * Highest ---- R4k Timer |
211 | * Local IRQ zero | 211 | * Local IRQ zero |
212 | * Local IRQ one | 212 | * Local IRQ one |
213 | * Bus Error | 213 | * Bus Error |
214 | * 8254 Timer zero | 214 | * 8254 Timer zero |
215 | * Lowest ---- 8254 Timer one | 215 | * Lowest ---- 8254 Timer one |
216 | * | 216 | * |
217 | * then we just return, if multiple IRQs are pending then we will just take | 217 | * then we just return, if multiple IRQs are pending then we will just take |
218 | * another exception, big deal. | 218 | * another exception, big deal. |
diff --git a/arch/mips/sgi-ip22/ip22-mc.c b/arch/mips/sgi-ip22/ip22-mc.c index 75ada8a9713b..7cec0a4e527d 100644 --- a/arch/mips/sgi-ip22/ip22-mc.c +++ b/arch/mips/sgi-ip22/ip22-mc.c | |||
@@ -121,22 +121,22 @@ void __init sgimc_init(void) | |||
121 | */ | 121 | */ |
122 | 122 | ||
123 | /* Step 0: Make sure we turn off the watchdog in case it's | 123 | /* Step 0: Make sure we turn off the watchdog in case it's |
124 | * still running (which might be the case after a | 124 | * still running (which might be the case after a |
125 | * soft reboot). | 125 | * soft reboot). |
126 | */ | 126 | */ |
127 | tmp = sgimc->cpuctrl0; | 127 | tmp = sgimc->cpuctrl0; |
128 | tmp &= ~SGIMC_CCTRL0_WDOG; | 128 | tmp &= ~SGIMC_CCTRL0_WDOG; |
129 | sgimc->cpuctrl0 = tmp; | 129 | sgimc->cpuctrl0 = tmp; |
130 | 130 | ||
131 | /* Step 1: The CPU/GIO error status registers will not latch | 131 | /* Step 1: The CPU/GIO error status registers will not latch |
132 | * up a new error status until the register has been | 132 | * up a new error status until the register has been |
133 | * cleared by the cpu. These status registers are | 133 | * cleared by the cpu. These status registers are |
134 | * cleared by writing any value to them. | 134 | * cleared by writing any value to them. |
135 | */ | 135 | */ |
136 | sgimc->cstat = sgimc->gstat = 0; | 136 | sgimc->cstat = sgimc->gstat = 0; |
137 | 137 | ||
138 | /* Step 2: Enable all parity checking in cpu control register | 138 | /* Step 2: Enable all parity checking in cpu control register |
139 | * zero. | 139 | * zero. |
140 | */ | 140 | */ |
141 | /* don't touch parity settings for IP28 */ | 141 | /* don't touch parity settings for IP28 */ |
142 | tmp = sgimc->cpuctrl0; | 142 | tmp = sgimc->cpuctrl0; |
@@ -147,7 +147,7 @@ void __init sgimc_init(void) | |||
147 | sgimc->cpuctrl0 = tmp; | 147 | sgimc->cpuctrl0 = tmp; |
148 | 148 | ||
149 | /* Step 3: Setup the MC write buffer depth, this is controlled | 149 | /* Step 3: Setup the MC write buffer depth, this is controlled |
150 | * in cpu control register 1 in the lower 4 bits. | 150 | * in cpu control register 1 in the lower 4 bits. |
151 | */ | 151 | */ |
152 | tmp = sgimc->cpuctrl1; | 152 | tmp = sgimc->cpuctrl1; |
153 | tmp &= ~0xf; | 153 | tmp &= ~0xf; |
@@ -155,26 +155,26 @@ void __init sgimc_init(void) | |||
155 | sgimc->cpuctrl1 = tmp; | 155 | sgimc->cpuctrl1 = tmp; |
156 | 156 | ||
157 | /* Step 4: Initialize the RPSS divider register to run as fast | 157 | /* Step 4: Initialize the RPSS divider register to run as fast |
158 | * as it can correctly operate. The register is laid | 158 | * as it can correctly operate. The register is laid |
159 | * out as follows: | 159 | * out as follows: |
160 | * | 160 | * |
161 | * ---------------------------------------- | 161 | * ---------------------------------------- |
162 | * | RESERVED | INCREMENT | DIVIDER | | 162 | * | RESERVED | INCREMENT | DIVIDER | |
163 | * ---------------------------------------- | 163 | * ---------------------------------------- |
164 | * 31 16 15 8 7 0 | 164 | * 31 16 15 8 7 0 |
165 | * | 165 | * |
166 | * DIVIDER determines how often a 'tick' happens, | 166 | * DIVIDER determines how often a 'tick' happens, |
167 | * INCREMENT determines by how the RPSS increment | 167 | * INCREMENT determines by how the RPSS increment |
168 | * registers value increases at each 'tick'. Thus, | 168 | * registers value increases at each 'tick'. Thus, |
169 | * for IP22 we get INCREMENT=1, DIVIDER=1 == 0x101 | 169 | * for IP22 we get INCREMENT=1, DIVIDER=1 == 0x101 |
170 | */ | 170 | */ |
171 | sgimc->divider = 0x101; | 171 | sgimc->divider = 0x101; |
172 | 172 | ||
173 | /* Step 5: Initialize GIO64 arbitrator configuration register. | 173 | /* Step 5: Initialize GIO64 arbitrator configuration register. |
174 | * | 174 | * |
175 | * NOTE: HPC init code in sgihpc_init() must run before us because | 175 | * NOTE: HPC init code in sgihpc_init() must run before us because |
176 | * we need to know Guiness vs. FullHouse and the board | 176 | * we need to know Guiness vs. FullHouse and the board |
177 | * revision on this machine. You have been warned. | 177 | * revision on this machine. You have been warned. |
178 | */ | 178 | */ |
179 | 179 | ||
180 | /* First the basic invariants across all GIO64 implementations. */ | 180 | /* First the basic invariants across all GIO64 implementations. */ |
@@ -187,18 +187,18 @@ void __init sgimc_init(void) | |||
187 | if (SGIOC_SYSID_BOARDREV(sgioc->sysid) < 2) { | 187 | if (SGIOC_SYSID_BOARDREV(sgioc->sysid) < 2) { |
188 | tmp |= SGIMC_GIOPAR_HPC264; /* 2nd HPC at 64bits */ | 188 | tmp |= SGIMC_GIOPAR_HPC264; /* 2nd HPC at 64bits */ |
189 | tmp |= SGIMC_GIOPAR_PLINEEXP0; /* exp0 pipelines */ | 189 | tmp |= SGIMC_GIOPAR_PLINEEXP0; /* exp0 pipelines */ |
190 | tmp |= SGIMC_GIOPAR_MASTEREXP1; /* exp1 masters */ | 190 | tmp |= SGIMC_GIOPAR_MASTEREXP1; /* exp1 masters */ |
191 | tmp |= SGIMC_GIOPAR_RTIMEEXP0; /* exp0 is realtime */ | 191 | tmp |= SGIMC_GIOPAR_RTIMEEXP0; /* exp0 is realtime */ |
192 | } else { | 192 | } else { |
193 | tmp |= SGIMC_GIOPAR_HPC264; /* 2nd HPC 64bits */ | 193 | tmp |= SGIMC_GIOPAR_HPC264; /* 2nd HPC 64bits */ |
194 | tmp |= SGIMC_GIOPAR_PLINEEXP0; /* exp[01] pipelined */ | 194 | tmp |= SGIMC_GIOPAR_PLINEEXP0; /* exp[01] pipelined */ |
195 | tmp |= SGIMC_GIOPAR_PLINEEXP1; | 195 | tmp |= SGIMC_GIOPAR_PLINEEXP1; |
196 | tmp |= SGIMC_GIOPAR_MASTEREISA; /* EISA masters */ | 196 | tmp |= SGIMC_GIOPAR_MASTEREISA; /* EISA masters */ |
197 | } | 197 | } |
198 | } else { | 198 | } else { |
199 | /* Guiness specific settings. */ | 199 | /* Guiness specific settings. */ |
200 | tmp |= SGIMC_GIOPAR_EISA64; /* MC talks to EISA at 64bits */ | 200 | tmp |= SGIMC_GIOPAR_EISA64; /* MC talks to EISA at 64bits */ |
201 | tmp |= SGIMC_GIOPAR_MASTEREISA; /* EISA bus can act as master */ | 201 | tmp |= SGIMC_GIOPAR_MASTEREISA; /* EISA bus can act as master */ |
202 | } | 202 | } |
203 | sgimc->giopar = tmp; /* poof */ | 203 | sgimc->giopar = tmp; /* poof */ |
204 | 204 | ||
diff --git a/arch/mips/sgi-ip22/ip22-nvram.c b/arch/mips/sgi-ip22/ip22-nvram.c index 0177566475d4..e077036a676a 100644 --- a/arch/mips/sgi-ip22/ip22-nvram.c +++ b/arch/mips/sgi-ip22/ip22-nvram.c | |||
@@ -14,11 +14,11 @@ | |||
14 | #define EEPROM_WRITE 0xa000 /* serial memory write */ | 14 | #define EEPROM_WRITE 0xa000 /* serial memory write */ |
15 | #define EEPROM_WRALL 0x8800 /* write all registers */ | 15 | #define EEPROM_WRALL 0x8800 /* write all registers */ |
16 | #define EEPROM_WDS 0x8000 /* disable all programming */ | 16 | #define EEPROM_WDS 0x8000 /* disable all programming */ |
17 | #define EEPROM_PRREAD 0xc000 /* read protect register */ | 17 | #define EEPROM_PRREAD 0xc000 /* read protect register */ |
18 | #define EEPROM_PREN 0x9800 /* enable protect register mode */ | 18 | #define EEPROM_PREN 0x9800 /* enable protect register mode */ |
19 | #define EEPROM_PRCLEAR 0xffff /* clear protect register */ | 19 | #define EEPROM_PRCLEAR 0xffff /* clear protect register */ |
20 | #define EEPROM_PRWRITE 0xa000 /* write protect register */ | 20 | #define EEPROM_PRWRITE 0xa000 /* write protect register */ |
21 | #define EEPROM_PRDS 0x8000 /* disable protect register, forever */ | 21 | #define EEPROM_PRDS 0x8000 /* disable protect register, forever */ |
22 | 22 | ||
23 | #define EEPROM_EPROT 0x01 /* Protect register enable */ | 23 | #define EEPROM_EPROT 0x01 /* Protect register enable */ |
24 | #define EEPROM_CSEL 0x02 /* Chip select */ | 24 | #define EEPROM_CSEL 0x02 /* Chip select */ |
@@ -27,7 +27,7 @@ | |||
27 | #define EEPROM_DATI 0x10 /* Data in */ | 27 | #define EEPROM_DATI 0x10 /* Data in */ |
28 | 28 | ||
29 | /* We need to use these functions early... */ | 29 | /* We need to use these functions early... */ |
30 | #define delay() ({ \ | 30 | #define delay() ({ \ |
31 | int x; \ | 31 | int x; \ |
32 | for (x=0; x<100000; x++) __asm__ __volatile__(""); }) | 32 | for (x=0; x<100000; x++) __asm__ __volatile__(""); }) |
33 | 33 | ||
@@ -35,7 +35,7 @@ | |||
35 | __raw_writel(__raw_readl(ptr) & ~EEPROM_DATO, ptr); \ | 35 | __raw_writel(__raw_readl(ptr) & ~EEPROM_DATO, ptr); \ |
36 | __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr); \ | 36 | __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr); \ |
37 | __raw_writel(__raw_readl(ptr) & ~EEPROM_EPROT, ptr); \ | 37 | __raw_writel(__raw_readl(ptr) & ~EEPROM_EPROT, ptr); \ |
38 | delay(); \ | 38 | delay(); \ |
39 | __raw_writel(__raw_readl(ptr) | EEPROM_CSEL, ptr); \ | 39 | __raw_writel(__raw_readl(ptr) | EEPROM_CSEL, ptr); \ |
40 | __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) | 40 | __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) |
41 | 41 | ||
@@ -46,7 +46,7 @@ | |||
46 | __raw_writel(__raw_readl(ptr) | EEPROM_EPROT, ptr); \ | 46 | __raw_writel(__raw_readl(ptr) | EEPROM_EPROT, ptr); \ |
47 | __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) | 47 | __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) |
48 | 48 | ||
49 | #define BITS_IN_COMMAND 11 | 49 | #define BITS_IN_COMMAND 11 |
50 | /* | 50 | /* |
51 | * clock in the nvram command and the register number. For the | 51 | * clock in the nvram command and the register number. For the |
52 | * national semiconductor nv ram chip the op code is 3 bits and | 52 | * national semiconductor nv ram chip the op code is 3 bits and |
diff --git a/arch/mips/sgi-ip22/ip22-platform.c b/arch/mips/sgi-ip22/ip22-platform.c index 698904daf901..a14fd32b76bd 100644 --- a/arch/mips/sgi-ip22/ip22-platform.c +++ b/arch/mips/sgi-ip22/ip22-platform.c | |||
@@ -137,7 +137,7 @@ static int __init sgiseeq_devinit(void) | |||
137 | 137 | ||
138 | eth0_pd.hpc = hpc3c0; | 138 | eth0_pd.hpc = hpc3c0; |
139 | eth0_pd.irq = SGI_ENET_IRQ; | 139 | eth0_pd.irq = SGI_ENET_IRQ; |
140 | #define EADDR_NVOFS 250 | 140 | #define EADDR_NVOFS 250 |
141 | for (i = 0; i < 3; i++) { | 141 | for (i = 0; i < 3; i++) { |
142 | unsigned short tmp = ip22_nvram_read(EADDR_NVOFS / 2 + i); | 142 | unsigned short tmp = ip22_nvram_read(EADDR_NVOFS / 2 + i); |
143 | 143 | ||
@@ -155,17 +155,17 @@ static int __init sgiseeq_devinit(void) | |||
155 | return 0; | 155 | return 0; |
156 | 156 | ||
157 | sgimc->giopar |= SGIMC_GIOPAR_MASTEREXP1 | SGIMC_GIOPAR_EXP164 | | 157 | sgimc->giopar |= SGIMC_GIOPAR_MASTEREXP1 | SGIMC_GIOPAR_EXP164 | |
158 | SGIMC_GIOPAR_HPC264; | 158 | SGIMC_GIOPAR_HPC264; |
159 | hpc3c1->pbus_piocfg[0][0] = 0x3ffff; | 159 | hpc3c1->pbus_piocfg[0][0] = 0x3ffff; |
160 | /* interrupt/config register on Challenge S Mezz board */ | 160 | /* interrupt/config register on Challenge S Mezz board */ |
161 | hpc3c1->pbus_extregs[0][0] = 0x30; | 161 | hpc3c1->pbus_extregs[0][0] = 0x30; |
162 | 162 | ||
163 | eth1_pd.hpc = hpc3c1; | 163 | eth1_pd.hpc = hpc3c1; |
164 | eth1_pd.irq = SGI_GIO_0_IRQ; | 164 | eth1_pd.irq = SGI_GIO_0_IRQ; |
165 | #define EADDR_NVOFS 250 | 165 | #define EADDR_NVOFS 250 |
166 | for (i = 0; i < 3; i++) { | 166 | for (i = 0; i < 3; i++) { |
167 | unsigned short tmp = ip22_eeprom_read(&hpc3c1->eeprom, | 167 | unsigned short tmp = ip22_eeprom_read(&hpc3c1->eeprom, |
168 | EADDR_NVOFS / 2 + i); | 168 | EADDR_NVOFS / 2 + i); |
169 | 169 | ||
170 | eth1_pd.mac[2 * i] = tmp >> 8; | 170 | eth1_pd.mac[2 * i] = tmp >> 8; |
171 | eth1_pd.mac[2 * i + 1] = tmp & 0xff; | 171 | eth1_pd.mac[2 * i + 1] = tmp & 0xff; |
diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c index 20363d29cb58..063c2dd31e72 100644 --- a/arch/mips/sgi-ip22/ip22-reset.c +++ b/arch/mips/sgi-ip22/ip22-reset.c | |||
@@ -101,7 +101,7 @@ static void debounce(unsigned long data) | |||
101 | del_timer(&debounce_timer); | 101 | del_timer(&debounce_timer); |
102 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { | 102 | if (sgint->istat1 & SGINT_ISTAT1_PWR) { |
103 | /* Interrupt still being sent. */ | 103 | /* Interrupt still being sent. */ |
104 | debounce_timer.expires = jiffies + (HZ / 20); /* 0.05s */ | 104 | debounce_timer.expires = jiffies + (HZ / 20); /* 0.05s */ |
105 | add_timer(&debounce_timer); | 105 | add_timer(&debounce_timer); |
106 | 106 | ||
107 | sgioc->panel = SGIOC_PANEL_POWERON | SGIOC_PANEL_POWERINTR | | 107 | sgioc->panel = SGIOC_PANEL_POWERON | SGIOC_PANEL_POWERINTR | |
@@ -166,7 +166,7 @@ static irqreturn_t panel_int(int irq, void *dev_id) | |||
166 | } | 166 | } |
167 | 167 | ||
168 | static int panic_event(struct notifier_block *this, unsigned long event, | 168 | static int panic_event(struct notifier_block *this, unsigned long event, |
169 | void *ptr) | 169 | void *ptr) |
170 | { | 170 | { |
171 | if (machine_state & MACHINE_PANICED) | 171 | if (machine_state & MACHINE_PANICED) |
172 | return NOTIFY_DONE; | 172 | return NOTIFY_DONE; |
diff --git a/arch/mips/sgi-ip22/ip28-berr.c b/arch/mips/sgi-ip22/ip28-berr.c index 0626555fd1a3..3f47346608d7 100644 --- a/arch/mips/sgi-ip22/ip28-berr.c +++ b/arch/mips/sgi-ip22/ip28-berr.c | |||
@@ -136,14 +136,14 @@ static void save_and_clear_buserr(void) | |||
136 | hpc3.scsi[1].cbp = hpc3c0->scsi_chan1.cbptr; | 136 | hpc3.scsi[1].cbp = hpc3c0->scsi_chan1.cbptr; |
137 | hpc3.scsi[1].ndptr = hpc3c0->scsi_chan1.ndptr; | 137 | hpc3.scsi[1].ndptr = hpc3c0->scsi_chan1.ndptr; |
138 | 138 | ||
139 | hpc3.ethrx.addr = (unsigned long)&hpc3c0->ethregs.rx_cbptr; | 139 | hpc3.ethrx.addr = (unsigned long)&hpc3c0->ethregs.rx_cbptr; |
140 | hpc3.ethrx.ctrl = hpc3c0->ethregs.rx_ctrl; /* HPC3_ERXCTRL_ACTIVE ? */ | 140 | hpc3.ethrx.ctrl = hpc3c0->ethregs.rx_ctrl; /* HPC3_ERXCTRL_ACTIVE ? */ |
141 | hpc3.ethrx.cbp = hpc3c0->ethregs.rx_cbptr; | 141 | hpc3.ethrx.cbp = hpc3c0->ethregs.rx_cbptr; |
142 | hpc3.ethrx.ndptr = hpc3c0->ethregs.rx_ndptr; | 142 | hpc3.ethrx.ndptr = hpc3c0->ethregs.rx_ndptr; |
143 | 143 | ||
144 | hpc3.ethtx.addr = (unsigned long)&hpc3c0->ethregs.tx_cbptr; | 144 | hpc3.ethtx.addr = (unsigned long)&hpc3c0->ethregs.tx_cbptr; |
145 | hpc3.ethtx.ctrl = hpc3c0->ethregs.tx_ctrl; /* HPC3_ETXCTRL_ACTIVE ? */ | 145 | hpc3.ethtx.ctrl = hpc3c0->ethregs.tx_ctrl; /* HPC3_ETXCTRL_ACTIVE ? */ |
146 | hpc3.ethtx.cbp = hpc3c0->ethregs.tx_cbptr; | 146 | hpc3.ethtx.cbp = hpc3c0->ethregs.tx_cbptr; |
147 | hpc3.ethtx.ndptr = hpc3c0->ethregs.tx_ndptr; | 147 | hpc3.ethtx.ndptr = hpc3c0->ethregs.tx_ndptr; |
148 | 148 | ||
149 | for (i = 0; i < 8; ++i) { | 149 | for (i = 0; i < 8; ++i) { |
@@ -196,11 +196,11 @@ static void print_cache_tags(void) | |||
196 | scb | (1 << 12)*i); | 196 | scb | (1 << 12)*i); |
197 | } | 197 | } |
198 | i = read_c0_config(); | 198 | i = read_c0_config(); |
199 | scb = i & (1 << 13) ? 7:6; /* scblksize = 2^[7..6] */ | 199 | scb = i & (1 << 13) ? 7:6; /* scblksize = 2^[7..6] */ |
200 | scw = ((i >> 16) & 7) + 19 - 1; /* scwaysize = 2^[24..19] / 2 */ | 200 | scw = ((i >> 16) & 7) + 19 - 1; /* scwaysize = 2^[24..19] / 2 */ |
201 | 201 | ||
202 | i = ((1 << scw) - 1) & ~((1 << scb) - 1); | 202 | i = ((1 << scw) - 1) & ~((1 << scb) - 1); |
203 | printk(KERN_ERR "S: 0: %08x %08x, 1: %08x %08x (PA[%u:%u] %05x)\n", | 203 | printk(KERN_ERR "S: 0: %08x %08x, 1: %08x %08x (PA[%u:%u] %05x)\n", |
204 | cache_tags.tags[0][0].hi, cache_tags.tags[0][0].lo, | 204 | cache_tags.tags[0][0].hi, cache_tags.tags[0][0].lo, |
205 | cache_tags.tags[0][1].hi, cache_tags.tags[0][1].lo, | 205 | cache_tags.tags[0][1].hi, cache_tags.tags[0][1].lo, |
206 | scw-1, scb, i & (unsigned)cache_tags.err_addr); | 206 | scw-1, scb, i & (unsigned)cache_tags.err_addr); |
diff --git a/arch/mips/sgi-ip27/ip27-berr.c b/arch/mips/sgi-ip27/ip27-berr.c index 04cebadc2b3c..692778da9e76 100644 --- a/arch/mips/sgi-ip27/ip27-berr.c +++ b/arch/mips/sgi-ip27/ip27-berr.c | |||
@@ -39,7 +39,7 @@ static void dump_hub_information(unsigned long errst0, unsigned long errst1) | |||
39 | 39 | ||
40 | printk("Hub has valid error information:\n"); | 40 | printk("Hub has valid error information:\n"); |
41 | if (errst0 & PI_ERR_ST0_OVERRUN_MASK) | 41 | if (errst0 & PI_ERR_ST0_OVERRUN_MASK) |
42 | printk("Overrun is set. Error stack may contain additional " | 42 | printk("Overrun is set. Error stack may contain additional " |
43 | "information.\n"); | 43 | "information.\n"); |
44 | printk("Hub error address is %08lx\n", | 44 | printk("Hub error address is %08lx\n", |
45 | (errst0 & PI_ERR_ST0_ADDR_MASK) >> (PI_ERR_ST0_ADDR_SHFT - 3)); | 45 | (errst0 & PI_ERR_ST0_ADDR_MASK) >> (PI_ERR_ST0_ADDR_SHFT - 3)); |
@@ -85,7 +85,7 @@ void __init ip27_be_init(void) | |||
85 | board_be_handler = ip27_be_handler; | 85 | board_be_handler = ip27_be_handler; |
86 | 86 | ||
87 | LOCAL_HUB_S(PI_ERR_INT_PEND, | 87 | LOCAL_HUB_S(PI_ERR_INT_PEND, |
88 | cpu ? PI_ERR_CLEAR_ALL_B : PI_ERR_CLEAR_ALL_A); | 88 | cpu ? PI_ERR_CLEAR_ALL_B : PI_ERR_CLEAR_ALL_A); |
89 | LOCAL_HUB_S(PI_ERR_INT_MASK_A + cpuoff, 0); | 89 | LOCAL_HUB_S(PI_ERR_INT_MASK_A + cpuoff, 0); |
90 | LOCAL_HUB_S(PI_ERR_STACK_ADDR_A + cpuoff, 0); | 90 | LOCAL_HUB_S(PI_ERR_STACK_ADDR_A + cpuoff, 0); |
91 | LOCAL_HUB_S(PI_ERR_STACK_SIZE, 0); /* Disable error stack */ | 91 | LOCAL_HUB_S(PI_ERR_STACK_SIZE, 0); /* Disable error stack */ |
diff --git a/arch/mips/sgi-ip27/ip27-hubio.c b/arch/mips/sgi-ip27/ip27-hubio.c index cd0d5b06cd83..328ceb3c86ec 100644 --- a/arch/mips/sgi-ip27/ip27-hubio.c +++ b/arch/mips/sgi-ip27/ip27-hubio.c | |||
@@ -17,11 +17,11 @@ | |||
17 | static int force_fire_and_forget = 1; | 17 | static int force_fire_and_forget = 1; |
18 | 18 | ||
19 | /** | 19 | /** |
20 | * hub_pio_map - establish a HUB PIO mapping | 20 | * hub_pio_map - establish a HUB PIO mapping |
21 | * | 21 | * |
22 | * @hub: hub to perform PIO mapping on | 22 | * @hub: hub to perform PIO mapping on |
23 | * @widget: widget ID to perform PIO mapping for | 23 | * @widget: widget ID to perform PIO mapping for |
24 | * @xtalk_addr: xtalk_address that needs to be mapped | 24 | * @xtalk_addr: xtalk_address that needs to be mapped |
25 | * @size: size of the PIO mapping | 25 | * @size: size of the PIO mapping |
26 | * | 26 | * |
27 | **/ | 27 | **/ |
@@ -78,8 +78,8 @@ unsigned long hub_pio_map(cnodeid_t cnode, xwidgetnum_t widget, | |||
78 | /* | 78 | /* |
79 | * hub_setup_prb(nasid, prbnum, credits, conveyor) | 79 | * hub_setup_prb(nasid, prbnum, credits, conveyor) |
80 | * | 80 | * |
81 | * Put a PRB into fire-and-forget mode if conveyor isn't set. Otherwise, | 81 | * Put a PRB into fire-and-forget mode if conveyor isn't set. Otherwise, |
82 | * put it into conveyor belt mode with the specified number of credits. | 82 | * put it into conveyor belt mode with the specified number of credits. |
83 | */ | 83 | */ |
84 | static void hub_setup_prb(nasid_t nasid, int prbnum, int credits) | 84 | static void hub_setup_prb(nasid_t nasid, int prbnum, int credits) |
85 | { | 85 | { |
@@ -125,12 +125,12 @@ static void hub_setup_prb(nasid_t nasid, int prbnum, int credits) | |||
125 | * so we turn off access to all widgets for the duration of the function. | 125 | * so we turn off access to all widgets for the duration of the function. |
126 | * | 126 | * |
127 | * XXX - This code should really check what kind of widget we're talking | 127 | * XXX - This code should really check what kind of widget we're talking |
128 | * to. Bridges can only handle three requests, but XG will do more. | 128 | * to. Bridges can only handle three requests, but XG will do more. |
129 | * How many can crossbow handle to widget 0? We're assuming 1. | 129 | * How many can crossbow handle to widget 0? We're assuming 1. |
130 | * | 130 | * |
131 | * XXX - There is a bug in the crossbow that link reset PIOs do not | 131 | * XXX - There is a bug in the crossbow that link reset PIOs do not |
132 | * return write responses. The easiest solution to this problem is to | 132 | * return write responses. The easiest solution to this problem is to |
133 | * leave widget 0 (xbow) in fire-and-forget mode at all times. This | 133 | * leave widget 0 (xbow) in fire-and-forget mode at all times. This |
134 | * only affects pio's to xbow registers, which should be rare. | 134 | * only affects pio's to xbow registers, which should be rare. |
135 | **/ | 135 | **/ |
136 | static void hub_set_piomode(nasid_t nasid) | 136 | static void hub_set_piomode(nasid_t nasid) |
@@ -167,7 +167,7 @@ static void hub_set_piomode(nasid_t nasid) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | /* | 169 | /* |
170 | * hub_pio_init - PIO-related hub initialization | 170 | * hub_pio_init - PIO-related hub initialization |
171 | * | 171 | * |
172 | * @hub: hubinfo structure for our hub | 172 | * @hub: hubinfo structure for our hub |
173 | */ | 173 | */ |
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c index 923c080f77bd..d41b1c6fb032 100644 --- a/arch/mips/sgi-ip27/ip27-init.c +++ b/arch/mips/sgi-ip27/ip27-init.c | |||
@@ -151,7 +151,7 @@ nasid_t | |||
151 | get_nasid(void) | 151 | get_nasid(void) |
152 | { | 152 | { |
153 | return (nasid_t)((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_NODEID_MASK) | 153 | return (nasid_t)((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_NODEID_MASK) |
154 | >> NSRI_NODEID_SHFT); | 154 | >> NSRI_NODEID_SHFT); |
155 | } | 155 | } |
156 | 156 | ||
157 | /* | 157 | /* |
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 69a939ae65e4..2315cfeb2687 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -62,7 +62,7 @@ extern int irq_to_slot[]; | |||
62 | * from the irq value | 62 | * from the irq value |
63 | */ | 63 | */ |
64 | #define IRQ_TO_BRIDGE(i) irq_to_bridge[(i)] | 64 | #define IRQ_TO_BRIDGE(i) irq_to_bridge[(i)] |
65 | #define SLOT_FROM_PCI_IRQ(i) irq_to_slot[i] | 65 | #define SLOT_FROM_PCI_IRQ(i) irq_to_slot[i] |
66 | 66 | ||
67 | static inline int alloc_level(int cpu, int irq) | 67 | static inline int alloc_level(int cpu, int irq) |
68 | { | 68 | { |
@@ -281,11 +281,11 @@ static unsigned int startup_bridge_irq(struct irq_data *d) | |||
281 | device |= (pin << (pin*3)); | 281 | device |= (pin << (pin*3)); |
282 | bridge->b_int_device = device; | 282 | bridge->b_int_device = device; |
283 | 283 | ||
284 | bridge->b_wid_tflush; | 284 | bridge->b_wid_tflush; |
285 | 285 | ||
286 | intr_connect_level(cpu, swlevel); | 286 | intr_connect_level(cpu, swlevel); |
287 | 287 | ||
288 | return 0; /* Never anything pending. */ | 288 | return 0; /* Never anything pending. */ |
289 | } | 289 | } |
290 | 290 | ||
291 | /* Shutdown one of the (PCI ...) IRQs routes over a bridge. */ | 291 | /* Shutdown one of the (PCI ...) IRQs routes over a bridge. */ |
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index cd8fcab6b054..3505d08ff2fd 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c | |||
@@ -31,8 +31,8 @@ | |||
31 | #include <asm/sn/sn_private.h> | 31 | #include <asm/sn/sn_private.h> |
32 | 32 | ||
33 | 33 | ||
34 | #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) | 34 | #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) |
35 | #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) | 35 | #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) |
36 | 36 | ||
37 | struct node_data *__node_data[MAX_COMPACT_NODES]; | 37 | struct node_data *__node_data[MAX_COMPACT_NODES]; |
38 | 38 | ||
@@ -43,7 +43,7 @@ static int fine_mode; | |||
43 | static int is_fine_dirmode(void) | 43 | static int is_fine_dirmode(void) |
44 | { | 44 | { |
45 | return (((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_REGIONSIZE_MASK) | 45 | return (((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_REGIONSIZE_MASK) |
46 | >> NSRI_REGIONSIZE_SHFT) & REGIONSIZE_FINE); | 46 | >> NSRI_REGIONSIZE_SHFT) & REGIONSIZE_FINE); |
47 | } | 47 | } |
48 | 48 | ||
49 | static hubreg_t get_region(cnodeid_t cnode) | 49 | static hubreg_t get_region(cnodeid_t cnode) |
@@ -66,7 +66,7 @@ static void gen_region_mask(hubreg_t *region_mask) | |||
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
69 | #define rou_rflag rou_flags | 69 | #define rou_rflag rou_flags |
70 | 70 | ||
71 | static int router_distance; | 71 | static int router_distance; |
72 | 72 | ||
@@ -412,7 +412,7 @@ static void __init node_mem_init(cnodeid_t node) | |||
412 | slot_freepfn += PFN_UP(sizeof(struct pglist_data) + | 412 | slot_freepfn += PFN_UP(sizeof(struct pglist_data) + |
413 | sizeof(struct hub_data)); | 413 | sizeof(struct hub_data)); |
414 | 414 | ||
415 | bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn, | 415 | bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn, |
416 | start_pfn, end_pfn); | 416 | start_pfn, end_pfn); |
417 | free_bootmem_with_active_regions(node, end_pfn); | 417 | free_bootmem_with_active_regions(node, end_pfn); |
418 | reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT, | 418 | reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT, |
@@ -422,7 +422,7 @@ static void __init node_mem_init(cnodeid_t node) | |||
422 | } | 422 | } |
423 | 423 | ||
424 | /* | 424 | /* |
425 | * A node with nothing. We use it to avoid any special casing in | 425 | * A node with nothing. We use it to avoid any special casing in |
426 | * cpumask_of_node | 426 | * cpumask_of_node |
427 | */ | 427 | */ |
428 | static struct node_data null_node = { | 428 | static struct node_data null_node = { |
diff --git a/arch/mips/sgi-ip27/ip27-nmi.c b/arch/mips/sgi-ip27/ip27-nmi.c index 005c29ed419a..a2358b44420c 100644 --- a/arch/mips/sgi-ip27/ip27-nmi.c +++ b/arch/mips/sgi-ip27/ip27-nmi.c | |||
@@ -54,7 +54,7 @@ void install_cpu_nmi_handler(int slice) | |||
54 | void nmi_cpu_eframe_save(nasid_t nasid, int slice) | 54 | void nmi_cpu_eframe_save(nasid_t nasid, int slice) |
55 | { | 55 | { |
56 | struct reg_struct *nr; | 56 | struct reg_struct *nr; |
57 | int i; | 57 | int i; |
58 | 58 | ||
59 | /* Get the pointer to the current cpu's register set. */ | 59 | /* Get the pointer to the current cpu's register set. */ |
60 | nr = (struct reg_struct *) | 60 | nr = (struct reg_struct *) |
@@ -86,12 +86,12 @@ void nmi_cpu_eframe_save(nasid_t nasid, int slice) | |||
86 | printk("%s\n", print_tainted()); | 86 | printk("%s\n", print_tainted()); |
87 | printk("ErrEPC: %016lx %pS\n", nr->error_epc, (void *) nr->error_epc); | 87 | printk("ErrEPC: %016lx %pS\n", nr->error_epc, (void *) nr->error_epc); |
88 | printk("ra : %016lx %pS\n", nr->gpr[31], (void *) nr->gpr[31]); | 88 | printk("ra : %016lx %pS\n", nr->gpr[31], (void *) nr->gpr[31]); |
89 | printk("Status: %08lx ", nr->sr); | 89 | printk("Status: %08lx ", nr->sr); |
90 | 90 | ||
91 | if (nr->sr & ST0_KX) | 91 | if (nr->sr & ST0_KX) |
92 | printk("KX "); | 92 | printk("KX "); |
93 | if (nr->sr & ST0_SX) | 93 | if (nr->sr & ST0_SX) |
94 | printk("SX "); | 94 | printk("SX "); |
95 | if (nr->sr & ST0_UX) | 95 | if (nr->sr & ST0_UX) |
96 | printk("UX "); | 96 | printk("UX "); |
97 | 97 | ||
diff --git a/arch/mips/sgi-ip27/ip27-reset.c b/arch/mips/sgi-ip27/ip27-reset.c index f347bc6b7954..ac37e54b3d5e 100644 --- a/arch/mips/sgi-ip27/ip27-reset.c +++ b/arch/mips/sgi-ip27/ip27-reset.c | |||
@@ -29,7 +29,7 @@ void machine_restart(char *command) __attribute__((noreturn)); | |||
29 | void machine_halt(void) __attribute__((noreturn)); | 29 | void machine_halt(void) __attribute__((noreturn)); |
30 | void machine_power_off(void) __attribute__((noreturn)); | 30 | void machine_power_off(void) __attribute__((noreturn)); |
31 | 31 | ||
32 | #define noreturn while(1); /* Silence gcc. */ | 32 | #define noreturn while(1); /* Silence gcc. */ |
33 | 33 | ||
34 | /* XXX How to pass the reboot command to the firmware??? */ | 34 | /* XXX How to pass the reboot command to the firmware??? */ |
35 | static void ip27_machine_restart(char *command) | 35 | static void ip27_machine_restart(char *command) |
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c index 735b43bf8f82..f94638141b20 100644 --- a/arch/mips/sgi-ip27/ip27-smp.c +++ b/arch/mips/sgi-ip27/ip27-smp.c | |||
@@ -191,7 +191,7 @@ static void __init ip27_cpus_done(void) | |||
191 | } | 191 | } |
192 | 192 | ||
193 | /* | 193 | /* |
194 | * Launch a slave into smp_bootstrap(). It doesn't take an argument, and we | 194 | * Launch a slave into smp_bootstrap(). It doesn't take an argument, and we |
195 | * set sp to the kernel stack of the newly created idle process, gp to the proc | 195 | * set sp to the kernel stack of the newly created idle process, gp to the proc |
196 | * struct so that current_thread_info() will work. | 196 | * struct so that current_thread_info() will work. |
197 | */ | 197 | */ |
@@ -219,7 +219,7 @@ static void __init ip27_smp_setup(void) | |||
219 | 219 | ||
220 | /* | 220 | /* |
221 | * Assumption to be fixed: we're always booted on logical / physical | 221 | * Assumption to be fixed: we're always booted on logical / physical |
222 | * processor 0. While we're always running on logical processor 0 | 222 | * processor 0. While we're always running on logical processor 0 |
223 | * this still means this is physical processor zero; it might for | 223 | * this still means this is physical processor zero; it might for |
224 | * example be disabled in the firmware. | 224 | * example be disabled in the firmware. |
225 | */ | 225 | */ |
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index 13cfeab50528..fff58ac176f3 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c | |||
@@ -117,8 +117,8 @@ void __cpuinit hub_rt_clock_event_init(void) | |||
117 | cd->name = name; | 117 | cd->name = name; |
118 | cd->features = CLOCK_EVT_FEAT_ONESHOT; | 118 | cd->features = CLOCK_EVT_FEAT_ONESHOT; |
119 | clockevent_set_clock(cd, CYCLES_PER_SEC); | 119 | clockevent_set_clock(cd, CYCLES_PER_SEC); |
120 | cd->max_delta_ns = clockevent_delta2ns(0xfffffffffffff, cd); | 120 | cd->max_delta_ns = clockevent_delta2ns(0xfffffffffffff, cd); |
121 | cd->min_delta_ns = clockevent_delta2ns(0x300, cd); | 121 | cd->min_delta_ns = clockevent_delta2ns(0x300, cd); |
122 | cd->rating = 200; | 122 | cd->rating = 200; |
123 | cd->irq = irq; | 123 | cd->irq = irq; |
124 | cd->cpumask = cpumask_of(cpu); | 124 | cd->cpumask = cpumask_of(cpu); |
@@ -153,7 +153,7 @@ static cycle_t hub_rt_read(struct clocksource *cs) | |||
153 | 153 | ||
154 | struct clocksource hub_rt_clocksource = { | 154 | struct clocksource hub_rt_clocksource = { |
155 | .name = "HUB-RT", | 155 | .name = "HUB-RT", |
156 | .rating = 200, | 156 | .rating = 200, |
157 | .read = hub_rt_read, | 157 | .read = hub_rt_read, |
158 | .mask = CLOCKSOURCE_MASK(52), | 158 | .mask = CLOCKSOURCE_MASK(52), |
159 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 159 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
diff --git a/arch/mips/sgi-ip27/ip27-xtalk.c b/arch/mips/sgi-ip27/ip27-xtalk.c index 5e871e75a8d9..a4df7d0f6f12 100644 --- a/arch/mips/sgi-ip27/ip27-xtalk.c +++ b/arch/mips/sgi-ip27/ip27-xtalk.c | |||
@@ -17,15 +17,15 @@ | |||
17 | #include <asm/xtalk/xtalk.h> | 17 | #include <asm/xtalk/xtalk.h> |
18 | 18 | ||
19 | 19 | ||
20 | #define XBOW_WIDGET_PART_NUM 0x0 | 20 | #define XBOW_WIDGET_PART_NUM 0x0 |
21 | #define XXBOW_WIDGET_PART_NUM 0xd000 /* Xbow in Xbridge */ | 21 | #define XXBOW_WIDGET_PART_NUM 0xd000 /* Xbow in Xbridge */ |
22 | #define BASE_XBOW_PORT 8 /* Lowest external port */ | 22 | #define BASE_XBOW_PORT 8 /* Lowest external port */ |
23 | 23 | ||
24 | extern int bridge_probe(nasid_t nasid, int widget, int masterwid); | 24 | extern int bridge_probe(nasid_t nasid, int widget, int masterwid); |
25 | 25 | ||
26 | static int __cpuinit probe_one_port(nasid_t nasid, int widget, int masterwid) | 26 | static int __cpuinit probe_one_port(nasid_t nasid, int widget, int masterwid) |
27 | { | 27 | { |
28 | widgetreg_t widget_id; | 28 | widgetreg_t widget_id; |
29 | xwidget_part_num_t partnum; | 29 | xwidget_part_num_t partnum; |
30 | 30 | ||
31 | widget_id = *(volatile widgetreg_t *) | 31 | widget_id = *(volatile widgetreg_t *) |
@@ -102,10 +102,10 @@ static int __cpuinit xbow_probe(nasid_t nasid) | |||
102 | 102 | ||
103 | void __cpuinit xtalk_probe_node(cnodeid_t nid) | 103 | void __cpuinit xtalk_probe_node(cnodeid_t nid) |
104 | { | 104 | { |
105 | volatile u64 hubreg; | 105 | volatile u64 hubreg; |
106 | nasid_t nasid; | 106 | nasid_t nasid; |
107 | xwidget_part_num_t partnum; | 107 | xwidget_part_num_t partnum; |
108 | widgetreg_t widget_id; | 108 | widgetreg_t widget_id; |
109 | 109 | ||
110 | nasid = COMPACT_TO_NASID_NODEID(nid); | 110 | nasid = COMPACT_TO_NASID_NODEID(nid); |
111 | hubreg = REMOTE_HUB_L(nasid, IIO_LLP_CSR); | 111 | hubreg = REMOTE_HUB_L(nasid, IIO_LLP_CSR); |
@@ -115,7 +115,7 @@ void __cpuinit xtalk_probe_node(cnodeid_t nid) | |||
115 | return; | 115 | return; |
116 | 116 | ||
117 | widget_id = *(volatile widgetreg_t *) | 117 | widget_id = *(volatile widgetreg_t *) |
118 | (RAW_NODE_SWIN_BASE(nasid, 0x0) + WIDGET_ID); | 118 | (RAW_NODE_SWIN_BASE(nasid, 0x0) + WIDGET_ID); |
119 | partnum = XWIDGET_PART_NUM(widget_id); | 119 | partnum = XWIDGET_PART_NUM(widget_id); |
120 | 120 | ||
121 | printk(KERN_INFO "Cpu %d, Nasid 0x%x: partnum 0x%x is ", | 121 | printk(KERN_INFO "Cpu %d, Nasid 0x%x: partnum 0x%x is ", |
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index e7d5054de8c8..e0c7d9e142fa 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
@@ -173,7 +173,7 @@ static struct irq_chip crime_edge_interrupt = { | |||
173 | 173 | ||
174 | /* | 174 | /* |
175 | * This is for MACE PCI interrupts. We can decrease bus traffic by masking | 175 | * This is for MACE PCI interrupts. We can decrease bus traffic by masking |
176 | * as close to the source as possible. This also means we can take the | 176 | * as close to the source as possible. This also means we can take the |
177 | * next chunk of the CRIME register in one piece. | 177 | * next chunk of the CRIME register in one piece. |
178 | */ | 178 | */ |
179 | 179 | ||
@@ -271,11 +271,11 @@ static void disable_maceisa_irq(struct irq_data *d) | |||
271 | unsigned int crime_int = 0; | 271 | unsigned int crime_int = 0; |
272 | 272 | ||
273 | maceisa_mask &= ~(1 << (d->irq - MACEISA_AUDIO_SW_IRQ)); | 273 | maceisa_mask &= ~(1 << (d->irq - MACEISA_AUDIO_SW_IRQ)); |
274 | if (!(maceisa_mask & MACEISA_AUDIO_INT)) | 274 | if (!(maceisa_mask & MACEISA_AUDIO_INT)) |
275 | crime_int |= MACE_AUDIO_INT; | 275 | crime_int |= MACE_AUDIO_INT; |
276 | if (!(maceisa_mask & MACEISA_MISC_INT)) | 276 | if (!(maceisa_mask & MACEISA_MISC_INT)) |
277 | crime_int |= MACE_MISC_INT; | 277 | crime_int |= MACE_MISC_INT; |
278 | if (!(maceisa_mask & MACEISA_SUPERIO_INT)) | 278 | if (!(maceisa_mask & MACEISA_SUPERIO_INT)) |
279 | crime_int |= MACE_SUPERIO_INT; | 279 | crime_int |= MACE_SUPERIO_INT; |
280 | crime_mask &= ~crime_int; | 280 | crime_mask &= ~crime_int; |
281 | crime->imask = crime_mask; | 281 | crime->imask = crime_mask; |
diff --git a/arch/mips/sibyte/Platform b/arch/mips/sibyte/Platform index 911dfe39c631..d03a07516f83 100644 --- a/arch/mips/sibyte/Platform +++ b/arch/mips/sibyte/Platform | |||
@@ -9,7 +9,7 @@ platform-$(CONFIG_SIBYTE_BCM1x80) += sibyte/ | |||
9 | # | 9 | # |
10 | # Sibyte SB1250 / BCM1480 family of SOCs | 10 | # Sibyte SB1250 / BCM1480 family of SOCs |
11 | # | 11 | # |
12 | cflags-$(CONFIG_SIBYTE_BCM112X) += \ | 12 | cflags-$(CONFIG_SIBYTE_BCM112X) += \ |
13 | -I$(srctree)/arch/mips/include/asm/mach-sibyte \ | 13 | -I$(srctree)/arch/mips/include/asm/mach-sibyte \ |
14 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL | 14 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL |
15 | 15 | ||
@@ -18,11 +18,11 @@ cflags-$(CONFIG_SIBYTE_SB1250) += \ | |||
18 | -I$(srctree)/arch/mips/include/asm/mach-sibyte \ | 18 | -I$(srctree)/arch/mips/include/asm/mach-sibyte \ |
19 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL | 19 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL |
20 | 20 | ||
21 | cflags-$(CONFIG_SIBYTE_BCM1x55) += \ | 21 | cflags-$(CONFIG_SIBYTE_BCM1x55) += \ |
22 | -I$(srctree)/arch/mips/include/asm/mach-sibyte \ | 22 | -I$(srctree)/arch/mips/include/asm/mach-sibyte \ |
23 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL | 23 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL |
24 | 24 | ||
25 | cflags-$(CONFIG_SIBYTE_BCM1x80) += \ | 25 | cflags-$(CONFIG_SIBYTE_BCM1x80) += \ |
26 | -I$(srctree)/arch/mips/include/asm/mach-sibyte \ | 26 | -I$(srctree)/arch/mips/include/asm/mach-sibyte \ |
27 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL | 27 | -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL |
28 | 28 | ||
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c index 215713e1f3c4..09d6e16a70f1 100644 --- a/arch/mips/sibyte/bcm1480/irq.c +++ b/arch/mips/sibyte/bcm1480/irq.c | |||
@@ -283,10 +283,10 @@ void __init arch_init_irq(void) | |||
283 | for (cpu = 0; cpu < 4; cpu++) { | 283 | for (cpu = 0; cpu < 4; cpu++) { |
284 | __raw_writeq(IMR_IP3_VAL, IOADDR(A_BCM1480_IMR_REGISTER(cpu, R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + | 284 | __raw_writeq(IMR_IP3_VAL, IOADDR(A_BCM1480_IMR_REGISTER(cpu, R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + |
285 | (K_BCM1480_INT_MBOX_0_0 << 3))); | 285 | (K_BCM1480_INT_MBOX_0_0 << 3))); |
286 | } | 286 | } |
287 | 287 | ||
288 | 288 | ||
289 | /* Clear the mailboxes. The firmware may leave them dirty */ | 289 | /* Clear the mailboxes. The firmware may leave them dirty */ |
290 | for (cpu = 0; cpu < 4; cpu++) { | 290 | for (cpu = 0; cpu < 4; cpu++) { |
291 | __raw_writeq(0xffffffffffffffffULL, | 291 | __raw_writeq(0xffffffffffffffffULL, |
292 | IOADDR(A_BCM1480_IMR_REGISTER(cpu, R_BCM1480_IMR_MAILBOX_0_CLR_CPU))); | 292 | IOADDR(A_BCM1480_IMR_REGISTER(cpu, R_BCM1480_IMR_MAILBOX_0_CLR_CPU))); |
@@ -307,7 +307,7 @@ void __init arch_init_irq(void) | |||
307 | 307 | ||
308 | /* | 308 | /* |
309 | * Note that the timer interrupts are also mapped, but this is | 309 | * Note that the timer interrupts are also mapped, but this is |
310 | * done in bcm1480_time_init(). Also, the profiling driver | 310 | * done in bcm1480_time_init(). Also, the profiling driver |
311 | * does its own management of IP7. | 311 | * does its own management of IP7. |
312 | */ | 312 | */ |
313 | 313 | ||
@@ -325,7 +325,7 @@ static inline void dispatch_ip2(void) | |||
325 | 325 | ||
326 | /* | 326 | /* |
327 | * Default...we've hit an IP[2] interrupt, which means we've got to | 327 | * Default...we've hit an IP[2] interrupt, which means we've got to |
328 | * check the 1480 interrupt registers to figure out what to do. Need | 328 | * check the 1480 interrupt registers to figure out what to do. Need |
329 | * to detect which CPU we're on, now that smp_affinity is supported. | 329 | * to detect which CPU we're on, now that smp_affinity is supported. |
330 | */ | 330 | */ |
331 | base = A_BCM1480_IMR_MAPPER(cpu); | 331 | base = A_BCM1480_IMR_MAPPER(cpu); |
diff --git a/arch/mips/sibyte/common/cfe.c b/arch/mips/sibyte/common/cfe.c index 6343011e9902..588e1806a1a3 100644 --- a/arch/mips/sibyte/common/cfe.c +++ b/arch/mips/sibyte/common/cfe.c | |||
@@ -127,8 +127,8 @@ static __init void prom_meminit(void) | |||
127 | if ((initrd_pstart > addr) && | 127 | if ((initrd_pstart > addr) && |
128 | (initrd_pstart < (addr + size))) { | 128 | (initrd_pstart < (addr + size))) { |
129 | add_memory_region(addr, | 129 | add_memory_region(addr, |
130 | initrd_pstart - addr, | 130 | initrd_pstart - addr, |
131 | BOOT_MEM_RAM); | 131 | BOOT_MEM_RAM); |
132 | rd_flag = 1; | 132 | rd_flag = 1; |
133 | } | 133 | } |
134 | if ((initrd_pend > addr) && | 134 | if ((initrd_pend > addr) && |
@@ -195,7 +195,7 @@ static int __init initrd_setup(char *str) | |||
195 | 195 | ||
196 | /* | 196 | /* |
197 | *Initrd location comes in the form "<hex size of ramdisk in bytes>@<location in memory>" | 197 | *Initrd location comes in the form "<hex size of ramdisk in bytes>@<location in memory>" |
198 | * e.g. initrd=3abfd@80010000. This is set up by the loader. | 198 | * e.g. initrd=3abfd@80010000. This is set up by the loader. |
199 | */ | 199 | */ |
200 | for (tmp = str; *tmp != '@'; tmp++) { | 200 | for (tmp = str; *tmp != '@'; tmp++) { |
201 | if (!*tmp) { | 201 | if (!*tmp) { |
@@ -244,7 +244,7 @@ void __init prom_init(void) | |||
244 | int *prom_vec = (int *) fw_arg3; | 244 | int *prom_vec = (int *) fw_arg3; |
245 | 245 | ||
246 | _machine_restart = cfe_linux_restart; | 246 | _machine_restart = cfe_linux_restart; |
247 | _machine_halt = cfe_linux_halt; | 247 | _machine_halt = cfe_linux_halt; |
248 | pm_power_off = cfe_linux_halt; | 248 | pm_power_off = cfe_linux_halt; |
249 | 249 | ||
250 | /* | 250 | /* |
@@ -299,7 +299,7 @@ void __init prom_init(void) | |||
299 | #ifdef CONFIG_BLK_DEV_INITRD | 299 | #ifdef CONFIG_BLK_DEV_INITRD |
300 | { | 300 | { |
301 | char *ptr; | 301 | char *ptr; |
302 | /* Need to find out early whether we've got an initrd. So scan | 302 | /* Need to find out early whether we've got an initrd. So scan |
303 | the list looking now */ | 303 | the list looking now */ |
304 | for (ptr = arcs_cmdline; *ptr; ptr++) { | 304 | for (ptr = arcs_cmdline; *ptr; ptr++) { |
305 | while (*ptr == ' ') { | 305 | while (*ptr == ' ') { |
diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c index e8c4538c5f61..2188b39a1251 100644 --- a/arch/mips/sibyte/common/sb_tbprof.c +++ b/arch/mips/sibyte/common/sb_tbprof.c | |||
@@ -152,7 +152,7 @@ static u64 tb_period; | |||
152 | 152 | ||
153 | static void arm_tb(void) | 153 | static void arm_tb(void) |
154 | { | 154 | { |
155 | u64 scdperfcnt; | 155 | u64 scdperfcnt; |
156 | u64 next = (1ULL << 40) - tb_period; | 156 | u64 next = (1ULL << 40) - tb_period; |
157 | u64 tb_options = M_SCD_TRACE_CFG_FREEZE_FULL; | 157 | u64 tb_options = M_SCD_TRACE_CFG_FREEZE_FULL; |
158 | 158 | ||
@@ -257,8 +257,8 @@ static irqreturn_t sbprof_pc_intr(int irq, void *dev_id) | |||
257 | 257 | ||
258 | /* | 258 | /* |
259 | * Requires: Already called zclk_timer_init with a value that won't | 259 | * Requires: Already called zclk_timer_init with a value that won't |
260 | * saturate 40 bits. No subsequent use of SCD performance counters | 260 | * saturate 40 bits. No subsequent use of SCD performance counters |
261 | * or trace buffer. | 261 | * or trace buffer. |
262 | */ | 262 | */ |
263 | 263 | ||
264 | static int sbprof_zbprof_start(struct file *filp) | 264 | static int sbprof_zbprof_start(struct file *filp) |
@@ -288,8 +288,8 @@ static int sbprof_zbprof_start(struct file *filp) | |||
288 | 288 | ||
289 | /* | 289 | /* |
290 | * We grab this interrupt to prevent others from trying to use | 290 | * We grab this interrupt to prevent others from trying to use |
291 | * it, even though we don't want to service the interrupts | 291 | * it, even though we don't want to service the interrupts |
292 | * (they only feed into the trace-on-interrupt mechanism) | 292 | * (they only feed into the trace-on-interrupt mechanism) |
293 | */ | 293 | */ |
294 | if (request_irq(K_INT_PERF_CNT, sbprof_pc_intr, 0, DEVNAME " scd perfcnt", &sbp)) { | 294 | if (request_irq(K_INT_PERF_CNT, sbprof_pc_intr, 0, DEVNAME " scd perfcnt", &sbp)) { |
295 | free_irq(K_INT_TRACE_FREEZE, &sbp); | 295 | free_irq(K_INT_TRACE_FREEZE, &sbp); |
@@ -298,7 +298,7 @@ static int sbprof_zbprof_start(struct file *filp) | |||
298 | 298 | ||
299 | /* | 299 | /* |
300 | * I need the core to mask these, but the interrupt mapper to | 300 | * I need the core to mask these, but the interrupt mapper to |
301 | * pass them through. I am exploiting my knowledge that | 301 | * pass them through. I am exploiting my knowledge that |
302 | * cp0_status masks out IP[5]. krw | 302 | * cp0_status masks out IP[5]. krw |
303 | */ | 303 | */ |
304 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) | 304 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) |
@@ -328,7 +328,7 @@ static int sbprof_zbprof_start(struct file *filp) | |||
328 | __raw_writeq(0, IOADDR(A_ADDR_TRAP_CFG_3)); | 328 | __raw_writeq(0, IOADDR(A_ADDR_TRAP_CFG_3)); |
329 | 329 | ||
330 | /* Initialize Trace Event 0-7 */ | 330 | /* Initialize Trace Event 0-7 */ |
331 | /* when interrupt */ | 331 | /* when interrupt */ |
332 | __raw_writeq(M_SCD_TREVT_INTERRUPT, IOADDR(A_SCD_TRACE_EVENT_0)); | 332 | __raw_writeq(M_SCD_TREVT_INTERRUPT, IOADDR(A_SCD_TRACE_EVENT_0)); |
333 | __raw_writeq(0, IOADDR(A_SCD_TRACE_EVENT_1)); | 333 | __raw_writeq(0, IOADDR(A_SCD_TRACE_EVENT_1)); |
334 | __raw_writeq(0, IOADDR(A_SCD_TRACE_EVENT_2)); | 334 | __raw_writeq(0, IOADDR(A_SCD_TRACE_EVENT_2)); |
@@ -479,7 +479,7 @@ static ssize_t sbprof_tb_read(struct file *filp, char *buf, | |||
479 | return err; | 479 | return err; |
480 | } | 480 | } |
481 | pr_debug(DEVNAME ": read from sample %d, %d bytes\n", | 481 | pr_debug(DEVNAME ": read from sample %d, %d bytes\n", |
482 | cur_sample, cur_count); | 482 | cur_sample, cur_count); |
483 | size -= cur_count; | 483 | size -= cur_count; |
484 | sample_left -= cur_count; | 484 | sample_left -= cur_count; |
485 | if (!sample_left) { | 485 | if (!sample_left) { |
@@ -540,7 +540,7 @@ static const struct file_operations sbprof_tb_fops = { | |||
540 | .open = sbprof_tb_open, | 540 | .open = sbprof_tb_open, |
541 | .release = sbprof_tb_release, | 541 | .release = sbprof_tb_release, |
542 | .read = sbprof_tb_read, | 542 | .read = sbprof_tb_read, |
543 | .unlocked_ioctl = sbprof_tb_ioctl, | 543 | .unlocked_ioctl = sbprof_tb_ioctl, |
544 | .compat_ioctl = sbprof_tb_ioctl, | 544 | .compat_ioctl = sbprof_tb_ioctl, |
545 | .mmap = NULL, | 545 | .mmap = NULL, |
546 | .llseek = default_llseek, | 546 | .llseek = default_llseek, |
diff --git a/arch/mips/sibyte/sb1250/bus_watcher.c b/arch/mips/sibyte/sb1250/bus_watcher.c index 86e6e54dd15d..e651105b3f0b 100644 --- a/arch/mips/sibyte/sb1250/bus_watcher.c +++ b/arch/mips/sibyte/sb1250/bus_watcher.c | |||
@@ -71,7 +71,7 @@ static void print_summary(uint32_t status, uint32_t l2_err, | |||
71 | * already been destructively read out of the registers. | 71 | * already been destructively read out of the registers. |
72 | * | 72 | * |
73 | * notes: this is currently used by the cache error handler | 73 | * notes: this is currently used by the cache error handler |
74 | * should provide locking against the interrupt handler | 74 | * should provide locking against the interrupt handler |
75 | */ | 75 | */ |
76 | void check_bus_watcher(void) | 76 | void check_bus_watcher(void) |
77 | { | 77 | { |
@@ -119,7 +119,7 @@ static int bw_print_buffer(char *page, struct bw_stats_struct *stats) | |||
119 | (int)G_SCD_BERR_RID(stats->status), | 119 | (int)G_SCD_BERR_RID(stats->status), |
120 | (int)G_SCD_BERR_DCODE(stats->status)); | 120 | (int)G_SCD_BERR_DCODE(stats->status)); |
121 | /* XXXKW indicate multiple errors between printings, or stats | 121 | /* XXXKW indicate multiple errors between printings, or stats |
122 | collection (or both)? */ | 122 | collection (or both)? */ |
123 | if (stats->status & M_SCD_BERR_MULTERRS) | 123 | if (stats->status & M_SCD_BERR_MULTERRS) |
124 | len += sprintf(page+len, "Multiple errors observed since last check.\n"); | 124 | len += sprintf(page+len, "Multiple errors observed since last check.\n"); |
125 | if (stats->status_printed) { | 125 | if (stats->status_printed) { |
@@ -168,7 +168,7 @@ static void create_proc_decoder(struct bw_stats_struct *stats) | |||
168 | * sibyte_bw_int - handle bus watcher interrupts and accumulate counts | 168 | * sibyte_bw_int - handle bus watcher interrupts and accumulate counts |
169 | * | 169 | * |
170 | * notes: possible re-entry due to multiple sources | 170 | * notes: possible re-entry due to multiple sources |
171 | * should check/indicate saturation | 171 | * should check/indicate saturation |
172 | */ | 172 | */ |
173 | static irqreturn_t sibyte_bw_int(int irq, void *data) | 173 | static irqreturn_t sibyte_bw_int(int irq, void *data) |
174 | { | 174 | { |
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index 340aaf626659..fca0cdb99509 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c | |||
@@ -264,7 +264,7 @@ void __init arch_init_irq(void) | |||
264 | IOADDR(A_IMR_REGISTER(1, R_IMR_INTERRUPT_MAP_BASE) + | 264 | IOADDR(A_IMR_REGISTER(1, R_IMR_INTERRUPT_MAP_BASE) + |
265 | (K_INT_MBOX_0 << 3))); | 265 | (K_INT_MBOX_0 << 3))); |
266 | 266 | ||
267 | /* Clear the mailboxes. The firmware may leave them dirty */ | 267 | /* Clear the mailboxes. The firmware may leave them dirty */ |
268 | __raw_writeq(0xffffffffffffffffULL, | 268 | __raw_writeq(0xffffffffffffffffULL, |
269 | IOADDR(A_IMR_REGISTER(0, R_IMR_MAILBOX_CLR_CPU))); | 269 | IOADDR(A_IMR_REGISTER(0, R_IMR_MAILBOX_CLR_CPU))); |
270 | __raw_writeq(0xffffffffffffffffULL, | 270 | __raw_writeq(0xffffffffffffffffULL, |
@@ -277,7 +277,7 @@ void __init arch_init_irq(void) | |||
277 | 277 | ||
278 | /* | 278 | /* |
279 | * Note that the timer interrupts are also mapped, but this is | 279 | * Note that the timer interrupts are also mapped, but this is |
280 | * done in sb1250_time_init(). Also, the profiling driver | 280 | * done in sb1250_time_init(). Also, the profiling driver |
281 | * does its own management of IP7. | 281 | * does its own management of IP7. |
282 | */ | 282 | */ |
283 | 283 | ||
@@ -294,7 +294,7 @@ static inline void dispatch_ip2(void) | |||
294 | 294 | ||
295 | /* | 295 | /* |
296 | * Default...we've hit an IP[2] interrupt, which means we've got to | 296 | * Default...we've hit an IP[2] interrupt, which means we've got to |
297 | * check the 1250 interrupt registers to figure out what to do. Need | 297 | * check the 1250 interrupt registers to figure out what to do. Need |
298 | * to detect which CPU we're on, now that smp_affinity is supported. | 298 | * to detect which CPU we're on, now that smp_affinity is supported. |
299 | */ | 299 | */ |
300 | mask = __raw_readq(IOADDR(A_IMR_REGISTER(cpu, | 300 | mask = __raw_readq(IOADDR(A_IMR_REGISTER(cpu, |
@@ -323,7 +323,7 @@ asmlinkage void plat_irq_dispatch(void) | |||
323 | if (pending & CAUSEF_IP7) /* CPU performance counter interrupt */ | 323 | if (pending & CAUSEF_IP7) /* CPU performance counter interrupt */ |
324 | do_IRQ(MIPS_CPU_IRQ_BASE + 7); | 324 | do_IRQ(MIPS_CPU_IRQ_BASE + 7); |
325 | else if (pending & CAUSEF_IP4) | 325 | else if (pending & CAUSEF_IP4) |
326 | do_IRQ(K_INT_TIMER_0 + cpu); /* sb1250_timer_interrupt() */ | 326 | do_IRQ(K_INT_TIMER_0 + cpu); /* sb1250_timer_interrupt() */ |
327 | 327 | ||
328 | #ifdef CONFIG_SMP | 328 | #ifdef CONFIG_SMP |
329 | else if (pending & CAUSEF_IP3) | 329 | else if (pending & CAUSEF_IP3) |
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c index 92da3155ce07..a14bd4cb0bc0 100644 --- a/arch/mips/sibyte/sb1250/setup.c +++ b/arch/mips/sibyte/sb1250/setup.c | |||
@@ -203,8 +203,8 @@ void __init sb1250_setup(void) | |||
203 | case K_SYS_REVISION_BCM1250_PASS1: | 203 | case K_SYS_REVISION_BCM1250_PASS1: |
204 | #ifndef CONFIG_SB1_PASS_1_WORKAROUNDS | 204 | #ifndef CONFIG_SB1_PASS_1_WORKAROUNDS |
205 | printk("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, " | 205 | printk("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, " |
206 | "and the kernel doesn't have the proper " | 206 | "and the kernel doesn't have the proper " |
207 | "workarounds compiled in. @@@@\n"); | 207 | "workarounds compiled in. @@@@\n"); |
208 | bad_config = 1; | 208 | bad_config = 1; |
209 | #endif | 209 | #endif |
210 | break; | 210 | break; |
@@ -213,28 +213,28 @@ void __init sb1250_setup(void) | |||
213 | #if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || \ | 213 | #if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || \ |
214 | !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) | 214 | !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) |
215 | printk("@@@@ This is a BCM1250 A3-A10 board, and the " | 215 | printk("@@@@ This is a BCM1250 A3-A10 board, and the " |
216 | "kernel doesn't have the proper workarounds " | 216 | "kernel doesn't have the proper workarounds " |
217 | "compiled in. @@@@\n"); | 217 | "compiled in. @@@@\n"); |
218 | bad_config = 1; | 218 | bad_config = 1; |
219 | #endif | 219 | #endif |
220 | #ifdef CONFIG_CPU_HAS_PREFETCH | 220 | #ifdef CONFIG_CPU_HAS_PREFETCH |
221 | printk("@@@@ Prefetches may be enabled in this kernel, " | 221 | printk("@@@@ Prefetches may be enabled in this kernel, " |
222 | "but are buggy on this board. @@@@\n"); | 222 | "but are buggy on this board. @@@@\n"); |
223 | bad_config = 1; | 223 | bad_config = 1; |
224 | #endif | 224 | #endif |
225 | break; | 225 | break; |
226 | case K_SYS_REVISION_BCM1250_PASS2_2: | 226 | case K_SYS_REVISION_BCM1250_PASS2_2: |
227 | #ifndef CONFIG_SB1_PASS_2_WORKAROUNDS | 227 | #ifndef CONFIG_SB1_PASS_2_WORKAROUNDS |
228 | printk("@@@@ This is a BCM1250 B1/B2. board, and the " | 228 | printk("@@@@ This is a BCM1250 B1/B2. board, and the " |
229 | "kernel doesn't have the proper workarounds " | 229 | "kernel doesn't have the proper workarounds " |
230 | "compiled in. @@@@\n"); | 230 | "compiled in. @@@@\n"); |
231 | bad_config = 1; | 231 | bad_config = 1; |
232 | #endif | 232 | #endif |
233 | #if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || \ | 233 | #if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || \ |
234 | !defined(CONFIG_CPU_HAS_PREFETCH) | 234 | !defined(CONFIG_CPU_HAS_PREFETCH) |
235 | printk("@@@@ This is a BCM1250 B1/B2, but the kernel is " | 235 | printk("@@@@ This is a BCM1250 B1/B2, but the kernel is " |
236 | "conservatively configured for an 'A' stepping. " | 236 | "conservatively configured for an 'A' stepping. " |
237 | "@@@@\n"); | 237 | "@@@@\n"); |
238 | #endif | 238 | #endif |
239 | break; | 239 | break; |
240 | default: | 240 | default: |
diff --git a/arch/mips/sibyte/swarm/platform.c b/arch/mips/sibyte/swarm/platform.c index 097335262fb3..9480c14ec66a 100644 --- a/arch/mips/sibyte/swarm/platform.c +++ b/arch/mips/sibyte/swarm/platform.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #define DRV_NAME "pata-swarm" | 14 | #define DRV_NAME "pata-swarm" |
15 | 15 | ||
16 | #define SWARM_IDE_SHIFT 5 | 16 | #define SWARM_IDE_SHIFT 5 |
17 | #define SWARM_IDE_BASE 0x1f0 | 17 | #define SWARM_IDE_BASE 0x1f0 |
18 | #define SWARM_IDE_CTRL 0x3f6 | 18 | #define SWARM_IDE_CTRL 0x3f6 |
19 | 19 | ||
@@ -123,7 +123,7 @@ static int __init sb1250_device_init(void) | |||
123 | case K_SYS_SOC_TYPE_BCM1120: | 123 | case K_SYS_SOC_TYPE_BCM1120: |
124 | case K_SYS_SOC_TYPE_BCM1125: | 124 | case K_SYS_SOC_TYPE_BCM1125: |
125 | case K_SYS_SOC_TYPE_BCM1125H: | 125 | case K_SYS_SOC_TYPE_BCM1125H: |
126 | case K_SYS_SOC_TYPE_BCM1250_ALT2: /* Hybrid */ | 126 | case K_SYS_SOC_TYPE_BCM1250_ALT2: /* Hybrid */ |
127 | ret = platform_add_devices(sb1250_devs, 2); | 127 | ret = platform_add_devices(sb1250_devs, 2); |
128 | break; | 128 | break; |
129 | case K_SYS_SOC_TYPE_BCM1x55: | 129 | case K_SYS_SOC_TYPE_BCM1x55: |
diff --git a/arch/mips/sibyte/swarm/rtc_xicor1241.c b/arch/mips/sibyte/swarm/rtc_xicor1241.c index 4438b2195c44..178a824b28d4 100644 --- a/arch/mips/sibyte/swarm/rtc_xicor1241.c +++ b/arch/mips/sibyte/swarm/rtc_xicor1241.c | |||
@@ -4,8 +4,8 @@ | |||
4 | * Copyright (C) 2002 MontaVista Software Inc. | 4 | * Copyright (C) 2002 MontaVista Software Inc. |
5 | * Author: jsun@mvista.com or jsun@junsun.net | 5 | * Author: jsun@mvista.com or jsun@junsun.net |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
9 | * Free Software Foundation; either version 2 of the License, or (at your | 9 | * Free Software Foundation; either version 2 of the License, or (at your |
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
@@ -28,15 +28,15 @@ | |||
28 | * Register bits | 28 | * Register bits |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #define X1241REG_SR_BAT 0x80 /* currently on battery power */ | 31 | #define X1241REG_SR_BAT 0x80 /* currently on battery power */ |
32 | #define X1241REG_SR_RWEL 0x04 /* r/w latch is enabled, can write RTC */ | 32 | #define X1241REG_SR_RWEL 0x04 /* r/w latch is enabled, can write RTC */ |
33 | #define X1241REG_SR_WEL 0x02 /* r/w latch is unlocked, can enable r/w now */ | 33 | #define X1241REG_SR_WEL 0x02 /* r/w latch is unlocked, can enable r/w now */ |
34 | #define X1241REG_SR_RTCF 0x01 /* clock failed */ | 34 | #define X1241REG_SR_RTCF 0x01 /* clock failed */ |
35 | #define X1241REG_BL_BP2 0x80 /* block protect 2 */ | 35 | #define X1241REG_BL_BP2 0x80 /* block protect 2 */ |
36 | #define X1241REG_BL_BP1 0x40 /* block protect 1 */ | 36 | #define X1241REG_BL_BP1 0x40 /* block protect 1 */ |
37 | #define X1241REG_BL_BP0 0x20 /* block protect 0 */ | 37 | #define X1241REG_BL_BP0 0x20 /* block protect 0 */ |
38 | #define X1241REG_BL_WD1 0x10 | 38 | #define X1241REG_BL_WD1 0x10 |
39 | #define X1241REG_BL_WD0 0x08 | 39 | #define X1241REG_BL_WD0 0x08 |
40 | #define X1241REG_HR_MIL 0x80 /* military time format */ | 40 | #define X1241REG_HR_MIL 0x80 /* military time format */ |
41 | 41 | ||
42 | /* | 42 | /* |
@@ -61,50 +61,50 @@ | |||
61 | 61 | ||
62 | static int xicor_read(uint8_t addr) | 62 | static int xicor_read(uint8_t addr) |
63 | { | 63 | { |
64 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) | 64 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) |
65 | ; | 65 | ; |
66 | 66 | ||
67 | __raw_writeq((addr >> 8) & 0x7, SMB_CSR(R_SMB_CMD)); | 67 | __raw_writeq((addr >> 8) & 0x7, SMB_CSR(R_SMB_CMD)); |
68 | __raw_writeq(addr & 0xff, SMB_CSR(R_SMB_DATA)); | 68 | __raw_writeq(addr & 0xff, SMB_CSR(R_SMB_DATA)); |
69 | __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR2BYTE, | 69 | __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR2BYTE, |
70 | SMB_CSR(R_SMB_START)); | 70 | SMB_CSR(R_SMB_START)); |
71 | 71 | ||
72 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) | 72 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) |
73 | ; | 73 | ; |
74 | 74 | ||
75 | __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_RD1BYTE, | 75 | __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_RD1BYTE, |
76 | SMB_CSR(R_SMB_START)); | 76 | SMB_CSR(R_SMB_START)); |
77 | 77 | ||
78 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) | 78 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) |
79 | ; | 79 | ; |
80 | 80 | ||
81 | if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) { | 81 | if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) { |
82 | /* Clear error bit by writing a 1 */ | 82 | /* Clear error bit by writing a 1 */ |
83 | __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS)); | 83 | __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS)); |
84 | return -1; | 84 | return -1; |
85 | } | 85 | } |
86 | 86 | ||
87 | return (__raw_readq(SMB_CSR(R_SMB_DATA)) & 0xff); | 87 | return (__raw_readq(SMB_CSR(R_SMB_DATA)) & 0xff); |
88 | } | 88 | } |
89 | 89 | ||
90 | static int xicor_write(uint8_t addr, int b) | 90 | static int xicor_write(uint8_t addr, int b) |
91 | { | 91 | { |
92 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) | 92 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) |
93 | ; | 93 | ; |
94 | 94 | ||
95 | __raw_writeq(addr, SMB_CSR(R_SMB_CMD)); | 95 | __raw_writeq(addr, SMB_CSR(R_SMB_CMD)); |
96 | __raw_writeq((addr & 0xff) | ((b & 0xff) << 8), SMB_CSR(R_SMB_DATA)); | 96 | __raw_writeq((addr & 0xff) | ((b & 0xff) << 8), SMB_CSR(R_SMB_DATA)); |
97 | __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR3BYTE, | 97 | __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR3BYTE, |
98 | SMB_CSR(R_SMB_START)); | 98 | SMB_CSR(R_SMB_START)); |
99 | 99 | ||
100 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) | 100 | while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) |
101 | ; | 101 | ; |
102 | 102 | ||
103 | if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) { | 103 | if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) { |
104 | /* Clear error bit by writing a 1 */ | 104 | /* Clear error bit by writing a 1 */ |
105 | __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS)); | 105 | __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS)); |
106 | return -1; | 106 | return -1; |
107 | } else { | 107 | } else { |
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
110 | } | 110 | } |
diff --git a/arch/mips/sni/a20r.c b/arch/mips/sni/a20r.c index 9cb9d43a3a0e..e250f099374d 100644 --- a/arch/mips/sni/a20r.c +++ b/arch/mips/sni/a20r.c | |||
@@ -41,17 +41,17 @@ static struct platform_device a20r_serial8250_device = { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | static struct resource a20r_ds1216_rsrc[] = { | 43 | static struct resource a20r_ds1216_rsrc[] = { |
44 | { | 44 | { |
45 | .start = 0x1c081ffc, | 45 | .start = 0x1c081ffc, |
46 | .end = 0x1c081fff, | 46 | .end = 0x1c081fff, |
47 | .flags = IORESOURCE_MEM | 47 | .flags = IORESOURCE_MEM |
48 | } | 48 | } |
49 | }; | 49 | }; |
50 | 50 | ||
51 | static struct platform_device a20r_ds1216_device = { | 51 | static struct platform_device a20r_ds1216_device = { |
52 | .name = "rtc-ds1216", | 52 | .name = "rtc-ds1216", |
53 | .num_resources = ARRAY_SIZE(a20r_ds1216_rsrc), | 53 | .num_resources = ARRAY_SIZE(a20r_ds1216_rsrc), |
54 | .resource = a20r_ds1216_rsrc | 54 | .resource = a20r_ds1216_rsrc |
55 | }; | 55 | }; |
56 | 56 | ||
57 | static struct resource snirm_82596_rsrc[] = { | 57 | static struct resource snirm_82596_rsrc[] = { |
@@ -76,14 +76,14 @@ static struct resource snirm_82596_rsrc[] = { | |||
76 | .flags = IORESOURCE_IRQ | 76 | .flags = IORESOURCE_IRQ |
77 | }, | 77 | }, |
78 | { | 78 | { |
79 | .flags = 0x01 /* 16bit mpu port access */ | 79 | .flags = 0x01 /* 16bit mpu port access */ |
80 | } | 80 | } |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static struct platform_device snirm_82596_pdev = { | 83 | static struct platform_device snirm_82596_pdev = { |
84 | .name = "snirm_82596", | 84 | .name = "snirm_82596", |
85 | .num_resources = ARRAY_SIZE(snirm_82596_rsrc), | 85 | .num_resources = ARRAY_SIZE(snirm_82596_rsrc), |
86 | .resource = snirm_82596_rsrc | 86 | .resource = snirm_82596_rsrc |
87 | }; | 87 | }; |
88 | 88 | ||
89 | static struct resource snirm_53c710_rsrc[] = { | 89 | static struct resource snirm_53c710_rsrc[] = { |
@@ -100,9 +100,9 @@ static struct resource snirm_53c710_rsrc[] = { | |||
100 | }; | 100 | }; |
101 | 101 | ||
102 | static struct platform_device snirm_53c710_pdev = { | 102 | static struct platform_device snirm_53c710_pdev = { |
103 | .name = "snirm_53c710", | 103 | .name = "snirm_53c710", |
104 | .num_resources = ARRAY_SIZE(snirm_53c710_rsrc), | 104 | .num_resources = ARRAY_SIZE(snirm_53c710_rsrc), |
105 | .resource = snirm_53c710_rsrc | 105 | .resource = snirm_53c710_rsrc |
106 | }; | 106 | }; |
107 | 107 | ||
108 | static struct resource sc26xx_rsrc[] = { | 108 | static struct resource sc26xx_rsrc[] = { |
@@ -171,7 +171,7 @@ static u32 a20r_ack_hwint(void) | |||
171 | " addiu %1, -1 \n" | 171 | " addiu %1, -1 \n" |
172 | " sw $1, 0(%0) \n" | 172 | " sw $1, 0(%0) \n" |
173 | " sync \n" | 173 | " sync \n" |
174 | ".set pop \n" | 174 | ".set pop \n" |
175 | : | 175 | : |
176 | : "Jr" (PCIMT_UCONF), "Jr" (0xbc000000)); | 176 | : "Jr" (PCIMT_UCONF), "Jr" (0xbc000000)); |
177 | write_c0_status(status); | 177 | write_c0_status(status); |
@@ -236,13 +236,13 @@ static int __init snirm_a20r_setup_devinit(void) | |||
236 | switch (sni_brd_type) { | 236 | switch (sni_brd_type) { |
237 | case SNI_BRD_TOWER_OASIC: | 237 | case SNI_BRD_TOWER_OASIC: |
238 | case SNI_BRD_MINITOWER: | 238 | case SNI_BRD_MINITOWER: |
239 | platform_device_register(&snirm_82596_pdev); | 239 | platform_device_register(&snirm_82596_pdev); |
240 | platform_device_register(&snirm_53c710_pdev); | 240 | platform_device_register(&snirm_53c710_pdev); |
241 | platform_device_register(&sc26xx_pdev); | 241 | platform_device_register(&sc26xx_pdev); |
242 | platform_device_register(&a20r_serial8250_device); | 242 | platform_device_register(&a20r_serial8250_device); |
243 | platform_device_register(&a20r_ds1216_device); | 243 | platform_device_register(&a20r_ds1216_device); |
244 | sni_eisa_root_init(); | 244 | sni_eisa_root_init(); |
245 | break; | 245 | break; |
246 | } | 246 | } |
247 | return 0; | 247 | return 0; |
248 | } | 248 | } |
diff --git a/arch/mips/sni/eisa.c b/arch/mips/sni/eisa.c index 6827feb4de96..179b5d556ad2 100644 --- a/arch/mips/sni/eisa.c +++ b/arch/mips/sni/eisa.c | |||
@@ -22,7 +22,7 @@ static struct platform_device eisa_root_dev = { | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | static struct eisa_root_device eisa_bus_root = { | 24 | static struct eisa_root_device eisa_bus_root = { |
25 | .dev = &eisa_root_dev.dev, | 25 | .dev = &eisa_root_dev.dev, |
26 | .bus_base_addr = 0, | 26 | .bus_base_addr = 0, |
27 | .res = &ioport_resource, | 27 | .res = &ioport_resource, |
28 | .slots = EISA_MAX_SLOTS, | 28 | .slots = EISA_MAX_SLOTS, |
diff --git a/arch/mips/sni/irq.c b/arch/mips/sni/irq.c index 5a4ec75382e2..ac61b90bcc66 100644 --- a/arch/mips/sni/irq.c +++ b/arch/mips/sni/irq.c | |||
@@ -58,25 +58,25 @@ void __init arch_init_irq(void) | |||
58 | case SNI_BRD_10NEW: | 58 | case SNI_BRD_10NEW: |
59 | case SNI_BRD_TOWER_OASIC: | 59 | case SNI_BRD_TOWER_OASIC: |
60 | case SNI_BRD_MINITOWER: | 60 | case SNI_BRD_MINITOWER: |
61 | sni_a20r_irq_init(); | 61 | sni_a20r_irq_init(); |
62 | break; | 62 | break; |
63 | 63 | ||
64 | case SNI_BRD_PCI_TOWER: | 64 | case SNI_BRD_PCI_TOWER: |
65 | sni_pcit_irq_init(); | 65 | sni_pcit_irq_init(); |
66 | break; | 66 | break; |
67 | 67 | ||
68 | case SNI_BRD_PCI_TOWER_CPLUS: | 68 | case SNI_BRD_PCI_TOWER_CPLUS: |
69 | sni_pcit_cplus_irq_init(); | 69 | sni_pcit_cplus_irq_init(); |
70 | break; | 70 | break; |
71 | 71 | ||
72 | case SNI_BRD_RM200: | 72 | case SNI_BRD_RM200: |
73 | sni_rm200_irq_init(); | 73 | sni_rm200_irq_init(); |
74 | break; | 74 | break; |
75 | 75 | ||
76 | case SNI_BRD_PCI_MTOWER: | 76 | case SNI_BRD_PCI_MTOWER: |
77 | case SNI_BRD_PCI_DESKTOP: | 77 | case SNI_BRD_PCI_DESKTOP: |
78 | case SNI_BRD_PCI_MTOWER_CPLUS: | 78 | case SNI_BRD_PCI_MTOWER_CPLUS: |
79 | sni_pcimt_irq_init(); | 79 | sni_pcimt_irq_init(); |
80 | break; | 80 | break; |
81 | } | 81 | } |
82 | } | 82 | } |
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c index cdb1417fba59..cec4b8ca1438 100644 --- a/arch/mips/sni/pcimt.c +++ b/arch/mips/sni/pcimt.c | |||
@@ -60,7 +60,7 @@ static inline void sni_pcimt_detect(void) | |||
60 | p += sprintf(p, "%s PCI", (csmsr & 0x80) ? "RM200" : "RM300"); | 60 | p += sprintf(p, "%s PCI", (csmsr & 0x80) ? "RM200" : "RM300"); |
61 | if ((csmsr & 0x80) == 0) | 61 | if ((csmsr & 0x80) == 0) |
62 | p += sprintf(p, ", board revision %s", | 62 | p += sprintf(p, ", board revision %s", |
63 | (csmsr & 0x20) ? "D" : "C"); | 63 | (csmsr & 0x20) ? "D" : "C"); |
64 | asic = csmsr & 0x80; | 64 | asic = csmsr & 0x80; |
65 | asic = (csmsr & 0x08) ? asic : !asic; | 65 | asic = (csmsr & 0x08) ? asic : !asic; |
66 | p += sprintf(p, ", ASIC PCI Rev %s", asic ? "1.0" : "1.1"); | 66 | p += sprintf(p, ", ASIC PCI Rev %s", asic ? "1.0" : "1.1"); |
@@ -91,22 +91,22 @@ static struct platform_device pcimt_serial8250_device = { | |||
91 | }; | 91 | }; |
92 | 92 | ||
93 | static struct resource pcimt_cmos_rsrc[] = { | 93 | static struct resource pcimt_cmos_rsrc[] = { |
94 | { | 94 | { |
95 | .start = 0x70, | 95 | .start = 0x70, |
96 | .end = 0x71, | 96 | .end = 0x71, |
97 | .flags = IORESOURCE_IO | 97 | .flags = IORESOURCE_IO |
98 | }, | 98 | }, |
99 | { | 99 | { |
100 | .start = 8, | 100 | .start = 8, |
101 | .end = 8, | 101 | .end = 8, |
102 | .flags = IORESOURCE_IRQ | 102 | .flags = IORESOURCE_IRQ |
103 | } | 103 | } |
104 | }; | 104 | }; |
105 | 105 | ||
106 | static struct platform_device pcimt_cmos_device = { | 106 | static struct platform_device pcimt_cmos_device = { |
107 | .name = "rtc_cmos", | 107 | .name = "rtc_cmos", |
108 | .num_resources = ARRAY_SIZE(pcimt_cmos_rsrc), | 108 | .num_resources = ARRAY_SIZE(pcimt_cmos_rsrc), |
109 | .resource = pcimt_cmos_rsrc | 109 | .resource = pcimt_cmos_rsrc |
110 | }; | 110 | }; |
111 | 111 | ||
112 | 112 | ||
@@ -191,7 +191,7 @@ static struct pci_controller sni_controller = { | |||
191 | .mem_offset = 0x00000000UL, | 191 | .mem_offset = 0x00000000UL, |
192 | .io_resource = &sni_io_resource, | 192 | .io_resource = &sni_io_resource, |
193 | .io_offset = 0x00000000UL, | 193 | .io_offset = 0x00000000UL, |
194 | .io_map_base = SNI_PORT_BASE | 194 | .io_map_base = SNI_PORT_BASE |
195 | }; | 195 | }; |
196 | 196 | ||
197 | static void enable_pcimt_irq(struct irq_data *d) | 197 | static void enable_pcimt_irq(struct irq_data *d) |
@@ -319,9 +319,9 @@ static int __init snirm_pcimt_setup_devinit(void) | |||
319 | case SNI_BRD_PCI_MTOWER: | 319 | case SNI_BRD_PCI_MTOWER: |
320 | case SNI_BRD_PCI_DESKTOP: | 320 | case SNI_BRD_PCI_DESKTOP: |
321 | case SNI_BRD_PCI_MTOWER_CPLUS: | 321 | case SNI_BRD_PCI_MTOWER_CPLUS: |
322 | platform_device_register(&pcimt_serial8250_device); | 322 | platform_device_register(&pcimt_serial8250_device); |
323 | platform_device_register(&pcimt_cmos_device); | 323 | platform_device_register(&pcimt_cmos_device); |
324 | break; | 324 | break; |
325 | } | 325 | } |
326 | 326 | ||
327 | return 0; | 327 | return 0; |
diff --git a/arch/mips/sni/pcit.c b/arch/mips/sni/pcit.c index b5246373d16b..7cddd03d1fea 100644 --- a/arch/mips/sni/pcit.c +++ b/arch/mips/sni/pcit.c | |||
@@ -59,22 +59,22 @@ static struct platform_device pcit_cplus_serial8250_device = { | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct resource pcit_cmos_rsrc[] = { | 61 | static struct resource pcit_cmos_rsrc[] = { |
62 | { | 62 | { |
63 | .start = 0x70, | 63 | .start = 0x70, |
64 | .end = 0x71, | 64 | .end = 0x71, |
65 | .flags = IORESOURCE_IO | 65 | .flags = IORESOURCE_IO |
66 | }, | 66 | }, |
67 | { | 67 | { |
68 | .start = 8, | 68 | .start = 8, |
69 | .end = 8, | 69 | .end = 8, |
70 | .flags = IORESOURCE_IRQ | 70 | .flags = IORESOURCE_IRQ |
71 | } | 71 | } |
72 | }; | 72 | }; |
73 | 73 | ||
74 | static struct platform_device pcit_cmos_device = { | 74 | static struct platform_device pcit_cmos_device = { |
75 | .name = "rtc_cmos", | 75 | .name = "rtc_cmos", |
76 | .num_resources = ARRAY_SIZE(pcit_cmos_rsrc), | 76 | .num_resources = ARRAY_SIZE(pcit_cmos_rsrc), |
77 | .resource = pcit_cmos_rsrc | 77 | .resource = pcit_cmos_rsrc |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static struct platform_device pcit_pcspeaker_pdev = { | 80 | static struct platform_device pcit_pcspeaker_pdev = { |
@@ -153,7 +153,7 @@ static struct pci_controller sni_pcit_controller = { | |||
153 | .mem_offset = 0x00000000UL, | 153 | .mem_offset = 0x00000000UL, |
154 | .io_resource = &sni_io_resource, | 154 | .io_resource = &sni_io_resource, |
155 | .io_offset = 0x00000000UL, | 155 | .io_offset = 0x00000000UL, |
156 | .io_map_base = SNI_PORT_BASE | 156 | .io_map_base = SNI_PORT_BASE |
157 | }; | 157 | }; |
158 | 158 | ||
159 | static void enable_pcit_irq(struct irq_data *d) | 159 | static void enable_pcit_irq(struct irq_data *d) |
@@ -272,16 +272,16 @@ static int __init snirm_pcit_setup_devinit(void) | |||
272 | { | 272 | { |
273 | switch (sni_brd_type) { | 273 | switch (sni_brd_type) { |
274 | case SNI_BRD_PCI_TOWER: | 274 | case SNI_BRD_PCI_TOWER: |
275 | platform_device_register(&pcit_serial8250_device); | 275 | platform_device_register(&pcit_serial8250_device); |
276 | platform_device_register(&pcit_cmos_device); | 276 | platform_device_register(&pcit_cmos_device); |
277 | platform_device_register(&pcit_pcspeaker_pdev); | 277 | platform_device_register(&pcit_pcspeaker_pdev); |
278 | break; | 278 | break; |
279 | 279 | ||
280 | case SNI_BRD_PCI_TOWER_CPLUS: | 280 | case SNI_BRD_PCI_TOWER_CPLUS: |
281 | platform_device_register(&pcit_cplus_serial8250_device); | 281 | platform_device_register(&pcit_cplus_serial8250_device); |
282 | platform_device_register(&pcit_cmos_device); | 282 | platform_device_register(&pcit_cmos_device); |
283 | platform_device_register(&pcit_pcspeaker_pdev); | 283 | platform_device_register(&pcit_pcspeaker_pdev); |
284 | break; | 284 | break; |
285 | } | 285 | } |
286 | return 0; | 286 | return 0; |
287 | } | 287 | } |
diff --git a/arch/mips/sni/rm200.c b/arch/mips/sni/rm200.c index 3ab5b5d25b0a..a046b302623e 100644 --- a/arch/mips/sni/rm200.c +++ b/arch/mips/sni/rm200.c | |||
@@ -48,17 +48,17 @@ static struct platform_device rm200_serial8250_device = { | |||
48 | }; | 48 | }; |
49 | 49 | ||
50 | static struct resource rm200_ds1216_rsrc[] = { | 50 | static struct resource rm200_ds1216_rsrc[] = { |
51 | { | 51 | { |
52 | .start = 0x1cd41ffc, | 52 | .start = 0x1cd41ffc, |
53 | .end = 0x1cd41fff, | 53 | .end = 0x1cd41fff, |
54 | .flags = IORESOURCE_MEM | 54 | .flags = IORESOURCE_MEM |
55 | } | 55 | } |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static struct platform_device rm200_ds1216_device = { | 58 | static struct platform_device rm200_ds1216_device = { |
59 | .name = "rtc-ds1216", | 59 | .name = "rtc-ds1216", |
60 | .num_resources = ARRAY_SIZE(rm200_ds1216_rsrc), | 60 | .num_resources = ARRAY_SIZE(rm200_ds1216_rsrc), |
61 | .resource = rm200_ds1216_rsrc | 61 | .resource = rm200_ds1216_rsrc |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static struct resource snirm_82596_rm200_rsrc[] = { | 64 | static struct resource snirm_82596_rm200_rsrc[] = { |
@@ -88,9 +88,9 @@ static struct resource snirm_82596_rm200_rsrc[] = { | |||
88 | }; | 88 | }; |
89 | 89 | ||
90 | static struct platform_device snirm_82596_rm200_pdev = { | 90 | static struct platform_device snirm_82596_rm200_pdev = { |
91 | .name = "snirm_82596", | 91 | .name = "snirm_82596", |
92 | .num_resources = ARRAY_SIZE(snirm_82596_rm200_rsrc), | 92 | .num_resources = ARRAY_SIZE(snirm_82596_rm200_rsrc), |
93 | .resource = snirm_82596_rm200_rsrc | 93 | .resource = snirm_82596_rm200_rsrc |
94 | }; | 94 | }; |
95 | 95 | ||
96 | static struct resource snirm_53c710_rm200_rsrc[] = { | 96 | static struct resource snirm_53c710_rm200_rsrc[] = { |
@@ -107,9 +107,9 @@ static struct resource snirm_53c710_rm200_rsrc[] = { | |||
107 | }; | 107 | }; |
108 | 108 | ||
109 | static struct platform_device snirm_53c710_rm200_pdev = { | 109 | static struct platform_device snirm_53c710_rm200_pdev = { |
110 | .name = "snirm_53c710", | 110 | .name = "snirm_53c710", |
111 | .num_resources = ARRAY_SIZE(snirm_53c710_rm200_rsrc), | 111 | .num_resources = ARRAY_SIZE(snirm_53c710_rm200_rsrc), |
112 | .resource = snirm_53c710_rm200_rsrc | 112 | .resource = snirm_53c710_rm200_rsrc |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static int __init snirm_setup_devinit(void) | 115 | static int __init snirm_setup_devinit(void) |
@@ -134,9 +134,9 @@ device_initcall(snirm_setup_devinit); | |||
134 | */ | 134 | */ |
135 | 135 | ||
136 | static DEFINE_RAW_SPINLOCK(sni_rm200_i8259A_lock); | 136 | static DEFINE_RAW_SPINLOCK(sni_rm200_i8259A_lock); |
137 | #define PIC_CMD 0x00 | 137 | #define PIC_CMD 0x00 |
138 | #define PIC_IMR 0x01 | 138 | #define PIC_IMR 0x01 |
139 | #define PIC_ISR PIC_CMD | 139 | #define PIC_ISR PIC_CMD |
140 | #define PIC_POLL PIC_ISR | 140 | #define PIC_POLL PIC_ISR |
141 | #define PIC_OCW3 PIC_ISR | 141 | #define PIC_OCW3 PIC_ISR |
142 | 142 | ||
@@ -421,8 +421,8 @@ void __init sni_rm200_i8259_irqs(void) | |||
421 | } | 421 | } |
422 | 422 | ||
423 | 423 | ||
424 | #define SNI_RM200_INT_STAT_REG CKSEG1ADDR(0xbc000000) | 424 | #define SNI_RM200_INT_STAT_REG CKSEG1ADDR(0xbc000000) |
425 | #define SNI_RM200_INT_ENA_REG CKSEG1ADDR(0xbc080000) | 425 | #define SNI_RM200_INT_ENA_REG CKSEG1ADDR(0xbc080000) |
426 | 426 | ||
427 | #define SNI_RM200_INT_START 24 | 427 | #define SNI_RM200_INT_START 24 |
428 | #define SNI_RM200_INT_END 28 | 428 | #define SNI_RM200_INT_END 28 |
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index 2e9c283b8e68..5b09b3544edd 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c | |||
@@ -204,23 +204,23 @@ void __init plat_mem_setup(void) | |||
204 | case SNI_BRD_10NEW: | 204 | case SNI_BRD_10NEW: |
205 | case SNI_BRD_TOWER_OASIC: | 205 | case SNI_BRD_TOWER_OASIC: |
206 | case SNI_BRD_MINITOWER: | 206 | case SNI_BRD_MINITOWER: |
207 | sni_a20r_init(); | 207 | sni_a20r_init(); |
208 | break; | 208 | break; |
209 | 209 | ||
210 | case SNI_BRD_PCI_TOWER: | 210 | case SNI_BRD_PCI_TOWER: |
211 | case SNI_BRD_PCI_TOWER_CPLUS: | 211 | case SNI_BRD_PCI_TOWER_CPLUS: |
212 | sni_pcit_init(); | 212 | sni_pcit_init(); |
213 | break; | 213 | break; |
214 | 214 | ||
215 | case SNI_BRD_RM200: | 215 | case SNI_BRD_RM200: |
216 | sni_rm200_init(); | 216 | sni_rm200_init(); |
217 | break; | 217 | break; |
218 | 218 | ||
219 | case SNI_BRD_PCI_MTOWER: | 219 | case SNI_BRD_PCI_MTOWER: |
220 | case SNI_BRD_PCI_DESKTOP: | 220 | case SNI_BRD_PCI_DESKTOP: |
221 | case SNI_BRD_PCI_MTOWER_CPLUS: | 221 | case SNI_BRD_PCI_MTOWER_CPLUS: |
222 | sni_pcimt_init(); | 222 | sni_pcimt_init(); |
223 | break; | 223 | break; |
224 | } | 224 | } |
225 | 225 | ||
226 | _machine_restart = sni_machine_restart; | 226 | _machine_restart = sni_machine_restart; |
@@ -247,16 +247,16 @@ static void quirk_cirrus_ram_size(struct pci_dev *dev) | |||
247 | */ | 247 | */ |
248 | pci_read_config_word(dev, PCI_COMMAND, &cmd); | 248 | pci_read_config_word(dev, PCI_COMMAND, &cmd); |
249 | if ((cmd & (PCI_COMMAND_IO|PCI_COMMAND_MEMORY)) | 249 | if ((cmd & (PCI_COMMAND_IO|PCI_COMMAND_MEMORY)) |
250 | == (PCI_COMMAND_IO|PCI_COMMAND_MEMORY)) { | 250 | == (PCI_COMMAND_IO|PCI_COMMAND_MEMORY)) { |
251 | vga_wseq(NULL, CL_SEQR6, 0x12); /* unlock all extension registers */ | 251 | vga_wseq(NULL, CL_SEQR6, 0x12); /* unlock all extension registers */ |
252 | vga_wseq(NULL, CL_SEQRF, 0x18); | 252 | vga_wseq(NULL, CL_SEQRF, 0x18); |
253 | } | 253 | } |
254 | } | 254 | } |
255 | 255 | ||
256 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5434_8, | 256 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5434_8, |
257 | quirk_cirrus_ram_size); | 257 | quirk_cirrus_ram_size); |
258 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5436, | 258 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5436, |
259 | quirk_cirrus_ram_size); | 259 | quirk_cirrus_ram_size); |
260 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5446, | 260 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5446, |
261 | quirk_cirrus_ram_size); | 261 | quirk_cirrus_ram_size); |
262 | #endif | 262 | #endif |
diff --git a/arch/mips/sni/time.c b/arch/mips/sni/time.c index 494c9e7847aa..cf8ec568b9df 100644 --- a/arch/mips/sni/time.c +++ b/arch/mips/sni/time.c | |||
@@ -10,12 +10,12 @@ | |||
10 | #include <asm/time.h> | 10 | #include <asm/time.h> |
11 | #include <asm-generic/rtc.h> | 11 | #include <asm-generic/rtc.h> |
12 | 12 | ||
13 | #define SNI_CLOCK_TICK_RATE 3686400 | 13 | #define SNI_CLOCK_TICK_RATE 3686400 |
14 | #define SNI_COUNTER2_DIV 64 | 14 | #define SNI_COUNTER2_DIV 64 |
15 | #define SNI_COUNTER0_DIV ((SNI_CLOCK_TICK_RATE / SNI_COUNTER2_DIV) / HZ) | 15 | #define SNI_COUNTER0_DIV ((SNI_CLOCK_TICK_RATE / SNI_COUNTER2_DIV) / HZ) |
16 | 16 | ||
17 | static void a20r_set_mode(enum clock_event_mode mode, | 17 | static void a20r_set_mode(enum clock_event_mode mode, |
18 | struct clock_event_device *evt) | 18 | struct clock_event_device *evt) |
19 | { | 19 | { |
20 | switch (mode) { | 20 | switch (mode) { |
21 | case CLOCK_EVT_MODE_PERIODIC: | 21 | case CLOCK_EVT_MODE_PERIODIC: |
@@ -33,14 +33,14 @@ static void a20r_set_mode(enum clock_event_mode mode, | |||
33 | *(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = SNI_COUNTER2_DIV >> 8; | 33 | *(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = SNI_COUNTER2_DIV >> 8; |
34 | wmb(); | 34 | wmb(); |
35 | 35 | ||
36 | break; | 36 | break; |
37 | case CLOCK_EVT_MODE_ONESHOT: | 37 | case CLOCK_EVT_MODE_ONESHOT: |
38 | case CLOCK_EVT_MODE_UNUSED: | 38 | case CLOCK_EVT_MODE_UNUSED: |
39 | case CLOCK_EVT_MODE_SHUTDOWN: | 39 | case CLOCK_EVT_MODE_SHUTDOWN: |
40 | break; | 40 | break; |
41 | case CLOCK_EVT_MODE_RESUME: | 41 | case CLOCK_EVT_MODE_RESUME: |
42 | break; | 42 | break; |
43 | } | 43 | } |
44 | } | 44 | } |
45 | 45 | ||
46 | static struct clock_event_device a20r_clockevent_device = { | 46 | static struct clock_event_device a20r_clockevent_device = { |
@@ -82,15 +82,15 @@ static void __init sni_a20r_timer_setup(void) | |||
82 | struct irqaction *action = &a20r_irqaction; | 82 | struct irqaction *action = &a20r_irqaction; |
83 | unsigned int cpu = smp_processor_id(); | 83 | unsigned int cpu = smp_processor_id(); |
84 | 84 | ||
85 | cd->cpumask = cpumask_of(cpu); | 85 | cd->cpumask = cpumask_of(cpu); |
86 | clockevents_register_device(cd); | 86 | clockevents_register_device(cd); |
87 | action->dev_id = cd; | 87 | action->dev_id = cd; |
88 | setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction); | 88 | setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction); |
89 | } | 89 | } |
90 | 90 | ||
91 | #define SNI_8254_TICK_RATE 1193182UL | 91 | #define SNI_8254_TICK_RATE 1193182UL |
92 | 92 | ||
93 | #define SNI_8254_TCSAMP_COUNTER ((SNI_8254_TICK_RATE / HZ) + 255) | 93 | #define SNI_8254_TCSAMP_COUNTER ((SNI_8254_TICK_RATE / HZ) + 255) |
94 | 94 | ||
95 | static __init unsigned long dosample(void) | 95 | static __init unsigned long dosample(void) |
96 | { | 96 | { |
diff --git a/arch/mips/txx9/Platform b/arch/mips/txx9/Platform index a801abbe138b..a176d1fd5799 100644 --- a/arch/mips/txx9/Platform +++ b/arch/mips/txx9/Platform | |||
@@ -6,5 +6,5 @@ cflags-$(CONFIG_MACH_TX39XX) += \ | |||
6 | cflags-$(CONFIG_MACH_TX49XX) += \ | 6 | cflags-$(CONFIG_MACH_TX49XX) += \ |
7 | -I$(srctree)/arch/mips/include/asm/mach-tx49xx | 7 | -I$(srctree)/arch/mips/include/asm/mach-tx49xx |
8 | 8 | ||
9 | load-$(CONFIG_MACH_TX39XX) += 0xffffffff80050000 | 9 | load-$(CONFIG_MACH_TX39XX) += 0xffffffff80050000 |
10 | load-$(CONFIG_MACH_TX49XX) += 0xffffffff80100000 | 10 | load-$(CONFIG_MACH_TX49XX) += 0xffffffff80100000 |
diff --git a/arch/mips/txx9/generic/irq_tx4927.c b/arch/mips/txx9/generic/irq_tx4927.c index 7e3ac5782da4..ed8e702d448e 100644 --- a/arch/mips/txx9/generic/irq_tx4927.c +++ b/arch/mips/txx9/generic/irq_tx4927.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Common tx4927 irq handler | 2 | * Common tx4927 irq handler |
3 | * | 3 | * |
4 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
5 | * source@mvista.com | 5 | * source@mvista.com |
6 | * | 6 | * |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
8 | * Free Software Foundation; either version 2 of the License, or (at your | 8 | * Free Software Foundation; either version 2 of the License, or (at your |
diff --git a/arch/mips/txx9/generic/irq_tx4939.c b/arch/mips/txx9/generic/irq_tx4939.c index 6b067dbd2ae1..0d7267e81a8c 100644 --- a/arch/mips/txx9/generic/irq_tx4939.c +++ b/arch/mips/txx9/generic/irq_tx4939.c | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Copyright 2001, 2003-2005 MontaVista Software Inc. | 6 | * Copyright 2001, 2003-2005 MontaVista Software Inc. |
7 | * Author: MontaVista Software, Inc. | 7 | * Author: MontaVista Software, Inc. |
8 | * ahennessy@mvista.com | 8 | * ahennessy@mvista.com |
9 | * source@mvista.com | 9 | * source@mvista.com |
10 | * Copyright (C) 2000-2001,2005-2007 Toshiba Corporation | 10 | * Copyright (C) 2000-2001,2005-2007 Toshiba Corporation |
11 | * | 11 | * |
12 | * This file is subject to the terms and conditions of the GNU General Public | 12 | * This file is subject to the terms and conditions of the GNU General Public |
diff --git a/arch/mips/txx9/generic/mem_tx4927.c b/arch/mips/txx9/generic/mem_tx4927.c index 70f9626f8227..deea2ceae8a7 100644 --- a/arch/mips/txx9/generic/mem_tx4927.c +++ b/arch/mips/txx9/generic/mem_tx4927.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * common tx4927 memory interface | 2 | * common tx4927 memory interface |
3 | * | 3 | * |
4 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
5 | * source@mvista.com | 5 | * source@mvista.com |
6 | * | 6 | * |
7 | * Copyright 2001-2002 MontaVista Software Inc. | 7 | * Copyright 2001-2002 MontaVista Software Inc. |
8 | * | 8 | * |
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c index ce8f8b9b930c..28713274e0cc 100644 --- a/arch/mips/txx9/generic/pci.c +++ b/arch/mips/txx9/generic/pci.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/arch/mips/txx9/pci.c | 2 | * linux/arch/mips/txx9/pci.c |
3 | * | 3 | * |
4 | * Based on linux/arch/mips/txx9/rbtx4927/setup.c, | 4 | * Based on linux/arch/mips/txx9/rbtx4927/setup.c, |
5 | * linux/arch/mips/txx9/rbtx4938/setup.c, | 5 | * linux/arch/mips/txx9/rbtx4938/setup.c, |
6 | * and RBTX49xx patch from CELF patch archive. | 6 | * and RBTX49xx patch from CELF patch archive. |
7 | * | 7 | * |
8 | * Copyright 2001-2005 MontaVista Software Inc. | 8 | * Copyright 2001-2005 MontaVista Software Inc. |
@@ -107,7 +107,7 @@ int txx9_pci_mem_high __initdata; | |||
107 | 107 | ||
108 | /* | 108 | /* |
109 | * allocate pci_controller and resources. | 109 | * allocate pci_controller and resources. |
110 | * mem_base, io_base: physical address. 0 for auto assignment. | 110 | * mem_base, io_base: physical address. 0 for auto assignment. |
111 | * mem_size and io_size means max size on auto assignment. | 111 | * mem_size and io_size means max size on auto assignment. |
112 | * pcic must be &txx9_primary_pcic or NULL. | 112 | * pcic must be &txx9_primary_pcic or NULL. |
113 | */ | 113 | */ |
diff --git a/arch/mips/txx9/generic/setup_tx3927.c b/arch/mips/txx9/generic/setup_tx3927.c index 9505d58454c8..110e05c3eb8f 100644 --- a/arch/mips/txx9/generic/setup_tx3927.c +++ b/arch/mips/txx9/generic/setup_tx3927.c | |||
@@ -132,6 +132,6 @@ void __init tx3927_mtd_init(int ch) | |||
132 | unsigned long size = txx9_ce_res[ch].end - start + 1; | 132 | unsigned long size = txx9_ce_res[ch].end - start + 1; |
133 | 133 | ||
134 | if (!(tx3927_romcptr->cr[ch] & 0x8)) | 134 | if (!(tx3927_romcptr->cr[ch] & 0x8)) |
135 | return; /* disabled */ | 135 | return; /* disabled */ |
136 | txx9_physmap_flash_init(ch, start, size, &pdata); | 136 | txx9_physmap_flash_init(ch, start, size, &pdata); |
137 | } | 137 | } |
diff --git a/arch/mips/txx9/generic/setup_tx4927.c b/arch/mips/txx9/generic/setup_tx4927.c index 3418b2a90f7e..e714d6ce9a82 100644 --- a/arch/mips/txx9/generic/setup_tx4927.c +++ b/arch/mips/txx9/generic/setup_tx4927.c | |||
@@ -250,7 +250,7 @@ void __init tx4927_mtd_init(int ch) | |||
250 | unsigned long size = txx9_ce_res[ch].end - start + 1; | 250 | unsigned long size = txx9_ce_res[ch].end - start + 1; |
251 | 251 | ||
252 | if (!(TX4927_EBUSC_CR(ch) & 0x8)) | 252 | if (!(TX4927_EBUSC_CR(ch) & 0x8)) |
253 | return; /* disabled */ | 253 | return; /* disabled */ |
254 | txx9_physmap_flash_init(ch, start, size, &pdata); | 254 | txx9_physmap_flash_init(ch, start, size, &pdata); |
255 | } | 255 | } |
256 | 256 | ||
diff --git a/arch/mips/txx9/generic/setup_tx4938.c b/arch/mips/txx9/generic/setup_tx4938.c index eb2080110239..0a3bf2dfaba1 100644 --- a/arch/mips/txx9/generic/setup_tx4938.c +++ b/arch/mips/txx9/generic/setup_tx4938.c | |||
@@ -329,7 +329,7 @@ void __init tx4938_mtd_init(int ch) | |||
329 | unsigned long size = txx9_ce_res[ch].end - start + 1; | 329 | unsigned long size = txx9_ce_res[ch].end - start + 1; |
330 | 330 | ||
331 | if (!(TX4938_EBUSC_CR(ch) & 0x8)) | 331 | if (!(TX4938_EBUSC_CR(ch) & 0x8)) |
332 | return; /* disabled */ | 332 | return; /* disabled */ |
333 | txx9_physmap_flash_init(ch, start, size, &pdata); | 333 | txx9_physmap_flash_init(ch, start, size, &pdata); |
334 | } | 334 | } |
335 | 335 | ||
diff --git a/arch/mips/txx9/generic/setup_tx4939.c b/arch/mips/txx9/generic/setup_tx4939.c index 5ff7a9584daf..729a50991780 100644 --- a/arch/mips/txx9/generic/setup_tx4939.c +++ b/arch/mips/txx9/generic/setup_tx4939.c | |||
@@ -301,7 +301,7 @@ void __init tx4939_sio_init(unsigned int sclk, unsigned int cts_mask) | |||
301 | unsigned int ch_mask = 0; | 301 | unsigned int ch_mask = 0; |
302 | __u64 pcfg = __raw_readq(&tx4939_ccfgptr->pcfg); | 302 | __u64 pcfg = __raw_readq(&tx4939_ccfgptr->pcfg); |
303 | 303 | ||
304 | cts_mask |= ~1; /* only SIO0 have RTS/CTS */ | 304 | cts_mask |= ~1; /* only SIO0 have RTS/CTS */ |
305 | if ((pcfg & TX4939_PCFG_SIO2MODE_MASK) != TX4939_PCFG_SIO2MODE_SIO0) | 305 | if ((pcfg & TX4939_PCFG_SIO2MODE_MASK) != TX4939_PCFG_SIO2MODE_SIO0) |
306 | cts_mask |= 1 << 0; /* disable SIO0 RTS/CTS by PCFG setting */ | 306 | cts_mask |= 1 << 0; /* disable SIO0 RTS/CTS by PCFG setting */ |
307 | if ((pcfg & TX4939_PCFG_SIO2MODE_MASK) != TX4939_PCFG_SIO2MODE_SIO2) | 307 | if ((pcfg & TX4939_PCFG_SIO2MODE_MASK) != TX4939_PCFG_SIO2MODE_SIO2) |
@@ -378,7 +378,7 @@ void __init tx4939_mtd_init(int ch) | |||
378 | unsigned long size = txx9_ce_res[ch].end - start + 1; | 378 | unsigned long size = txx9_ce_res[ch].end - start + 1; |
379 | 379 | ||
380 | if (!(TX4939_EBUSC_CR(ch) & 0x8)) | 380 | if (!(TX4939_EBUSC_CR(ch) & 0x8)) |
381 | return; /* disabled */ | 381 | return; /* disabled */ |
382 | txx9_physmap_flash_init(ch, start, size, &pdata); | 382 | txx9_physmap_flash_init(ch, start, size, &pdata); |
383 | } | 383 | } |
384 | 384 | ||
diff --git a/arch/mips/txx9/generic/smsc_fdc37m81x.c b/arch/mips/txx9/generic/smsc_fdc37m81x.c index 8ebc3848f3ac..f98baa6263d2 100644 --- a/arch/mips/txx9/generic/smsc_fdc37m81x.c +++ b/arch/mips/txx9/generic/smsc_fdc37m81x.c | |||
@@ -18,40 +18,40 @@ | |||
18 | /* Common Registers */ | 18 | /* Common Registers */ |
19 | #define SMSC_FDC37M81X_CONFIG_INDEX 0x00 | 19 | #define SMSC_FDC37M81X_CONFIG_INDEX 0x00 |
20 | #define SMSC_FDC37M81X_CONFIG_DATA 0x01 | 20 | #define SMSC_FDC37M81X_CONFIG_DATA 0x01 |
21 | #define SMSC_FDC37M81X_CONF 0x02 | 21 | #define SMSC_FDC37M81X_CONF 0x02 |
22 | #define SMSC_FDC37M81X_INDEX 0x03 | 22 | #define SMSC_FDC37M81X_INDEX 0x03 |
23 | #define SMSC_FDC37M81X_DNUM 0x07 | 23 | #define SMSC_FDC37M81X_DNUM 0x07 |
24 | #define SMSC_FDC37M81X_DID 0x20 | 24 | #define SMSC_FDC37M81X_DID 0x20 |
25 | #define SMSC_FDC37M81X_DREV 0x21 | 25 | #define SMSC_FDC37M81X_DREV 0x21 |
26 | #define SMSC_FDC37M81X_PCNT 0x22 | 26 | #define SMSC_FDC37M81X_PCNT 0x22 |
27 | #define SMSC_FDC37M81X_PMGT 0x23 | 27 | #define SMSC_FDC37M81X_PMGT 0x23 |
28 | #define SMSC_FDC37M81X_OSC 0x24 | 28 | #define SMSC_FDC37M81X_OSC 0x24 |
29 | #define SMSC_FDC37M81X_CONFPA0 0x26 | 29 | #define SMSC_FDC37M81X_CONFPA0 0x26 |
30 | #define SMSC_FDC37M81X_CONFPA1 0x27 | 30 | #define SMSC_FDC37M81X_CONFPA1 0x27 |
31 | #define SMSC_FDC37M81X_TEST4 0x2B | 31 | #define SMSC_FDC37M81X_TEST4 0x2B |
32 | #define SMSC_FDC37M81X_TEST5 0x2C | 32 | #define SMSC_FDC37M81X_TEST5 0x2C |
33 | #define SMSC_FDC37M81X_TEST1 0x2D | 33 | #define SMSC_FDC37M81X_TEST1 0x2D |
34 | #define SMSC_FDC37M81X_TEST2 0x2E | 34 | #define SMSC_FDC37M81X_TEST2 0x2E |
35 | #define SMSC_FDC37M81X_TEST3 0x2F | 35 | #define SMSC_FDC37M81X_TEST3 0x2F |
36 | 36 | ||
37 | /* Logical device numbers */ | 37 | /* Logical device numbers */ |
38 | #define SMSC_FDC37M81X_FDD 0x00 | 38 | #define SMSC_FDC37M81X_FDD 0x00 |
39 | #define SMSC_FDC37M81X_SERIAL1 0x04 | 39 | #define SMSC_FDC37M81X_SERIAL1 0x04 |
40 | #define SMSC_FDC37M81X_SERIAL2 0x05 | 40 | #define SMSC_FDC37M81X_SERIAL2 0x05 |
41 | #define SMSC_FDC37M81X_KBD 0x07 | 41 | #define SMSC_FDC37M81X_KBD 0x07 |
42 | 42 | ||
43 | /* Logical device Config Registers */ | 43 | /* Logical device Config Registers */ |
44 | #define SMSC_FDC37M81X_ACTIVE 0x30 | 44 | #define SMSC_FDC37M81X_ACTIVE 0x30 |
45 | #define SMSC_FDC37M81X_BASEADDR0 0x60 | 45 | #define SMSC_FDC37M81X_BASEADDR0 0x60 |
46 | #define SMSC_FDC37M81X_BASEADDR1 0x61 | 46 | #define SMSC_FDC37M81X_BASEADDR1 0x61 |
47 | #define SMSC_FDC37M81X_INT 0x70 | 47 | #define SMSC_FDC37M81X_INT 0x70 |
48 | #define SMSC_FDC37M81X_INT2 0x72 | 48 | #define SMSC_FDC37M81X_INT2 0x72 |
49 | #define SMSC_FDC37M81X_MODE 0xF0 | 49 | #define SMSC_FDC37M81X_MODE 0xF0 |
50 | 50 | ||
51 | /* Chip Config Values */ | 51 | /* Chip Config Values */ |
52 | #define SMSC_FDC37M81X_CONFIG_ENTER 0x55 | 52 | #define SMSC_FDC37M81X_CONFIG_ENTER 0x55 |
53 | #define SMSC_FDC37M81X_CONFIG_EXIT 0xaa | 53 | #define SMSC_FDC37M81X_CONFIG_EXIT 0xaa |
54 | #define SMSC_FDC37M81X_CHIP_ID 0x4d | 54 | #define SMSC_FDC37M81X_CHIP_ID 0x4d |
55 | 55 | ||
56 | static unsigned long g_smsc_fdc37m81x_base; | 56 | static unsigned long g_smsc_fdc37m81x_base; |
57 | 57 | ||
diff --git a/arch/mips/txx9/rbtx4927/irq.c b/arch/mips/txx9/rbtx4927/irq.c index 6c22c496090b..3f48292c9c6c 100644 --- a/arch/mips/txx9/rbtx4927/irq.c +++ b/arch/mips/txx9/rbtx4927/irq.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Toshiba RBTX4927 specific interrupt handlers | 2 | * Toshiba RBTX4927 specific interrupt handlers |
3 | * | 3 | * |
4 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
5 | * source@mvista.com | 5 | * source@mvista.com |
6 | * | 6 | * |
7 | * Copyright 2001-2002 MontaVista Software Inc. | 7 | * Copyright 2001-2002 MontaVista Software Inc. |
8 | * | 8 | * |
diff --git a/arch/mips/txx9/rbtx4927/prom.c b/arch/mips/txx9/rbtx4927/prom.c index cc97c6a6011b..fe6d0b54763f 100644 --- a/arch/mips/txx9/rbtx4927/prom.c +++ b/arch/mips/txx9/rbtx4927/prom.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * rbtx4927 specific prom routines | 2 | * rbtx4927 specific prom routines |
3 | * | 3 | * |
4 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
5 | * source@mvista.com | 5 | * source@mvista.com |
6 | * | 6 | * |
7 | * Copyright 2001-2002 MontaVista Software Inc. | 7 | * Copyright 2001-2002 MontaVista Software Inc. |
8 | * | 8 | * |
diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c index b15adfc2d726..3c516ef625e5 100644 --- a/arch/mips/txx9/rbtx4927/setup.c +++ b/arch/mips/txx9/rbtx4927/setup.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Toshiba rbtx4927 specific setup | 2 | * Toshiba rbtx4927 specific setup |
3 | * | 3 | * |
4 | * Author: MontaVista Software, Inc. | 4 | * Author: MontaVista Software, Inc. |
5 | * source@mvista.com | 5 | * source@mvista.com |
6 | * | 6 | * |
7 | * Copyright 2001-2002 MontaVista Software Inc. | 7 | * Copyright 2001-2002 MontaVista Software Inc. |
8 | * | 8 | * |
diff --git a/arch/mips/txx9/rbtx4938/setup.c b/arch/mips/txx9/rbtx4938/setup.c index d6e70dab3bd3..c9afd05020e0 100644 --- a/arch/mips/txx9/rbtx4938/setup.c +++ b/arch/mips/txx9/rbtx4938/setup.c | |||
@@ -107,10 +107,10 @@ static void __init rbtx4938_pci_setup(void) | |||
107 | /* SPI support */ | 107 | /* SPI support */ |
108 | 108 | ||
109 | /* chip select for SPI devices */ | 109 | /* chip select for SPI devices */ |
110 | #define SEEPROM1_CS 7 /* PIO7 */ | 110 | #define SEEPROM1_CS 7 /* PIO7 */ |
111 | #define SEEPROM2_CS 0 /* IOC */ | 111 | #define SEEPROM2_CS 0 /* IOC */ |
112 | #define SEEPROM3_CS 1 /* IOC */ | 112 | #define SEEPROM3_CS 1 /* IOC */ |
113 | #define SRTC_CS 2 /* IOC */ | 113 | #define SRTC_CS 2 /* IOC */ |
114 | #define SPI_BUSNO 0 | 114 | #define SPI_BUSNO 0 |
115 | 115 | ||
116 | static int __init rbtx4938_ethaddr_init(void) | 116 | static int __init rbtx4938_ethaddr_init(void) |
diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setup.c index e15641d93092..2da5f25f98bc 100644 --- a/arch/mips/txx9/rbtx4939/setup.c +++ b/arch/mips/txx9/rbtx4939/setup.c | |||
@@ -243,7 +243,7 @@ static int __init rbtx4939_led_probe(struct platform_device *pdev) | |||
243 | } | 243 | } |
244 | 244 | ||
245 | static struct platform_driver rbtx4939_led_driver = { | 245 | static struct platform_driver rbtx4939_led_driver = { |
246 | .driver = { | 246 | .driver = { |
247 | .name = "rbtx4939-led", | 247 | .name = "rbtx4939-led", |
248 | .owner = THIS_MODULE, | 248 | .owner = THIS_MODULE, |
249 | }, | 249 | }, |
@@ -337,7 +337,7 @@ static void rbtx4939_flash_copy_from(struct map_info *map, void *to, | |||
337 | shift = bdipsw & 3; | 337 | shift = bdipsw & 3; |
338 | while (len) { | 338 | while (len) { |
339 | curlen = min_t(unsigned long, len, | 339 | curlen = min_t(unsigned long, len, |
340 | 0x400000 - (from & (0x400000 - 1))); | 340 | 0x400000 - (from & (0x400000 - 1))); |
341 | memcpy(to, | 341 | memcpy(to, |
342 | (void *)((from & ~0xc00000) | | 342 | (void *)((from & ~0xc00000) | |
343 | ((((from >> 22) + shift) & 3) << 22)), | 343 | ((((from >> 22) + shift) & 3) << 22)), |
diff --git a/arch/mips/vr41xx/common/bcu.c b/arch/mips/vr41xx/common/bcu.c index 6346c59c9f9d..ff7d1c66cf82 100644 --- a/arch/mips/vr41xx/common/bcu.c +++ b/arch/mips/vr41xx/common/bcu.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * bcu.c, Bus Control Unit routines for the NEC VR4100 series. | 2 | * bcu.c, Bus Control Unit routines for the NEC VR4100 series. |
3 | * | 3 | * |
4 | * Copyright (C) 2002 MontaVista Software Inc. | 4 | * Copyright (C) 2002 MontaVista Software Inc. |
5 | * Author: Yoichi Yuasa <source@mvista.com> | 5 | * Author: Yoichi Yuasa <source@mvista.com> |
6 | * Copyright (C) 2003-2005 Yoichi Yuasa <yuasa@linux-mips.org> | 6 | * Copyright (C) 2003-2005 Yoichi Yuasa <yuasa@linux-mips.org> |
7 | * | 7 | * |
@@ -176,7 +176,7 @@ static inline unsigned long calculate_vtclock(uint16_t clkspeed, unsigned long p | |||
176 | } | 176 | } |
177 | 177 | ||
178 | static inline unsigned long calculate_tclock(uint16_t clkspeed, unsigned long pclock, | 178 | static inline unsigned long calculate_tclock(uint16_t clkspeed, unsigned long pclock, |
179 | unsigned long vtclock) | 179 | unsigned long vtclock) |
180 | { | 180 | { |
181 | unsigned long tclock = 0; | 181 | unsigned long tclock = 0; |
182 | 182 | ||
diff --git a/arch/mips/vr41xx/common/cmu.c b/arch/mips/vr41xx/common/cmu.c index 8ba7d04a5ec5..05302bfdd114 100644 --- a/arch/mips/vr41xx/common/cmu.c +++ b/arch/mips/vr41xx/common/cmu.c | |||
@@ -217,24 +217,24 @@ static int __init vr41xx_cmu_init(void) | |||
217 | unsigned long start, size; | 217 | unsigned long start, size; |
218 | 218 | ||
219 | switch (current_cpu_type()) { | 219 | switch (current_cpu_type()) { |
220 | case CPU_VR4111: | 220 | case CPU_VR4111: |
221 | case CPU_VR4121: | 221 | case CPU_VR4121: |
222 | start = CMU_TYPE1_BASE; | 222 | start = CMU_TYPE1_BASE; |
223 | size = CMU_TYPE1_SIZE; | 223 | size = CMU_TYPE1_SIZE; |
224 | break; | 224 | break; |
225 | case CPU_VR4122: | 225 | case CPU_VR4122: |
226 | case CPU_VR4131: | 226 | case CPU_VR4131: |
227 | start = CMU_TYPE2_BASE; | 227 | start = CMU_TYPE2_BASE; |
228 | size = CMU_TYPE2_SIZE; | 228 | size = CMU_TYPE2_SIZE; |
229 | break; | 229 | break; |
230 | case CPU_VR4133: | 230 | case CPU_VR4133: |
231 | start = CMU_TYPE3_BASE; | 231 | start = CMU_TYPE3_BASE; |
232 | size = CMU_TYPE3_SIZE; | 232 | size = CMU_TYPE3_SIZE; |
233 | break; | 233 | break; |
234 | default: | 234 | default: |
235 | panic("Unexpected CPU of NEC VR4100 series"); | 235 | panic("Unexpected CPU of NEC VR4100 series"); |
236 | break; | 236 | break; |
237 | } | 237 | } |
238 | 238 | ||
239 | if (request_mem_region(start, size, "CMU") == NULL) | 239 | if (request_mem_region(start, size, "CMU") == NULL) |
240 | return -EBUSY; | 240 | return -EBUSY; |
diff --git a/arch/mips/vr41xx/common/giu.c b/arch/mips/vr41xx/common/giu.c index b32b3bc60441..32cc8d66b34e 100644 --- a/arch/mips/vr41xx/common/giu.c +++ b/arch/mips/vr41xx/common/giu.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * NEC VR4100 series GIU platform device. | 2 | * NEC VR4100 series GIU platform device. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c index a39ef3207d71..41e873bc8474 100644 --- a/arch/mips/vr41xx/common/icu.c +++ b/arch/mips/vr41xx/common/icu.c | |||
@@ -49,11 +49,11 @@ static unsigned char sysint1_assign[16] = { | |||
49 | static unsigned char sysint2_assign[16] = { | 49 | static unsigned char sysint2_assign[16] = { |
50 | 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; | 50 | 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
51 | 51 | ||
52 | #define ICU1_TYPE1_BASE 0x0b000080UL | 52 | #define ICU1_TYPE1_BASE 0x0b000080UL |
53 | #define ICU2_TYPE1_BASE 0x0b000200UL | 53 | #define ICU2_TYPE1_BASE 0x0b000200UL |
54 | 54 | ||
55 | #define ICU1_TYPE2_BASE 0x0f000080UL | 55 | #define ICU1_TYPE2_BASE 0x0f000080UL |
56 | #define ICU2_TYPE2_BASE 0x0f0000a0UL | 56 | #define ICU2_TYPE2_BASE 0x0f0000a0UL |
57 | 57 | ||
58 | #define ICU1_SIZE 0x20 | 58 | #define ICU1_SIZE 0x20 |
59 | #define ICU2_SIZE 0x1c | 59 | #define ICU2_SIZE 0x1c |
diff --git a/arch/mips/vr41xx/common/pmu.c b/arch/mips/vr41xx/common/pmu.c index 9fbf5f0d1faf..70a3f90131d8 100644 --- a/arch/mips/vr41xx/common/pmu.c +++ b/arch/mips/vr41xx/common/pmu.c | |||
@@ -74,7 +74,7 @@ static inline void software_reset(void) | |||
74 | change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); | 74 | change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); |
75 | flush_cache_all(); | 75 | flush_cache_all(); |
76 | write_c0_wired(0); | 76 | write_c0_wired(0); |
77 | __asm__("jr %0"::"r"(0xbfc00000)); | 77 | __asm__("jr %0"::"r"(0xbfc00000)); |
78 | break; | 78 | break; |
79 | } | 79 | } |
80 | } | 80 | } |
diff --git a/arch/mips/vr41xx/common/rtc.c b/arch/mips/vr41xx/common/rtc.c index 76e3e8af7c96..c1e3d200920e 100644 --- a/arch/mips/vr41xx/common/rtc.c +++ b/arch/mips/vr41xx/common/rtc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * NEC VR4100 series RTC platform device. | 2 | * NEC VR4100 series RTC platform device. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/vr41xx/common/type.c b/arch/mips/vr41xx/common/type.c index ff841422b638..45836a92b7a1 100644 --- a/arch/mips/vr41xx/common/type.c +++ b/arch/mips/vr41xx/common/type.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * type.c, System type for NEC VR4100 series. | 2 | * type.c, System type for NEC VR4100 series. |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2005 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/mips/wrppmc/Platform b/arch/mips/wrppmc/Platform index e758645e9681..dc78b25b95fe 100644 --- a/arch/mips/wrppmc/Platform +++ b/arch/mips/wrppmc/Platform | |||
@@ -2,6 +2,6 @@ | |||
2 | # Wind River PPMC Board (4KC + GT64120) | 2 | # Wind River PPMC Board (4KC + GT64120) |
3 | # | 3 | # |
4 | platform-$(CONFIG_WR_PPMC) += wrppmc/ | 4 | platform-$(CONFIG_WR_PPMC) += wrppmc/ |
5 | cflags-$(CONFIG_WR_PPMC) += \ | 5 | cflags-$(CONFIG_WR_PPMC) += \ |
6 | -I$(srctree)/arch/mips/include/asm/mach-wrppmc | 6 | -I$(srctree)/arch/mips/include/asm/mach-wrppmc |
7 | load-$(CONFIG_WR_PPMC) += 0xffffffff80100000 | 7 | load-$(CONFIG_WR_PPMC) += 0xffffffff80100000 |
diff --git a/arch/mips/wrppmc/irq.c b/arch/mips/wrppmc/irq.c index c6e706274db4..f237bf4d5c3a 100644 --- a/arch/mips/wrppmc/irq.c +++ b/arch/mips/wrppmc/irq.c | |||
@@ -4,8 +4,8 @@ | |||
4 | * Copyright (C) 2006, Wind River System Inc. | 4 | * Copyright (C) 2006, Wind River System Inc. |
5 | * Author: Rongkai.Zhan, <rongkai.zhan@windriver.com> | 5 | * Author: Rongkai.Zhan, <rongkai.zhan@windriver.com> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
9 | * Free Software Foundation; either version 2 of the License, or (at your | 9 | * Free Software Foundation; either version 2 of the License, or (at your |
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
diff --git a/arch/mips/wrppmc/serial.c b/arch/mips/wrppmc/serial.c index 6f9d0858f596..83f0f7d05187 100644 --- a/arch/mips/wrppmc/serial.c +++ b/arch/mips/wrppmc/serial.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Registration of WRPPMC UART platform device. | 2 | * Registration of WRPPMC UART platform device. |
3 | * | 3 | * |
4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> | 4 | * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |