Skip to content

Commit

Permalink
Merge tag 'omap-for-v4.8/soc-signed' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tmlind/linux-omap into next/soc

SoC related changes for omaps for v4.8 merge window:

- A series of DSS platform_data fixes to prepare for DSS driver changes
- Add tblck clck aliases for PWM
- A series of trivial spelling corrections
- Remove bogus eQEP, ePWM and eCAP hwmod entries
- A series of McBSP sidetone fixes
- Remove QSPI and DSS addresses from hwmod, these come from dts
- Fix RSTST register offset for pruss
- Make ti81xx_rtc_hwmod static
- Remove wrongly defined RSTST offset for PER Domain, note
  that the subject for this one wrongly has "dts" in the
  subject
- Add support for omap5 and dra7 workaround for 801819
- A series of patches to make kexec work for SMP omaps

* tag 'omap-for-v4.8/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (30 commits)
  ARM: OMAP2+: Fix build if CONFIG_SMP is not set
  ARM: OMAP4+: Allow kexec on SMP variants
  ARM: OMAP4+: Reset CPU1 properly for kexec
  ARM: OMAP4+: Prevent CPU1 related hang with kexec
  ARM: OMAP4+: Initialize SAR RAM base early for proper CPU1 reset for kexec
  ARM: dts: am43xx: Remove wrongly defined RSTST offset for PER Domain
  ARM: OMAP: make ti81xx_rtc_hwmod static
  ARM: AM43XX: hwmod: Fix RSTST register offset for pruss
  ARM: DRA7: hwmod: remove DSS addresses from hwmod
  ARM: DRA7: hwmod: Remove QSPI address space entry from hwmod
  ARM: OMAP2+: McBSP: Remove the old iclk allow/deny idle code
  ASoC: omap-mcbsp: sidetone: Use the new callback for iclk handling
  ASoC: omap-mcbsp: Rename omap_mcbsp_sysfs_remove() to omap_mcbsp_cleanup()
  ARM: OMAP3: pdata-quirks: Add support for McBSP2/3 sidetone handling
  ARM: OMAP3: McBSP: New callback for McBSP2/3 ICLK idle configuration
  ARM: OMAP3: hwmod data: Fix McBSP2/3 sidetone data
  ARM: AM335x/AM437x: hwmod: Remove eQEP, ePWM and eCAP hwmod entries
  ARM: OMAP2+: Fix typo in sdrc.h
  ARM: OMAP2+: Fix typo in omap_device.c
  ARM: OMAP2+: Fix typo in omap4-common.c
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Jul 6, 2016
2 parents fa06f54 + 44e7475 commit df92d2e
Show file tree
Hide file tree
Showing 41 changed files with 320 additions and 409 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/ams-delta-fiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void __init ams_delta_init_fiq(void)
fiq_buffer[i] = 0;

/*
* FIQ mode r9 always points to the fiq_buffer, becauses the FIQ isr
* FIQ mode r9 always points to the fiq_buffer, because the FIQ isr
* will run in an unpredictable context. The fiq_buffer is the FIQ isr's
* only means of communication with the IRQ level and other kernel
* context code.
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/include/mach/mtd-xip.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static inline unsigned long xip_omap_mpu_timer_read(int nr)
#define xip_currtime() (~xip_omap_mpu_timer_read(0))

/*
* It's permitted to do approxmation for xip_elapsed_since macro
* It's permitted to do approximation for xip_elapsed_since macro
* (see linux/mtd/xip.h)
*/

Expand Down
8 changes: 8 additions & 0 deletions arch/arm/mach-omap2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,12 @@ endmenu

endif

config OMAP5_ERRATA_801819
bool "Errata 801819: An eviction from L1 data cache might stall indefinitely"
depends on SOC_OMAP5 || SOC_DRA7XX
help
A livelock can occur in the L2 cache arbitration that might prevent
a snoop from completing. Under certain conditions this can cause the
system to deadlock.

endmenu
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ccflags-y := -I$(srctree)/$(src)/include \
# Common support
obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o timer.o pm.o \
common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
omap_device.o sram.o drm.o
omap_device.o omap-headsmp.o sram.o drm.o

hwmod-common = omap_hwmod.o omap_hwmod_reset.o \
omap_hwmod_common_data.o
Expand All @@ -32,7 +32,7 @@ obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o

# SMP support ONLY available for OMAP4

smp-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o
smp-$(CONFIG_SMP) += omap-smp.o
smp-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
omap-4-5-common = omap4-common.o omap-wakeupgen.o
obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common) $(smp-y) sleep44xx.o
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-omap2/board-ldp.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@
#include "gpmc.h"
#include "gpmc-smsc911x.h"

#include <video/omapdss.h>
#include <linux/platform_data/omapdss.h>
#include <video/omap-panel-data.h>

#include "board-flash.h"
#include "mux.h"
#include "hsmmc.h"
#include "control.h"
#include "common-board-devices.h"
#include "display.h"

#define LDP_SMSC911X_CS 1
#define LDP_SMSC911X_GPIO 152
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/board-rx51-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
#include <linux/spi/spi.h>
#include <linux/mm.h>
#include <asm/mach-types.h>
#include <video/omapdss.h>
#include <linux/platform_data/omapdss.h>
#include <video/omap-panel-data.h>

#include <linux/platform_data/spi-omap2-mcspi.h>

#include "soc.h"
#include "board-rx51.h"
#include "display.h"

#include "mux.h"

Expand All @@ -32,7 +33,6 @@
static struct connector_atv_platform_data rx51_tv_pdata = {
.name = "tv",
.source = "venc.0",
.connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
.invert_polarity = false,
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/cm3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ void omap3_cm_save_scratchpad_contents(u32 *ptr)
/*
* As per erratum i671, ROM code does not respect the PER DPLL
* programming scheme if CM_AUTOIDLE_PLL..AUTO_PERIPH_DPLL == 1.
* Then, in anycase, clear these bits to avoid extra latencies.
* Then, in any case, clear these bits to avoid extra latencies.
*/
*ptr++ = omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE) &
~OMAP3430_AUTO_PERIPH_DPLL_MASK;
Expand Down
8 changes: 6 additions & 2 deletions arch/arm/mach-omap2/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,22 @@ extern void gic_dist_enable(void);
extern bool gic_dist_disabled(void);
extern void gic_timer_retrigger(void);
extern void omap_smc1(u32 fn, u32 arg);
extern void omap4_sar_ram_init(void);
extern void __iomem *omap4_get_sar_ram_base(void);
extern void omap4_mpuss_early_init(void);
extern void omap_do_wfi(void);

#ifdef CONFIG_SMP
/* Needed for secondary core boot */
extern void omap4_secondary_startup(void);
extern void omap4460_secondary_startup(void);

#ifdef CONFIG_SMP
/* Needed for secondary core boot */
extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
extern void omap_auxcoreboot_addr(u32 cpu_addr);
extern u32 omap_read_auxcoreboot0(void);

extern void omap4_cpu_die(unsigned int cpu);
extern int omap4_cpu_kill(unsigned int cpu);

extern const struct smp_operations omap4_smp_ops;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>

#include <video/omapdss.h>
#include <linux/platform_data/omapdss.h>
#include "omap_hwmod.h"
#include "omap_device.h"
#include "omap-pm.h"
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/mach-omap2/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ int omap_init_vout(void);

struct device_node * __init omapdss_find_dss_of_node(void);

struct omap_dss_board_info;

/* Init with the board info */
int omap_display_init(struct omap_dss_board_info *board_data);

#endif
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/dss-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <linux/gpio.h>
#include <linux/platform_device.h>

#include <video/omapdss.h>
#include <linux/platform_data/omapdss.h>
#include <video/omap-panel-data.h>

#include "soc.h"
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-omap2/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,8 @@ void __init omap4430_init_early(void)
omap4xxx_check_revision();
omap4xxx_check_features();
omap2_prcm_base_init();
omap4_sar_ram_init();
omap4_mpuss_early_init();
omap4_pm_init_early();
omap44xx_voltagedomains_init();
omap44xx_powerdomains_init();
Expand Down Expand Up @@ -718,6 +720,7 @@ void __init omap5_init_early(void)
omap4_pm_init_early();
omap2_prcm_base_init();
omap5xxx_check_revision();
omap4_sar_ram_init();
omap54xx_voltagedomains_init();
omap54xx_powerdomains_init();
omap54xx_clockdomains_init();
Expand Down
31 changes: 17 additions & 14 deletions arch/arm/mach-omap2/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,24 @@
#include "cm3xxx.h"
#include "cm-regbits-34xx.h"

static struct clk *mcbsp_iclks[5];

static int omap3_enable_st_clock(unsigned int id, bool enable)
static int omap3_mcbsp_force_ick_on(struct clk *clk, bool force_on)
{
/*
* Sidetone uses McBSP ICLK - which must not idle when sidetones
* are enabled or sidetones start sounding ugly.
*/
if (enable)
return omap2_clk_deny_idle(mcbsp_iclks[id]);
if (!clk)
return 0;

if (force_on)
return omap2_clk_deny_idle(clk);
else
return omap2_clk_allow_idle(mcbsp_iclks[id]);
return omap2_clk_allow_idle(clk);
}

void __init omap3_mcbsp_init_pdata_callback(
struct omap_mcbsp_platform_data *pdata)
{
if (!pdata)
return;

pdata->force_ick_on = omap3_mcbsp_force_ick_on;
}

static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
Expand All @@ -55,7 +61,6 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
struct omap_hwmod *oh_device[2];
struct omap_mcbsp_platform_data *pdata = NULL;
struct platform_device *pdev;
char clk_name[11];

sscanf(oh->name, "mcbsp%d", &id);

Expand Down Expand Up @@ -96,9 +101,7 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
if (oh->dev_attr) {
oh_device[1] = omap_hwmod_lookup((
(struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone);
pdata->enable_st_clock = omap3_enable_st_clock;
sprintf(clk_name, "mcbsp%d_ick", id);
mcbsp_iclks[id] = clk_get(NULL, clk_name);
pdata->force_ick_on = omap3_mcbsp_force_ick_on;
count++;
}
pdev = omap_device_build_ss(name, id, oh_device, count, pdata,
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-omap2/mux34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ static struct omap_ball __initdata omap3_cus_ball[] = {
#endif

/*
* Signals different on CBB package comapared to superset
* Signals different on CBB package compared to superset
*/
#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBB)
static struct omap_mux __initdata omap3_cbb_subset[] = {
Expand Down Expand Up @@ -1597,7 +1597,7 @@ static struct omap_ball __initdata omap3_cbb_ball[] = {
#endif

/*
* Signals different on 36XX CBP package comapared to 34XX CBC package
* Signals different on 36XX CBP package compared to 34XX CBC package
*/
#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBP)
static struct omap_mux __initdata omap36xx_cbp_subset[] = {
Expand Down
18 changes: 14 additions & 4 deletions arch/arm/mach-omap2/omap-headsmp.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
#define AUX_CORE_BOOT0_PA 0x48281800
#define API_HYP_ENTRY 0x102

ENTRY(omap_secondary_startup)
#ifdef CONFIG_SMP
b secondary_startup
#else
/* Should never get here */
again: wfi
b again
#endif
#ENDPROC(omap_secondary_startup)

/*
* OMAP5 specific entry point for secondary CPU to jump from ROM
* code. This routine also provides a holding flag into which
Expand All @@ -39,7 +49,7 @@ wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
and r4, r4, #0x0f
cmp r0, r4
bne wait
b secondary_startup
b omap_secondary_startup
ENDPROC(omap5_secondary_startup)
/*
* Same as omap5_secondary_startup except we call into the ROM to
Expand All @@ -59,7 +69,7 @@ wait_2: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
adr r0, hyp_boot
smc #0
hyp_boot:
b secondary_startup
b omap_secondary_startup
ENDPROC(omap5_secondary_hyp_startup)
/*
* OMAP4 specific entry point for secondary CPU to jump from ROM
Expand All @@ -82,7 +92,7 @@ hold: ldr r12,=0x103
* we've been released from the wait loop,secondary_stack
* should now contain the SVC stack for this core
*/
b secondary_startup
b omap_secondary_startup
ENDPROC(omap4_secondary_startup)

ENTRY(omap4460_secondary_startup)
Expand Down Expand Up @@ -119,5 +129,5 @@ hold_2: ldr r12,=0x103
* we've been released from the wait loop,secondary_stack
* should now contain the SVC stack for this core
*/
b secondary_startup
b omap_secondary_startup
ENDPROC(omap4460_secondary_startup)
6 changes: 6 additions & 0 deletions arch/arm/mach-omap2/omap-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ void omap4_cpu_die(unsigned int cpu)
pr_debug("CPU%u: spurious wakeup call\n", cpu);
}
}

/* Needed by kexec and platform_can_cpu_hotplug() */
int omap4_cpu_kill(unsigned int cpu)
{
return 1;
}
29 changes: 25 additions & 4 deletions arch/arm/mach-omap2/omap-mpuss-lowpower.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
#include "prm44xx.h"
#include "prm-regbits-44xx.h"

static void __iomem *sar_base;

#ifdef CONFIG_SMP

struct omap4_cpu_pm_info {
Expand Down Expand Up @@ -90,7 +92,6 @@ struct cpu_pm_ops {

static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info);
static struct powerdomain *mpuss_pd;
static void __iomem *sar_base;
static u32 cpu_context_offset;

static int default_finish_suspend(unsigned long cpu_state)
Expand Down Expand Up @@ -366,9 +367,6 @@ int __init omap4_mpuss_init(void)
return -ENODEV;
}

if (cpu_is_omap44xx())
sar_base = omap4_get_sar_ram_base();

/* Initilaise per CPU PM information */
pm_info = &per_cpu(omap4_pm_info, 0x0);
if (sar_base) {
Expand Down Expand Up @@ -444,3 +442,26 @@ int __init omap4_mpuss_init(void)
}

#endif

/*
* For kexec, we must set CPU1_WAKEUP_NS_PA_ADDR to point to
* current kernel's secondary_startup() early before
* clockdomains_init(). Otherwise clockdomain_init() can
* wake CPU1 and cause a hang.
*/
void __init omap4_mpuss_early_init(void)
{
unsigned long startup_pa;

if (!cpu_is_omap44xx())
return;

sar_base = omap4_get_sar_ram_base();

if (cpu_is_omap443x())
startup_pa = virt_to_phys(omap4_secondary_startup);
else
startup_pa = virt_to_phys(omap4460_secondary_startup);

writel_relaxed(startup_pa, sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET);
}
1 change: 1 addition & 0 deletions arch/arm/mach-omap2/omap-secure.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

#define OMAP5_DRA7_MON_SET_CNTFRQ_INDEX 0x109
#define OMAP5_MON_AMBA_IF_INDEX 0x108
#define OMAP5_DRA7_MON_SET_ACR_INDEX 0x107

/* Secure PPA(Primary Protected Application) APIs */
#define OMAP4_PPA_L2_POR_INDEX 0x23
Expand Down
Loading

0 comments on commit df92d2e

Please sign in to comment.