This pull requests contains Broadcom ARM64-based SoC changes for 4.8 second part:
- Eric updates the bcm2836 interrupt controller driver not to rely on ARM/Linux specific functions in preparation for using it on ARM64 - Eric also adds a Kconfig entry for the BCM2835 Raspberry Pi family in the ARM64 Kconfig.platforms file - Eric cherry picked a patch from Alexander Graf with Acks from ARM64 maintainers to support different DMA and bus offsets, required for the Raspberry Pi 3 SoC -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXfeKCAAoJEIfQlpxEBwcE5lsQANQE4ppxhTsQe/VhxWFnIchC UEBRTP00iFtQbiYLrP0irRe37QxRy16A5AY7yFp9CHPOe9Ut1fvzwOORCsXViqSo 5NB3UGUnLJmrBSe5q8wbGXXc0JAnFwcFEHIvnhRVPy8lG2dC0QsABmxoOgen1euz WFFW3/nWhG3U8S59h0WqYeSlspbr9byDRFLYA8nvyK1GKtaRkwnAd4OuqKhHcI1t 1Yw1H9WnQk5deEYEYki6LJCNggJ4+cqltFb2h0x7QcMTVLz/KmNDA7uAmR+ZxLpx RinlzKW8kdDFOqhzfr250M3z6THCpX9DR+NUjkaua5NxFuQZvhdLldOu9wXlo5Ya bhYXgeU3YHdAw3mVHmCwqaNv0UDAhKAbmXtriqqJs44bF0HWr7oT4FyhMf7r1Pae V6V3Oh+xYknaYOCS7Ny4ALkPFH7CbArLU5CCvW8uTSt3K38MMmFDwPurAlb7bVph UB6jmsNVwPXrs40ha0IMnVgwnC5m8eva4g+UbV/KBr7vrSC4XQMwRfTd4Cm6ZhtB GymQ9y7hR4VDkLnt1QNbQDWz+PE4ycixn3uN070rA+6evi0DLcOLH+KK+g3lPdsl dZqxBkZR1JpzIM4OezKK6XzlR6cKUSW+vJ4GrDllWIHXXRILVVZLHdiDRG2rBrv0 /1rBUxXZoPvSGY79dRqD =qrTS -----END PGP SIGNATURE----- Merge tag 'arm-soc/for-4.8/soc-arm64-part2' of http://github.com/Broadcom/stblinux into next/arm64 Merge "Broadcom ARM64-based SoC changes for 4.8 second part" from Florian Fainelli: - Eric updates the bcm2836 interrupt controller driver not to rely on ARM/Linux specific functions in preparation for using it on ARM64 - Eric also adds a Kconfig entry for the BCM2835 Raspberry Pi family in the ARM64 Kconfig.platforms file - Eric cherry picked a patch from Alexander Graf with Acks from ARM64 maintainers to support different DMA and bus offsets, required for the Raspberry Pi 3 SoC * tag 'arm-soc/for-4.8/soc-arm64-part2' of http://github.com/Broadcom/stblinux: arm64: Add platform selection for BCM2835. arm64: Allow for different DMA and CPU bus offsets irqchip: bcm2835: Avoid arch/arm-specific handle_IRQ
This commit is contained in:
commit
fc7c0be084
@ -13,6 +13,19 @@ config ARCH_ALPINE
|
||||
This enables support for the Annapurna Labs Alpine
|
||||
Soc family.
|
||||
|
||||
config ARCH_BCM2835
|
||||
bool "Broadcom BCM2835 family"
|
||||
select ARCH_REQUIRE_GPIOLIB
|
||||
select CLKSRC_OF
|
||||
select PINCTRL
|
||||
select PINCTRL_BCM2835
|
||||
select ARM_AMBA
|
||||
select ARM_TIMER_SP804
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
help
|
||||
This enables support for the Broadcom BCM2837 SoC.
|
||||
This SoC is used in the Raspberry Pi 3 device.
|
||||
|
||||
config ARCH_BCM_IPROC
|
||||
bool "Broadcom iProc SoC Family"
|
||||
select COMMON_CLK_IPROC
|
||||
|
@ -66,12 +66,16 @@ static inline bool is_device_dma_coherent(struct device *dev)
|
||||
|
||||
static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
|
||||
{
|
||||
return (dma_addr_t)paddr;
|
||||
dma_addr_t dev_addr = (dma_addr_t)paddr;
|
||||
|
||||
return dev_addr - ((dma_addr_t)dev->dma_pfn_offset << PAGE_SHIFT);
|
||||
}
|
||||
|
||||
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
|
||||
{
|
||||
return (phys_addr_t)dev_addr;
|
||||
phys_addr_t paddr = (phys_addr_t)dev_addr;
|
||||
|
||||
return paddr + ((phys_addr_t)dev->dma_pfn_offset << PAGE_SHIFT);
|
||||
}
|
||||
|
||||
static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
|
||||
@ -86,5 +90,14 @@ static inline void dma_mark_clean(void *addr, size_t size)
|
||||
{
|
||||
}
|
||||
|
||||
/* Override for dma_max_pfn() */
|
||||
static inline unsigned long dma_max_pfn(struct device *dev)
|
||||
{
|
||||
dma_addr_t dma_max = (dma_addr_t)*dev->dma_mask;
|
||||
|
||||
return (ulong)dma_to_phys(dev, dma_max) >> PAGE_SHIFT;
|
||||
}
|
||||
#define dma_max_pfn(dev) dma_max_pfn(dev)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_DMA_MAPPING_H */
|
||||
|
@ -52,7 +52,6 @@
|
||||
#include <linux/irqdomain.h>
|
||||
|
||||
#include <asm/exception.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
/* Put the bank and irq (32 bits) into the hwirq */
|
||||
#define MAKE_HWIRQ(b, n) ((b << 5) | (n))
|
||||
@ -242,7 +241,7 @@ static void __exception_irq_entry bcm2835_handle_irq(
|
||||
u32 hwirq;
|
||||
|
||||
while ((hwirq = get_next_armctrl_hwirq()) != ~0)
|
||||
handle_IRQ(irq_linear_revmap(intc.domain, hwirq), regs);
|
||||
handle_domain_irq(intc.domain, hwirq, regs);
|
||||
}
|
||||
|
||||
static void bcm2836_chained_handle_irq(struct irq_desc *desc)
|
||||
|
@ -180,7 +180,7 @@ __exception_irq_entry bcm2836_arm_irqchip_handle_irq(struct pt_regs *regs)
|
||||
} else if (stat) {
|
||||
u32 hwirq = ffs(stat) - 1;
|
||||
|
||||
handle_IRQ(irq_linear_revmap(intc.domain, hwirq), regs);
|
||||
handle_domain_irq(intc.domain, hwirq, regs);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user