Skip to content

Commit

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

Fixes for omaps for v4.8-rc cycle, mostly a series of four fixes for
am335x RTC zero offset for clkctrl register. Also few other fixes:

- Add missing sysc information for DSI as at least n950 needs it for
  the working display

- Fix old elm-id properties that cause nand boot to not work

- Fix overo gpmc nand cs0 range

- FIx overo gpmc nand on boards with ethernet

- Fix logicpd torpedo nand ready pin nand interrupt configuration

* tag 'omap-for-v4.8/fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: logicpd-somlv: Fix NAND device nodes
  ARM: dts: logicpd-torpedo-som: Provide NAND ready pin
  ARM: dts: overo: fix gpmc nand on boards with ethernet
  ARM: dts: overo: fix gpmc nand cs0 range
  ARM: dts: am335x: Update elm phandle binding
  ARM: OMAP4+: CM: Remove redundant checks for clkctrl_offs of zero
  ARM: OMAP4+: Have _omap4_wait_target_* check for valid clkctrl_offs
  ARM: OMAP2+: AM33XX: Add HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET flag to rtc hwmod
  ARM: OMAP4+: hwmod: Add hwmod flag for HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET
  ARM: OMAP3: hwmod data: Add sysc information for DSI

Signed-off-by: Olof Johansson <[email protected]>
  • Loading branch information
olofj committed Aug 26, 2016
2 parents 8184a34 + 7391218 commit fd03819
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 28 deletions.
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/am335x-baltos.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@

#address-cells = <1>;
#size-cells = <1>;
elm_id = <&elm>;
ti,elm-id = <&elm>;
};
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/am335x-igep0033.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@

#address-cells = <1>;
#size-cells = <1>;
elm_id = <&elm>;
ti,elm-id = <&elm>;

/* MTD partition table */
partition@0 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/am335x-phycore-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
gpmc,wr-access-ns = <30>;
gpmc,wr-data-mux-bus-ns = <0>;

elm_id = <&elm>;
ti,elm-id = <&elm>;

#address-cells = <1>;
#size-cells = <1>;
Expand Down
11 changes: 6 additions & 5 deletions arch/arm/boot/dts/logicpd-som-lv.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,15 @@
ranges = <0 0 0x00000000 0x1000000>; /* CS0: 16MB for NAND */

nand@0,0 {
linux,mtd-name = "micron,mt29f4g16abbda3w";
compatible = "ti,omap2-nand";
reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
interrupt-parent = <&gpmc>;
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
<1 IRQ_TYPE_NONE>; /* termcount */
linux,mtd-name = "micron,mt29f4g16abbda3w";
nand-bus-width = <16>;
ti,nand-ecc-opt = "bch8";
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
gpmc,sync-clk-ps = <0>;
gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <44>;
Expand All @@ -54,10 +59,6 @@
gpmc,wr-access-ns = <40>;
gpmc,wr-data-mux-bus-ns = <0>;
gpmc,device-width = <2>;

gpmc,page-burst-access-ns = <5>;
gpmc,cycle2cycle-delay-ns = <50>;

#address-cells = <1>;
#size-cells = <1>;

Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/logicpd-torpedo-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
linux,mtd-name = "micron,mt29f4g16abbda3w";
nand-bus-width = <16>;
ti,nand-ecc-opt = "bch8";
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
gpmc,sync-clk-ps = <0>;
gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <44>;
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/boot/dts/omap3-overo-base.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@
};

&gpmc {
ranges = <0 0 0x00000000 0x20000000>;
ranges = <0 0 0x30000000 0x1000000>, /* CS0 */
<4 0 0x2b000000 0x1000000>, /* CS4 */
<5 0 0x2c000000 0x1000000>; /* CS5 */

nand@0,0 {
compatible = "ti,omap2-nand";
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
#include "omap-gpmc-smsc9221.dtsi"

&gpmc {
ranges = <5 0 0x2c000000 0x1000000>; /* CS5 */

ethernet@gpmc {
reg = <5 0 0xff>;
interrupt-parent = <&gpio6>;
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/boot/dts/omap3-overo-tobi-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include "omap-gpmc-smsc9221.dtsi"

&gpmc {
ranges = <5 0 0x2c000000 0x1000000>; /* CS5 */

ethernet@gpmc {
reg = <5 0 0xff>;
interrupt-parent = <&gpio6>;
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/boot/dts/omap3-overo-tobiduo-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
#include "omap-gpmc-smsc9221.dtsi"

&gpmc {
ranges = <4 0 0x2b000000 0x1000000>, /* CS4 */
<5 0 0x2c000000 0x1000000>; /* CS5 */

smsc1: ethernet@gpmc {
reg = <5 0 0xff>;
interrupt-parent = <&gpio6>;
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-omap2/cm33xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
{
int i = 0;

if (!clkctrl_offs)
return 0;

omap_test_timeout(_is_module_ready(inst, clkctrl_offs),
MAX_MODULE_READY_TIME, i);

Expand All @@ -246,9 +243,6 @@ static int am33xx_cm_wait_module_idle(u8 part, s16 inst, u16 clkctrl_offs,
{
int i = 0;

if (!clkctrl_offs)
return 0;

omap_test_timeout((_clkctrl_idlest(inst, clkctrl_offs) ==
CLKCTRL_IDLEST_DISABLED),
MAX_MODULE_READY_TIME, i);
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-omap2/cminst44xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,6 @@ static int omap4_cminst_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
{
int i = 0;

if (!clkctrl_offs)
return 0;

omap_test_timeout(_is_module_ready(part, inst, clkctrl_offs),
MAX_MODULE_READY_TIME, i);

Expand All @@ -304,9 +301,6 @@ static int omap4_cminst_wait_module_idle(u8 part, s16 inst, u16 clkctrl_offs,
{
int i = 0;

if (!clkctrl_offs)
return 0;

omap_test_timeout((_clkctrl_idlest(part, inst, clkctrl_offs) ==
CLKCTRL_IDLEST_DISABLED),
MAX_MODULE_DISABLE_TIME, i);
Expand Down
8 changes: 8 additions & 0 deletions arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,10 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh)
if (oh->flags & HWMOD_NO_IDLEST)
return 0;

if (!oh->prcm.omap4.clkctrl_offs &&
!(oh->prcm.omap4.flags & HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET))
return 0;

return omap_cm_wait_module_idle(oh->clkdm->prcm_partition,
oh->clkdm->cm_inst,
oh->prcm.omap4.clkctrl_offs, 0);
Expand Down Expand Up @@ -2971,6 +2975,10 @@ static int _omap4_wait_target_ready(struct omap_hwmod *oh)
if (!_find_mpu_rt_port(oh))
return 0;

if (!oh->prcm.omap4.clkctrl_offs &&
!(oh->prcm.omap4.flags & HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET))
return 0;

/* XXX check module SIDLEMODE, hardreset status */

return omap_cm_wait_module_ready(oh->clkdm->prcm_partition,
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/mach-omap2/omap_hwmod.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,12 @@ struct omap_hwmod_omap2_prcm {
* HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT: Some IP blocks don't have a PRCM
* module-level context loss register associated with them; this
* flag bit should be set in those cases
* HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET: Some IP blocks have a valid CLKCTRL
* offset of zero; this flag bit should be set in those cases to
* distinguish from hwmods that have no clkctrl offset.
*/
#define HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT (1 << 0)
#define HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET (1 << 1)

/**
* struct omap_hwmod_omap4_prcm - OMAP4-specific PRCM data
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#define CLKCTRL(oh, clkctrl) ((oh).prcm.omap4.clkctrl_offs = (clkctrl))
#define RSTCTRL(oh, rstctrl) ((oh).prcm.omap4.rstctrl_offs = (rstctrl))
#define RSTST(oh, rstst) ((oh).prcm.omap4.rstst_offs = (rstst))
#define PRCM_FLAGS(oh, flag) ((oh).prcm.omap4.flags = (flag))

/*
* 'l3' class
Expand Down Expand Up @@ -1296,6 +1297,7 @@ static void omap_hwmod_am33xx_clkctrl(void)
CLKCTRL(am33xx_i2c1_hwmod, AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET);
CLKCTRL(am33xx_wd_timer1_hwmod, AM33XX_CM_WKUP_WDT1_CLKCTRL_OFFSET);
CLKCTRL(am33xx_rtc_hwmod, AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET);
PRCM_FLAGS(am33xx_rtc_hwmod, HWMOD_OMAP4_ZERO_CLKCTRL_OFFSET);
CLKCTRL(am33xx_mmc2_hwmod, AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET);
CLKCTRL(am33xx_gpmc_hwmod, AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET);
CLKCTRL(am33xx_l4_ls_hwmod, AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET);
Expand Down
12 changes: 12 additions & 0 deletions arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,20 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
* display serial interface controller
*/

static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = {
.rev_offs = 0x0000,
.sysc_offs = 0x0010,
.syss_offs = 0x0014,
.sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
.sysc_fields = &omap_hwmod_sysc_type1,
};

static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
.name = "dsi",
.sysc = &omap3xxx_dsi_sysc,
};

static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
Expand Down

0 comments on commit fd03819

Please sign in to comment.