mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
Merge tag 'pxa-for-4.6' of https://github.com/rjarzmik/linux into next/soc
Merge "pxa changes for v4.6 cycle" from Robert Jarzmik: This is a minor cycle with : - cleanup fixes from Arnd, mainly build oriented and sparse type ones - dma fixes for requestors above 32 (impacting mainly camera driver) - some minor cleanup on pxa3xx device-tree side * tag 'pxa-for-4.6' of https://github.com/rjarzmik/linux: dmaengine: pxa_dma: fix the maximum requestor line ARM: pxa: add the number of DMA requestor lines dmaengine: mmp-pdma: add number of requestors dma: mmp_pdma: Add the #dma-requests DT property documentation ARM: pxa: pxa3xx device-tree support cleanup ARM: pxa: don't select RFKILL if CONFIG_NET is disabled ARM: pxa: fix building without IWMMXT ARM: pxa: move extern declarations to pm.h ARM: pxa: always select one of the two CPU types ARM: pxa: don't select GPIO_SYSFS for MIOA701 ARM: pxa: mark unused eseries code as __maybe_unused ARM: pxa: mark spitz_card_pwr_ctrl as __maybe_unused ARM: pxa: define clock registers as __iomem
This commit is contained in:
@@ -12,6 +12,8 @@ Required properties:
|
||||
Optional properties:
|
||||
- #dma-channels: Number of DMA channels supported by the controller (defaults
|
||||
to 32 when not specified)
|
||||
- #dma-requests: Number of DMA requestor lines supported by the controller
|
||||
(defaults to 32 when not specified)
|
||||
|
||||
"marvell,pdma-1.0"
|
||||
Used platforms: pxa25x, pxa27x, pxa3xx, pxa93x, pxa168, pxa910, pxa688.
|
||||
|
||||
@@ -547,6 +547,7 @@ config ARCH_PXA
|
||||
select CLKSRC_PXA
|
||||
select CLKSRC_MMIO
|
||||
select CLKSRC_OF
|
||||
select CPU_XSCALE if !CPU_XSC3
|
||||
select GENERIC_CLOCKEVENTS
|
||||
select GPIO_PXA
|
||||
select HAVE_IDE
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
interrupts = <25>;
|
||||
#dma-channels = <32>;
|
||||
#dma-cells = <2>;
|
||||
#dma-requests = <75>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
interrupts = <25>;
|
||||
#dma-channels = <32>;
|
||||
#dma-cells = <2>;
|
||||
#dma-requests = <100>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -378,6 +378,7 @@ CONFIG_GPIO_PALMAS=y
|
||||
CONFIG_GPIO_TPS6586X=y
|
||||
CONFIG_GPIO_TPS65910=y
|
||||
CONFIG_GPIO_MAX7301=m
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_POWER_SUPPLY_DEBUG=y
|
||||
CONFIG_PDA_POWER=m
|
||||
CONFIG_BATTERY_SBS=m
|
||||
|
||||
@@ -297,7 +297,6 @@ config MACH_MAGICIAN
|
||||
|
||||
config MACH_MIOA701
|
||||
bool "Mitac Mio A701 Support"
|
||||
select GPIO_SYSFS
|
||||
select IWMMXT
|
||||
select PXA27x
|
||||
help
|
||||
@@ -529,7 +528,7 @@ config MACH_TOSA
|
||||
|
||||
config TOSA_BT
|
||||
tristate "Control the state of built-in bluetooth chip on Sharp SL-6000"
|
||||
depends on MACH_TOSA
|
||||
depends on MACH_TOSA && NET
|
||||
select RFKILL
|
||||
help
|
||||
This is a simple driver that is able to control
|
||||
|
||||
@@ -1203,6 +1203,7 @@ void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info)
|
||||
|
||||
static struct mmp_dma_platdata pxa_dma_pdata = {
|
||||
.dma_channels = 0,
|
||||
.nb_requestors = 0,
|
||||
};
|
||||
|
||||
static struct resource pxa_dma_resource[] = {
|
||||
@@ -1231,7 +1232,7 @@ static struct platform_device pxa2xx_pxa_dma = {
|
||||
.resource = pxa_dma_resource,
|
||||
};
|
||||
|
||||
void __init pxa2xx_set_dmac_info(int nb_channels)
|
||||
void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors)
|
||||
{
|
||||
pxa_dma_pdata.dma_channels = nb_channels;
|
||||
pxa_register_device(&pxa2xx_pxa_dma, &pxa_dma_pdata);
|
||||
|
||||
@@ -57,7 +57,7 @@ struct gpio_vbus_mach_info e7xx_udc_info = {
|
||||
.gpio_pullup_inverted = 1
|
||||
};
|
||||
|
||||
static struct platform_device e7xx_gpio_vbus = {
|
||||
static struct platform_device e7xx_gpio_vbus __maybe_unused = {
|
||||
.name = "gpio-vbus",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
@@ -126,7 +126,7 @@ struct resource eseries_tmio_resources[] = {
|
||||
};
|
||||
|
||||
/* Some e-series hardware cannot control the 32K clock */
|
||||
static void __init eseries_register_clks(void)
|
||||
static void __init __maybe_unused eseries_register_clks(void)
|
||||
{
|
||||
clk_register_fixed_rate(NULL, "CLK_CK32K", NULL, CLK_IS_ROOT, 32768);
|
||||
}
|
||||
|
||||
@@ -139,14 +139,14 @@ static void gumstix_setup_bt_clock(void)
|
||||
{
|
||||
int timeout = 500;
|
||||
|
||||
if (!(OSCC & OSCC_OOK))
|
||||
if (!(readl(OSCC) & OSCC_OOK))
|
||||
pr_warn("32kHz clock was not on. Bootloader may need to be updated\n");
|
||||
else
|
||||
return;
|
||||
|
||||
OSCC |= OSCC_OON;
|
||||
writel(readl(OSCC) | OSCC_OON, OSCC);
|
||||
do {
|
||||
if (OSCC & OSCC_OOK)
|
||||
if (readl(OSCC) & OSCC_OOK)
|
||||
break;
|
||||
udelay(1);
|
||||
} while (--timeout);
|
||||
|
||||
@@ -134,10 +134,10 @@
|
||||
/*
|
||||
* PXA2xx specific Core clock definitions
|
||||
*/
|
||||
#define CCCR __REG(0x41300000) /* Core Clock Configuration Register */
|
||||
#define CCSR __REG(0x4130000C) /* Core Clock Status Register */
|
||||
#define CKEN __REG(0x41300004) /* Clock Enable Register */
|
||||
#define OSCC __REG(0x41300008) /* Oscillator Configuration Register */
|
||||
#define CCCR io_p2v(0x41300000) /* Core Clock Configuration Register */
|
||||
#define CCSR io_p2v(0x4130000C) /* Core Clock Status Register */
|
||||
#define CKEN io_p2v(0x41300004) /* Clock Enable Register */
|
||||
#define OSCC io_p2v(0x41300008) /* Oscillator Configuration Register */
|
||||
|
||||
#define CCCR_N_MASK 0x0380 /* Run Mode Frequency to Turbo Mode Frequency Multiplier */
|
||||
#define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/*
|
||||
* Oscillator Configuration Register (OSCC)
|
||||
*/
|
||||
#define OSCC __REG(0x41350000) /* Oscillator Configuration Register */
|
||||
#define OSCC io_p2v(0x41350000) /* Oscillator Configuration Register */
|
||||
|
||||
#define OSCC_PEN (1 << 11) /* 13MHz POUT */
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@ extern int pxa_pm_enter(suspend_state_t state);
|
||||
extern int pxa_pm_prepare(void);
|
||||
extern void pxa_pm_finish(void);
|
||||
|
||||
extern const char pm_enter_standby_start[], pm_enter_standby_end[];
|
||||
extern int pxa3xx_finish_suspend(unsigned long);
|
||||
|
||||
/* NOTE: this is for PM debugging on Lubbock, it's really a big
|
||||
* ugly, but let's keep the crap minimum here, instead of direct
|
||||
* accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c
|
||||
|
||||
@@ -19,42 +19,18 @@
|
||||
#include "generic.h"
|
||||
|
||||
#ifdef CONFIG_PXA3xx
|
||||
static const struct of_dev_auxdata const pxa3xx_auxdata_lookup[] __initconst = {
|
||||
OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40100000, "pxa2xx-uart.0", NULL),
|
||||
OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40200000, "pxa2xx-uart.1", NULL),
|
||||
OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40700000, "pxa2xx-uart.2", NULL),
|
||||
OF_DEV_AUXDATA("mrvl,pxa-uart", 0x41600000, "pxa2xx-uart.3", NULL),
|
||||
OF_DEV_AUXDATA("marvell,pxa-mmc", 0x41100000, "pxa2xx-mci.0", NULL),
|
||||
OF_DEV_AUXDATA("intel,pxa3xx-gpio", 0x40e00000, "pxa3xx-gpio", NULL),
|
||||
OF_DEV_AUXDATA("marvell,pxa-ohci", 0x4c000000, "pxa27x-ohci", NULL),
|
||||
OF_DEV_AUXDATA("mrvl,pxa-i2c", 0x40301680, "pxa2xx-i2c.0", NULL),
|
||||
OF_DEV_AUXDATA("mrvl,pwri2c", 0x40f500c0, "pxa3xx-i2c.1", NULL),
|
||||
OF_DEV_AUXDATA("marvell,pxa3xx-nand", 0x43100000, "pxa3xx-nand", NULL),
|
||||
{}
|
||||
};
|
||||
|
||||
static void __init pxa3xx_dt_init(void)
|
||||
{
|
||||
of_platform_populate(NULL, of_default_bus_match_table,
|
||||
pxa3xx_auxdata_lookup, NULL);
|
||||
}
|
||||
|
||||
static const char *const pxa3xx_dt_board_compat[] __initconst = {
|
||||
"marvell,pxa300",
|
||||
"marvell,pxa310",
|
||||
"marvell,pxa320",
|
||||
NULL,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PXA3xx
|
||||
DT_MACHINE_START(PXA_DT, "Marvell PXA3xx (Device Tree Support)")
|
||||
.map_io = pxa3xx_map_io,
|
||||
.init_irq = pxa3xx_dt_init_irq,
|
||||
.handle_irq = pxa3xx_handle_irq,
|
||||
.init_time = pxa_timer_init,
|
||||
.restart = pxa_restart,
|
||||
.init_machine = pxa3xx_dt_init,
|
||||
.dt_compat = pxa3xx_dt_board_compat,
|
||||
MACHINE_END
|
||||
#endif
|
||||
|
||||
@@ -206,7 +206,7 @@ static int __init pxa25x_init(void)
|
||||
register_syscore_ops(&pxa_irq_syscore_ops);
|
||||
register_syscore_ops(&pxa2xx_mfp_syscore_ops);
|
||||
|
||||
pxa2xx_set_dmac_info(16);
|
||||
pxa2xx_set_dmac_info(16, 40);
|
||||
pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info);
|
||||
ret = platform_add_devices(pxa25x_devices,
|
||||
ARRAY_SIZE(pxa25x_devices));
|
||||
|
||||
@@ -132,7 +132,8 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)
|
||||
#ifndef CONFIG_IWMMXT
|
||||
u64 acc0;
|
||||
|
||||
asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0));
|
||||
asm volatile(".arch_extension xscale\n\t"
|
||||
"mra %Q0, %R0, acc0" : "=r" (acc0));
|
||||
#endif
|
||||
|
||||
/* ensure voltage-change sequencer not initiated, which hangs */
|
||||
@@ -151,7 +152,8 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)
|
||||
case PM_SUSPEND_MEM:
|
||||
cpu_suspend(pwrmode, pxa27x_finish_suspend);
|
||||
#ifndef CONFIG_IWMMXT
|
||||
asm volatile("mar acc0, %Q0, %R0" : "=r" (acc0));
|
||||
asm volatile(".arch_extension xscale\n\t"
|
||||
"mar acc0, %Q0, %R0" : "=r" (acc0));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@@ -309,7 +311,7 @@ static int __init pxa27x_init(void)
|
||||
if (!of_have_populated_dt()) {
|
||||
pxa_register_device(&pxa27x_device_gpio,
|
||||
&pxa27x_gpio_info);
|
||||
pxa2xx_set_dmac_info(32);
|
||||
pxa2xx_set_dmac_info(32, 75);
|
||||
ret = platform_add_devices(devices,
|
||||
ARRAY_SIZE(devices));
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@ static unsigned long wakeup_src;
|
||||
*/
|
||||
static void pxa3xx_cpu_standby(unsigned int pwrmode)
|
||||
{
|
||||
extern const char pm_enter_standby_start[], pm_enter_standby_end[];
|
||||
void (*fn)(unsigned int) = (void __force *)(sram + 0x8000);
|
||||
|
||||
memcpy_toio(sram + 0x8000, pm_enter_standby_start,
|
||||
@@ -103,11 +102,10 @@ static void pxa3xx_cpu_pm_suspend(void)
|
||||
#ifndef CONFIG_IWMMXT
|
||||
u64 acc0;
|
||||
|
||||
asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0));
|
||||
asm volatile(".arch_extension xscale\n\t"
|
||||
"mra %Q0, %R0, acc0" : "=r" (acc0));
|
||||
#endif
|
||||
|
||||
extern int pxa3xx_finish_suspend(unsigned long);
|
||||
|
||||
/* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */
|
||||
CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM);
|
||||
CKENB |= 1 << (CKEN_HSIO2 & 0x1f);
|
||||
@@ -133,7 +131,8 @@ static void pxa3xx_cpu_pm_suspend(void)
|
||||
AD3ER = 0;
|
||||
|
||||
#ifndef CONFIG_IWMMXT
|
||||
asm volatile("mar acc0, %Q0, %R0" : "=r" (acc0));
|
||||
asm volatile(".arch_extension xscale\n\t"
|
||||
"mar acc0, %Q0, %R0" : "=r" (acc0));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -450,7 +449,7 @@ static int __init pxa3xx_init(void)
|
||||
if (of_have_populated_dt())
|
||||
return 0;
|
||||
|
||||
pxa2xx_set_dmac_info(32);
|
||||
pxa2xx_set_dmac_info(32, 100);
|
||||
ret = platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -201,7 +201,7 @@ static void __init spitz_scoop_init(void)
|
||||
}
|
||||
|
||||
/* Power control is shared with between one of the CF slots and SD */
|
||||
static void spitz_card_pwr_ctrl(uint8_t enable, uint8_t new_cpr)
|
||||
static void __maybe_unused spitz_card_pwr_ctrl(uint8_t enable, uint8_t new_cpr)
|
||||
{
|
||||
unsigned short cpr;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -910,7 +910,7 @@ static void __init zeus_map_io(void)
|
||||
PMCR = PSPR = 0;
|
||||
|
||||
/* enable internal 32.768Khz oscillator (ignore OSCC_OOK) */
|
||||
OSCC |= OSCC_OON;
|
||||
writel(readl(OSCC) | OSCC_OON, OSCC);
|
||||
|
||||
/* Some clock cycles later (from OSCC_ON), programme PCFR (OPDE...).
|
||||
* float chip selects and PCMCIA */
|
||||
|
||||
@@ -95,6 +95,6 @@ static inline int pxad_toggle_reserved_channel(int legacy_channel)
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void __init pxa2xx_set_dmac_info(int nb_channels);
|
||||
extern void __init pxa2xx_set_dmac_info(int nb_channels, int nb_requestors);
|
||||
|
||||
#endif /* __PLAT_DMA_H */
|
||||
|
||||
@@ -84,7 +84,7 @@ unsigned int pxa25x_get_clk_frequency_khz(int info)
|
||||
static unsigned long clk_pxa25x_memory_get_rate(struct clk_hw *hw,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
unsigned long cccr = CCCR;
|
||||
unsigned long cccr = readl(CCCR);
|
||||
unsigned int m = M_clk_mult[(cccr >> 5) & 0x03];
|
||||
|
||||
return parent_rate / m;
|
||||
@@ -99,7 +99,7 @@ PARENTS(pxa25x_osc3) = { "osc_3_6864mhz", "osc_3_6864mhz" };
|
||||
#define PXA25X_CKEN(dev_id, con_id, parents, mult, div, \
|
||||
bit, is_lp, flags) \
|
||||
PXA_CKEN(dev_id, con_id, bit, parents, mult, div, mult, div, \
|
||||
is_lp, &CKEN, CKEN_ ## bit, flags)
|
||||
is_lp, CKEN, CKEN_ ## bit, flags)
|
||||
#define PXA25X_PBUS95_CKEN(dev_id, con_id, bit, mult_hp, div_hp, delay) \
|
||||
PXA25X_CKEN(dev_id, con_id, pxa25x_pbus95_parents, mult_hp, \
|
||||
div_hp, bit, NULL, 0)
|
||||
@@ -112,10 +112,10 @@ PARENTS(pxa25x_osc3) = { "osc_3_6864mhz", "osc_3_6864mhz" };
|
||||
|
||||
#define PXA25X_CKEN_1RATE(dev_id, con_id, bit, parents, delay) \
|
||||
PXA_CKEN_1RATE(dev_id, con_id, bit, parents, \
|
||||
&CKEN, CKEN_ ## bit, 0)
|
||||
CKEN, CKEN_ ## bit, 0)
|
||||
#define PXA25X_CKEN_1RATE_AO(dev_id, con_id, bit, parents, delay) \
|
||||
PXA_CKEN_1RATE(dev_id, con_id, bit, parents, \
|
||||
&CKEN, CKEN_ ## bit, CLK_IGNORE_UNUSED)
|
||||
CKEN, CKEN_ ## bit, CLK_IGNORE_UNUSED)
|
||||
|
||||
static struct desc_clk_cken pxa25x_clocks[] __initdata = {
|
||||
PXA25X_PBUS95_CKEN("pxa2xx-mci.0", NULL, MMC, 1, 5, 0),
|
||||
@@ -162,7 +162,7 @@ MUX_RO_RATE_RO_OPS(clk_pxa25x_core, "core");
|
||||
static unsigned long clk_pxa25x_run_get_rate(struct clk_hw *hw,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
unsigned long cccr = CCCR;
|
||||
unsigned long cccr = readl(CCCR);
|
||||
unsigned int n2 = N2_clk_mult[(cccr >> 7) & 0x07];
|
||||
|
||||
return (parent_rate / n2) * 2;
|
||||
@@ -173,7 +173,7 @@ RATE_RO_OPS(clk_pxa25x_run, "run");
|
||||
static unsigned long clk_pxa25x_cpll_get_rate(struct clk_hw *hw,
|
||||
unsigned long parent_rate)
|
||||
{
|
||||
unsigned long clkcfg, cccr = CCCR;
|
||||
unsigned long clkcfg, cccr = readl(CCCR);
|
||||
unsigned int l, m, n2, t;
|
||||
|
||||
asm("mrc\tp14, 0, %0, c6, c0, 0" : "=r" (clkcfg));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user