You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'late-omap' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC late OMAP changes from Olof Johansson:
"This branch contains changes for OMAP that came in late during the
release staging, close to when the merge window opened.
It contains, among other things:
- OMAP PM fixes and some patches for audio device integration
- OMAP clock fixes related to common clock conversion
- A set of patches cleaning up WFI entry and blocking.
- A set of fixes and IP block support for PM on TI AM33xx SoCs
(Beaglebone, etc)
- A set of smaller fixes and cleanups around AM33xx restart and
revision detection, as well as removal of some dead code
(CONFIG_32K_TIMER_HZ)"
* tag 'late-omap' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (34 commits)
ARM: omap2: include linux/errno.h in hwmod_reset
ARM: OMAP2+: fix some omap_device_build() calls that aren't compiled by default
ARM: OMAP4: hwmod data: Enable AESS hwmod device
ARM: OMAP4: hwmod data: Update AESS data with memory bank area
ARM: OMAP4+: AESS: enable internal auto-gating during initial setup
ASoC: TI AESS: add autogating-enable function, callable from architecture code
ARM: OMAP2+: hwmod: add enable_preprogram hook
ARM: OMAP4: clock data: Add missing clkdm association for dpll_usb
ARM: OMAP2+: PM: Fix the dt return condition in pm_late_init()
ARM: OMAP2: am33xx-hwmod: Fix "register offset NULL check" bug
ARM: OMAP2+: AM33xx: hwmod: add missing HWMOD_NO_IDLEST flags
ARM: OMAP: AM33xx hwmod: Add parent-child relationship for PWM subsystem
ARM: OMAP: AM33xx hwmod: Corrects PWM subsystem HWMOD entries
ARM: DTS: AM33XX: Add nodes for OCMC RAM and WKUP-M3
ARM: OMAP2+: AM33XX: Update the hardreset API
ARM: OMAP2+: AM33XX: hwmod: Update the WKUP-M3 hwmod with reset status bit
ARM: OMAP2+: AM33XX: hwmod: Fixup cpgmac0 hwmod entry
ARM: OMAP2+: AM33XX: hwmod: Update TPTC0 hwmod with the right flags
ARM: OMAP2+: AM33XX: hwmod: Register OCMC RAM hwmod
ARM: OMAP2+: AM33XX: CM/PRM: Use __ASSEMBLER__ macros in header files
...
This commit is contained in:
@@ -1676,7 +1676,6 @@ config HZ
|
||||
int
|
||||
default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \
|
||||
ARCH_S5PV210 || ARCH_EXYNOS4
|
||||
default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
|
||||
default AT91_TIMER_HZ if ARCH_AT91
|
||||
default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE
|
||||
default 100
|
||||
|
||||
@@ -385,5 +385,19 @@
|
||||
mac-address = [ 00 00 00 00 00 00 ];
|
||||
};
|
||||
};
|
||||
|
||||
ocmcram: ocmcram@40300000 {
|
||||
compatible = "ti,am3352-ocmcram";
|
||||
reg = <0x40300000 0x10000>;
|
||||
ti,hwmods = "ocmcram";
|
||||
ti,no_idle_on_suspend;
|
||||
};
|
||||
|
||||
wkup_m3: wkup_m3@44d00000 {
|
||||
compatible = "ti,am3353-wkup-m3";
|
||||
reg = <0x44d00000 0x4000 /* M3 UMEM */
|
||||
0x44d80000 0x2000>; /* M3 DMEM */
|
||||
ti,hwmods = "wkup_m3";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
|
||||
omap_device.o sram.o
|
||||
|
||||
omap-2-3-common = irq.o
|
||||
hwmod-common = omap_hwmod.o \
|
||||
hwmod-common = omap_hwmod.o omap_hwmod_reset.o \
|
||||
omap_hwmod_common_data.o
|
||||
clock-common = clock.o clock_common_data.o \
|
||||
clkt_dpll.o clkt_clksel.o
|
||||
@@ -56,6 +56,7 @@ AFLAGS_sram34xx.o :=-Wa,-march=armv7-a
|
||||
# Restart code (OMAP4/5 currently in omap4-common.c)
|
||||
obj-$(CONFIG_SOC_OMAP2420) += omap2-restart.o
|
||||
obj-$(CONFIG_SOC_OMAP2430) += omap2-restart.o
|
||||
obj-$(CONFIG_SOC_AM33XX) += am33xx-restart.o
|
||||
obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o
|
||||
|
||||
# Pin multiplexing
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* am33xx-restart.c - Code common to all AM33xx machines.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "prm-regbits-33xx.h"
|
||||
#include "prm33xx.h"
|
||||
|
||||
/**
|
||||
* am3xx_restart - trigger a software restart of the SoC
|
||||
* @mode: the "reboot mode", see arch/arm/kernel/{setup,process}.c
|
||||
* @cmd: passed from the userspace program rebooting the system (if provided)
|
||||
*
|
||||
* Resets the SoC. For @cmd, see the 'reboot' syscall in
|
||||
* kernel/sys.c. No return value.
|
||||
*/
|
||||
void am33xx_restart(char mode, const char *cmd)
|
||||
{
|
||||
/* TODO: Handle mode and cmd if necessary */
|
||||
|
||||
am33xx_prm_rmw_reg_bits(AM33XX_GLOBAL_WARM_SW_RST_MASK,
|
||||
AM33XX_GLOBAL_WARM_SW_RST_MASK,
|
||||
AM33XX_PRM_DEVICE_MOD,
|
||||
AM33XX_PRM_RSTCTRL_OFFSET);
|
||||
|
||||
/* OCP barrier */
|
||||
(void)am33xx_prm_read_reg(AM33XX_PRM_DEVICE_MOD,
|
||||
AM33XX_PRM_RSTCTRL_OFFSET);
|
||||
}
|
||||
@@ -62,8 +62,7 @@ static int __init omap_davinci_emac_dev_init(struct omap_hwmod *oh,
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
|
||||
pdev = omap_device_build(oh->class->name, 0, oh, pdata, pdata_len,
|
||||
false);
|
||||
pdev = omap_device_build(oh->class->name, 0, oh, pdata, pdata_len);
|
||||
if (IS_ERR(pdev)) {
|
||||
WARN(1, "Can't build omap_device for %s:%s.\n",
|
||||
oh->class->name, oh->name);
|
||||
|
||||
@@ -140,6 +140,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
|
||||
.init_machine = omap_generic_init,
|
||||
.init_time = omap3_am33xx_gptimer_timer_init,
|
||||
.dt_compat = am33xx_boards_compat,
|
||||
.restart = am33xx_restart,
|
||||
MACHINE_END
|
||||
#endif
|
||||
|
||||
|
||||
@@ -284,9 +284,10 @@ DEFINE_STRUCT_CLK(dpll_disp_ck, dpll_core_ck_parents, dpll_ddr_ck_ops);
|
||||
* TODO: Add clksel here (sys_clkin, CORE_CLKOUTM6, PER_CLKOUTM2
|
||||
* and ALT_CLK1/2)
|
||||
*/
|
||||
DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck, 0x0,
|
||||
AM33XX_CM_DIV_M2_DPLL_DISP, AM33XX_DPLL_CLKOUT_DIV_SHIFT,
|
||||
AM33XX_DPLL_CLKOUT_DIV_WIDTH, CLK_DIVIDER_ONE_BASED, NULL);
|
||||
DEFINE_CLK_DIVIDER(dpll_disp_m2_ck, "dpll_disp_ck", &dpll_disp_ck,
|
||||
CLK_SET_RATE_PARENT, AM33XX_CM_DIV_M2_DPLL_DISP,
|
||||
AM33XX_DPLL_CLKOUT_DIV_SHIFT, AM33XX_DPLL_CLKOUT_DIV_WIDTH,
|
||||
CLK_DIVIDER_ONE_BASED, NULL);
|
||||
|
||||
/* DPLL_PER */
|
||||
static struct dpll_data dpll_per_dd = {
|
||||
@@ -723,7 +724,8 @@ static struct clk_hw_omap lcd_gclk_hw = {
|
||||
.clksel_mask = AM33XX_CLKSEL_0_1_MASK,
|
||||
};
|
||||
|
||||
DEFINE_STRUCT_CLK(lcd_gclk, lcd_ck_parents, gpio_fck_ops);
|
||||
DEFINE_STRUCT_CLK_FLAGS(lcd_gclk, lcd_ck_parents,
|
||||
gpio_fck_ops, CLK_SET_RATE_PARENT);
|
||||
|
||||
DEFINE_CLK_FIXED_FACTOR(mmc_clk, "dpll_per_m2_ck", &dpll_per_m2_ck, 0x0, 1, 2);
|
||||
|
||||
|
||||
@@ -426,6 +426,7 @@ static struct clk dpll4_m5x2_ck_3630 = {
|
||||
.parent_names = dpll4_m5x2_ck_parent_names,
|
||||
.num_parents = ARRAY_SIZE(dpll4_m5x2_ck_parent_names),
|
||||
.ops = &dpll4_m5x2_ck_3630_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
};
|
||||
|
||||
static struct clk cam_mclk;
|
||||
@@ -443,7 +444,14 @@ static struct clk_hw_omap cam_mclk_hw = {
|
||||
.clkdm_name = "cam_clkdm",
|
||||
};
|
||||
|
||||
DEFINE_STRUCT_CLK(cam_mclk, cam_mclk_parent_names, aes2_ick_ops);
|
||||
static struct clk cam_mclk = {
|
||||
.name = "cam_mclk",
|
||||
.hw = &cam_mclk_hw.hw,
|
||||
.parent_names = cam_mclk_parent_names,
|
||||
.num_parents = ARRAY_SIZE(cam_mclk_parent_names),
|
||||
.ops = &aes2_ick_ops,
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
};
|
||||
|
||||
static const struct clksel_rate clkout2_src_core_rates[] = {
|
||||
{ .div = 1, .val = 0, .flags = RATE_IN_3XXX },
|
||||
|
||||
@@ -605,15 +605,26 @@ static const char *dpll_usb_ck_parents[] = {
|
||||
|
||||
static struct clk dpll_usb_ck;
|
||||
|
||||
static const struct clk_ops dpll_usb_ck_ops = {
|
||||
.enable = &omap3_noncore_dpll_enable,
|
||||
.disable = &omap3_noncore_dpll_disable,
|
||||
.recalc_rate = &omap3_dpll_recalc,
|
||||
.round_rate = &omap2_dpll_round_rate,
|
||||
.set_rate = &omap3_noncore_dpll_set_rate,
|
||||
.get_parent = &omap2_init_dpll_parent,
|
||||
.init = &omap2_init_clk_clkdm,
|
||||
};
|
||||
|
||||
static struct clk_hw_omap dpll_usb_ck_hw = {
|
||||
.hw = {
|
||||
.clk = &dpll_usb_ck,
|
||||
},
|
||||
.dpll_data = &dpll_usb_dd,
|
||||
.clkdm_name = "l3_init_clkdm",
|
||||
.ops = &clkhwops_omap3_dpll,
|
||||
};
|
||||
|
||||
DEFINE_STRUCT_CLK(dpll_usb_ck, dpll_usb_ck_parents, dpll_ck_ops);
|
||||
DEFINE_STRUCT_CLK(dpll_usb_ck, dpll_usb_ck_parents, dpll_usb_ck_ops);
|
||||
|
||||
static const char *dpll_usb_clkdcoldo_ck_parents[] = {
|
||||
"dpll_usb_ck",
|
||||
|
||||
@@ -65,6 +65,17 @@ struct clockdomain;
|
||||
.ops = &_clkops_name, \
|
||||
};
|
||||
|
||||
#define DEFINE_STRUCT_CLK_FLAGS(_name, _parent_array_name, \
|
||||
_clkops_name, _flags) \
|
||||
static struct clk _name = { \
|
||||
.name = #_name, \
|
||||
.hw = &_name##_hw.hw, \
|
||||
.parent_names = _parent_array_name, \
|
||||
.num_parents = ARRAY_SIZE(_parent_array_name), \
|
||||
.ops = &_clkops_name, \
|
||||
.flags = _flags, \
|
||||
};
|
||||
|
||||
#define DEFINE_STRUCT_CLK_HW_OMAP(_name, _clkdm_name) \
|
||||
static struct clk_hw_omap _name##_hw = { \
|
||||
.hw = { \
|
||||
|
||||
@@ -241,9 +241,6 @@ int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs, u16 clkctrl_offs)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (!clkctrl_offs)
|
||||
return 0;
|
||||
|
||||
omap_test_timeout(_is_module_ready(inst, cdoffs, clkctrl_offs),
|
||||
MAX_MODULE_READY_TIME, i);
|
||||
|
||||
|
||||
@@ -17,16 +17,11 @@
|
||||
#ifndef __ARCH_ARM_MACH_OMAP2_CM_33XX_H
|
||||
#define __ARCH_ARM_MACH_OMAP2_CM_33XX_H
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "cm.h"
|
||||
#include "cm-regbits-33xx.h"
|
||||
#include "cm33xx.h"
|
||||
#include "iomap.h"
|
||||
|
||||
/* CM base address */
|
||||
#define AM33XX_CM_BASE 0x44e00000
|
||||
@@ -381,6 +376,7 @@
|
||||
#define AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL AM33XX_CM_REGADDR(AM33XX_CM_CEFUSE_MOD, 0x0020)
|
||||
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
extern bool am33xx_cm_is_clkdm_in_hwsup(s16 inst, u16 cdoffs);
|
||||
extern void am33xx_cm_clkdm_enable_hwsup(s16 inst, u16 cdoffs);
|
||||
extern void am33xx_cm_clkdm_disable_hwsup(s16 inst, u16 cdoffs);
|
||||
@@ -417,4 +413,5 @@ static inline int am33xx_cm_wait_module_ready(u16 inst, s16 cdoffs,
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ASSEMBLER */
|
||||
#endif
|
||||
|
||||
@@ -119,6 +119,14 @@ static inline void omap2xxx_restart(char mode, const char *cmd)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOC_AM33XX
|
||||
void am33xx_restart(char mode, const char *cmd);
|
||||
#else
|
||||
static inline void am33xx_restart(char mode, const char *cmd)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
void omap3xxx_restart(char mode, const char *cmd);
|
||||
#else
|
||||
|
||||
@@ -426,7 +426,7 @@ static void __init omap_init_hdmi_audio(void)
|
||||
return;
|
||||
}
|
||||
|
||||
pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0, 0);
|
||||
pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0);
|
||||
WARN(IS_ERR(pdev),
|
||||
"Can't build omap_device for omap-hdmi-audio-dai.\n");
|
||||
|
||||
|
||||
@@ -500,8 +500,9 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
if (dd->last_rounded_rate == 0)
|
||||
return -EINVAL;
|
||||
|
||||
/* No freqsel on OMAP4 and OMAP3630 */
|
||||
if (!cpu_is_omap44xx() && !cpu_is_omap3630()) {
|
||||
/* No freqsel on AM335x, OMAP4 and OMAP3630 */
|
||||
if (!soc_is_am33xx() && !cpu_is_omap44xx() &&
|
||||
!cpu_is_omap3630()) {
|
||||
freqsel = _omap3_dpll_compute_freqsel(clk,
|
||||
dd->last_rounded_n);
|
||||
WARN_ON(!freqsel);
|
||||
|
||||
@@ -399,8 +399,18 @@ void __init omap3xxx_check_revision(void)
|
||||
}
|
||||
break;
|
||||
case 0xb944:
|
||||
omap_revision = AM335X_REV_ES1_0;
|
||||
cpu_rev = "1.0";
|
||||
switch (rev) {
|
||||
case 0:
|
||||
omap_revision = AM335X_REV_ES1_0;
|
||||
cpu_rev = "1.0";
|
||||
break;
|
||||
case 1:
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
omap_revision = AM335X_REV_ES2_0;
|
||||
cpu_rev = "2.0";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0xb8f2:
|
||||
switch (rev) {
|
||||
|
||||
@@ -2054,6 +2054,23 @@ static int _omap4_get_context_lost(struct omap_hwmod *oh)
|
||||
return oh->prcm.omap4.context_lost_counter;
|
||||
}
|
||||
|
||||
/**
|
||||
* _enable_preprogram - Pre-program an IP block during the _enable() process
|
||||
* @oh: struct omap_hwmod *
|
||||
*
|
||||
* Some IP blocks (such as AESS) require some additional programming
|
||||
* after enable before they can enter idle. If a function pointer to
|
||||
* do so is present in the hwmod data, then call it and pass along the
|
||||
* return value; otherwise, return 0.
|
||||
*/
|
||||
static int __init _enable_preprogram(struct omap_hwmod *oh)
|
||||
{
|
||||
if (!oh->class->enable_preprogram)
|
||||
return 0;
|
||||
|
||||
return oh->class->enable_preprogram(oh);
|
||||
}
|
||||
|
||||
/**
|
||||
* _enable - enable an omap_hwmod
|
||||
* @oh: struct omap_hwmod *
|
||||
@@ -2160,6 +2177,7 @@ static int _enable(struct omap_hwmod *oh)
|
||||
_update_sysc_cache(oh);
|
||||
_enable_sysc(oh);
|
||||
}
|
||||
r = _enable_preprogram(oh);
|
||||
} else {
|
||||
if (soc_ops.disable_module)
|
||||
soc_ops.disable_module(oh);
|
||||
@@ -3049,11 +3067,8 @@ static int _am33xx_assert_hardreset(struct omap_hwmod *oh,
|
||||
static int _am33xx_deassert_hardreset(struct omap_hwmod *oh,
|
||||
struct omap_hwmod_rst_info *ohri)
|
||||
{
|
||||
if (ohri->st_shift)
|
||||
pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",
|
||||
oh->name, ohri->name);
|
||||
|
||||
return am33xx_prm_deassert_hardreset(ohri->rst_shift,
|
||||
ohri->st_shift,
|
||||
oh->clkdm->pwrdm.ptr->prcm_offs,
|
||||
oh->prcm.omap4.rstctrl_offs,
|
||||
oh->prcm.omap4.rstst_offs);
|
||||
|
||||
@@ -510,6 +510,7 @@ struct omap_hwmod_omap4_prcm {
|
||||
* @rev: revision of the IP class
|
||||
* @pre_shutdown: ptr to fn to be executed immediately prior to device shutdown
|
||||
* @reset: ptr to fn to be executed in place of the standard hwmod reset fn
|
||||
* @enable_preprogram: ptr to fn to be executed during device enable
|
||||
*
|
||||
* Represent the class of a OMAP hardware "modules" (e.g. timer,
|
||||
* smartreflex, gpio, uart...)
|
||||
@@ -533,6 +534,7 @@ struct omap_hwmod_class {
|
||||
u32 rev;
|
||||
int (*pre_shutdown)(struct omap_hwmod *oh);
|
||||
int (*reset)(struct omap_hwmod *oh);
|
||||
int (*enable_preprogram)(struct omap_hwmod *oh);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -679,6 +681,12 @@ extern void __init omap_hwmod_init(void);
|
||||
|
||||
const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh);
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
extern int omap_hwmod_aess_preprogram(struct omap_hwmod *oh);
|
||||
|
||||
/*
|
||||
* Chip variant-specific hwmod init routines - XXX should be converted
|
||||
* to use initcalls once the initial boot ordering is straightened out
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3493,7 +3493,12 @@ static struct omap_hwmod am35xx_emac_hwmod = {
|
||||
.name = "davinci_emac",
|
||||
.mpu_irqs = am35xx_emac_mpu_irqs,
|
||||
.class = &am35xx_emac_class,
|
||||
.flags = HWMOD_NO_IDLEST,
|
||||
/*
|
||||
* According to Mark Greer, the MPU will not return from WFI
|
||||
* when the EMAC signals an interrupt.
|
||||
* http://www.spinics.net/lists/arm-kernel/msg174734.html
|
||||
*/
|
||||
.flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
|
||||
};
|
||||
|
||||
/* l3_core -> davinci emac interface */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user