Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a3d93584
Commit
a3d93584
authored
Aug 20, 2011
by
Kukjin Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: S5P64X0: Use soc_is_s5p64x0() to distinguish cpu at runtime
Signed-off-by:
Kukjin Kim
<
kgene.kim@samsung.com
>
parent
c06af3cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
16 deletions
+9
-16
arch/arm/mach-s5p64x0/dev-spi.c
arch/arm/mach-s5p64x0/dev-spi.c
+3
-5
arch/arm/mach-s5p64x0/dma.c
arch/arm/mach-s5p64x0/dma.c
+2
-5
arch/arm/mach-s5p64x0/gpiolib.c
arch/arm/mach-s5p64x0/gpiolib.c
+2
-5
arch/arm/mach-s5p64x0/irq-eint.c
arch/arm/mach-s5p64x0/irq-eint.c
+2
-1
No files found.
arch/arm/mach-s5p64x0/dev-spi.c
View file @
a3d93584
...
...
@@ -21,6 +21,7 @@
#include <mach/regs-clock.h>
#include <mach/spi-clocks.h>
#include <plat/cpu.h>
#include <plat/s3c64xx-spi.h>
#include <plat/gpio-cfg.h>
...
...
@@ -185,11 +186,8 @@ struct platform_device s5p64x0_device_spi1 = {
void
__init
s5p64x0_spi_set_info
(
int
cntrlr
,
int
src_clk_nr
,
int
num_cs
)
{
unsigned
int
id
;
struct
s3c64xx_spi_info
*
pd
;
id
=
__raw_readl
(
S5P64X0_SYS_ID
)
&
0xFF000
;
/* Reject invalid configuration */
if
(
!
num_cs
||
src_clk_nr
<
0
||
src_clk_nr
>
S5P64X0_SPI_SRCCLK_SCLK
)
{
...
...
@@ -199,7 +197,7 @@ void __init s5p64x0_spi_set_info(int cntrlr, int src_clk_nr, int num_cs)
switch
(
cntrlr
)
{
case
0
:
if
(
id
==
0x50000
)
if
(
soc_is_s5p6450
()
)
pd
=
&
s5p6450_spi0_pdata
;
else
pd
=
&
s5p6440_spi0_pdata
;
...
...
@@ -207,7 +205,7 @@ void __init s5p64x0_spi_set_info(int cntrlr, int src_clk_nr, int num_cs)
s5p64x0_device_spi0
.
dev
.
platform_data
=
pd
;
break
;
case
1
:
if
(
id
==
0x50000
)
if
(
soc_is_s5p6450
()
)
pd
=
&
s5p6450_spi1_pdata
;
else
pd
=
&
s5p6440_spi1_pdata
;
...
...
arch/arm/mach-s5p64x0/dma.c
View file @
a3d93584
...
...
@@ -28,6 +28,7 @@
#include <mach/irqs.h>
#include <mach/regs-clock.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/s3c-pl330-pdata.h>
...
...
@@ -133,11 +134,7 @@ static struct platform_device s5p64x0_device_pdma = {
static
int
__init
s5p64x0_dma_init
(
void
)
{
unsigned
int
id
;
id
=
__raw_readl
(
S5P64X0_SYS_ID
)
&
0xFF000
;
if
(
id
==
0x50000
)
if
(
soc_is_s5p6450
())
s5p64x0_device_pdma
.
dev
.
platform_data
=
&
s5p6450_pdma_pdata
;
else
s5p64x0_device_pdma
.
dev
.
platform_data
=
&
s5p6440_pdma_pdata
;
...
...
arch/arm/mach-s5p64x0/gpiolib.c
View file @
a3d93584
...
...
@@ -19,6 +19,7 @@
#include <mach/regs-gpio.h>
#include <mach/regs-clock.h>
#include <plat/cpu.h>
#include <plat/gpio-core.h>
#include <plat/gpio-cfg.h>
#include <plat/gpio-cfg-helpers.h>
...
...
@@ -473,14 +474,10 @@ static void __init s5p64x0_gpio_add_rbank_4bit2(struct s3c_gpio_chip *chip,
static
int
__init
s5p64x0_gpiolib_init
(
void
)
{
unsigned
int
chipid
;
chipid
=
__raw_readl
(
S5P64X0_SYS_ID
);
s5p64x0_gpiolib_set_cfg
(
s5p64x0_gpio_cfgs
,
ARRAY_SIZE
(
s5p64x0_gpio_cfgs
));
if
(
(
chipid
&
0xff000
)
==
0x50000
)
{
if
(
soc_is_s5p6450
()
)
{
samsung_gpiolib_add_2bit_chips
(
s5p6450_gpio_2bit
,
ARRAY_SIZE
(
s5p6450_gpio_2bit
));
...
...
arch/arm/mach-s5p64x0/irq-eint.c
View file @
a3d93584
...
...
@@ -17,6 +17,7 @@
#include <linux/irq.h>
#include <linux/io.h>
#include <plat/cpu.h>
#include <plat/regs-irqtype.h>
#include <plat/gpio-cfg.h>
...
...
@@ -67,7 +68,7 @@ static int s5p64x0_irq_eint_set_type(struct irq_data *data, unsigned int type)
__raw_writel
(
ctrl
,
S5P64X0_EINT0CON0
);
/* Configure the GPIO pin for 6450 or 6440 based on CPU ID */
if
(
0x50000
==
(
__raw_readl
(
S5P64X0_SYS_ID
)
&
0xFF000
))
if
(
soc_is_s5p6450
(
))
s3c_gpio_cfgpin
(
S5P6450_GPN
(
offs
),
S3C_GPIO_SFN
(
2
));
else
s3c_gpio_cfgpin
(
S5P6440_GPN
(
offs
),
S3C_GPIO_SFN
(
2
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment