diff options
Diffstat (limited to 'drivers')
70 files changed, 246 insertions, 10 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 851bd3f43ac6..fb0b40a191c2 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | #include <scsi/scsi_cmnd.h> | 24 | #include <scsi/scsi_cmnd.h> |
| 25 | #include <linux/libata.h> | 25 | #include <linux/libata.h> |
| 26 | #include <asm/io.h> | 26 | #include <asm/io.h> |
| 27 | #include <linux/of_address.h> | ||
| 28 | #include <linux/of_irq.h> | ||
| 27 | #include <linux/of_platform.h> | 29 | #include <linux/of_platform.h> |
| 28 | 30 | ||
| 29 | static unsigned int intr_coalescing_count; | 31 | static unsigned int intr_coalescing_count; |
diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c index 0671e45daa57..8fedbc250414 100644 --- a/drivers/char/bsr.c +++ b/drivers/char/bsr.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
| 23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
| 24 | #include <linux/of_address.h> | ||
| 24 | #include <linux/of_device.h> | 25 | #include <linux/of_device.h> |
| 25 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
| 26 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c index c6df5b29af08..c66279bb6ef3 100644 --- a/drivers/char/hw_random/pasemi-rng.c +++ b/drivers/char/hw_random/pasemi-rng.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
| 25 | #include <linux/hw_random.h> | 25 | #include <linux/hw_random.h> |
| 26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
| 27 | #include <linux/of_address.h> | ||
| 27 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
| 28 | #include <asm/io.h> | 29 | #include <asm/io.h> |
| 29 | 30 | ||
diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c index 534e43a60d1f..f4ec8145b3d1 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/cpufreq.h> | 28 | #include <linux/cpufreq.h> |
| 29 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
| 30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
| 31 | #include <linux/of_address.h> | ||
| 31 | 32 | ||
| 32 | #include <asm/hw_irq.h> | 33 | #include <asm/hw_irq.h> |
| 33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index ae6e5542ec46..bc6d820812b6 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c | |||
| @@ -5,6 +5,9 @@ | |||
| 5 | * Copyright 2008-2012 Freescale Semiconductor, Inc. | 5 | * Copyright 2008-2012 Freescale Semiconductor, Inc. |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <linux/of_address.h> | ||
| 9 | #include <linux/of_irq.h> | ||
| 10 | |||
| 8 | #include "compat.h" | 11 | #include "compat.h" |
| 9 | #include "regs.h" | 12 | #include "regs.h" |
| 10 | #include "intern.h" | 13 | #include "intern.h" |
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index 517a16d87e4b..bdb786d5a5e5 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c | |||
| @@ -5,6 +5,8 @@ | |||
| 5 | * Copyright 2008-2012 Freescale Semiconductor, Inc. | 5 | * Copyright 2008-2012 Freescale Semiconductor, Inc. |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <linux/of_irq.h> | ||
| 9 | |||
| 8 | #include "compat.h" | 10 | #include "compat.h" |
| 9 | #include "regs.h" | 11 | #include "regs.h" |
| 10 | #include "jr.h" | 12 | #include "jr.h" |
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 661dc3eb1d66..6cd0e6038583 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
| @@ -32,6 +32,8 @@ | |||
| 32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
| 33 | #include <linux/crypto.h> | 33 | #include <linux/crypto.h> |
| 34 | #include <linux/hw_random.h> | 34 | #include <linux/hw_random.h> |
| 35 | #include <linux/of_address.h> | ||
| 36 | #include <linux/of_irq.h> | ||
| 35 | #include <linux/of_platform.h> | 37 | #include <linux/of_platform.h> |
| 36 | #include <linux/dma-mapping.h> | 38 | #include <linux/dma-mapping.h> |
| 37 | #include <linux/io.h> | 39 | #include <linux/io.h> |
diff --git a/drivers/dma/bestcomm/sram.c b/drivers/dma/bestcomm/sram.c index 5e2ed30ba2c4..2074e0e3fa21 100644 --- a/drivers/dma/bestcomm/sram.c +++ b/drivers/dma/bestcomm/sram.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
| 20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
| 21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
| 22 | #include <linux/of_address.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
| 24 | #include <asm/mmu.h> | 25 | #include <asm/mmu.h> |
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index b3f3e90054f2..61517dd0d0b7 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
| @@ -33,6 +33,8 @@ | |||
| 33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
| 34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
| 35 | #include <linux/dmapool.h> | 35 | #include <linux/dmapool.h> |
| 36 | #include <linux/of_address.h> | ||
| 37 | #include <linux/of_irq.h> | ||
| 36 | #include <linux/of_platform.h> | 38 | #include <linux/of_platform.h> |
| 37 | 39 | ||
| 38 | #include "dmaengine.h" | 40 | #include "dmaengine.h" |
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 2fe435377333..448750da4402 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c | |||
| @@ -39,7 +39,9 @@ | |||
| 39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
| 40 | #include <linux/io.h> | 40 | #include <linux/io.h> |
| 41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
| 42 | #include <linux/of_address.h> | ||
| 42 | #include <linux/of_device.h> | 43 | #include <linux/of_device.h> |
| 44 | #include <linux/of_irq.h> | ||
| 43 | #include <linux/of_platform.h> | 45 | #include <linux/of_platform.h> |
| 44 | 46 | ||
| 45 | #include <linux/random.h> | 47 | #include <linux/random.h> |
diff --git a/drivers/edac/cell_edac.c b/drivers/edac/cell_edac.c index c2eaf334b90b..9ee1c76da7b9 100644 --- a/drivers/edac/cell_edac.c +++ b/drivers/edac/cell_edac.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
| 16 | #include <linux/stop_machine.h> | 16 | #include <linux/stop_machine.h> |
| 17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
| 18 | #include <linux/of_address.h> | ||
| 18 | #include <asm/machdep.h> | 19 | #include <asm/machdep.h> |
| 19 | #include <asm/cell-regs.h> | 20 | #include <asm/cell-regs.h> |
| 20 | 21 | ||
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index a0b33a216d4a..de9630b08b99 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
| 15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 16 | #include <linux/of_gpio.h> | 16 | #include <linux/of_gpio.h> |
| 17 | #include <linux/of_irq.h> | ||
| 17 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
| 18 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
| 19 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index ff3caa0c28cd..f7444100f397 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
| @@ -41,6 +41,8 @@ | |||
| 41 | #include <asm/irq.h> | 41 | #include <asm/irq.h> |
| 42 | #include <linux/io.h> | 42 | #include <linux/io.h> |
| 43 | #include <linux/i2c.h> | 43 | #include <linux/i2c.h> |
| 44 | #include <linux/of_address.h> | ||
| 45 | #include <linux/of_irq.h> | ||
| 44 | #include <linux/of_platform.h> | 46 | #include <linux/of_platform.h> |
| 45 | 47 | ||
| 46 | #include "i2c-ibm_iic.h" | 48 | #include "i2c-ibm_iic.h" |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index b80c76888cab..b6a741caf4f6 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
| @@ -17,6 +17,8 @@ | |||
| 17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
| 19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 20 | #include <linux/of_address.h> | ||
| 21 | #include <linux/of_irq.h> | ||
| 20 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
| 21 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
| 22 | 24 | ||
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 37e8cfad625b..8c87f4a9793b 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
| 28 | #include <linux/device.h> | 28 | #include <linux/device.h> |
| 29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
| 30 | #include <linux/of_irq.h> | ||
| 30 | #include <asm/prom.h> | 31 | #include <asm/prom.h> |
| 31 | #include <asm/pmac_low_i2c.h> | 32 | #include <asm/pmac_low_i2c.h> |
| 32 | 33 | ||
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index 36f7b9533397..dfbcd872f95e 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
| 26 | #include <linux/of_address.h> | 26 | #include <linux/of_address.h> |
| 27 | #include <linux/of_device.h> | 27 | #include <linux/of_device.h> |
| 28 | #include <linux/of_irq.h> | ||
| 28 | #include <linux/of_platform.h> | 29 | #include <linux/of_platform.h> |
| 29 | 30 | ||
| 30 | #define DRIVER_NAME "xilinx_ps2" | 31 | #define DRIVER_NAME "xilinx_ps2" |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index ac5c87939860..4f12c6f01fe7 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
| 25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
| 26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
| 27 | #include <linux/of_address.h> | ||
| 28 | #include <linux/of_irq.h> | ||
| 27 | 29 | ||
| 28 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
| 29 | #include <asm/macio.h> | 31 | #include <asm/macio.h> |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index cad0e19b47a2..4192901cab40 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
| 26 | #include <linux/dma-mapping.h> | 26 | #include <linux/dma-mapping.h> |
| 27 | #include <linux/kernel_stat.h> | 27 | #include <linux/kernel_stat.h> |
| 28 | #include <linux/of_address.h> | ||
| 29 | #include <linux/of_irq.h> | ||
| 28 | 30 | ||
| 29 | #include <asm/io.h> | 31 | #include <asm/io.h> |
| 30 | #include <asm/prom.h> | 32 | #include <asm/prom.h> |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index b3b2d36c009e..23b4a3b28dbc 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/poll.h> | 35 | #include <linux/poll.h> |
| 36 | #include <linux/mutex.h> | 36 | #include <linux/mutex.h> |
| 37 | #include <linux/of_device.h> | 37 | #include <linux/of_device.h> |
| 38 | #include <linux/of_irq.h> | ||
| 38 | #include <linux/of_platform.h> | 39 | #include <linux/of_platform.h> |
| 39 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
| 40 | 41 | ||
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 283e1b53c6be..dee88e59f0d3 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
| @@ -46,6 +46,8 @@ | |||
| 46 | #include <linux/suspend.h> | 46 | #include <linux/suspend.h> |
| 47 | #include <linux/cpu.h> | 47 | #include <linux/cpu.h> |
| 48 | #include <linux/compat.h> | 48 | #include <linux/compat.h> |
| 49 | #include <linux/of_address.h> | ||
| 50 | #include <linux/of_irq.h> | ||
| 49 | #include <asm/prom.h> | 51 | #include <asm/prom.h> |
| 50 | #include <asm/machdep.h> | 52 | #include <asm/machdep.h> |
| 51 | #include <asm/io.h> | 53 | #include <asm/io.h> |
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index fe9898ca3c84..6a232239ee8c 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c | |||
| @@ -21,6 +21,8 @@ | |||
| 21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
| 22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
| 24 | #include <linux/of_address.h> | ||
| 25 | #include <linux/of_irq.h> | ||
| 24 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
| 25 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
| 26 | #include <media/v4l2-common.h> | 28 | #include <media/v4l2-common.h> |
diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c index c6bd7e84de24..7be89832db19 100644 --- a/drivers/misc/carma/carma-fpga-program.c +++ b/drivers/misc/carma/carma-fpga-program.c | |||
| @@ -10,6 +10,8 @@ | |||
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
| 13 | #include <linux/of_address.h> | ||
| 14 | #include <linux/of_irq.h> | ||
| 13 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
| 14 | #include <linux/completion.h> | 16 | #include <linux/completion.h> |
| 15 | #include <linux/miscdevice.h> | 17 | #include <linux/miscdevice.h> |
diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c index 7b56563f8b74..08b18f3f5264 100644 --- a/drivers/misc/carma/carma-fpga.c +++ b/drivers/misc/carma/carma-fpga.c | |||
| @@ -88,6 +88,8 @@ | |||
| 88 | * interrupt source to the GPIO pin. Tada, we hid the interrupt. :) | 88 | * interrupt source to the GPIO pin. Tada, we hid the interrupt. :) |
| 89 | */ | 89 | */ |
| 90 | 90 | ||
| 91 | #include <linux/of_address.h> | ||
| 92 | #include <linux/of_irq.h> | ||
| 91 | #include <linux/of_platform.h> | 93 | #include <linux/of_platform.h> |
| 92 | #include <linux/dma-mapping.h> | 94 | #include <linux/dma-mapping.h> |
| 93 | #include <linux/miscdevice.h> | 95 | #include <linux/miscdevice.h> |
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 20657209a472..e59c8860f472 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
| 29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
| 30 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
| 31 | #include <linux/of_address.h> | ||
| 31 | #include <linux/of_platform.h> | 32 | #include <linux/of_platform.h> |
| 32 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
| 33 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index 317a771f1587..2730c78d2bf8 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
| 26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
| 27 | #include <linux/of_address.h> | ||
| 27 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
| 28 | #include <linux/mtd/mtd.h> | 29 | #include <linux/mtd/mtd.h> |
| 29 | #include <linux/mtd/nand.h> | 30 | #include <linux/mtd/nand.h> |
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index 04e07252d74b..4d203e84e8ca 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/mtd/nand_ecc.h> | 18 | #include <linux/mtd/nand_ecc.h> |
| 19 | #include <linux/mtd/partitions.h> | 19 | #include <linux/mtd/partitions.h> |
| 20 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
| 21 | #include <linux/of_address.h> | ||
| 21 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
| 22 | #include <linux/of_gpio.h> | 23 | #include <linux/of_gpio.h> |
| 23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 3c60a000b426..439bc3896418 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c | |||
| @@ -36,7 +36,9 @@ | |||
| 36 | #include <linux/mtd/mtd.h> | 36 | #include <linux/mtd/mtd.h> |
| 37 | #include <linux/mtd/nand.h> | 37 | #include <linux/mtd/nand.h> |
| 38 | #include <linux/mtd/partitions.h> | 38 | #include <linux/mtd/partitions.h> |
| 39 | #include <linux/of_address.h> | ||
| 39 | #include <linux/of_device.h> | 40 | #include <linux/of_device.h> |
| 41 | #include <linux/of_irq.h> | ||
| 40 | #include <linux/of_platform.h> | 42 | #include <linux/of_platform.h> |
| 41 | 43 | ||
| 42 | #include <asm/mpc5121.h> | 44 | #include <asm/mpc5121.h> |
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 8e148f1478fd..69eaba690a99 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/mtd/ndfc.h> | 30 | #include <linux/mtd/ndfc.h> |
| 31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
| 32 | #include <linux/mtd/mtd.h> | 32 | #include <linux/mtd/mtd.h> |
| 33 | #include <linux/of_address.h> | ||
| 33 | #include <linux/of_platform.h> | 34 | #include <linux/of_platform.h> |
| 34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
| 35 | 36 | ||
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index 5a67082c07ee..4d174366a0f0 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c | |||
| @@ -28,6 +28,8 @@ | |||
| 28 | #include <linux/mtd/mtd.h> | 28 | #include <linux/mtd/mtd.h> |
| 29 | #include <linux/mtd/nand.h> | 29 | #include <linux/mtd/nand.h> |
| 30 | #include <linux/mtd/nand_ecc.h> | 30 | #include <linux/mtd/nand_ecc.h> |
| 31 | #include <linux/of_address.h> | ||
| 32 | #include <linux/of_irq.h> | ||
| 31 | #include <linux/of_platform.h> | 33 | #include <linux/of_platform.h> |
| 32 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
| 33 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c index 6aa737a24393..ab506d6cab37 100644 --- a/drivers/net/can/grcan.c +++ b/drivers/net/can/grcan.c | |||
| @@ -34,10 +34,7 @@ | |||
| 34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
| 35 | #include <linux/can/dev.h> | 35 | #include <linux/can/dev.h> |
| 36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
| 37 | |||
| 38 | #include <linux/of_platform.h> | 37 | #include <linux/of_platform.h> |
| 39 | #include <asm/prom.h> | ||
| 40 | |||
| 41 | #include <linux/of_irq.h> | 38 | #include <linux/of_irq.h> |
| 42 | 39 | ||
| 43 | #include <linux/dma-mapping.h> | 40 | #include <linux/dma-mapping.h> |
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index 31ad33911167..047accd4ede5 100644 --- a/drivers/net/can/sja1000/sja1000_of_platform.c +++ b/drivers/net/can/sja1000/sja1000_of_platform.c | |||
| @@ -44,7 +44,6 @@ | |||
| 44 | #include <linux/of_platform.h> | 44 | #include <linux/of_platform.h> |
| 45 | #include <linux/of_address.h> | 45 | #include <linux/of_address.h> |
| 46 | #include <linux/of_irq.h> | 46 | #include <linux/of_irq.h> |
| 47 | #include <asm/prom.h> | ||
| 48 | 47 | ||
| 49 | #include "sja1000.h" | 48 | #include "sja1000.h" |
| 50 | 49 | ||
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c b/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c index 10f781d8cb09..f8b92864fc52 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | |||
| @@ -32,7 +32,9 @@ | |||
| 32 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
| 33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
| 34 | #include <linux/phy.h> | 34 | #include <linux/phy.h> |
| 35 | #include <linux/of_address.h> | ||
| 35 | #include <linux/of_device.h> | 36 | #include <linux/of_device.h> |
| 37 | #include <linux/of_irq.h> | ||
| 36 | #include <linux/gfp.h> | 38 | #include <linux/gfp.h> |
| 37 | 39 | ||
| 38 | #include <asm/immap_cpm2.h> | 40 | #include <asm/immap_cpm2.h> |
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c index 53a0c23b4890..a9a00f39521a 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c | |||
| @@ -31,7 +31,9 @@ | |||
| 31 | #include <linux/bitops.h> | 31 | #include <linux/bitops.h> |
| 32 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
| 33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
| 34 | #include <linux/of_address.h> | ||
| 34 | #include <linux/of_device.h> | 35 | #include <linux/of_device.h> |
| 36 | #include <linux/of_irq.h> | ||
| 35 | #include <linux/gfp.h> | 37 | #include <linux/gfp.h> |
| 36 | 38 | ||
| 37 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-scc.c b/drivers/net/ethernet/freescale/fs_enet/mac-scc.c index 631f09872fa2..d37cd4ebac65 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-scc.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-scc.c | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | #include <linux/bitops.h> | 31 | #include <linux/bitops.h> |
| 32 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
| 33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
| 34 | #include <linux/of_address.h> | ||
| 35 | #include <linux/of_irq.h> | ||
| 34 | #include <linux/of_platform.h> | 36 | #include <linux/of_platform.h> |
| 35 | 37 | ||
| 36 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c index 844ecfa84d17..67caaacd19ec 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c +++ b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/mii.h> | 22 | #include <linux/mii.h> |
| 23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
| 24 | #include <linux/mdio-bitbang.h> | 24 | #include <linux/mdio-bitbang.h> |
| 25 | #include <linux/of_address.h> | ||
| 25 | #include <linux/of_mdio.h> | 26 | #include <linux/of_mdio.h> |
| 26 | #include <linux/of_platform.h> | 27 | #include <linux/of_platform.h> |
| 27 | 28 | ||
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c index 2f1c46a12f05..ac5d447ff8c4 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/ethtool.h> | 31 | #include <linux/ethtool.h> |
| 32 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
| 33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
| 34 | #include <linux/of_address.h> | ||
| 34 | #include <linux/of_platform.h> | 35 | #include <linux/of_platform.h> |
| 35 | 36 | ||
| 36 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index c4eaadeb572f..c49abb478e84 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c | |||
| @@ -78,6 +78,8 @@ | |||
| 78 | #include <linux/if_vlan.h> | 78 | #include <linux/if_vlan.h> |
| 79 | #include <linux/spinlock.h> | 79 | #include <linux/spinlock.h> |
| 80 | #include <linux/mm.h> | 80 | #include <linux/mm.h> |
| 81 | #include <linux/of_address.h> | ||
| 82 | #include <linux/of_irq.h> | ||
| 81 | #include <linux/of_mdio.h> | 83 | #include <linux/of_mdio.h> |
| 82 | #include <linux/of_platform.h> | 84 | #include <linux/of_platform.h> |
| 83 | #include <linux/ip.h> | 85 | #include <linux/ip.h> |
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index 5930c39672db..64b329fecf3d 100644 --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | #include <linux/mii.h> | 31 | #include <linux/mii.h> |
| 32 | #include <linux/phy.h> | 32 | #include <linux/phy.h> |
| 33 | #include <linux/workqueue.h> | 33 | #include <linux/workqueue.h> |
| 34 | #include <linux/of_address.h> | ||
| 35 | #include <linux/of_irq.h> | ||
| 34 | #include <linux/of_mdio.h> | 36 | #include <linux/of_mdio.h> |
| 35 | #include <linux/of_net.h> | 37 | #include <linux/of_net.h> |
| 36 | #include <linux/of_platform.h> | 38 | #include <linux/of_platform.h> |
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index c1b6e7e31aac..d449fcb90199 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
| 18 | #include <linux/phy.h> | 18 | #include <linux/phy.h> |
| 19 | #include <linux/mdio.h> | 19 | #include <linux/mdio.h> |
| 20 | #include <linux/of_address.h> | ||
| 20 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
| 21 | #include <linux/of_mdio.h> | 22 | #include <linux/of_mdio.h> |
| 22 | 23 | ||
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index 6b5c7222342c..cdf2321f1f0f 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c | |||
| @@ -39,6 +39,8 @@ | |||
| 39 | #include <linux/bitops.h> | 39 | #include <linux/bitops.h> |
| 40 | #include <linux/workqueue.h> | 40 | #include <linux/workqueue.h> |
| 41 | #include <linux/of.h> | 41 | #include <linux/of.h> |
| 42 | #include <linux/of_address.h> | ||
| 43 | #include <linux/of_irq.h> | ||
| 42 | #include <linux/of_net.h> | 44 | #include <linux/of_net.h> |
| 43 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
| 44 | 46 | ||
diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c index dac564c25440..4742ba3909fb 100644 --- a/drivers/net/ethernet/ibm/emac/mal.c +++ b/drivers/net/ethernet/ibm/emac/mal.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
| 29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
| 30 | #include <linux/of_irq.h> | ||
| 30 | 31 | ||
| 31 | #include "core.h" | 32 | #include "core.h" |
| 32 | #include <asm/dcr-regs.h> | 33 | #include <asm/dcr-regs.h> |
diff --git a/drivers/net/ethernet/ibm/emac/rgmii.c b/drivers/net/ethernet/ibm/emac/rgmii.c index c47e23d6eeaa..4fb2f96da23b 100644 --- a/drivers/net/ethernet/ibm/emac/rgmii.c +++ b/drivers/net/ethernet/ibm/emac/rgmii.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
| 26 | #include <linux/ethtool.h> | 26 | #include <linux/ethtool.h> |
| 27 | #include <linux/of_address.h> | ||
| 27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
| 28 | 29 | ||
| 29 | #include "emac.h" | 30 | #include "emac.h" |
diff --git a/drivers/net/ethernet/ibm/emac/tah.c b/drivers/net/ethernet/ibm/emac/tah.c index c231a4a32c4d..9f24769ed826 100644 --- a/drivers/net/ethernet/ibm/emac/tah.c +++ b/drivers/net/ethernet/ibm/emac/tah.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | * Free Software Foundation; either version 2 of the License, or (at your | 18 | * Free Software Foundation; either version 2 of the License, or (at your |
| 19 | * option) any later version. | 19 | * option) any later version. |
| 20 | */ | 20 | */ |
| 21 | #include <linux/of_address.h> | ||
| 21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
| 22 | 23 | ||
| 23 | #include "emac.h" | 24 | #include "emac.h" |
diff --git a/drivers/net/ethernet/ibm/emac/zmii.c b/drivers/net/ethernet/ibm/emac/zmii.c index 4cdf286f7ee3..9ca67a38c062 100644 --- a/drivers/net/ethernet/ibm/emac/zmii.c +++ b/drivers/net/ethernet/ibm/emac/zmii.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
| 26 | #include <linux/ethtool.h> | 26 | #include <linux/ethtool.h> |
| 27 | #include <linux/of_address.h> | ||
| 27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
| 28 | 29 | ||
| 29 | #include "emac.h" | 30 | #include "emac.h" |
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 0029148077a9..1f2364126323 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/netdevice.h> | 36 | #include <linux/netdevice.h> |
| 37 | #include <linux/of.h> | 37 | #include <linux/of.h> |
| 38 | #include <linux/of_device.h> | 38 | #include <linux/of_device.h> |
| 39 | #include <linux/of_irq.h> | ||
| 39 | #include <linux/of_mdio.h> | 40 | #include <linux/of_mdio.h> |
| 40 | #include <linux/of_platform.h> | 41 | #include <linux/of_platform.h> |
| 41 | #include <linux/of_address.h> | 42 | #include <linux/of_address.h> |
diff --git a/drivers/of/address.c b/drivers/of/address.c index 994f293baebf..4b9317bdb81c 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c | |||
| @@ -626,6 +626,14 @@ const __be32 *of_get_address(struct device_node *dev, int index, u64 *size, | |||
| 626 | } | 626 | } |
| 627 | EXPORT_SYMBOL(of_get_address); | 627 | EXPORT_SYMBOL(of_get_address); |
| 628 | 628 | ||
| 629 | unsigned long __weak pci_address_to_pio(phys_addr_t address) | ||
| 630 | { | ||
| 631 | if (address > IO_SPACE_LIMIT) | ||
| 632 | return (unsigned long)-1; | ||
| 633 | |||
| 634 | return (unsigned long) address; | ||
| 635 | } | ||
| 636 | |||
| 629 | static int __of_address_to_resource(struct device_node *dev, | 637 | static int __of_address_to_resource(struct device_node *dev, |
| 630 | const __be32 *addrp, u64 size, unsigned int flags, | 638 | const __be32 *addrp, u64 size, unsigned int flags, |
| 631 | const char *name, struct resource *r) | 639 | const char *name, struct resource *r) |
diff --git a/drivers/of/base.c b/drivers/of/base.c index 021db96245e7..f2431091f4c1 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
| @@ -74,6 +74,13 @@ int of_n_size_cells(struct device_node *np) | |||
| 74 | } | 74 | } |
| 75 | EXPORT_SYMBOL(of_n_size_cells); | 75 | EXPORT_SYMBOL(of_n_size_cells); |
| 76 | 76 | ||
| 77 | #ifdef CONFIG_NUMA | ||
| 78 | int __weak of_node_to_nid(struct device_node *np) | ||
| 79 | { | ||
| 80 | return numa_node_id(); | ||
| 81 | } | ||
| 82 | #endif | ||
| 83 | |||
| 77 | #if defined(CONFIG_OF_DYNAMIC) | 84 | #if defined(CONFIG_OF_DYNAMIC) |
| 78 | /** | 85 | /** |
| 79 | * of_node_get - Increment refcount of a node | 86 | * of_node_get - Increment refcount of a node |
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 229dd9d69e18..5c479104fc67 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
| @@ -619,12 +619,72 @@ int __init of_scan_flat_dt_by_path(const char *path, | |||
| 619 | return ret; | 619 | return ret; |
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | const char * __init of_flat_dt_get_machine_name(void) | ||
| 623 | { | ||
| 624 | const char *name; | ||
| 625 | unsigned long dt_root = of_get_flat_dt_root(); | ||
| 626 | |||
| 627 | name = of_get_flat_dt_prop(dt_root, "model", NULL); | ||
| 628 | if (!name) | ||
| 629 | name = of_get_flat_dt_prop(dt_root, "compatible", NULL); | ||
| 630 | return name; | ||
| 631 | } | ||
| 632 | |||
| 633 | /** | ||
| 634 | * of_flat_dt_match_machine - Iterate match tables to find matching machine. | ||
| 635 | * | ||
| 636 | * @default_match: A machine specific ptr to return in case of no match. | ||
| 637 | * @get_next_compat: callback function to return next compatible match table. | ||
| 638 | * | ||
| 639 | * Iterate through machine match tables to find the best match for the machine | ||
| 640 | * compatible string in the FDT. | ||
| 641 | */ | ||
| 642 | const void * __init of_flat_dt_match_machine(const void *default_match, | ||
| 643 | const void * (*get_next_compat)(const char * const**)) | ||
| 644 | { | ||
| 645 | const void *data = NULL; | ||
| 646 | const void *best_data = default_match; | ||
| 647 | const char *const *compat; | ||
| 648 | unsigned long dt_root; | ||
| 649 | unsigned int best_score = ~1, score = 0; | ||
| 650 | |||
| 651 | dt_root = of_get_flat_dt_root(); | ||
| 652 | while ((data = get_next_compat(&compat))) { | ||
| 653 | score = of_flat_dt_match(dt_root, compat); | ||
| 654 | if (score > 0 && score < best_score) { | ||
| 655 | best_data = data; | ||
| 656 | best_score = score; | ||
| 657 | } | ||
| 658 | } | ||
| 659 | if (!best_data) { | ||
| 660 | const char *prop; | ||
| 661 | long size; | ||
| 662 | |||
| 663 | pr_err("\n unrecognized device tree list:\n[ "); | ||
| 664 | |||
| 665 | prop = of_get_flat_dt_prop(dt_root, "compatible", &size); | ||
| 666 | if (prop) { | ||
| 667 | while (size > 0) { | ||
| 668 | printk("'%s' ", prop); | ||
| 669 | size -= strlen(prop) + 1; | ||
| 670 | prop += strlen(prop) + 1; | ||
| 671 | } | ||
| 672 | } | ||
| 673 | printk("]\n\n"); | ||
| 674 | return NULL; | ||
| 675 | } | ||
| 676 | |||
| 677 | pr_info("Machine model: %s\n", of_flat_dt_get_machine_name()); | ||
| 678 | |||
| 679 | return best_data; | ||
| 680 | } | ||
| 681 | |||
| 622 | #ifdef CONFIG_BLK_DEV_INITRD | 682 | #ifdef CONFIG_BLK_DEV_INITRD |
| 623 | /** | 683 | /** |
| 624 | * early_init_dt_check_for_initrd - Decode initrd location from flat tree | 684 | * early_init_dt_check_for_initrd - Decode initrd location from flat tree |
| 625 | * @node: reference to node containing initrd location ('chosen') | 685 | * @node: reference to node containing initrd location ('chosen') |
| 626 | */ | 686 | */ |
| 627 | void __init early_init_dt_check_for_initrd(unsigned long node) | 687 | static void __init early_init_dt_check_for_initrd(unsigned long node) |
| 628 | { | 688 | { |
| 629 | u64 start, end; | 689 | u64 start, end; |
| 630 | unsigned long len; | 690 | unsigned long len; |
| @@ -642,12 +702,15 @@ void __init early_init_dt_check_for_initrd(unsigned long node) | |||
| 642 | return; | 702 | return; |
| 643 | end = of_read_number(prop, len/4); | 703 | end = of_read_number(prop, len/4); |
| 644 | 704 | ||
| 645 | early_init_dt_setup_initrd_arch(start, end); | 705 | initrd_start = (unsigned long)__va(start); |
| 706 | initrd_end = (unsigned long)__va(end); | ||
| 707 | initrd_below_start_ok = 1; | ||
| 708 | |||
| 646 | pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n", | 709 | pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n", |
| 647 | (unsigned long long)start, (unsigned long long)end); | 710 | (unsigned long long)start, (unsigned long long)end); |
| 648 | } | 711 | } |
| 649 | #else | 712 | #else |
| 650 | inline void early_init_dt_check_for_initrd(unsigned long node) | 713 | static inline void early_init_dt_check_for_initrd(unsigned long node) |
| 651 | { | 714 | { |
| 652 | } | 715 | } |
| 653 | #endif /* CONFIG_BLK_DEV_INITRD */ | 716 | #endif /* CONFIG_BLK_DEV_INITRD */ |
| @@ -775,6 +838,25 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, | |||
| 775 | } | 838 | } |
| 776 | 839 | ||
| 777 | #ifdef CONFIG_HAVE_MEMBLOCK | 840 | #ifdef CONFIG_HAVE_MEMBLOCK |
| 841 | void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size) | ||
| 842 | { | ||
| 843 | const u64 phys_offset = __pa(PAGE_OFFSET); | ||
| 844 | base &= PAGE_MASK; | ||
| 845 | size &= PAGE_MASK; | ||
| 846 | if (base + size < phys_offset) { | ||
| 847 | pr_warning("Ignoring memory block 0x%llx - 0x%llx\n", | ||
| 848 | base, base + size); | ||
| 849 | return; | ||
| 850 | } | ||
| 851 | if (base < phys_offset) { | ||
| 852 | pr_warning("Ignoring memory range 0x%llx - 0x%llx\n", | ||
| 853 | base, phys_offset); | ||
| 854 | size -= phys_offset - base; | ||
| 855 | base = phys_offset; | ||
| 856 | } | ||
| 857 | memblock_add(base, size); | ||
| 858 | } | ||
| 859 | |||
| 778 | /* | 860 | /* |
| 779 | * called from unflatten_device_tree() to bootstrap devicetree itself | 861 | * called from unflatten_device_tree() to bootstrap devicetree itself |
| 780 | * Architectures can override this definition if memblock isn't used | 862 | * Architectures can override this definition if memblock isn't used |
| @@ -785,6 +867,32 @@ void * __init __weak early_init_dt_alloc_memory_arch(u64 size, u64 align) | |||
| 785 | } | 867 | } |
| 786 | #endif | 868 | #endif |
| 787 | 869 | ||
| 870 | bool __init early_init_dt_scan(void *params) | ||
| 871 | { | ||
| 872 | if (!params) | ||
| 873 | return false; | ||
| 874 | |||
| 875 | /* Setup flat device-tree pointer */ | ||
| 876 | initial_boot_params = params; | ||
| 877 | |||
| 878 | /* check device tree validity */ | ||
| 879 | if (be32_to_cpu(initial_boot_params->magic) != OF_DT_HEADER) { | ||
| 880 | initial_boot_params = NULL; | ||
| 881 | return false; | ||
| 882 | } | ||
| 883 | |||
| 884 | /* Retrieve various information from the /chosen node */ | ||
| 885 | of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line); | ||
| 886 | |||
| 887 | /* Initialize {size,address}-cells info */ | ||
| 888 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | ||
| 889 | |||
| 890 | /* Setup memory, calling early_init_dt_add_memory_arch */ | ||
| 891 | of_scan_flat_dt(early_init_dt_scan_memory, NULL); | ||
| 892 | |||
| 893 | return true; | ||
| 894 | } | ||
| 895 | |||
| 788 | /** | 896 | /** |
| 789 | * unflatten_device_tree - create tree of device_nodes from flat blob | 897 | * unflatten_device_tree - create tree of device_nodes from flat blob |
| 790 | * | 898 | * |
| @@ -802,6 +910,30 @@ void __init unflatten_device_tree(void) | |||
| 802 | of_alias_scan(early_init_dt_alloc_memory_arch); | 910 | of_alias_scan(early_init_dt_alloc_memory_arch); |
| 803 | } | 911 | } |
| 804 | 912 | ||
| 913 | /** | ||
| 914 | * unflatten_and_copy_device_tree - copy and create tree of device_nodes from flat blob | ||
| 915 | * | ||
| 916 | * Copies and unflattens the device-tree passed by the firmware, creating the | ||
| 917 | * tree of struct device_node. It also fills the "name" and "type" | ||
| 918 | * pointers of the nodes so the normal device-tree walking functions | ||
| 919 | * can be used. This should only be used when the FDT memory has not been | ||
| 920 | * reserved such is the case when the FDT is built-in to the kernel init | ||
| 921 | * section. If the FDT memory is reserved already then unflatten_device_tree | ||
| 922 | * should be used instead. | ||
| 923 | */ | ||
| 924 | void __init unflatten_and_copy_device_tree(void) | ||
| 925 | { | ||
| 926 | int size = __be32_to_cpu(initial_boot_params->totalsize); | ||
| 927 | void *dt = early_init_dt_alloc_memory_arch(size, | ||
| 928 | __alignof__(struct boot_param_header)); | ||
| 929 | |||
| 930 | if (dt) { | ||
| 931 | memcpy(dt, initial_boot_params, size); | ||
| 932 | initial_boot_params = dt; | ||
| 933 | } | ||
| 934 | unflatten_device_tree(); | ||
| 935 | } | ||
| 936 | |||
| 805 | #endif /* CONFIG_OF_EARLY_FLATTREE */ | 937 | #endif /* CONFIG_OF_EARLY_FLATTREE */ |
| 806 | 938 | ||
| 807 | /* Feed entire flattened device tree into the random pool */ | 939 | /* Feed entire flattened device tree into the random pool */ |
diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c index e5ca00893c0c..848199633798 100644 --- a/drivers/of/of_pci.c +++ b/drivers/of/of_pci.c | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #include <linux/export.h> | 2 | #include <linux/export.h> |
| 3 | #include <linux/of.h> | 3 | #include <linux/of.h> |
| 4 | #include <linux/of_pci.h> | 4 | #include <linux/of_pci.h> |
| 5 | #include <asm/prom.h> | ||
| 6 | 5 | ||
| 7 | static inline int __of_pci_pci_compare(struct device_node *node, | 6 | static inline int __of_pci_pci_compare(struct device_node *node, |
| 8 | unsigned int data) | 7 | unsigned int data) |
diff --git a/drivers/of/of_pci_irq.c b/drivers/of/of_pci_irq.c index 8e92acd8253f..8736bc7676c5 100644 --- a/drivers/of/of_pci_irq.c +++ b/drivers/of/of_pci_irq.c | |||
| @@ -2,7 +2,6 @@ | |||
| 2 | #include <linux/of_pci.h> | 2 | #include <linux/of_pci.h> |
| 3 | #include <linux/of_irq.h> | 3 | #include <linux/of_irq.h> |
| 4 | #include <linux/export.h> | 4 | #include <linux/export.h> |
| 5 | #include <asm/prom.h> | ||
| 6 | 5 | ||
| 7 | /** | 6 | /** |
| 8 | * of_irq_parse_pci - Resolve the interrupt for a PCI device | 7 | * of_irq_parse_pci - Resolve the interrupt for a PCI device |
diff --git a/drivers/of/pdt.c b/drivers/of/pdt.c index 4ec19cbee57f..7b666736c168 100644 --- a/drivers/of/pdt.c +++ b/drivers/of/pdt.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
| 23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
| 24 | #include <linux/of_pdt.h> | 24 | #include <linux/of_pdt.h> |
| 25 | #include <asm/prom.h> | ||
| 26 | 25 | ||
| 27 | static struct of_pdt_ops *of_pdt_prom_ops __initdata; | 26 | static struct of_pdt_ops *of_pdt_prom_ops __initdata; |
| 28 | 27 | ||
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 9b439ac63d8e..c005495fa382 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
| @@ -216,6 +216,8 @@ static struct platform_device *of_platform_device_create_pdata( | |||
| 216 | dev->archdata.dma_mask = 0xffffffffUL; | 216 | dev->archdata.dma_mask = 0xffffffffUL; |
| 217 | #endif | 217 | #endif |
| 218 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | 218 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
| 219 | if (!dev->dev.dma_mask) | ||
| 220 | dev->dev.dma_mask = &dev->dev.coherent_dma_mask; | ||
| 219 | dev->dev.bus = &platform_bus_type; | 221 | dev->dev.bus = &platform_bus_type; |
| 220 | dev->dev.platform_data = platform_data; | 222 | dev->dev.platform_data = platform_data; |
| 221 | 223 | ||
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index a007321ad314..1b206eac5f93 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c | |||
| @@ -30,6 +30,8 @@ | |||
| 30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
| 31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
| 32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
| 33 | #include <linux/of_address.h> | ||
| 34 | #include <linux/of_irq.h> | ||
| 33 | #include <linux/of_platform.h> | 35 | #include <linux/of_platform.h> |
| 34 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
| 35 | 37 | ||
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c index 9c8f60903799..dc4f14255cc3 100644 --- a/drivers/rtc/rtc-mpc5121.c +++ b/drivers/rtc/rtc-mpc5121.c | |||
| @@ -14,7 +14,9 @@ | |||
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/rtc.h> | 15 | #include <linux/rtc.h> |
| 16 | #include <linux/of.h> | 16 | #include <linux/of.h> |
| 17 | #include <linux/of_address.h> | ||
| 17 | #include <linux/of_device.h> | 18 | #include <linux/of_device.h> |
| 19 | #include <linux/of_irq.h> | ||
| 18 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
| 19 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 20 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
diff --git a/drivers/spi/spi-fsl-cpm.c b/drivers/spi/spi-fsl-cpm.c index 07971e3fe58b..bd5aaf42719c 100644 --- a/drivers/spi/spi-fsl-cpm.c +++ b/drivers/spi/spi-fsl-cpm.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
| 21 | #include <linux/fsl_devices.h> | 21 | #include <linux/fsl_devices.h> |
| 22 | #include <linux/dma-mapping.h> | 22 | #include <linux/dma-mapping.h> |
| 23 | #include <linux/of_address.h> | ||
| 23 | #include <asm/cpm.h> | 24 | #include <asm/cpm.h> |
| 24 | #include <asm/qe.h> | 25 | #include <asm/qe.h> |
| 25 | 26 | ||
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index 3197d55f30cd..84e342130a60 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | #include <linux/fsl_devices.h> | 16 | #include <linux/fsl_devices.h> |
| 17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
| 18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
| 19 | #include <linux/of_address.h> | ||
| 20 | #include <linux/of_irq.h> | ||
| 19 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
| 20 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| 21 | #include <linux/err.h> | 23 | #include <linux/err.h> |
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c index 6adf4e35816d..8dcc1432f1f5 100644 --- a/drivers/spi/spi-mpc512x-psc.c +++ b/drivers/spi/spi-mpc512x-psc.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
| 21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
| 22 | #include <linux/of_address.h> | 22 | #include <linux/of_address.h> |
| 23 | #include <linux/of_irq.h> | ||
| 23 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
| 24 | #include <linux/completion.h> | 25 | #include <linux/completion.h> |
| 25 | #include <linux/io.h> | 26 | #include <linux/io.h> |
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c index 9bffcec5ad82..0419b69e270f 100644 --- a/drivers/tty/ehv_bytechan.c +++ b/drivers/tty/ehv_bytechan.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <linux/poll.h> | 32 | #include <linux/poll.h> |
| 33 | #include <asm/epapr_hcalls.h> | 33 | #include <asm/epapr_hcalls.h> |
| 34 | #include <linux/of.h> | 34 | #include <linux/of.h> |
| 35 | #include <linux/of_irq.h> | ||
| 35 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
| 36 | #include <linux/cdev.h> | 37 | #include <linux/cdev.h> |
| 37 | #include <linux/console.h> | 38 | #include <linux/console.h> |
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c index 6957f445a114..7d76214612c7 100644 --- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c | |||
| @@ -41,6 +41,8 @@ | |||
| 41 | #include <linux/bootmem.h> | 41 | #include <linux/bootmem.h> |
| 42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
| 43 | #include <linux/fs_uart_pd.h> | 43 | #include <linux/fs_uart_pd.h> |
| 44 | #include <linux/of_address.h> | ||
| 45 | #include <linux/of_irq.h> | ||
| 44 | #include <linux/of_platform.h> | 46 | #include <linux/of_platform.h> |
| 45 | #include <linux/gpio.h> | 47 | #include <linux/gpio.h> |
| 46 | #include <linux/of_gpio.h> | 48 | #include <linux/of_gpio.h> |
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c index 18f79575894a..527a969b0952 100644 --- a/drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c +++ b/drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #include <linux/kernel.h> | 45 | #include <linux/kernel.h> |
| 46 | 46 | ||
| 47 | #include <linux/of.h> | 47 | #include <linux/of.h> |
| 48 | #include <linux/of_address.h> | ||
| 48 | 49 | ||
| 49 | #include "cpm_uart.h" | 50 | #include "cpm_uart.h" |
| 50 | 51 | ||
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index f87f1a0c8c6e..246b4c327a54 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c | |||
| @@ -57,6 +57,8 @@ | |||
| 57 | #include <linux/bitops.h> | 57 | #include <linux/bitops.h> |
| 58 | #include <linux/sysrq.h> | 58 | #include <linux/sysrq.h> |
| 59 | #include <linux/mutex.h> | 59 | #include <linux/mutex.h> |
| 60 | #include <linux/of_address.h> | ||
| 61 | #include <linux/of_irq.h> | ||
| 60 | #include <asm/sections.h> | 62 | #include <asm/sections.h> |
| 61 | #include <asm/io.h> | 63 | #include <asm/io.h> |
| 62 | #include <asm/irq.h> | 64 | #include <asm/irq.h> |
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index 88317482b81f..9de1da0c9d89 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #include <linux/tty.h> | 25 | #include <linux/tty.h> |
| 26 | #include <linux/tty_flip.h> | 26 | #include <linux/tty_flip.h> |
| 27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
| 28 | #include <linux/of_address.h> | ||
| 29 | #include <linux/of_irq.h> | ||
| 28 | #include <linux/of_platform.h> | 30 | #include <linux/of_platform.h> |
| 29 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
| 30 | 32 | ||
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c index f3bb363f1d4a..807127d56fa3 100644 --- a/drivers/usb/gadget/fsl_qe_udc.c +++ b/drivers/usb/gadget/fsl_qe_udc.c | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
| 34 | #include <linux/moduleparam.h> | 34 | #include <linux/moduleparam.h> |
| 35 | #include <linux/of_address.h> | 35 | #include <linux/of_address.h> |
| 36 | #include <linux/of_irq.h> | ||
| 36 | #include <linux/of_platform.h> | 37 | #include <linux/of_platform.h> |
| 37 | #include <linux/dma-mapping.h> | 38 | #include <linux/dma-mapping.h> |
| 38 | #include <linux/usb/ch9.h> | 39 | #include <linux/usb/ch9.h> |
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index 932293fa32de..2b1694e6b480 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
| 17 | 17 | ||
| 18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
| 19 | #include <linux/of_address.h> | ||
| 20 | #include <linux/of_irq.h> | ||
| 19 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
| 20 | 22 | ||
| 21 | 23 | ||
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c index 0b46542591ff..0551c0af0fd1 100644 --- a/drivers/usb/host/fhci-hcd.c +++ b/drivers/usb/host/fhci-hcd.c | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
| 27 | #include <linux/usb.h> | 27 | #include <linux/usb.h> |
| 28 | #include <linux/usb/hcd.h> | 28 | #include <linux/usb/hcd.h> |
| 29 | #include <linux/of_address.h> | ||
| 30 | #include <linux/of_irq.h> | ||
| 29 | #include <linux/of_platform.h> | 31 | #include <linux/of_platform.h> |
| 30 | #include <linux/of_gpio.h> | 32 | #include <linux/of_gpio.h> |
| 31 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c index 75f5a1e2f01e..81f3eba215c1 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
| 17 | #include <linux/of_address.h> | ||
| 18 | #include <linux/of_irq.h> | ||
| 17 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
| 18 | 20 | ||
| 19 | #include <asm/prom.h> | 21 | #include <asm/prom.h> |
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 6dd72250111e..b047ec58ac30 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
| 32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
| 33 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
| 34 | #include <linux/of_address.h> | ||
| 35 | #include <linux/of_irq.h> | ||
| 34 | 36 | ||
| 35 | #include <sysdev/fsl_soc.h> | 37 | #include <sysdev/fsl_soc.h> |
| 36 | #include <linux/fsl-diu-fb.h> | 38 | #include <linux/fsl-diu-fb.h> |
diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c index d294f67d6f84..32c8fc5f7a5c 100644 --- a/drivers/virt/fsl_hypervisor.c +++ b/drivers/virt/fsl_hypervisor.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
| 35 | #include <linux/poll.h> | 35 | #include <linux/poll.h> |
| 36 | #include <linux/of.h> | 36 | #include <linux/of.h> |
| 37 | #include <linux/of_irq.h> | ||
| 37 | #include <linux/reboot.h> | 38 | #include <linux/reboot.h> |
| 38 | #include <linux/uaccess.h> | 39 | #include <linux/uaccess.h> |
| 39 | #include <linux/notifier.h> | 40 | #include <linux/notifier.h> |
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index 257cfbad21da..3755833430dc 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/watchdog.h> | 34 | #include <linux/watchdog.h> |
| 35 | #include <linux/fs.h> | 35 | #include <linux/fs.h> |
| 36 | #include <linux/of.h> | 36 | #include <linux/of.h> |
| 37 | #include <linux/of_address.h> | ||
| 37 | #include <linux/of_platform.h> | 38 | #include <linux/of_platform.h> |
| 38 | #include <linux/io.h> | 39 | #include <linux/io.h> |
| 39 | #include <linux/uaccess.h> | 40 | #include <linux/uaccess.h> |
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index da2752063bb7..d0ebebae607c 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
| 25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
| 26 | #include <linux/miscdevice.h> | 26 | #include <linux/miscdevice.h> |
| 27 | #include <linux/of_address.h> | ||
| 27 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
| 28 | #include <linux/module.h> | 29 | #include <linux/module.h> |
| 29 | #include <linux/watchdog.h> | 30 | #include <linux/watchdog.h> |
