mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
A few more clk driver fixes
- Set the max_register member of the spreadtrum regmap so that reads
don't go off the end of the I/O space
- Avoid a clk parent error in the i.MX imx6ul driver when the selector
is unknown
- Fix an oops due to REGCACHE_NONE usage by the Renesas 9-series driver
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmQ4hC0RHHNib3lkQGtl
cm5lbC5vcmcACgkQrQKIl8bklSVTrRAApvhlzQsZhso9eHBcOJ6l8HzvS9c+lpop
BJNxJOaZWfU2kDZHTuRetWqwhsCCI51g8MeaNFsrRQVoIYyAi55TaUGzQrAzkdxN
oU1WN2SRYZnQ72FnQCg926lmSfSajF7p7LkWEMpjj9wTaNCS/G5JxyakMF3PllJg
ZDyd9Jp7GF56WExhrCPjAO4smY4o1pzDt07ruP6etiHOi5NkUFYoNn0F7/dVZilY
eu9gs7m+qKPquAGbVyL/lb0eXPz37tG7XIR4yTb2N0P2ENAOy3EK6ok2giD+ojC0
UpmUKBPjQVibYSlvxmn/LUvagPAnrjUPV0G9o8s/kL0knnmjAye681n5Udt63HSY
IQ2I0DKHU0SvE2lz0sGnR52BSRmZn8of07zbTx4WR/bMrVSAncOmWY/hMl3ke+Su
V+haRR1gPOBTYn1ARceyZmkilfzbWAQrb9hBYP2e8s/PLmGSQJ/c0MFr9YQbY0Cu
8lPyvC/cAymncN30qO6JFgEFJvlRK6U3RxL511NuQxslNlJZ/Uvp3hm8OL06+ISF
IeYVWrhDyP6tB8rZucMFsJnH0KLz4SUhqya+h6Cp2zr5tn2JWAVLmUrs+gpluzpm
o14AjTtPCJKxKG1nc8len0+O2WqffQbNubExhimjixZTRljSMfspz9PuKBois2RE
W/N9RVjMSrI=
=3TUe
-----END PGP SIGNATURE-----
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk fixes from Stephen Boyd:
"A few more clk driver fixes:
- Set the max_register member of the spreadtrum regmap so that reads
don't go off the end of the I/O space
- Avoid a clk parent error in the i.MX imx6ul driver when the
selector is unknown
- Fix an oops due to REGCACHE_NONE usage by the Renesas 9-series
driver"
* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
clk: rs9: Fix suspend/resume
clk: imx6ul: fix "failed to get parent" error
clk: sprd: set max_register according to mapping range
This commit is contained in:
commit
e44f45fee8
|
|
@ -143,8 +143,9 @@ static int rs9_regmap_i2c_read(void *context,
|
|||
static const struct regmap_config rs9_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
.cache_type = REGCACHE_NONE,
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
.max_register = RS9_REG_BCP,
|
||||
.num_reg_defaults_raw = 0x8,
|
||||
.rd_table = &rs9_readable_table,
|
||||
.wr_table = &rs9_writeable_table,
|
||||
.reg_write = rs9_regmap_i2c_write,
|
||||
|
|
|
|||
|
|
@ -95,14 +95,16 @@ static const struct clk_div_table video_div_table[] = {
|
|||
{ }
|
||||
};
|
||||
|
||||
static const char * enet1_ref_sels[] = { "enet1_ref_125m", "enet1_ref_pad", };
|
||||
static const char * enet1_ref_sels[] = { "enet1_ref_125m", "enet1_ref_pad", "dummy", "dummy"};
|
||||
static const u32 enet1_ref_sels_table[] = { IMX6UL_GPR1_ENET1_TX_CLK_DIR,
|
||||
IMX6UL_GPR1_ENET1_CLK_SEL };
|
||||
IMX6UL_GPR1_ENET1_CLK_SEL, 0,
|
||||
IMX6UL_GPR1_ENET1_TX_CLK_DIR | IMX6UL_GPR1_ENET1_CLK_SEL };
|
||||
static const u32 enet1_ref_sels_table_mask = IMX6UL_GPR1_ENET1_TX_CLK_DIR |
|
||||
IMX6UL_GPR1_ENET1_CLK_SEL;
|
||||
static const char * enet2_ref_sels[] = { "enet2_ref_125m", "enet2_ref_pad", };
|
||||
static const char * enet2_ref_sels[] = { "enet2_ref_125m", "enet2_ref_pad", "dummy", "dummy"};
|
||||
static const u32 enet2_ref_sels_table[] = { IMX6UL_GPR1_ENET2_TX_CLK_DIR,
|
||||
IMX6UL_GPR1_ENET2_CLK_SEL };
|
||||
IMX6UL_GPR1_ENET2_CLK_SEL, 0,
|
||||
IMX6UL_GPR1_ENET2_TX_CLK_DIR | IMX6UL_GPR1_ENET2_CLK_SEL };
|
||||
static const u32 enet2_ref_sels_table_mask = IMX6UL_GPR1_ENET2_TX_CLK_DIR |
|
||||
IMX6UL_GPR1_ENET2_CLK_SEL;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ static const struct regmap_config sprdclk_regmap_config = {
|
|||
.reg_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.val_bits = 32,
|
||||
.max_register = 0xffff,
|
||||
.fast_io = true,
|
||||
};
|
||||
|
||||
|
|
@ -43,6 +42,8 @@ int sprd_clk_regmap_init(struct platform_device *pdev,
|
|||
struct device *dev = &pdev->dev;
|
||||
struct device_node *node = dev->of_node, *np;
|
||||
struct regmap *regmap;
|
||||
struct resource *res;
|
||||
struct regmap_config reg_config = sprdclk_regmap_config;
|
||||
|
||||
if (of_find_property(node, "sprd,syscon", NULL)) {
|
||||
regmap = syscon_regmap_lookup_by_phandle(node, "sprd,syscon");
|
||||
|
|
@ -59,12 +60,14 @@ int sprd_clk_regmap_init(struct platform_device *pdev,
|
|||
return PTR_ERR(regmap);
|
||||
}
|
||||
} else {
|
||||
base = devm_platform_ioremap_resource(pdev, 0);
|
||||
base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
reg_config.max_register = resource_size(res) - reg_config.reg_stride;
|
||||
|
||||
regmap = devm_regmap_init_mmio(&pdev->dev, base,
|
||||
&sprdclk_regmap_config);
|
||||
®_config);
|
||||
if (IS_ERR(regmap)) {
|
||||
pr_err("failed to init regmap\n");
|
||||
return PTR_ERR(regmap);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user