mx25: add support for the DryIce rtc
Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>hifive-unleashed-5.1
parent
4cb73288b1
commit
dcbabbc1fc
|
@ -182,6 +182,7 @@ DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL, NULL);
|
||||||
DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL, NULL);
|
DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL, NULL);
|
||||||
DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);
|
DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL);
|
||||||
DEFINE_CLOCK(fec_clk, 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk);
|
DEFINE_CLOCK(fec_clk, 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk);
|
||||||
|
DEFINE_CLOCK(dryice_clk, 0, CCM_CGCR1, 8, get_rate_ipg, NULL, NULL);
|
||||||
|
|
||||||
#define _REGISTER_CLOCK(d, n, c) \
|
#define _REGISTER_CLOCK(d, n, c) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -214,6 +215,7 @@ static struct clk_lookup lookups[] = {
|
||||||
_REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk)
|
_REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk)
|
||||||
_REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk)
|
_REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk)
|
||||||
_REGISTER_CLOCK("fec.0", NULL, fec_clk)
|
_REGISTER_CLOCK("fec.0", NULL, fec_clk)
|
||||||
|
_REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk)
|
||||||
};
|
};
|
||||||
|
|
||||||
int __init mx25_clocks_init(void)
|
int __init mx25_clocks_init(void)
|
||||||
|
|
|
@ -458,3 +458,22 @@ struct platform_device mxc_nand_device = {
|
||||||
.num_resources = ARRAY_SIZE(mxc_nand_resources),
|
.num_resources = ARRAY_SIZE(mxc_nand_resources),
|
||||||
.resource = mxc_nand_resources,
|
.resource = mxc_nand_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct resource mx25_rtc_resources[] = {
|
||||||
|
{
|
||||||
|
.start = MX25_DRYICE_BASE_ADDR,
|
||||||
|
.end = MX25_DRYICE_BASE_ADDR + 0x40,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.start = MX25_INT_DRYICE,
|
||||||
|
.flags = IORESOURCE_IRQ
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
struct platform_device mx25_rtc_device = {
|
||||||
|
.name = "imxdi_rtc",
|
||||||
|
.id = 0,
|
||||||
|
.num_resources = ARRAY_SIZE(mx25_rtc_resources),
|
||||||
|
.resource = mx25_rtc_resources,
|
||||||
|
};
|
||||||
|
|
|
@ -19,3 +19,4 @@ extern struct platform_device mxc_i2c_device1;
|
||||||
extern struct platform_device mxc_i2c_device2;
|
extern struct platform_device mxc_i2c_device2;
|
||||||
extern struct platform_device mx25_fec_device;
|
extern struct platform_device mx25_fec_device;
|
||||||
extern struct platform_device mxc_nand_device;
|
extern struct platform_device mxc_nand_device;
|
||||||
|
extern struct platform_device mx25_rtc_device;
|
||||||
|
|
|
@ -32,7 +32,9 @@
|
||||||
|
|
||||||
#define MX25_FEC_BASE_ADDR 0x50038000
|
#define MX25_FEC_BASE_ADDR 0x50038000
|
||||||
#define MX25_NFC_BASE_ADDR 0xbb000000
|
#define MX25_NFC_BASE_ADDR 0xbb000000
|
||||||
|
#define MX25_DRYICE_BASE_ADDR 0x53ffc000
|
||||||
|
|
||||||
|
#define MX25_INT_DRYICE 25
|
||||||
#define MX25_INT_FEC 57
|
#define MX25_INT_FEC 57
|
||||||
#define MX25_INT_NANDFC 33
|
#define MX25_INT_NANDFC 33
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue