summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-01-05 12:08:20 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-01-05 12:08:20 +0100
commit052d1c9e0756db2b02da98c97a6c50d26b8c28ce (patch)
treecd9c072425c9e333e4be744d47aab96fed2cd430 /drivers
parente2d5e447e6b5035f9e78a29037d15f7fd9606918 (diff)
parent7518e1c47765bb66ee854acb97bd285e9320df36 (diff)
downloadbarebox-052d1c9e0756db2b02da98c97a6c50d26b8c28ce.tar.gz
barebox-052d1c9e0756db2b02da98c97a6c50d26b8c28ce.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/vexpress/clk-sp810.c20
-rw-r--r--drivers/mtd/spi-nor/spi-nor.c4
2 files changed, 9 insertions, 15 deletions
diff --git a/drivers/clk/vexpress/clk-sp810.c b/drivers/clk/vexpress/clk-sp810.c
index af72c74024..959661e19e 100644
--- a/drivers/clk/vexpress/clk-sp810.c
+++ b/drivers/clk/vexpress/clk-sp810.c
@@ -44,10 +44,7 @@ struct clk_sp810 {
static int clk_sp810_timerclken_get_parent(struct clk *hw)
{
- struct clk_sp810_timerclken *timerclken = to_clk_sp810_timerclken(hw);
- u32 val = readl(timerclken->sp810->base + SCCTRL);
-
- return !!(val & (1 << SCCTRL_TIMERENnSEL_SHIFT(timerclken->channel)));
+ return 1;
}
static int clk_sp810_timerclken_set_parent(struct clk *hw, u8 index)
@@ -59,6 +56,9 @@ static int clk_sp810_timerclken_set_parent(struct clk *hw, u8 index)
if (WARN_ON(index > 1))
return -EINVAL;
+ if (index == 0)
+ return -EINVAL;
+
val = readl(sp810->base + SCCTRL);
val &= ~(1 << shift);
val |= index << shift;
@@ -92,7 +92,6 @@ static void clk_sp810_of_setup(struct device_node *node)
char name[12];
static int instance;
int i;
- bool deprecated;
if (!sp810)
return;
@@ -106,8 +105,6 @@ static void clk_sp810_of_setup(struct device_node *node)
sp810->node = node;
sp810->base = of_iomap(node, 0);
- deprecated = !of_find_property(node, "assigned-clock-parents", NULL);
-
for (i = 0; i < ARRAY_SIZE(sp810->timerclken); i++) {
snprintf(name, sizeof(name), "sp810_%d_%d", instance, i);
@@ -119,13 +116,10 @@ static void clk_sp810_of_setup(struct device_node *node)
sp810->timerclken[i].hw.ops = &clk_sp810_timerclken_ops;
/*
- * If DT isn't setting the parent, force it to be
- * the 1 MHz clock without going through the framework.
- * We do this before clk_register() so that it can determine
- * the parent and setup the tree properly.
+ * Always set parent to 1MHz clock to match QEMU emulation
+ * and satisfy requirements on real HW.
*/
- if (deprecated)
- clk_sp810_timerclken_set_parent(&sp810->timerclken[i].hw, 1);
+ clk_sp810_timerclken_set_parent(&sp810->timerclken[i].hw, 1);
clk_register(&sp810->timerclken[i].hw);
}
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index fb13cd1269..5cf650c0e2 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -524,9 +524,9 @@ static const struct spi_device_id spi_nor_ids[] = {
{ "mx25l4005a", INFO(0xc22013, 0, 64 * 1024, 8, SECT_4K) },
{ "mx25l8005", INFO(0xc22014, 0, 64 * 1024, 16, 0) },
{ "mx25l1606e", INFO(0xc22015, 0, 64 * 1024, 32, SECT_4K) },
- { "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, 0) },
+ { "mx25l3205d", INFO(0xc22016, 0, 64 * 1024, 64, SECT_4K) },
{ "mx25l3255e", INFO(0xc29e16, 0, 64 * 1024, 64, SECT_4K) },
- { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, 0) },
+ { "mx25l6405d", INFO(0xc22017, 0, 64 * 1024, 128, SECT_4K) },
{ "mx25u2033e", INFO(0xc22532, 0, 64 * 1024, 4, SECT_4K) },
{ "mx25u4035", INFO(0xc22533, 0, 64 * 1024, 8, SECT_4K) },
{ "mx25u8035", INFO(0xc22534, 0, 64 * 1024, 16, SECT_4K) },