diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-14 14:07:42 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-14 14:07:42 -0400 |
| commit | d8bfb96a2e3c42f91a9944a19638c043cb86dd8f (patch) | |
| tree | 58dfdccc4f15a6f35e0875d21373e303f13553a4 /arch/powerpc/sysdev | |
| parent | 11ed3e0ef354cdc9c4577a187fa60a053137b507 (diff) | |
| parent | 08bf75ba852ef8304a84b6a030466b4b4850382e (diff) | |
Merge tag 'powerpc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull more powerpc updates from Michael Ellerman:
"Some more powerpc updates for 4.9:
Freescale updates from Scott Wood:
- qbman support (a prerequisite for datapath drivers such as ethernet)
- a PCI DMA fix+improvement
- reset handler changes
- more 8xx optimizations
- some cleanups and fixes.'
Fixes:
- selftests/powerpc: Add missing binaries to .gitignores (Michael Ellerman)
- selftests/powerpc: Fix build break caused by EXPORT_SYMBOL changes (Michael Ellerman)
- powerpc/pseries: Fix stack corruption in htpe code (Laurent Dufour)
- powerpc/64s: Fix power4_fixup_nap placement (Nicholas Piggin)
- powerpc/64: Fix incorrect return value from __copy_tofrom_user (Paul Mackerras)
- powerpc/mm/hash64: Fix might_have_hea() check (Michael Ellerman)
Other:
- MAINTAINERS: Remove myself from PA Semi entries (Olof Johansson)
- MAINTAINERS: Drop separate pseries entry (Michael Ellerman)
- MAINTAINERS: Update powerpc website & add selftests (Michael Ellerman):
* tag 'powerpc-4.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (35 commits)
powerpc/mm/hash64: Fix might_have_hea() check
powerpc/64: Fix incorrect return value from __copy_tofrom_user
powerpc/64s: Fix power4_fixup_nap placement
powerpc/pseries: Fix stack corruption in htpe code
selftests/powerpc: Fix build break caused by EXPORT_SYMBOL changes
MAINTAINERS: Update powerpc website & add selftests
MAINTAINERS: Drop separate pseries entry
MAINTAINERS: Remove myself from PA Semi entries
selftests/powerpc: Add missing binaries to .gitignores
arch/powerpc: Add CONFIG_FSL_DPAA to corenetXX_smp_defconfig
soc/qman: Add self-test for QMan driver
soc/bman: Add self-test for BMan driver
soc/fsl: Introduce DPAA 1.x QMan device driver
soc/fsl: Introduce DPAA 1.x BMan device driver
powerpc/8xx: make user addr DTLB miss the short path
powerpc/8xx: Move additional DTLBMiss handlers out of exception area
powerpc/8xx: use r3 to scratch CR in ITLBmiss
soc/fsl/qe: fix gpio save_regs functions
powerpc/8xx: add dedicated machine check handler
powerpc/8xx: add system_reset_exception
...
Diffstat (limited to 'arch/powerpc/sysdev')
| -rw-r--r-- | arch/powerpc/sysdev/cpm1.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/cpm2.c | 4 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/cpm_common.c | 15 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 12 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 33 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/fsl_soc.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/mpic.c | 2 |
7 files changed, 41 insertions, 29 deletions
diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c index 3c0eb9b25535..986cd111d4df 100644 --- a/arch/powerpc/sysdev/cpm1.c +++ b/arch/powerpc/sysdev/cpm1.c | |||
| @@ -233,8 +233,6 @@ void __init cpm_reset(void) | |||
| 233 | else | 233 | else |
| 234 | out_be32(&siu_conf->sc_sdcr, 1); | 234 | out_be32(&siu_conf->sc_sdcr, 1); |
| 235 | immr_unmap(siu_conf); | 235 | immr_unmap(siu_conf); |
| 236 | |||
| 237 | cpm_muram_init(); | ||
| 238 | } | 236 | } |
| 239 | 237 | ||
| 240 | static DEFINE_SPINLOCK(cmd_lock); | 238 | static DEFINE_SPINLOCK(cmd_lock); |
diff --git a/arch/powerpc/sysdev/cpm2.c b/arch/powerpc/sysdev/cpm2.c index 8dc1e24f3c23..f78ff841652c 100644 --- a/arch/powerpc/sysdev/cpm2.c +++ b/arch/powerpc/sysdev/cpm2.c | |||
| @@ -66,10 +66,6 @@ void __init cpm2_reset(void) | |||
| 66 | cpm2_immr = ioremap(get_immrbase(), CPM_MAP_SIZE); | 66 | cpm2_immr = ioremap(get_immrbase(), CPM_MAP_SIZE); |
| 67 | #endif | 67 | #endif |
| 68 | 68 | ||
| 69 | /* Reclaim the DP memory for our use. | ||
| 70 | */ | ||
| 71 | cpm_muram_init(); | ||
| 72 | |||
| 73 | /* Tell everyone where the comm processor resides. | 69 | /* Tell everyone where the comm processor resides. |
| 74 | */ | 70 | */ |
| 75 | cpmp = &cpm2_immr->im_cpm; | 71 | cpmp = &cpm2_immr->im_cpm; |
diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c index 947f42007734..51bf749a4f3a 100644 --- a/arch/powerpc/sysdev/cpm_common.c +++ b/arch/powerpc/sysdev/cpm_common.c | |||
| @@ -37,6 +37,21 @@ | |||
| 37 | #include <linux/of_gpio.h> | 37 | #include <linux/of_gpio.h> |
| 38 | #endif | 38 | #endif |
| 39 | 39 | ||
| 40 | static int __init cpm_init(void) | ||
| 41 | { | ||
| 42 | struct device_node *np; | ||
| 43 | |||
| 44 | np = of_find_compatible_node(NULL, NULL, "fsl,cpm1"); | ||
| 45 | if (!np) | ||
| 46 | np = of_find_compatible_node(NULL, NULL, "fsl,cpm2"); | ||
| 47 | if (!np) | ||
| 48 | return -ENODEV; | ||
| 49 | cpm_muram_init(); | ||
| 50 | of_node_put(np); | ||
| 51 | return 0; | ||
| 52 | } | ||
| 53 | subsys_initcall(cpm_init); | ||
| 54 | |||
| 40 | #ifdef CONFIG_PPC_EARLY_DEBUG_CPM | 55 | #ifdef CONFIG_PPC_EARLY_DEBUG_CPM |
| 41 | static u32 __iomem *cpm_udbg_txdesc; | 56 | static u32 __iomem *cpm_udbg_txdesc; |
| 42 | static u8 __iomem *cpm_udbg_txbuf; | 57 | static u8 __iomem *cpm_udbg_txbuf; |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 0ef9df49f0f2..d3a597456b6e 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
| @@ -111,8 +111,7 @@ static struct pci_ops fsl_indirect_pcie_ops = | |||
| 111 | .write = indirect_write_config, | 111 | .write = indirect_write_config, |
| 112 | }; | 112 | }; |
| 113 | 113 | ||
| 114 | #define MAX_PHYS_ADDR_BITS 40 | 114 | static u64 pci64_dma_offset; |
| 115 | static u64 pci64_dma_offset = 1ull << MAX_PHYS_ADDR_BITS; | ||
| 116 | 115 | ||
| 117 | #ifdef CONFIG_SWIOTLB | 116 | #ifdef CONFIG_SWIOTLB |
| 118 | static void setup_swiotlb_ops(struct pci_controller *hose) | 117 | static void setup_swiotlb_ops(struct pci_controller *hose) |
| @@ -132,12 +131,10 @@ static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask) | |||
| 132 | return -EIO; | 131 | return -EIO; |
| 133 | 132 | ||
| 134 | /* | 133 | /* |
| 135 | * Fixup PCI devices that are able to DMA to above the physical | 134 | * Fix up PCI devices that are able to DMA to the large inbound |
| 136 | * address width of the SoC such that we can address any internal | 135 | * mapping that allows addressing any RAM address from across PCI. |
| 137 | * SoC address from across PCI if needed | ||
| 138 | */ | 136 | */ |
| 139 | if ((dev_is_pci(dev)) && | 137 | if (dev_is_pci(dev) && dma_mask >= pci64_dma_offset * 2 - 1) { |
| 140 | dma_mask >= DMA_BIT_MASK(MAX_PHYS_ADDR_BITS)) { | ||
| 141 | set_dma_ops(dev, &dma_direct_ops); | 138 | set_dma_ops(dev, &dma_direct_ops); |
| 142 | set_dma_offset(dev, pci64_dma_offset); | 139 | set_dma_offset(dev, pci64_dma_offset); |
| 143 | } | 140 | } |
| @@ -387,6 +384,7 @@ static void setup_pci_atmu(struct pci_controller *hose) | |||
| 387 | mem_log++; | 384 | mem_log++; |
| 388 | 385 | ||
| 389 | piwar = (piwar & ~PIWAR_SZ_MASK) | (mem_log - 1); | 386 | piwar = (piwar & ~PIWAR_SZ_MASK) | (mem_log - 1); |
| 387 | pci64_dma_offset = 1ULL << mem_log; | ||
| 390 | 388 | ||
| 391 | if (setup_inbound) { | 389 | if (setup_inbound) { |
| 392 | /* Setup inbound memory window */ | 390 | /* Setup inbound memory window */ |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index a09ca704de58..d93056eedcb0 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/fsl_devices.h> | 29 | #include <linux/fsl_devices.h> |
| 30 | #include <linux/fs_enet_pd.h> | 30 | #include <linux/fs_enet_pd.h> |
| 31 | #include <linux/fs_uart_pd.h> | 31 | #include <linux/fs_uart_pd.h> |
| 32 | #include <linux/reboot.h> | ||
| 32 | 33 | ||
| 33 | #include <linux/atomic.h> | 34 | #include <linux/atomic.h> |
| 34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
| @@ -180,23 +181,38 @@ EXPORT_SYMBOL(get_baudrate); | |||
| 180 | #if defined(CONFIG_FSL_SOC_BOOKE) || defined(CONFIG_PPC_86xx) | 181 | #if defined(CONFIG_FSL_SOC_BOOKE) || defined(CONFIG_PPC_86xx) |
| 181 | static __be32 __iomem *rstcr; | 182 | static __be32 __iomem *rstcr; |
| 182 | 183 | ||
| 184 | static int fsl_rstcr_restart(struct notifier_block *this, | ||
| 185 | unsigned long mode, void *cmd) | ||
| 186 | { | ||
| 187 | local_irq_disable(); | ||
| 188 | /* set reset control register */ | ||
| 189 | out_be32(rstcr, 0x2); /* HRESET_REQ */ | ||
| 190 | |||
| 191 | return NOTIFY_DONE; | ||
| 192 | } | ||
| 193 | |||
| 183 | static int __init setup_rstcr(void) | 194 | static int __init setup_rstcr(void) |
| 184 | { | 195 | { |
| 185 | struct device_node *np; | 196 | struct device_node *np; |
| 186 | 197 | ||
| 198 | static struct notifier_block restart_handler = { | ||
| 199 | .notifier_call = fsl_rstcr_restart, | ||
| 200 | .priority = 128, | ||
| 201 | }; | ||
| 202 | |||
| 187 | for_each_node_by_name(np, "global-utilities") { | 203 | for_each_node_by_name(np, "global-utilities") { |
| 188 | if ((of_get_property(np, "fsl,has-rstcr", NULL))) { | 204 | if ((of_get_property(np, "fsl,has-rstcr", NULL))) { |
| 189 | rstcr = of_iomap(np, 0) + 0xb0; | 205 | rstcr = of_iomap(np, 0) + 0xb0; |
| 190 | if (!rstcr) | 206 | if (!rstcr) { |
| 191 | printk (KERN_ERR "Error: reset control " | 207 | printk (KERN_ERR "Error: reset control " |
| 192 | "register not mapped!\n"); | 208 | "register not mapped!\n"); |
| 209 | } else { | ||
| 210 | register_restart_handler(&restart_handler); | ||
| 211 | } | ||
| 193 | break; | 212 | break; |
| 194 | } | 213 | } |
| 195 | } | 214 | } |
| 196 | 215 | ||
| 197 | if (!rstcr && ppc_md.restart == fsl_rstcr_restart) | ||
| 198 | printk(KERN_ERR "No RSTCR register, warm reboot won't work\n"); | ||
| 199 | |||
| 200 | of_node_put(np); | 216 | of_node_put(np); |
| 201 | 217 | ||
| 202 | return 0; | 218 | return 0; |
| @@ -204,15 +220,6 @@ static int __init setup_rstcr(void) | |||
| 204 | 220 | ||
| 205 | arch_initcall(setup_rstcr); | 221 | arch_initcall(setup_rstcr); |
| 206 | 222 | ||
| 207 | void __noreturn fsl_rstcr_restart(char *cmd) | ||
| 208 | { | ||
| 209 | local_irq_disable(); | ||
| 210 | if (rstcr) | ||
| 211 | /* set reset control register */ | ||
| 212 | out_be32(rstcr, 0x2); /* HRESET_REQ */ | ||
| 213 | |||
| 214 | while (1) ; | ||
| 215 | } | ||
| 216 | #endif | 223 | #endif |
| 217 | 224 | ||
| 218 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | 225 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) |
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h index 433566a5ef19..d73daa4f0ccf 100644 --- a/arch/powerpc/sysdev/fsl_soc.h +++ b/arch/powerpc/sysdev/fsl_soc.h | |||
| @@ -19,8 +19,6 @@ extern u32 fsl_get_sys_freq(void); | |||
| 19 | struct spi_board_info; | 19 | struct spi_board_info; |
| 20 | struct device_node; | 20 | struct device_node; |
| 21 | 21 | ||
| 22 | extern void __noreturn fsl_rstcr_restart(char *cmd); | ||
| 23 | |||
| 24 | /* The different ports that the DIU can be connected to */ | 22 | /* The different ports that the DIU can be connected to */ |
| 25 | enum fsl_diu_monitor_port { | 23 | enum fsl_diu_monitor_port { |
| 26 | FSL_DIU_PORT_DVI, /* DVI */ | 24 | FSL_DIU_PORT_DVI, /* DVI */ |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 4d48cecfedd1..b9aac951a90f 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
| @@ -1249,7 +1249,7 @@ struct mpic * __init mpic_alloc(struct device_node *node, | |||
| 1249 | /* Pick the physical address from the device tree if unspecified */ | 1249 | /* Pick the physical address from the device tree if unspecified */ |
| 1250 | if (!phys_addr) { | 1250 | if (!phys_addr) { |
| 1251 | /* Check if it is DCR-based */ | 1251 | /* Check if it is DCR-based */ |
| 1252 | if (of_get_property(node, "dcr-reg", NULL)) { | 1252 | if (of_property_read_bool(node, "dcr-reg")) { |
| 1253 | flags |= MPIC_USES_DCR; | 1253 | flags |= MPIC_USES_DCR; |
| 1254 | } else { | 1254 | } else { |
| 1255 | struct resource r; | 1255 | struct resource r; |
