diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2019-02-24 19:52:59 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-25 09:46:48 +0100 |
commit | af5383ee87e0087ea17e8921a9604b51a31c6fb8 (patch) | |
tree | 674b0f6c617f2d9923fd771eebdde5b1cb53b3b3 /include/soc | |
parent | a937f01db475f4e4e174668f4dfcf2ee52e0031a (diff) | |
download | barebox-af5383ee87e0087ea17e8921a9604b51a31c6fb8.tar.gz barebox-af5383ee87e0087ea17e8921a9604b51a31c6fb8.tar.xz |
clk: at91: update to PMC bindings
Based on kernel 5.0-rc6 update at91 clk support
to match the new PMC bindings.
Manually added all changes done in the kernel from 4.9-rc3 to 5.0-rc6.
New drivers required was added as seperate commits.
This includes dt-compat code required to support at91sam5d3,
as this is not yet ported to use the new PMC bindings.
clk-programmable saw some extra changes - it had never been bulit.
It is used only by at91sama5d2 - and barebox has no board support for
this cpu (yet).
The CONFIG_SOC symbols is used to select the relevant drivers.
CONFIG_SOC_SAM9 selects several drivers, and in the future
this can be split to keep the image size down.
In the kernel CLK_OF_DECLARE_DRIVER() can be used for a two step init.
In barebox this is a simple one step init.
It was added to have less differences between the kernel and the barebox
versions of the drivers.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/soc')
-rw-r--r-- | include/soc/at91/atmel-sfr.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/soc/at91/atmel-sfr.h b/include/soc/at91/atmel-sfr.h new file mode 100644 index 0000000000..482337af06 --- /dev/null +++ b/include/soc/at91/atmel-sfr.h @@ -0,0 +1,34 @@ +/* + * Atmel SFR (Special Function Registers) register offsets and bit definitions. + * + * Copyright (C) 2016 Atmel + * + * Author: Ludovic Desroches <ludovic.desroches@atmel.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef _LINUX_MFD_SYSCON_ATMEL_SFR_H +#define _LINUX_MFD_SYSCON_ATMEL_SFR_H + +#define AT91_SFR_DDRCFG 0x04 /* DDR Configuration Register */ +/* 0x08 ~ 0x0c: Reserved */ +#define AT91_SFR_OHCIICR 0x10 /* OHCI INT Configuration Register */ +#define AT91_SFR_OHCIISR 0x14 /* OHCI INT Status Register */ +#define AT91_SFR_UTMICKTRIM 0x30 /* UTMI Clock Trimming Register */ +#define AT91_SFR_I2SCLKSEL 0x90 /* I2SC Register */ + +/* Field definitions */ +#define AT91_OHCIICR_SUSPEND_A BIT(8) +#define AT91_OHCIICR_SUSPEND_B BIT(9) +#define AT91_OHCIICR_SUSPEND_C BIT(10) + +#define AT91_OHCIICR_USB_SUSPEND (AT91_OHCIICR_SUSPEND_A | \ + AT91_OHCIICR_SUSPEND_B | \ + AT91_OHCIICR_SUSPEND_C) + +#define AT91_UTMICKTRIM_FREQ GENMASK(1, 0) + +#endif /* _LINUX_MFD_SYSCON_ATMEL_SFR_H */ |