aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/asm/socket.h3
-rw-r--r--arch/arm/include/asm/socket.h3
-rw-r--r--arch/arm/mach-kirkwood/common.c5
-rw-r--r--arch/arm/mach-kirkwood/rd88f6281-setup.c13
-rw-r--r--arch/arm/mach-orion5x/common.c5
-rw-r--r--arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c9
-rw-r--r--arch/arm/mach-orion5x/rd88f5181l-ge-setup.c10
-rw-r--r--arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c10
-rw-r--r--arch/arm/mach-orion5x/wrt350n-v2-setup.c9
-rw-r--r--arch/avr32/include/asm/socket.h3
-rw-r--r--arch/blackfin/include/asm/socket.h3
-rw-r--r--arch/cris/include/asm/socket.h3
-rw-r--r--arch/h8300/include/asm/socket.h3
-rw-r--r--arch/ia64/include/asm/socket.h3
-rw-r--r--arch/m68k/include/asm/socket.h3
-rw-r--r--arch/m68knommu/platform/520x/config.c56
-rw-r--r--arch/m68knommu/platform/523x/config.c51
-rw-r--r--arch/m68knommu/platform/5272/config.c48
-rw-r--r--arch/m68knommu/platform/527x/config.c113
-rw-r--r--arch/m68knommu/platform/528x/config.c58
-rw-r--r--arch/m68knommu/platform/532x/config.c49
-rw-r--r--arch/mips/include/asm/socket.h3
-rw-r--r--arch/parisc/include/asm/socket.h3
-rw-r--r--arch/powerpc/include/asm/socket.h3
-rw-r--r--arch/s390/include/asm/socket.h3
-rw-r--r--arch/sh/include/asm/socket.h3
-rw-r--r--arch/sparc/include/asm/socket.h3
-rw-r--r--arch/x86/include/asm/socket.h3
-rw-r--r--arch/xtensa/include/asm/socket.h3
29 files changed, 469 insertions, 15 deletions
diff --git a/arch/alpha/include/asm/socket.h b/arch/alpha/include/asm/socket.h
index a1057c2d95e7..3641ec1452f4 100644
--- a/arch/alpha/include/asm/socket.h
+++ b/arch/alpha/include/asm/socket.h
@@ -62,6 +62,9 @@
62 62
63#define SO_MARK 36 63#define SO_MARK 36
64 64
65#define SO_TIMESTAMPING 37
66#define SCM_TIMESTAMPING SO_TIMESTAMPING
67
65/* O_NONBLOCK clashes with the bits used for socket types. Therefore we 68/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
66 * have to define SOCK_NONBLOCK to a different value here. 69 * have to define SOCK_NONBLOCK to a different value here.
67 */ 70 */
diff --git a/arch/arm/include/asm/socket.h b/arch/arm/include/asm/socket.h
index 6817be9573a6..537de4e0ef50 100644
--- a/arch/arm/include/asm/socket.h
+++ b/arch/arm/include/asm/socket.h
@@ -54,4 +54,7 @@
54 54
55#define SO_MARK 36 55#define SO_MARK 36
56 56
57#define SO_TIMESTAMPING 37
58#define SCM_TIMESTAMPING SO_TIMESTAMPING
59
57#endif /* _ASM_SOCKET_H */ 60#endif /* _ASM_SOCKET_H */
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index b3404b7775b3..0d2074f51a59 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -231,14 +231,17 @@ static struct platform_device kirkwood_switch_device = {
231 231
232void __init kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq) 232void __init kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq)
233{ 233{
234 int i;
235
234 if (irq != NO_IRQ) { 236 if (irq != NO_IRQ) {
235 kirkwood_switch_resources[0].start = irq; 237 kirkwood_switch_resources[0].start = irq;
236 kirkwood_switch_resources[0].end = irq; 238 kirkwood_switch_resources[0].end = irq;
237 kirkwood_switch_device.num_resources = 1; 239 kirkwood_switch_device.num_resources = 1;
238 } 240 }
239 241
240 d->mii_bus = &kirkwood_ge00_shared.dev;
241 d->netdev = &kirkwood_ge00.dev; 242 d->netdev = &kirkwood_ge00.dev;
243 for (i = 0; i < d->nr_chips; i++)
244 d->chip[i].mii_bus = &kirkwood_ge00_shared.dev;
242 kirkwood_switch_device.dev.platform_data = d; 245 kirkwood_switch_device.dev.platform_data = d;
243 246
244 platform_device_register(&kirkwood_switch_device); 247 platform_device_register(&kirkwood_switch_device);
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c
index 9a0e905d10cd..e1c0516c4df3 100644
--- a/arch/arm/mach-kirkwood/rd88f6281-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
@@ -75,7 +75,7 @@ static struct mv643xx_eth_platform_data rd88f6281_ge00_data = {
75 .duplex = DUPLEX_FULL, 75 .duplex = DUPLEX_FULL,
76}; 76};
77 77
78static struct dsa_platform_data rd88f6281_switch_data = { 78static struct dsa_chip_data rd88f6281_switch_chip_data = {
79 .port_names[0] = "lan1", 79 .port_names[0] = "lan1",
80 .port_names[1] = "lan2", 80 .port_names[1] = "lan2",
81 .port_names[2] = "lan3", 81 .port_names[2] = "lan3",
@@ -83,6 +83,11 @@ static struct dsa_platform_data rd88f6281_switch_data = {
83 .port_names[5] = "cpu", 83 .port_names[5] = "cpu",
84}; 84};
85 85
86static struct dsa_platform_data rd88f6281_switch_plat_data = {
87 .nr_chips = 1,
88 .chip = &rd88f6281_switch_chip_data,
89};
90
86static struct mv643xx_eth_platform_data rd88f6281_ge01_data = { 91static struct mv643xx_eth_platform_data rd88f6281_ge01_data = {
87 .phy_addr = MV643XX_ETH_PHY_ADDR(11), 92 .phy_addr = MV643XX_ETH_PHY_ADDR(11),
88}; 93};
@@ -105,12 +110,12 @@ static void __init rd88f6281_init(void)
105 kirkwood_ge00_init(&rd88f6281_ge00_data); 110 kirkwood_ge00_init(&rd88f6281_ge00_data);
106 kirkwood_pcie_id(&dev, &rev); 111 kirkwood_pcie_id(&dev, &rev);
107 if (rev == MV88F6281_REV_A0) { 112 if (rev == MV88F6281_REV_A0) {
108 rd88f6281_switch_data.sw_addr = 10; 113 rd88f6281_switch_chip_data.sw_addr = 10;
109 kirkwood_ge01_init(&rd88f6281_ge01_data); 114 kirkwood_ge01_init(&rd88f6281_ge01_data);
110 } else { 115 } else {
111 rd88f6281_switch_data.port_names[4] = "wan"; 116 rd88f6281_switch_chip_data.port_names[4] = "wan";
112 } 117 }
113 kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ); 118 kirkwood_ge00_switch_init(&rd88f6281_switch_plat_data, NO_IRQ);
114 119
115 kirkwood_rtc_init(); 120 kirkwood_rtc_init();
116 kirkwood_sata_init(&rd88f6281_sata_data); 121 kirkwood_sata_init(&rd88f6281_sata_data);
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 1a1df24f419e..68cc3efae567 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -220,14 +220,17 @@ static struct platform_device orion5x_switch_device = {
220 220
221void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq) 221void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq)
222{ 222{
223 int i;
224
223 if (irq != NO_IRQ) { 225 if (irq != NO_IRQ) {
224 orion5x_switch_resources[0].start = irq; 226 orion5x_switch_resources[0].start = irq;
225 orion5x_switch_resources[0].end = irq; 227 orion5x_switch_resources[0].end = irq;
226 orion5x_switch_device.num_resources = 1; 228 orion5x_switch_device.num_resources = 1;
227 } 229 }
228 230
229 d->mii_bus = &orion5x_eth_shared.dev;
230 d->netdev = &orion5x_eth.dev; 231 d->netdev = &orion5x_eth.dev;
232 for (i = 0; i < d->nr_chips; i++)
233 d->chip[i].mii_bus = &orion5x_eth_shared.dev;
231 orion5x_switch_device.dev.platform_data = d; 234 orion5x_switch_device.dev.platform_data = d;
232 235
233 platform_device_register(&orion5x_switch_device); 236 platform_device_register(&orion5x_switch_device);
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
index 15f53235ee30..9c1ca41730ba 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
@@ -94,7 +94,7 @@ static struct mv643xx_eth_platform_data rd88f5181l_fxo_eth_data = {
94 .duplex = DUPLEX_FULL, 94 .duplex = DUPLEX_FULL,
95}; 95};
96 96
97static struct dsa_platform_data rd88f5181l_fxo_switch_data = { 97static struct dsa_chip_data rd88f5181l_fxo_switch_chip_data = {
98 .port_names[0] = "lan2", 98 .port_names[0] = "lan2",
99 .port_names[1] = "lan1", 99 .port_names[1] = "lan1",
100 .port_names[2] = "wan", 100 .port_names[2] = "wan",
@@ -103,6 +103,11 @@ static struct dsa_platform_data rd88f5181l_fxo_switch_data = {
103 .port_names[7] = "lan3", 103 .port_names[7] = "lan3",
104}; 104};
105 105
106static struct dsa_platform_data rd88f5181l_fxo_switch_plat_data = {
107 .nr_chips = 1,
108 .chip = &rd88f5181l_fxo_switch_chip_data,
109};
110
106static void __init rd88f5181l_fxo_init(void) 111static void __init rd88f5181l_fxo_init(void)
107{ 112{
108 /* 113 /*
@@ -117,7 +122,7 @@ static void __init rd88f5181l_fxo_init(void)
117 */ 122 */
118 orion5x_ehci0_init(); 123 orion5x_ehci0_init();
119 orion5x_eth_init(&rd88f5181l_fxo_eth_data); 124 orion5x_eth_init(&rd88f5181l_fxo_eth_data);
120 orion5x_eth_switch_init(&rd88f5181l_fxo_switch_data, NO_IRQ); 125 orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, NO_IRQ);
121 orion5x_uart0_init(); 126 orion5x_uart0_init();
122 127
123 orion5x_setup_dev_boot_win(RD88F5181L_FXO_NOR_BOOT_BASE, 128 orion5x_setup_dev_boot_win(RD88F5181L_FXO_NOR_BOOT_BASE,
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
index 8ad3934399d4..ee1399ff0ced 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
@@ -95,7 +95,7 @@ static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = {
95 .duplex = DUPLEX_FULL, 95 .duplex = DUPLEX_FULL,
96}; 96};
97 97
98static struct dsa_platform_data rd88f5181l_ge_switch_data = { 98static struct dsa_chip_data rd88f5181l_ge_switch_chip_data = {
99 .port_names[0] = "lan2", 99 .port_names[0] = "lan2",
100 .port_names[1] = "lan1", 100 .port_names[1] = "lan1",
101 .port_names[2] = "wan", 101 .port_names[2] = "wan",
@@ -104,6 +104,11 @@ static struct dsa_platform_data rd88f5181l_ge_switch_data = {
104 .port_names[7] = "lan3", 104 .port_names[7] = "lan3",
105}; 105};
106 106
107static struct dsa_platform_data rd88f5181l_ge_switch_plat_data = {
108 .nr_chips = 1,
109 .chip = &rd88f5181l_ge_switch_chip_data,
110};
111
107static struct i2c_board_info __initdata rd88f5181l_ge_i2c_rtc = { 112static struct i2c_board_info __initdata rd88f5181l_ge_i2c_rtc = {
108 I2C_BOARD_INFO("ds1338", 0x68), 113 I2C_BOARD_INFO("ds1338", 0x68),
109}; 114};
@@ -122,7 +127,8 @@ static void __init rd88f5181l_ge_init(void)
122 */ 127 */
123 orion5x_ehci0_init(); 128 orion5x_ehci0_init();
124 orion5x_eth_init(&rd88f5181l_ge_eth_data); 129 orion5x_eth_init(&rd88f5181l_ge_eth_data);
125 orion5x_eth_switch_init(&rd88f5181l_ge_switch_data, gpio_to_irq(8)); 130 orion5x_eth_switch_init(&rd88f5181l_ge_switch_plat_data,
131 gpio_to_irq(8));
126 orion5x_i2c_init(); 132 orion5x_i2c_init();
127 orion5x_uart0_init(); 133 orion5x_uart0_init();
128 134
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 262e25e4dace..7737cf9a8f50 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
@@ -35,7 +35,7 @@ static struct mv643xx_eth_platform_data rd88f6183ap_ge_eth_data = {
35 .duplex = DUPLEX_FULL, 35 .duplex = DUPLEX_FULL,
36}; 36};
37 37
38static struct dsa_platform_data rd88f6183ap_ge_switch_data = { 38static struct dsa_chip_data rd88f6183ap_ge_switch_chip_data = {
39 .port_names[0] = "lan1", 39 .port_names[0] = "lan1",
40 .port_names[1] = "lan2", 40 .port_names[1] = "lan2",
41 .port_names[2] = "lan3", 41 .port_names[2] = "lan3",
@@ -44,6 +44,11 @@ static struct dsa_platform_data rd88f6183ap_ge_switch_data = {
44 .port_names[5] = "cpu", 44 .port_names[5] = "cpu",
45}; 45};
46 46
47static struct dsa_platform_data rd88f6183ap_ge_switch_plat_data = {
48 .nr_chips = 1,
49 .chip = &rd88f6183ap_ge_switch_chip_data,
50};
51
47static struct mtd_partition rd88f6183ap_ge_partitions[] = { 52static struct mtd_partition rd88f6183ap_ge_partitions[] = {
48 { 53 {
49 .name = "kernel", 54 .name = "kernel",
@@ -89,7 +94,8 @@ static void __init rd88f6183ap_ge_init(void)
89 */ 94 */
90 orion5x_ehci0_init(); 95 orion5x_ehci0_init();
91 orion5x_eth_init(&rd88f6183ap_ge_eth_data); 96 orion5x_eth_init(&rd88f6183ap_ge_eth_data);
92 orion5x_eth_switch_init(&rd88f6183ap_ge_switch_data, gpio_to_irq(3)); 97 orion5x_eth_switch_init(&rd88f6183ap_ge_switch_plat_data,
98 gpio_to_irq(3));
93 spi_register_board_info(rd88f6183ap_ge_spi_slave_info, 99 spi_register_board_info(rd88f6183ap_ge_spi_slave_info,
94 ARRAY_SIZE(rd88f6183ap_ge_spi_slave_info)); 100 ARRAY_SIZE(rd88f6183ap_ge_spi_slave_info));
95 orion5x_spi_init(); 101 orion5x_spi_init();
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
index cc8f89200865..1b4ad9d5e2eb 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
@@ -106,7 +106,7 @@ static struct mv643xx_eth_platform_data wrt350n_v2_eth_data = {
106 .duplex = DUPLEX_FULL, 106 .duplex = DUPLEX_FULL,
107}; 107};
108 108
109static struct dsa_platform_data wrt350n_v2_switch_data = { 109static struct dsa_chip_data wrt350n_v2_switch_chip_data = {
110 .port_names[0] = "lan2", 110 .port_names[0] = "lan2",
111 .port_names[1] = "lan1", 111 .port_names[1] = "lan1",
112 .port_names[2] = "wan", 112 .port_names[2] = "wan",
@@ -115,6 +115,11 @@ static struct dsa_platform_data wrt350n_v2_switch_data = {
115 .port_names[7] = "lan4", 115 .port_names[7] = "lan4",
116}; 116};
117 117
118static struct dsa_platform_data wrt350n_v2_switch_plat_data = {
119 .nr_chips = 1,
120 .chip = &wrt350n_v2_switch_chip_data,
121};
122
118static void __init wrt350n_v2_init(void) 123static void __init wrt350n_v2_init(void)
119{ 124{
120 /* 125 /*
@@ -129,7 +134,7 @@ static void __init wrt350n_v2_init(void)
129 */ 134 */
130 orion5x_ehci0_init(); 135 orion5x_ehci0_init();
131 orion5x_eth_init(&wrt350n_v2_eth_data); 136 orion5x_eth_init(&wrt350n_v2_eth_data);
132 orion5x_eth_switch_init(&wrt350n_v2_switch_data, NO_IRQ); 137 orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, NO_IRQ);
133 orion5x_uart0_init(); 138 orion5x_uart0_init();
134 139
135 orion5x_setup_dev_boot_win(WRT350N_V2_NOR_BOOT_BASE, 140 orion5x_setup_dev_boot_win(WRT350N_V2_NOR_BOOT_BASE,
diff --git a/arch/avr32/include/asm/socket.h b/arch/avr32/include/asm/socket.h
index 35863f260929..04c860619700 100644
--- a/arch/avr32/include/asm/socket.h
+++ b/arch/avr32/include/asm/socket.h
@@ -54,4 +54,7 @@
54 54
55#define SO_MARK 36 55#define SO_MARK 36
56 56
57#define SO_TIMESTAMPING 37
58#define SCM_TIMESTAMPING SO_TIMESTAMPING
59
57#endif /* __ASM_AVR32_SOCKET_H */ 60#endif /* __ASM_AVR32_SOCKET_H */
diff --git a/arch/blackfin/include/asm/socket.h b/arch/blackfin/include/asm/socket.h
index 2ca702e44d47..fac7fe9e1f8a 100644
--- a/arch/blackfin/include/asm/socket.h
+++ b/arch/blackfin/include/asm/socket.h
@@ -53,4 +53,7 @@
53 53
54#define SO_MARK 36 54#define SO_MARK 36
55 55
56#define SO_TIMESTAMPING 37
57#define SCM_TIMESTAMPING SO_TIMESTAMPING
58
56#endif /* _ASM_SOCKET_H */ 59#endif /* _ASM_SOCKET_H */
diff --git a/arch/cris/include/asm/socket.h b/arch/cris/include/asm/socket.h
index 9df0ca82f5de..d5cf74005408 100644
--- a/arch/cris/include/asm/socket.h
+++ b/arch/cris/include/asm/socket.h
@@ -56,6 +56,9 @@
56 56
57#define SO_MARK 36 57#define SO_MARK 36
58 58
59#define SO_TIMESTAMPING 37
60#define SCM_TIMESTAMPING SO_TIMESTAMPING
61
59#endif /* _ASM_SOCKET_H */ 62#endif /* _ASM_SOCKET_H */
60 63
61 64
diff --git a/arch/h8300/include/asm/socket.h b/arch/h8300/include/asm/socket.h
index da2520dbf254..602518a70a1a 100644
--- a/arch/h8300/include/asm/socket.h
+++ b/arch/h8300/include/asm/socket.h
@@ -54,4 +54,7 @@
54 54
55#define SO_MARK 36 55#define SO_MARK 36
56 56
57#define SO_TIMESTAMPING 37
58#define SCM_TIMESTAMPING SO_TIMESTAMPING
59
57#endif /* _ASM_SOCKET_H */ 60#endif /* _ASM_SOCKET_H */
diff --git a/arch/ia64/include/asm/socket.h b/arch/ia64/include/asm/socket.h
index d5ef0aa3e312..745421225ec6 100644
--- a/arch/ia64/include/asm/socket.h
+++ b/arch/ia64/include/asm/socket.h
@@ -63,4 +63,7 @@
63 63
64#define SO_MARK 36 64#define SO_MARK 36
65 65
66#define SO_TIMESTAMPING 37
67#define SCM_TIMESTAMPING SO_TIMESTAMPING
68
66#endif /* _ASM_IA64_SOCKET_H */ 69#endif /* _ASM_IA64_SOCKET_H */
diff --git a/arch/m68k/include/asm/socket.h b/arch/m68k/include/asm/socket.h
index dbc64e92c41a..ca87f938b03f 100644
--- a/arch/m68k/include/asm/socket.h
+++ b/arch/m68k/include/asm/socket.h
@@ -54,4 +54,7 @@
54 54
55#define SO_MARK 36 55#define SO_MARK 36
56 56
57#define SO_TIMESTAMPING 37
58#define SCM_TIMESTAMPING SO_TIMESTAMPING
59
57#endif /* _ASM_SOCKET_H */ 60#endif /* _ASM_SOCKET_H */
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
index 06d887cdcbfb..855fc6a79d72 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -49,8 +49,39 @@ static struct platform_device m520x_uart = {
49 .dev.platform_data = m520x_uart_platform, 49 .dev.platform_data = m520x_uart_platform,
50}; 50};
51 51
52static struct resource m520x_fec_resources[] = {
53 {
54 .start = MCF_MBAR + 0x30000,
55 .end = MCF_MBAR + 0x30000 + 0x7ff,
56 .flags = IORESOURCE_MEM,
57 },
58 {
59 .start = 64 + 36,
60 .end = 64 + 36,
61 .flags = IORESOURCE_IRQ,
62 },
63 {
64 .start = 64 + 40,
65 .end = 64 + 40,
66 .flags = IORESOURCE_IRQ,
67 },
68 {
69 .start = 64 + 42,
70 .end = 64 + 42,
71 .flags = IORESOURCE_IRQ,
72 },
73};
74
75static struct platform_device m520x_fec = {
76 .name = "fec",
77 .id = 0,
78 .num_resources = ARRAY_SIZE(m520x_fec_resources),
79 .resource = m520x_fec_resources,
80};
81
52static struct platform_device *m520x_devices[] __initdata = { 82static struct platform_device *m520x_devices[] __initdata = {
53 &m520x_uart, 83 &m520x_uart,
84 &m520x_fec,
54}; 85};
55 86
56/***************************************************************************/ 87/***************************************************************************/
@@ -103,6 +134,30 @@ static void __init m520x_uarts_init(void)
103 134
104/***************************************************************************/ 135/***************************************************************************/
105 136
137static void __init m520x_fec_init(void)
138{
139 u32 imr;
140 u8 v;
141
142 /* Unmask FEC interrupts at ColdFire interrupt controller */
143 writeb(0x4, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 36);
144 writeb(0x4, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 40);
145 writeb(0x4, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 42);
146
147 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
148 imr &= ~0x0001FFF0;
149 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
150
151 /* Set multi-function pins to ethernet mode */
152 v = readb(MCF_IPSBAR + MCF_GPIO_PAR_FEC);
153 writeb(v | 0xf0, MCF_IPSBAR + MCF_GPIO_PAR_FEC);
154
155 v = readb(MCF_IPSBAR + MCF_GPIO_PAR_FECI2C);
156 writeb(v | 0x0f, MCF_IPSBAR + MCF_GPIO_PAR_FECI2C);
157}
158
159/***************************************************************************/
160
106/* 161/*
107 * Program the vector to be an auto-vectored. 162 * Program the vector to be an auto-vectored.
108 */ 163 */
@@ -118,6 +173,7 @@ void __init config_BSP(char *commandp, int size)
118{ 173{
119 mach_reset = coldfire_reset; 174 mach_reset = coldfire_reset;
120 m520x_uarts_init(); 175 m520x_uarts_init();
176 m520x_fec_init();
121} 177}
122 178
123/***************************************************************************/ 179/***************************************************************************/
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 13f02611ea23..74133f27b30c 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -50,8 +50,39 @@ static struct platform_device m523x_uart = {
50 .dev.platform_data = m523x_uart_platform, 50 .dev.platform_data = m523x_uart_platform,
51}; 51};
52 52
53static struct resource m523x_fec_resources[] = {
54 {
55 .start = MCF_MBAR + 0x1000,
56 .end = MCF_MBAR + 0x1000 + 0x7ff,
57 .flags = IORESOURCE_MEM,
58 },
59 {
60 .start = 64 + 23,
61 .end = 64 + 23,
62 .flags = IORESOURCE_IRQ,
63 },
64 {
65 .start = 64 + 27,
66 .end = 64 + 27,
67 .flags = IORESOURCE_IRQ,
68 },
69 {
70 .start = 64 + 29,
71 .end = 64 + 29,
72 .flags = IORESOURCE_IRQ,
73 },
74};
75
76static struct platform_device m523x_fec = {
77 .name = "fec",
78 .id = 0,
79 .num_resources = ARRAY_SIZE(m523x_fec_resources),
80 .resource = m523x_fec_resources,
81};
82
53static struct platform_device *m523x_devices[] __initdata = { 83static struct platform_device *m523x_devices[] __initdata = {
54 &m523x_uart, 84 &m523x_uart,
85 &m523x_fec,
55}; 86};
56 87
57/***************************************************************************/ 88/***************************************************************************/
@@ -83,6 +114,25 @@ static void __init m523x_uarts_init(void)
83 114
84/***************************************************************************/ 115/***************************************************************************/
85 116
117static void __init m523x_fec_init(void)
118{
119 u32 imr;
120
121 /* Unmask FEC interrupts at ColdFire interrupt controller */
122 writeb(0x28, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 23);
123 writeb(0x27, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 27);
124 writeb(0x26, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 29);
125
126 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
127 imr &= ~0xf;
128 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
129 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
130 imr &= ~0xff800001;
131 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
132}
133
134/***************************************************************************/
135
86void mcf_disableall(void) 136void mcf_disableall(void)
87{ 137{
88 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff; 138 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff;
@@ -103,6 +153,7 @@ void __init config_BSP(char *commandp, int size)
103 mcf_disableall(); 153 mcf_disableall();
104 mach_reset = coldfire_reset; 154 mach_reset = coldfire_reset;
105 m523x_uarts_init(); 155 m523x_uarts_init();
156 m523x_fec_init();
106} 157}
107 158
108/***************************************************************************/ 159/***************************************************************************/
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index 230bae691a7f..e049245f4092 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -55,8 +55,39 @@ static struct platform_device m5272_uart = {
55 .dev.platform_data = m5272_uart_platform, 55 .dev.platform_data = m5272_uart_platform,
56}; 56};
57 57
58static struct resource m5272_fec_resources[] = {
59 {
60 .start = MCF_MBAR + 0x840,
61 .end = MCF_MBAR + 0x840 + 0x1cf,
62 .flags = IORESOURCE_MEM,
63 },
64 {
65 .start = 86,
66 .end = 86,
67 .flags = IORESOURCE_IRQ,
68 },
69 {
70 .start = 87,
71 .end = 87,
72 .flags = IORESOURCE_IRQ,
73 },
74 {
75 .start = 88,
76 .end = 88,
77 .flags = IORESOURCE_IRQ,
78 },
79};
80
81static struct platform_device m5272_fec = {
82 .name = "fec",
83 .id = 0,
84 .num_resources = ARRAY_SIZE(m5272_fec_resources),
85 .resource = m5272_fec_resources,
86};
87
58static struct platform_device *m5272_devices[] __initdata = { 88static struct platform_device *m5272_devices[] __initdata = {
59 &m5272_uart, 89 &m5272_uart,
90 &m5272_fec,
60}; 91};
61 92
62/***************************************************************************/ 93/***************************************************************************/
@@ -91,6 +122,22 @@ static void __init m5272_uarts_init(void)
91 122
92/***************************************************************************/ 123/***************************************************************************/
93 124
125static void __init m5272_fec_init(void)
126{
127 u32 imr;
128
129 /* Unmask FEC interrupts at ColdFire interrupt controller */
130 imr = readl(MCF_MBAR + MCFSIM_ICR3);
131 imr = (imr & ~0x00000fff) | 0x00000ddd;
132 writel(imr, MCF_MBAR + MCFSIM_ICR3);
133
134 imr = readl(MCF_MBAR + MCFSIM_ICR1);
135 imr = (imr & ~0x0f000000) | 0x0d000000;
136 writel(imr, MCF_MBAR + MCFSIM_ICR1);
137}
138
139/***************************************************************************/
140
94void mcf_disableall(void) 141void mcf_disableall(void)
95{ 142{
96 volatile unsigned long *icrp; 143 volatile unsigned long *icrp;
@@ -155,6 +202,7 @@ void __init config_BSP(char *commandp, int size)
155static int __init init_BSP(void) 202static int __init init_BSP(void)
156{ 203{
157 m5272_uarts_init(); 204 m5272_uarts_init();
205 m5272_fec_init();
158 platform_add_devices(m5272_devices, ARRAY_SIZE(m5272_devices)); 206 platform_add_devices(m5272_devices, ARRAY_SIZE(m5272_devices));
159 return 0; 207 return 0;
160} 208}
diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c
index 73cd1aef4a90..49343fb157b0 100644
--- a/arch/m68knommu/platform/527x/config.c
+++ b/arch/m68knommu/platform/527x/config.c
@@ -50,8 +50,73 @@ static struct platform_device m527x_uart = {
50 .dev.platform_data = m527x_uart_platform, 50 .dev.platform_data = m527x_uart_platform,
51}; 51};
52 52
53static struct resource m527x_fec0_resources[] = {
54 {
55 .start = MCF_MBAR + 0x1000,
56 .end = MCF_MBAR + 0x1000 + 0x7ff,
57 .flags = IORESOURCE_MEM,
58 },
59 {
60 .start = 64 + 23,
61 .end = 64 + 23,
62 .flags = IORESOURCE_IRQ,
63 },
64 {
65 .start = 64 + 27,
66 .end = 64 + 27,
67 .flags = IORESOURCE_IRQ,
68 },
69 {
70 .start = 64 + 29,
71 .end = 64 + 29,
72 .flags = IORESOURCE_IRQ,
73 },
74};
75
76static struct resource m527x_fec1_resources[] = {
77 {
78 .start = MCF_MBAR + 0x1800,
79 .end = MCF_MBAR + 0x1800 + 0x7ff,
80 .flags = IORESOURCE_MEM,
81 },
82 {
83 .start = 128 + 23,
84 .end = 128 + 23,
85 .flags = IORESOURCE_IRQ,
86 },
87 {
88 .start = 128 + 27,
89 .end = 128 + 27,
90 .flags = IORESOURCE_IRQ,
91 },
92 {
93 .start = 128 + 29,
94 .end = 128 + 29,
95 .flags = IORESOURCE_IRQ,
96 },
97};
98
99static struct platform_device m527x_fec[] = {
100 {
101 .name = "fec",
102 .id = 0,
103 .num_resources = ARRAY_SIZE(m527x_fec0_resources),
104 .resource = m527x_fec0_resources,
105 },
106 {
107 .name = "fec",
108 .id = 1,
109 .num_resources = ARRAY_SIZE(m527x_fec1_resources),
110 .resource = m527x_fec1_resources,
111 },
112};
113
53static struct platform_device *m527x_devices[] __initdata = { 114static struct platform_device *m527x_devices[] __initdata = {
54 &m527x_uart, 115 &m527x_uart,
116 &m527x_fec[0],
117#ifdef CONFIG_FEC2
118 &m527x_fec[1],
119#endif
55}; 120};
56 121
57/***************************************************************************/ 122/***************************************************************************/
@@ -97,6 +162,51 @@ static void __init m527x_uarts_init(void)
97 162
98/***************************************************************************/ 163/***************************************************************************/
99 164
165static void __init m527x_fec_irq_init(int nr)
166{
167 unsigned long base;
168 u32 imr;
169
170 base = MCF_IPSBAR + (nr ? MCFICM_INTC1 : MCFICM_INTC0);
171
172 writeb(0x28, base + MCFINTC_ICR0 + 23);
173 writeb(0x27, base + MCFINTC_ICR0 + 27);
174 writeb(0x26, base + MCFINTC_ICR0 + 29);
175
176 imr = readl(base + MCFINTC_IMRH);
177 imr &= ~0xf;
178 writel(imr, base + MCFINTC_IMRH);
179 imr = readl(base + MCFINTC_IMRL);
180 imr &= ~0xff800001;
181 writel(imr, base + MCFINTC_IMRL);
182}
183
184static void __init m527x_fec_init(void)
185{
186 u16 par;
187 u8 v;
188
189 m527x_fec_irq_init(0);
190
191 /* Set multi-function pins to ethernet mode for fec0 */
192 par = readw(MCF_IPSBAR + 0x100082);
193 writew(par | 0xf00, MCF_IPSBAR + 0x100082);
194 v = readb(MCF_IPSBAR + 0x100078);
195 writeb(v | 0xc0, MCF_IPSBAR + 0x100078);
196
197#ifdef CONFIG_FEC2
198 m527x_fec_irq_init(1);
199
200 /* Set multi-function pins to ethernet mode for fec1 */
201 par = readw(MCF_IPSBAR + 0x100082);
202 writew(par | 0xa0, MCF_IPSBAR + 0x100082);
203 v = readb(MCF_IPSBAR + 0x100079);
204 writeb(v | 0xc0, MCF_IPSBAR + 0x100079);
205#endif
206}
207
208/***************************************************************************/
209
100void mcf_disableall(void) 210void mcf_disableall(void)
101{ 211{
102 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff; 212 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff;
@@ -116,13 +226,14 @@ void __init config_BSP(char *commandp, int size)
116{ 226{
117 mcf_disableall(); 227 mcf_disableall();
118 mach_reset = coldfire_reset; 228 mach_reset = coldfire_reset;
229 m527x_uarts_init();
230 m527x_fec_init();
119} 231}
120 232
121/***************************************************************************/ 233/***************************************************************************/
122 234
123static int __init init_BSP(void) 235static int __init init_BSP(void)
124{ 236{
125 m527x_uarts_init();
126 platform_add_devices(m527x_devices, ARRAY_SIZE(m527x_devices)); 237 platform_add_devices(m527x_devices, ARRAY_SIZE(m527x_devices));
127 return 0; 238 return 0;
128} 239}
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index 44baeb225dc7..bee526f4d1af 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -57,8 +57,40 @@ static struct platform_device m528x_uart = {
57 .dev.platform_data = m528x_uart_platform, 57 .dev.platform_data = m528x_uart_platform,
58}; 58};
59 59
60static struct resource m528x_fec_resources[] = {
61 {
62 .start = MCF_MBAR + 0x1000,
63 .end = MCF_MBAR + 0x1000 + 0x7ff,
64 .flags = IORESOURCE_MEM,
65 },
66 {
67 .start = 64 + 23,
68 .end = 64 + 23,
69 .flags = IORESOURCE_IRQ,
70 },
71 {
72 .start = 64 + 27,
73 .end = 64 + 27,
74 .flags = IORESOURCE_IRQ,
75 },
76 {
77 .start = 64 + 29,
78 .end = 64 + 29,
79 .flags = IORESOURCE_IRQ,
80 },
81};
82
83static struct platform_device m528x_fec = {
84 .name = "fec",
85 .id = 0,
86 .num_resources = ARRAY_SIZE(m528x_fec_resources),
87 .resource = m528x_fec_resources,
88};
89
90
60static struct platform_device *m528x_devices[] __initdata = { 91static struct platform_device *m528x_devices[] __initdata = {
61 &m528x_uart, 92 &m528x_uart,
93 &m528x_fec,
62}; 94};
63 95
64/***************************************************************************/ 96/***************************************************************************/
@@ -99,6 +131,31 @@ static void __init m528x_uarts_init(void)
99 131
100/***************************************************************************/ 132/***************************************************************************/
101 133
134static void __init m528x_fec_init(void)
135{
136 u32 imr;
137 u16 v16;
138
139 /* Unmask FEC interrupts at ColdFire interrupt controller */
140 writeb(0x28, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 23);
141 writeb(0x27, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 27);
142 writeb(0x26, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 29);
143
144 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
145 imr &= ~0xf;
146 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH);
147 imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
148 imr &= ~0xff800001;
149 writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
150
151 /* Set multi-function pins to ethernet mode for fec0 */
152 v16 = readw(MCF_IPSBAR + 0x100056);
153 writew(v16 | 0xf00, MCF_IPSBAR + 0x100056);
154 writeb(0xc0, MCF_IPSBAR + 0x100058);
155}
156
157/***************************************************************************/
158
102void mcf_disableall(void) 159void mcf_disableall(void)
103{ 160{
104 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff; 161 *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff;
@@ -158,6 +215,7 @@ void __init config_BSP(char *commandp, int size)
158static int __init init_BSP(void) 215static int __init init_BSP(void)
159{ 216{
160 m528x_uarts_init(); 217 m528x_uarts_init();
218 m528x_fec_init();
161 platform_add_devices(m528x_devices, ARRAY_SIZE(m528x_devices)); 219 platform_add_devices(m528x_devices, ARRAY_SIZE(m528x_devices));
162 return 0; 220 return 0;
163} 221}
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index a347623d6ee6..591f2f801134 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -61,8 +61,38 @@ static struct platform_device m532x_uart = {
61 .dev.platform_data = m532x_uart_platform, 61 .dev.platform_data = m532x_uart_platform,
62}; 62};
63 63
64static struct resource m532x_fec_resources[] = {
65 {
66 .start = 0xfc030000,
67 .end = 0xfc0307ff,
68 .flags = IORESOURCE_MEM,
69 },
70 {
71 .start = 64 + 36,
72 .end = 64 + 36,
73 .flags = IORESOURCE_IRQ,
74 },
75 {
76 .start = 64 + 40,
77 .end = 64 + 40,
78 .flags = IORESOURCE_IRQ,
79 },
80 {
81 .start = 64 + 42,
82 .end = 64 + 42,
83 .flags = IORESOURCE_IRQ,
84 },
85};
86
87static struct platform_device m532x_fec = {
88 .name = "fec",
89 .id = 0,
90 .num_resources = ARRAY_SIZE(m532x_fec_resources),
91 .resource = m532x_fec_resources,
92};
64static struct platform_device *m532x_devices[] __initdata = { 93static struct platform_device *m532x_devices[] __initdata = {
65 &m532x_uart, 94 &m532x_uart,
95 &m532x_fec,
66}; 96};
67 97
68/***************************************************************************/ 98/***************************************************************************/
@@ -93,6 +123,24 @@ static void __init m532x_uarts_init(void)
93 for (line = 0; (line < nrlines); line++) 123 for (line = 0; (line < nrlines); line++)
94 m532x_uart_init_line(line, m532x_uart_platform[line].irq); 124 m532x_uart_init_line(line, m532x_uart_platform[line].irq);
95} 125}
126/***************************************************************************/
127
128static void __init m532x_fec_init(void)
129{
130 /* Unmask FEC interrupts at ColdFire interrupt controller */
131 MCF_INTC0_ICR36 = 0x2;
132 MCF_INTC0_ICR40 = 0x2;
133 MCF_INTC0_ICR42 = 0x2;
134
135 MCF_INTC0_IMRH &= ~(MCF_INTC_IMRH_INT_MASK36 |
136 MCF_INTC_IMRH_INT_MASK40 | MCF_INTC_IMRH_INT_MASK42);
137
138 /* Set multi-function pins to ethernet mode for fec0 */
139 MCF_GPIO_PAR_FECI2C |= (MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC |
140 MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO);
141 MCF_GPIO_PAR_FEC = (MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC |
142 MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC);
143}
96 144
97/***************************************************************************/ 145/***************************************************************************/
98 146
@@ -150,6 +198,7 @@ void __init config_BSP(char *commandp, int size)
150static int __init init_BSP(void) 198static int __init init_BSP(void)
151{ 199{
152 m532x_uarts_init(); 200 m532x_uarts_init();
201 m532x_fec_init();
153 platform_add_devices(m532x_devices, ARRAY_SIZE(m532x_devices)); 202 platform_add_devices(m532x_devices, ARRAY_SIZE(m532x_devices));
154 return 0; 203 return 0;
155} 204}
diff --git a/arch/mips/include/asm/socket.h b/arch/mips/include/asm/socket.h
index facc2d7a87ca..2abca1780169 100644
--- a/arch/mips/include/asm/socket.h
+++ b/arch/mips/include/asm/socket.h
@@ -75,6 +75,9 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
75 75
76#define SO_MARK 36 76#define SO_MARK 36
77 77
78#define SO_TIMESTAMPING 37
79#define SCM_TIMESTAMPING SO_TIMESTAMPING
80
78#ifdef __KERNEL__ 81#ifdef __KERNEL__
79 82
80/** sock_type - Socket types 83/** sock_type - Socket types
diff --git a/arch/parisc/include/asm/socket.h b/arch/parisc/include/asm/socket.h
index fba402c95ac2..885472bf7b78 100644
--- a/arch/parisc/include/asm/socket.h
+++ b/arch/parisc/include/asm/socket.h
@@ -54,6 +54,9 @@
54 54
55#define SO_MARK 0x401f 55#define SO_MARK 0x401f
56 56
57#define SO_TIMESTAMPING 0x4020
58#define SCM_TIMESTAMPING SO_TIMESTAMPING
59
57/* O_NONBLOCK clashes with the bits used for socket types. Therefore we 60/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
58 * have to define SOCK_NONBLOCK to a different value here. 61 * have to define SOCK_NONBLOCK to a different value here.
59 */ 62 */
diff --git a/arch/powerpc/include/asm/socket.h b/arch/powerpc/include/asm/socket.h
index f5a4e168e498..1e5cfad0e3f7 100644
--- a/arch/powerpc/include/asm/socket.h
+++ b/arch/powerpc/include/asm/socket.h
@@ -61,4 +61,7 @@
61 61
62#define SO_MARK 36 62#define SO_MARK 36
63 63
64#define SO_TIMESTAMPING 37
65#define SCM_TIMESTAMPING SO_TIMESTAMPING
66
64#endif /* _ASM_POWERPC_SOCKET_H */ 67#endif /* _ASM_POWERPC_SOCKET_H */
diff --git a/arch/s390/include/asm/socket.h b/arch/s390/include/asm/socket.h
index c786ab623b2d..02330c50241b 100644
--- a/arch/s390/include/asm/socket.h
+++ b/arch/s390/include/asm/socket.h
@@ -62,4 +62,7 @@
62 62
63#define SO_MARK 36 63#define SO_MARK 36
64 64
65#define SO_TIMESTAMPING 37
66#define SCM_TIMESTAMPING SO_TIMESTAMPING
67
65#endif /* _ASM_SOCKET_H */ 68#endif /* _ASM_SOCKET_H */
diff --git a/arch/sh/include/asm/socket.h b/arch/sh/include/asm/socket.h
index 6d4bf6512959..345653b96826 100644
--- a/arch/sh/include/asm/socket.h
+++ b/arch/sh/include/asm/socket.h
@@ -54,4 +54,7 @@
54 54
55#define SO_MARK 36 55#define SO_MARK 36
56 56
57#define SO_TIMESTAMPING 37
58#define SCM_TIMESTAMPING SO_TIMESTAMPING
59
57#endif /* __ASM_SH_SOCKET_H */ 60#endif /* __ASM_SH_SOCKET_H */
diff --git a/arch/sparc/include/asm/socket.h b/arch/sparc/include/asm/socket.h
index bf50d0c2d583..982a12f959f4 100644
--- a/arch/sparc/include/asm/socket.h
+++ b/arch/sparc/include/asm/socket.h
@@ -50,6 +50,9 @@
50 50
51#define SO_MARK 0x0022 51#define SO_MARK 0x0022
52 52
53#define SO_TIMESTAMPING 0x0023
54#define SCM_TIMESTAMPING SO_TIMESTAMPING
55
53/* Security levels - as per NRL IPv6 - don't actually do anything */ 56/* Security levels - as per NRL IPv6 - don't actually do anything */
54#define SO_SECURITY_AUTHENTICATION 0x5001 57#define SO_SECURITY_AUTHENTICATION 0x5001
55#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 58#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
diff --git a/arch/x86/include/asm/socket.h b/arch/x86/include/asm/socket.h
index 8ab9cc8b2ecc..ca8bf2cd0ba9 100644
--- a/arch/x86/include/asm/socket.h
+++ b/arch/x86/include/asm/socket.h
@@ -54,4 +54,7 @@
54 54
55#define SO_MARK 36 55#define SO_MARK 36
56 56
57#define SO_TIMESTAMPING 37
58#define SCM_TIMESTAMPING SO_TIMESTAMPING
59
57#endif /* _ASM_X86_SOCKET_H */ 60#endif /* _ASM_X86_SOCKET_H */
diff --git a/arch/xtensa/include/asm/socket.h b/arch/xtensa/include/asm/socket.h
index 6100682b1da2..dd1a7a4a1cea 100644
--- a/arch/xtensa/include/asm/socket.h
+++ b/arch/xtensa/include/asm/socket.h
@@ -65,4 +65,7 @@
65 65
66#define SO_MARK 36 66#define SO_MARK 36
67 67
68#define SO_TIMESTAMPING 37
69#define SCM_TIMESTAMPING SO_TIMESTAMPING
70
68#endif /* _XTENSA_SOCKET_H */ 71#endif /* _XTENSA_SOCKET_H */