Skip to content

Commit

Permalink
MIPS: lantiq: remove ltq_reset_cause() and ltq_boot_select()
Browse files Browse the repository at this point in the history
Do not export the ltq_reset_cause() and ltq_boot_select() function any
more. ltq_reset_cause() was accessed by the watchdog driver before to
see why the last reset happened, this is now done through direct access
of the register over regmap. The bits in this register are anyway
different between the xrx200 and the falcon SoC.
ltq_boot_select() is not used any more and was used by the flash
drivers to check if the system was booted from this flash type, now the
drivers should depend on the device tree only.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: john@phrozen.org
Cc: robh@kernel.org
Cc: andy.shevchenko@gmail.com
Cc: p.zabel@pengutronix.de
Cc: kishon@ti.com
Cc: mark.rutland@arm.com
Cc: linux-mips@linux-mips.org
Cc: linux-mtd@lists.infradead.org
Cc: linux-watchdog@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-spi@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17126/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Hauke Mehrtens authored and Ralf Baechle committed Sep 4, 2017
1 parent c20b3b8 commit 333b270
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
2 changes: 0 additions & 2 deletions arch/mips/include/asm/mach-lantiq/lantiq.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ extern struct clk *clk_get_ppe(void);

/* find out what bootsource we have */
extern unsigned char ltq_boot_select(void);
/* find out what caused the last cpu reset */
extern int ltq_reset_cause(void);
/* find out the soc type */
extern int ltq_soc_type(void);

Expand Down
13 changes: 0 additions & 13 deletions arch/mips/lantiq/falcon/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@

#include <lantiq_soc.h>

/* CPU0 Reset Source Register */
#define SYS1_CPU0RS 0x0040
/* reset cause mask */
#define CPU0RS_MASK 0x0003
/* CPU0 Boot Mode Register */
#define SYS1_BM 0x00a0
/* boot mode mask */
#define BM_MASK 0x0005

Expand All @@ -30,13 +24,6 @@ unsigned char ltq_boot_select(void)
return ltq_sys1_r32(SYS1_BM) & BM_MASK;
}

/* allow the watchdog driver to find out what the boot reason was */
int ltq_reset_cause(void)
{
return ltq_sys1_r32(SYS1_CPU0RS) & CPU0RS_MASK;
}
EXPORT_SYMBOL_GPL(ltq_reset_cause);

#define BOOT_REG_BASE (KSEG1 | 0x1F200000)
#define BOOT_PW1_REG (BOOT_REG_BASE | 0x20)
#define BOOT_PW2_REG (BOOT_REG_BASE | 0x24)
Expand Down
19 changes: 0 additions & 19 deletions arch/mips/lantiq/xway/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,6 @@ static void ltq_rcu_w32_mask(uint32_t clr, uint32_t set, uint32_t reg_off)
spin_unlock_irqrestore(&ltq_rcu_lock, flags);
}

/* This function is used by the watchdog driver */
int ltq_reset_cause(void)
{
u32 val = ltq_rcu_r32(RCU_RST_STAT);
return val >> RCU_STAT_SHIFT;
}
EXPORT_SYMBOL_GPL(ltq_reset_cause);

/* allow platform code to find out what source we booted from */
unsigned char ltq_boot_select(void)
{
u32 val = ltq_rcu_r32(RCU_RST_STAT);

if (of_device_is_compatible(ltq_rcu_np, "lantiq,rcu-xrx200"))
return RCU_BOOT_SEL_XRX200(val);

return RCU_BOOT_SEL(val);
}

struct ltq_gphy_reset {
u32 rd;
u32 addr;
Expand Down

0 comments on commit 333b270

Please sign in to comment.