mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
ARM: s3c: simplify platform code
Following down the now unused symbols and header files, some additional content can be dropped that is used by neither the s3c64xx DT support nor the crag6410 board. Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -90,36 +90,6 @@ config S3C_DEV_I2C1
|
||||
help
|
||||
Compile in platform device definitions for I2C channel 1
|
||||
|
||||
config S3C_DEV_I2C2
|
||||
bool
|
||||
help
|
||||
Compile in platform device definitions for I2C channel 2
|
||||
|
||||
config S3C_DEV_I2C3
|
||||
bool
|
||||
help
|
||||
Compile in platform device definition for I2C controller 3
|
||||
|
||||
config S3C_DEV_I2C4
|
||||
bool
|
||||
help
|
||||
Compile in platform device definition for I2C controller 4
|
||||
|
||||
config S3C_DEV_I2C5
|
||||
bool
|
||||
help
|
||||
Compile in platform device definition for I2C controller 5
|
||||
|
||||
config S3C_DEV_I2C6
|
||||
bool
|
||||
help
|
||||
Compile in platform device definition for I2C controller 6
|
||||
|
||||
config S3C_DEV_I2C7
|
||||
bool
|
||||
help
|
||||
Compile in platform device definition for I2C controller 7
|
||||
|
||||
config S3C_DEV_FB
|
||||
bool
|
||||
help
|
||||
@@ -135,26 +105,6 @@ config S3C_DEV_USB_HSOTG
|
||||
help
|
||||
Compile in platform device definition for USB high-speed OtG
|
||||
|
||||
config S3C_DEV_WDT
|
||||
bool
|
||||
help
|
||||
Compile in platform device definition for Watchdog Timer
|
||||
|
||||
config S3C_DEV_NAND
|
||||
bool
|
||||
help
|
||||
Compile in platform device definition for NAND controller
|
||||
|
||||
config S3C_DEV_ONENAND
|
||||
bool
|
||||
help
|
||||
Compile in platform device definition for OneNAND controller
|
||||
|
||||
config S3C_DEV_RTC
|
||||
bool
|
||||
help
|
||||
Compile in platform device definition for RTC
|
||||
|
||||
config S3C64XX_DEV_SPI0
|
||||
bool
|
||||
help
|
||||
|
||||
@@ -15,7 +15,6 @@ menuconfig ARCH_S3C64XX
|
||||
select HAVE_TCM
|
||||
select PLAT_SAMSUNG
|
||||
select PM_GENERIC_DOMAINS if PM
|
||||
select S3C_DEV_NAND if ATAGS
|
||||
select S3C_GPIO_TRACK if ATAGS
|
||||
select S3C2410_WATCHDOG
|
||||
select SAMSUNG_ATAGS if ATAGS
|
||||
@@ -121,10 +120,8 @@ config MACH_WLF_CRAGG_6410
|
||||
select S3C_DEV_HSMMC1
|
||||
select S3C_DEV_HSMMC2
|
||||
select S3C_DEV_I2C1
|
||||
select S3C_DEV_RTC
|
||||
select S3C_DEV_USB_HOST
|
||||
select S3C_DEV_USB_HSOTG
|
||||
select S3C_DEV_WDT
|
||||
select SAMSUNG_DEV_KEYPAD
|
||||
select SAMSUNG_DEV_PWM
|
||||
help
|
||||
|
||||
@@ -11,7 +11,6 @@ obj-y += init.o cpu.o
|
||||
# devices
|
||||
|
||||
obj-$(CONFIG_SAMSUNG_ATAGS) += platformdata.o
|
||||
|
||||
obj-$(CONFIG_SAMSUNG_ATAGS) += devs.o
|
||||
obj-$(CONFIG_SAMSUNG_ATAGS) += dev-uart.o
|
||||
|
||||
@@ -21,5 +20,4 @@ obj-$(CONFIG_GPIO_SAMSUNG) += gpio-samsung.o
|
||||
|
||||
obj-$(CONFIG_SAMSUNG_PM) += pm.o pm-common.o
|
||||
obj-$(CONFIG_SAMSUNG_PM_GPIO) += pm-gpio.o
|
||||
|
||||
obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o
|
||||
|
||||
@@ -33,7 +33,6 @@ obj-y += dev-audio-s3c64xx.o
|
||||
obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp-s3c64xx.o
|
||||
obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0-s3c64xx.o
|
||||
obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1-s3c64xx.o
|
||||
obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide-s3c64xx.o
|
||||
obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad-s3c64xx.o
|
||||
obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio-s3c64xx.o
|
||||
obj-$(CONFIG_S3C64XX_SETUP_SPI) += setup-spi-s3c64xx.o
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com/
|
||||
*
|
||||
* Samsung ADC Controller core functions
|
||||
*/
|
||||
|
||||
#ifndef __ASM_PLAT_ADC_CORE_H
|
||||
#define __ASM_PLAT_ADC_CORE_H __FILE__
|
||||
|
||||
/* These functions are only for use with the core support code, such as
|
||||
* the cpu specific initialisation code
|
||||
*/
|
||||
|
||||
/* re-define device name depending on support. */
|
||||
static inline void s3c_adc_setname(char *name)
|
||||
{
|
||||
#if defined(CONFIG_SAMSUNG_DEV_ADC) || defined(CONFIG_PLAT_S3C24XX)
|
||||
s3c_device_adc.name = name;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* __ASM_PLAT_ADC_CORE_H */
|
||||
@@ -1,24 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* Samsung CF-ATA Controller core functions
|
||||
*/
|
||||
|
||||
#ifndef __ASM_PLAT_ATA_CORE_S3C64XX_H
|
||||
#define __ASM_PLAT_ATA_CORE_S3C64XX_H __FILE__
|
||||
|
||||
/* These functions are only for use with the core support code, such as
|
||||
* the cpu specific initialisation code
|
||||
*/
|
||||
|
||||
/* re-define device name depending on support. */
|
||||
static inline void s3c_cfcon_setname(char *name)
|
||||
{
|
||||
#ifdef CONFIG_SAMSUNG_DEV_IDE
|
||||
s3c_device_cfcon.name = name;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* __ASM_PLAT_ATA_CORE_S3C64XX_H */
|
||||
@@ -1,22 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*/
|
||||
|
||||
#ifndef __ASM_PLAT_BACKLIGHT_S3C64XX_H
|
||||
#define __ASM_PLAT_BACKLIGHT_S3C64XX_H __FILE__
|
||||
|
||||
/* samsung_bl_gpio_info - GPIO info for PWM Backlight control
|
||||
* @no: GPIO number for PWM timer out
|
||||
* @func: Special function of GPIO line for PWM timer
|
||||
*/
|
||||
struct samsung_bl_gpio_info {
|
||||
int no;
|
||||
int func;
|
||||
};
|
||||
|
||||
extern void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
|
||||
struct platform_pwm_backlight_data *bl_data);
|
||||
|
||||
#endif /* __ASM_PLAT_BACKLIGHT_S3C64XX_H */
|
||||
@@ -16,15 +16,6 @@
|
||||
|
||||
extern unsigned long samsung_cpu_id;
|
||||
|
||||
#define S3C2410_CPU_ID 0x32410000
|
||||
#define S3C2410_CPU_MASK 0xFFFFFFFF
|
||||
|
||||
#define S3C24XX_CPU_ID 0x32400000
|
||||
#define S3C24XX_CPU_MASK 0xFFF00000
|
||||
|
||||
#define S3C2412_CPU_ID 0x32412000
|
||||
#define S3C2412_CPU_MASK 0xFFFFF000
|
||||
|
||||
#define S3C6400_CPU_ID 0x36400000
|
||||
#define S3C6410_CPU_ID 0x36410000
|
||||
#define S3C64XX_CPU_MASK 0xFFFFF000
|
||||
@@ -38,29 +29,9 @@ static inline int is_samsung_##name(void) \
|
||||
return ((samsung_cpu_id & mask) == (id & mask)); \
|
||||
}
|
||||
|
||||
IS_SAMSUNG_CPU(s3c2410, S3C2410_CPU_ID, S3C2410_CPU_MASK)
|
||||
IS_SAMSUNG_CPU(s3c24xx, S3C24XX_CPU_ID, S3C24XX_CPU_MASK)
|
||||
IS_SAMSUNG_CPU(s3c2412, S3C2412_CPU_ID, S3C2412_CPU_MASK)
|
||||
IS_SAMSUNG_CPU(s3c6400, S3C6400_CPU_ID, S3C64XX_CPU_MASK)
|
||||
IS_SAMSUNG_CPU(s3c6410, S3C6410_CPU_ID, S3C64XX_CPU_MASK)
|
||||
|
||||
#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \
|
||||
defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \
|
||||
defined(CONFIG_CPU_S3C2442) || defined(CONFIG_CPU_S3C244X) || \
|
||||
defined(CONFIG_CPU_S3C2443)
|
||||
# define soc_is_s3c24xx() is_samsung_s3c24xx()
|
||||
# define soc_is_s3c2410() is_samsung_s3c2410()
|
||||
#else
|
||||
# define soc_is_s3c24xx() 0
|
||||
# define soc_is_s3c2410() 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_S3C2412)
|
||||
# define soc_is_s3c2412() is_samsung_s3c2412()
|
||||
#else
|
||||
# define soc_is_s3c2412() 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_S3C6400) || defined(CONFIG_CPU_S3C6410)
|
||||
# define soc_is_s3c6400() is_samsung_s3c6400()
|
||||
# define soc_is_s3c6410() is_samsung_s3c6410()
|
||||
@@ -71,12 +42,6 @@ IS_SAMSUNG_CPU(s3c6410, S3C6410_CPU_ID, S3C64XX_CPU_MASK)
|
||||
# define soc_is_s3c64xx() 0
|
||||
#endif
|
||||
|
||||
#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
|
||||
|
||||
#ifndef KHZ
|
||||
#define KHZ (1000)
|
||||
#endif
|
||||
|
||||
#ifndef MHZ
|
||||
#define MHZ (1000*1000)
|
||||
#endif
|
||||
@@ -96,7 +61,6 @@ struct cpu_table {
|
||||
unsigned long idmask;
|
||||
void (*map_io)(void);
|
||||
void (*init_uarts)(struct s3c2410_uartcfg *cfg, int no);
|
||||
void (*init_clocks)(int xtal);
|
||||
int (*init)(void);
|
||||
const char *name;
|
||||
};
|
||||
@@ -105,24 +69,13 @@ extern void s3c_init_cpu(unsigned long idcode,
|
||||
struct cpu_table *cpus, unsigned int cputab_size);
|
||||
|
||||
/* core initialisation functions */
|
||||
|
||||
extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
|
||||
|
||||
extern void s3c64xx_init_cpu(void);
|
||||
|
||||
extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
|
||||
|
||||
extern void s3c24xx_init_clocks(int xtal);
|
||||
|
||||
extern void s3c24xx_init_uartdevs(char *name,
|
||||
struct s3c24xx_uart_resources *res,
|
||||
struct s3c2410_uartcfg *cfg, int no);
|
||||
|
||||
extern struct syscore_ops s3c2410_pm_syscore_ops;
|
||||
extern struct syscore_ops s3c2412_pm_syscore_ops;
|
||||
extern struct syscore_ops s3c2416_pm_syscore_ops;
|
||||
extern struct syscore_ops s3c244x_pm_syscore_ops;
|
||||
|
||||
extern struct bus_type s3c6410_subsys;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -83,130 +83,3 @@ struct platform_device s3c64xx_device_iis1 = {
|
||||
},
|
||||
};
|
||||
EXPORT_SYMBOL(s3c64xx_device_iis1);
|
||||
|
||||
static struct resource s3c64xx_iisv4_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S3C64XX_PA_IISV4, SZ_256),
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata i2sv4_pdata = {
|
||||
.cfg_gpio = s3c64xx_i2s_cfg_gpio,
|
||||
.type = {
|
||||
.quirks = QUIRK_PRI_6CHAN,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s3c64xx_device_iisv4 = {
|
||||
.name = "samsung-i2s",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_iisv4_resource),
|
||||
.resource = s3c64xx_iisv4_resource,
|
||||
.dev = {
|
||||
.platform_data = &i2sv4_pdata,
|
||||
},
|
||||
};
|
||||
EXPORT_SYMBOL(s3c64xx_device_iisv4);
|
||||
|
||||
|
||||
/* PCM Controller platform_devices */
|
||||
|
||||
static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev)
|
||||
{
|
||||
unsigned int base;
|
||||
|
||||
switch (pdev->id) {
|
||||
case 0:
|
||||
base = S3C64XX_GPD(0);
|
||||
break;
|
||||
case 1:
|
||||
base = S3C64XX_GPE(0);
|
||||
break;
|
||||
default:
|
||||
printk(KERN_DEBUG "Invalid PCM Controller number: %d\n",
|
||||
pdev->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(2));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct resource s3c64xx_pcm0_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S3C64XX_PA_PCM0, SZ_256),
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata s3c_pcm0_pdata = {
|
||||
.cfg_gpio = s3c64xx_pcm_cfg_gpio,
|
||||
};
|
||||
|
||||
struct platform_device s3c64xx_device_pcm0 = {
|
||||
.name = "samsung-pcm",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_pcm0_resource),
|
||||
.resource = s3c64xx_pcm0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_pcm0_pdata,
|
||||
},
|
||||
};
|
||||
EXPORT_SYMBOL(s3c64xx_device_pcm0);
|
||||
|
||||
static struct resource s3c64xx_pcm1_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S3C64XX_PA_PCM1, SZ_256),
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata s3c_pcm1_pdata = {
|
||||
.cfg_gpio = s3c64xx_pcm_cfg_gpio,
|
||||
};
|
||||
|
||||
struct platform_device s3c64xx_device_pcm1 = {
|
||||
.name = "samsung-pcm",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_pcm1_resource),
|
||||
.resource = s3c64xx_pcm1_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_pcm1_pdata,
|
||||
},
|
||||
};
|
||||
EXPORT_SYMBOL(s3c64xx_device_pcm1);
|
||||
|
||||
/* AC97 Controller platform devices */
|
||||
|
||||
static int s3c64xx_ac97_cfg_gpd(struct platform_device *pdev)
|
||||
{
|
||||
return s3c_gpio_cfgpin_range(S3C64XX_GPD(0), 5, S3C_GPIO_SFN(4));
|
||||
}
|
||||
|
||||
static int s3c64xx_ac97_cfg_gpe(struct platform_device *pdev)
|
||||
{
|
||||
return s3c_gpio_cfgpin_range(S3C64XX_GPE(0), 5, S3C_GPIO_SFN(4));
|
||||
}
|
||||
|
||||
static struct resource s3c64xx_ac97_resource[] = {
|
||||
[0] = DEFINE_RES_MEM(S3C64XX_PA_AC97, SZ_256),
|
||||
[1] = DEFINE_RES_IRQ(IRQ_AC97),
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata s3c_ac97_pdata = {
|
||||
};
|
||||
|
||||
static u64 s3c64xx_ac97_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
struct platform_device s3c64xx_device_ac97 = {
|
||||
.name = "samsung-ac97",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_ac97_resource),
|
||||
.resource = s3c64xx_ac97_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_ac97_pdata,
|
||||
.dma_mask = &s3c64xx_ac97_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
};
|
||||
EXPORT_SYMBOL(s3c64xx_device_ac97);
|
||||
|
||||
void __init s3c64xx_ac97_setup_gpio(int num)
|
||||
{
|
||||
if (num == S3C64XX_AC97_GPD)
|
||||
s3c_ac97_pdata.cfg_gpio = s3c64xx_ac97_cfg_gpd;
|
||||
else
|
||||
s3c_ac97_pdata.cfg_gpio = s3c64xx_ac97_cfg_gpe;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,60 +25,23 @@ extern struct s3c24xx_uart_resources s3c64xx_uart_resources[];
|
||||
extern struct platform_device *s3c24xx_uart_devs[];
|
||||
extern struct platform_device *s3c24xx_uart_src[];
|
||||
|
||||
extern struct platform_device s3c64xx_device_ac97;
|
||||
extern struct platform_device s3c64xx_device_iis0;
|
||||
extern struct platform_device s3c64xx_device_iis1;
|
||||
extern struct platform_device s3c64xx_device_iisv4;
|
||||
extern struct platform_device s3c64xx_device_onenand1;
|
||||
extern struct platform_device s3c64xx_device_pcm0;
|
||||
extern struct platform_device s3c64xx_device_pcm1;
|
||||
extern struct platform_device s3c64xx_device_spi0;
|
||||
|
||||
extern struct platform_device s3c_device_adc;
|
||||
extern struct platform_device s3c_device_cfcon;
|
||||
extern struct platform_device s3c_device_fb;
|
||||
extern struct platform_device s3c_device_hwmon;
|
||||
extern struct platform_device s3c_device_hsmmc0;
|
||||
extern struct platform_device s3c_device_hsmmc1;
|
||||
extern struct platform_device s3c_device_hsmmc2;
|
||||
extern struct platform_device s3c_device_hsmmc3;
|
||||
extern struct platform_device s3c_device_i2c0;
|
||||
extern struct platform_device s3c_device_i2c1;
|
||||
extern struct platform_device s3c_device_i2c2;
|
||||
extern struct platform_device s3c_device_i2c3;
|
||||
extern struct platform_device s3c_device_i2c4;
|
||||
extern struct platform_device s3c_device_i2c5;
|
||||
extern struct platform_device s3c_device_i2c6;
|
||||
extern struct platform_device s3c_device_i2c7;
|
||||
extern struct platform_device s3c_device_iis;
|
||||
extern struct platform_device s3c_device_lcd;
|
||||
extern struct platform_device s3c_device_nand;
|
||||
extern struct platform_device s3c_device_ohci;
|
||||
extern struct platform_device s3c_device_onenand;
|
||||
extern struct platform_device s3c_device_rtc;
|
||||
extern struct platform_device s3c_device_sdi;
|
||||
extern struct platform_device s3c_device_spi0;
|
||||
extern struct platform_device s3c_device_spi1;
|
||||
extern struct platform_device s3c_device_ts;
|
||||
extern struct platform_device s3c_device_timer[];
|
||||
extern struct platform_device s3c_device_usbgadget;
|
||||
extern struct platform_device s3c_device_usb_hsotg;
|
||||
extern struct platform_device s3c_device_usb_hsudc;
|
||||
extern struct platform_device s3c_device_wdt;
|
||||
|
||||
extern struct platform_device samsung_asoc_idma;
|
||||
extern struct platform_device samsung_device_keypad;
|
||||
extern struct platform_device samsung_device_pwm;
|
||||
|
||||
/* s3c2440 specific devices */
|
||||
|
||||
#ifdef CONFIG_CPU_S3C2440
|
||||
|
||||
extern struct platform_device s3c_device_camif;
|
||||
extern struct platform_device s3c_device_ac97;
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* s3c_set_platdata() - helper for setting platform data
|
||||
* @pd: The default platform data for this device.
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* linux/arch/arm/mach-s3c6400/include/mach/dma.h
|
||||
*
|
||||
* Copyright 2008 Openmoko, Inc.
|
||||
* Copyright 2008 Simtec Electronics
|
||||
* Ben Dooks <ben@simtec.co.uk>
|
||||
* http://armlinux.simtec.co.uk/
|
||||
*
|
||||
* S3C6400 - DMA support
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_DMA_H
|
||||
#define __ASM_ARCH_DMA_H __FILE__
|
||||
|
||||
#define S3C64XX_DMA_CHAN(name) ((unsigned long)(name))
|
||||
|
||||
/* DMA0/SDMA0 */
|
||||
#define DMACH_UART0 "uart0_tx"
|
||||
#define DMACH_UART0_SRC2 "uart0_rx"
|
||||
#define DMACH_UART1 "uart1_tx"
|
||||
#define DMACH_UART1_SRC2 "uart1_rx"
|
||||
#define DMACH_UART2 "uart2_tx"
|
||||
#define DMACH_UART2_SRC2 "uart2_rx"
|
||||
#define DMACH_UART3 "uart3_tx"
|
||||
#define DMACH_UART3_SRC2 "uart3_rx"
|
||||
#define DMACH_PCM0_TX "pcm0_tx"
|
||||
#define DMACH_PCM0_RX "pcm0_rx"
|
||||
#define DMACH_I2S0_OUT "i2s0_tx"
|
||||
#define DMACH_I2S0_IN "i2s0_rx"
|
||||
#define DMACH_SPI0_TX S3C64XX_DMA_CHAN("spi0_tx")
|
||||
#define DMACH_SPI0_RX S3C64XX_DMA_CHAN("spi0_rx")
|
||||
#define DMACH_HSI_I2SV40_TX "i2s2_tx"
|
||||
#define DMACH_HSI_I2SV40_RX "i2s2_rx"
|
||||
|
||||
/* DMA1/SDMA1 */
|
||||
#define DMACH_PCM1_TX "pcm1_tx"
|
||||
#define DMACH_PCM1_RX "pcm1_rx"
|
||||
#define DMACH_I2S1_OUT "i2s1_tx"
|
||||
#define DMACH_I2S1_IN "i2s1_rx"
|
||||
#define DMACH_SPI1_TX S3C64XX_DMA_CHAN("spi1_tx")
|
||||
#define DMACH_SPI1_RX S3C64XX_DMA_CHAN("spi1_rx")
|
||||
#define DMACH_AC97_PCMOUT "ac97_out"
|
||||
#define DMACH_AC97_PCMIN "ac97_in"
|
||||
#define DMACH_AC97_MICIN "ac97_mic"
|
||||
#define DMACH_PWM "pwm"
|
||||
#define DMACH_IRDA "irda"
|
||||
#define DMACH_EXTERNAL "external"
|
||||
#define DMACH_SECURITY_RX "sec_rx"
|
||||
#define DMACH_SECURITY_TX "sec_tx"
|
||||
|
||||
enum dma_ch {
|
||||
DMACH_MAX = 32
|
||||
};
|
||||
|
||||
#include <linux/amba/pl08x.h>
|
||||
|
||||
#endif /* __ASM_ARCH_IRQ_H */
|
||||
@@ -1,2 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#include "dma-s3c64xx.h"
|
||||
@@ -26,134 +26,10 @@ static inline int samsung_gpio_do_setcfg(struct samsung_gpio_chip *chip,
|
||||
return (chip->config->set_config)(chip, off, config);
|
||||
}
|
||||
|
||||
static inline unsigned samsung_gpio_do_getcfg(struct samsung_gpio_chip *chip,
|
||||
unsigned int off)
|
||||
{
|
||||
return (chip->config->get_config)(chip, off);
|
||||
}
|
||||
|
||||
static inline int samsung_gpio_do_setpull(struct samsung_gpio_chip *chip,
|
||||
unsigned int off, samsung_gpio_pull_t pull)
|
||||
{
|
||||
return (chip->config->set_pull)(chip, off, pull);
|
||||
}
|
||||
|
||||
static inline samsung_gpio_pull_t samsung_gpio_do_getpull(struct samsung_gpio_chip *chip,
|
||||
unsigned int off)
|
||||
{
|
||||
return chip->config->get_pull(chip, off);
|
||||
}
|
||||
|
||||
/* Pull-{up,down} resistor controls.
|
||||
*
|
||||
* S3C2410,S3C2440 = Pull-UP,
|
||||
* S3C2412,S3C2413 = Pull-Down
|
||||
* S3C6400,S3C6410 = Pull-Both [None,Down,Up,Undef]
|
||||
* S3C2443 = Pull-Both [not same as S3C6400]
|
||||
*/
|
||||
|
||||
/**
|
||||
* s3c24xx_gpio_setpull_1up() - Pull configuration for choice of up or none.
|
||||
* @chip: The gpio chip that is being configured.
|
||||
* @off: The offset for the GPIO being configured.
|
||||
* @param: pull: The pull mode being requested.
|
||||
*
|
||||
* This is a helper function for the case where we have GPIOs with one
|
||||
* bit configuring the presence of a pull-up resistor.
|
||||
*/
|
||||
extern int s3c24xx_gpio_setpull_1up(struct samsung_gpio_chip *chip,
|
||||
unsigned int off, samsung_gpio_pull_t pull);
|
||||
|
||||
/**
|
||||
* s3c24xx_gpio_setpull_1down() - Pull configuration for choice of down or none
|
||||
* @chip: The gpio chip that is being configured
|
||||
* @off: The offset for the GPIO being configured
|
||||
* @param: pull: The pull mode being requested
|
||||
*
|
||||
* This is a helper function for the case where we have GPIOs with one
|
||||
* bit configuring the presence of a pull-down resistor.
|
||||
*/
|
||||
extern int s3c24xx_gpio_setpull_1down(struct samsung_gpio_chip *chip,
|
||||
unsigned int off, samsung_gpio_pull_t pull);
|
||||
|
||||
/**
|
||||
* samsung_gpio_setpull_upown() - Pull configuration for choice of up,
|
||||
* down or none
|
||||
*
|
||||
* @chip: The gpio chip that is being configured.
|
||||
* @off: The offset for the GPIO being configured.
|
||||
* @param: pull: The pull mode being requested.
|
||||
*
|
||||
* This is a helper function for the case where we have GPIOs with two
|
||||
* bits configuring the presence of a pull resistor, in the following
|
||||
* order:
|
||||
* 00 = No pull resistor connected
|
||||
* 01 = Pull-up resistor connected
|
||||
* 10 = Pull-down resistor connected
|
||||
*/
|
||||
extern int samsung_gpio_setpull_updown(struct samsung_gpio_chip *chip,
|
||||
unsigned int off, samsung_gpio_pull_t pull);
|
||||
|
||||
/**
|
||||
* samsung_gpio_getpull_updown() - Get configuration for choice of up,
|
||||
* down or none
|
||||
*
|
||||
* @chip: The gpio chip that the GPIO pin belongs to
|
||||
* @off: The offset to the pin to get the configuration of.
|
||||
*
|
||||
* This helper function reads the state of the pull-{up,down} resistor
|
||||
* for the given GPIO in the same case as samsung_gpio_setpull_upown.
|
||||
*/
|
||||
extern samsung_gpio_pull_t samsung_gpio_getpull_updown(struct samsung_gpio_chip *chip,
|
||||
unsigned int off);
|
||||
|
||||
/**
|
||||
* s3c24xx_gpio_getpull_1up() - Get configuration for choice of up or none
|
||||
* @chip: The gpio chip that the GPIO pin belongs to
|
||||
* @off: The offset to the pin to get the configuration of.
|
||||
*
|
||||
* This helper function reads the state of the pull-up resistor for the
|
||||
* given GPIO in the same case as s3c24xx_gpio_setpull_1up.
|
||||
*/
|
||||
extern samsung_gpio_pull_t s3c24xx_gpio_getpull_1up(struct samsung_gpio_chip *chip,
|
||||
unsigned int off);
|
||||
|
||||
/**
|
||||
* s3c24xx_gpio_getpull_1down() - Get configuration for choice of down or none
|
||||
* @chip: The gpio chip that the GPIO pin belongs to
|
||||
* @off: The offset to the pin to get the configuration of.
|
||||
*
|
||||
* This helper function reads the state of the pull-down resistor for the
|
||||
* given GPIO in the same case as s3c24xx_gpio_setpull_1down.
|
||||
*/
|
||||
extern samsung_gpio_pull_t s3c24xx_gpio_getpull_1down(struct samsung_gpio_chip *chip,
|
||||
unsigned int off);
|
||||
|
||||
/**
|
||||
* s3c2443_gpio_setpull() - Pull configuration for s3c2443.
|
||||
* @chip: The gpio chip that is being configured.
|
||||
* @off: The offset for the GPIO being configured.
|
||||
* @param: pull: The pull mode being requested.
|
||||
*
|
||||
* This is a helper function for the case where we have GPIOs with two
|
||||
* bits configuring the presence of a pull resistor, in the following
|
||||
* order:
|
||||
* 00 = Pull-up resistor connected
|
||||
* 10 = Pull-down resistor connected
|
||||
* x1 = No pull up resistor
|
||||
*/
|
||||
extern int s3c2443_gpio_setpull(struct samsung_gpio_chip *chip,
|
||||
unsigned int off, samsung_gpio_pull_t pull);
|
||||
|
||||
/**
|
||||
* s3c2443_gpio_getpull() - Get configuration for s3c2443 pull resistors
|
||||
* @chip: The gpio chip that the GPIO pin belongs to.
|
||||
* @off: The offset to the pin to get the configuration of.
|
||||
*
|
||||
* This helper function reads the state of the pull-{up,down} resistor for the
|
||||
* given GPIO in the same case as samsung_gpio_setpull_upown.
|
||||
*/
|
||||
extern samsung_gpio_pull_t s3c2443_gpio_getpull(struct samsung_gpio_chip *chip,
|
||||
unsigned int off);
|
||||
|
||||
#endif /* __PLAT_GPIO_CFG_HELPERS_H */
|
||||
|
||||
@@ -94,17 +94,6 @@ struct samsung_gpio_cfg {
|
||||
*/
|
||||
extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to);
|
||||
|
||||
/**
|
||||
* s3c_gpio_getcfg - Read the current function for a GPIO pin
|
||||
* @pin: The pin to read the configuration value for.
|
||||
*
|
||||
* Read the configuration state of the given @pin, returning a value that
|
||||
* could be passed back to s3c_gpio_cfgpin().
|
||||
*
|
||||
* @sa s3c_gpio_cfgpin
|
||||
*/
|
||||
extern unsigned s3c_gpio_getcfg(unsigned int pin);
|
||||
|
||||
/**
|
||||
* s3c_gpio_cfgpin_range() - Change the GPIO function for configuring pin range
|
||||
* @start: The pin number to start at
|
||||
@@ -142,14 +131,6 @@ extern int s3c_gpio_cfgpin_range(unsigned int start, unsigned int nr,
|
||||
*/
|
||||
extern int s3c_gpio_setpull(unsigned int pin, samsung_gpio_pull_t pull);
|
||||
|
||||
/**
|
||||
* s3c_gpio_getpull() - get the pull resistor state of a gpio pin
|
||||
* @pin: The pin number to get the settings for
|
||||
*
|
||||
* Read the pull resistor value for the specified pin.
|
||||
*/
|
||||
extern samsung_gpio_pull_t s3c_gpio_getpull(unsigned int pin);
|
||||
|
||||
/* configure `all` aspects of an gpio */
|
||||
|
||||
/**
|
||||
|
||||
@@ -93,9 +93,6 @@ static inline struct samsung_gpio_chip *to_samsung_gpio(struct gpio_chip *gpc)
|
||||
*/
|
||||
extern int samsung_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset);
|
||||
|
||||
/* exported for core SoC support to change */
|
||||
extern struct samsung_gpio_cfg s3c24xx_gpiocfg_default;
|
||||
|
||||
#ifdef CONFIG_S3C_GPIO_TRACK
|
||||
extern struct samsung_gpio_chip *s3c_gpios[S3C_GPIO_END];
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -28,11 +28,4 @@ static inline void s3c_i2c1_setname(char *name)
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void s3c_i2c2_setname(char *name)
|
||||
{
|
||||
#ifdef CONFIG_S3C_DEV_I2C2
|
||||
s3c_device_i2c2.name = name;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* __ASM_ARCH_IIC_H */
|
||||
|
||||
@@ -63,29 +63,6 @@ void __init s3c_init_cpu(unsigned long idcode,
|
||||
pr_err("The platform is deprecated and scheduled for removal. Please reach to the maintainers of the platform and linux-samsung-soc@vger.kernel.org if you still use it. Without such feedback, the platform will be removed after 2022.\n");
|
||||
}
|
||||
|
||||
/* s3c24xx_init_clocks
|
||||
*
|
||||
* Initialise the clock subsystem and associated information from the
|
||||
* given master crystal value.
|
||||
*
|
||||
* xtal = 0 -> use default PLL crystal value (normally 12MHz)
|
||||
* != 0 -> PLL crystal value in Hz
|
||||
*/
|
||||
|
||||
void __init s3c24xx_init_clocks(int xtal)
|
||||
{
|
||||
if (xtal == 0)
|
||||
xtal = 12*1000*1000;
|
||||
|
||||
if (cpu == NULL)
|
||||
panic("s3c24xx_init_clocks: no cpu setup?\n");
|
||||
|
||||
if (cpu->init_clocks == NULL)
|
||||
panic("s3c24xx_init_clocks: cpu has no clock init\n");
|
||||
else
|
||||
(cpu->init_clocks)(xtal);
|
||||
}
|
||||
|
||||
/* uart management */
|
||||
#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS)
|
||||
static int nr_uarts __initdata = 0;
|
||||
@@ -150,8 +127,7 @@ static int __init s3c_arch_init(void)
|
||||
int ret;
|
||||
|
||||
/* init is only needed for ATAGS based platforms */
|
||||
if (!IS_ENABLED(CONFIG_ATAGS) ||
|
||||
(!soc_is_s3c24xx() && !soc_is_s3c64xx()))
|
||||
if (!IS_ENABLED(CONFIG_ATAGS))
|
||||
return 0;
|
||||
|
||||
// do the correct init for cpu
|
||||
|
||||
@@ -11,20 +11,6 @@
|
||||
|
||||
#include "map.h"
|
||||
|
||||
#define S3C24XX_VA_IRQ S3C_VA_IRQ
|
||||
#define S3C24XX_VA_MEMCTRL S3C_VA_MEM
|
||||
#define S3C24XX_VA_UART S3C_VA_UART
|
||||
|
||||
#define S3C24XX_VA_TIMER S3C_VA_TIMER
|
||||
#define S3C24XX_VA_CLKPWR S3C_VA_SYS
|
||||
#define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG
|
||||
|
||||
#define S3C2412_VA_SSMC S3C_ADDR_CPU(0x00000000)
|
||||
#define S3C2412_VA_EBI S3C_ADDR_CPU(0x00100000)
|
||||
|
||||
#define S3C2410_PA_UART (0x50000000)
|
||||
#define S3C24XX_PA_UART S3C2410_PA_UART
|
||||
|
||||
/*
|
||||
* GPIO ports
|
||||
*
|
||||
@@ -35,11 +21,6 @@
|
||||
* 0xFA800000, which is not in the way of any current mapping
|
||||
* by the base system.
|
||||
*/
|
||||
|
||||
#define S3C2410_PA_GPIO (0x56000000)
|
||||
#define S3C24XX_PA_GPIO S3C2410_PA_GPIO
|
||||
|
||||
#define S3C24XX_VA_GPIO ((S3C24XX_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART)
|
||||
#define S3C64XX_VA_GPIO S3C_ADDR_CPU(0x00000000)
|
||||
|
||||
#define S3C64XX_VA_MODEM S3C_ADDR_CPU(0x00100000)
|
||||
@@ -47,24 +28,6 @@
|
||||
|
||||
#define S3C_VA_USB_HSPHY S3C64XX_VA_USB_HSPHY
|
||||
|
||||
#define S3C2410_ADDR(x) S3C_ADDR(x)
|
||||
|
||||
/* deal with the registers that move under the 2412/2413 */
|
||||
|
||||
#if defined(CONFIG_CPU_S3C2412)
|
||||
#ifndef __ASSEMBLY__
|
||||
extern void __iomem *s3c24xx_va_gpio2;
|
||||
#endif
|
||||
#ifdef CONFIG_CPU_S3C2412_ONLY
|
||||
#define S3C24XX_VA_GPIO2 (S3C24XX_VA_GPIO + 0x10)
|
||||
#else
|
||||
#define S3C24XX_VA_GPIO2 s3c24xx_va_gpio2
|
||||
#endif
|
||||
#else
|
||||
#define s3c24xx_va_gpio2 S3C24XX_VA_GPIO
|
||||
#define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO
|
||||
#endif
|
||||
|
||||
#include "map-s5p.h"
|
||||
|
||||
#endif /* __ASM_PLAT_MAP_S3C_H */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user