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
ccfadbb7
Commit
ccfadbb7
authored
May 02, 2018
by
Sekhar Nori
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v4.18/nand-cs-simplification' into v4.18/soc
parents
8e730c7f
7c4db57c
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
26 additions
and
7 deletions
+26
-7
arch/arm/mach-davinci/aemif.c
arch/arm/mach-davinci/aemif.c
+4
-4
arch/arm/mach-davinci/board-da830-evm.c
arch/arm/mach-davinci/board-da830-evm.c
+1
-0
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/board-da850-evm.c
+1
-0
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm355-evm.c
+1
-0
arch/arm/mach-davinci/board-dm355-leopard.c
arch/arm/mach-davinci/board-dm355-leopard.c
+1
-0
arch/arm/mach-davinci/board-dm365-evm.c
arch/arm/mach-davinci/board-dm365-evm.c
+1
-0
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-dm644x-evm.c
+1
-0
arch/arm/mach-davinci/board-dm646x-evm.c
arch/arm/mach-davinci/board-dm646x-evm.c
+1
-0
arch/arm/mach-davinci/board-mityomapl138.c
arch/arm/mach-davinci/board-mityomapl138.c
+1
-0
arch/arm/mach-davinci/board-neuros-osd2.c
arch/arm/mach-davinci/board-neuros-osd2.c
+1
-0
drivers/mtd/nand/raw/davinci_nand.c
drivers/mtd/nand/raw/davinci_nand.c
+3
-3
include/linux/platform_data/mtd-davinci.h
include/linux/platform_data/mtd-davinci.h
+10
-0
No files found.
arch/arm/mach-davinci/aemif.c
View file @
ccfadbb7
...
@@ -189,7 +189,7 @@ int davinci_aemif_setup(struct platform_device *pdev)
...
@@ -189,7 +189,7 @@ int davinci_aemif_setup(struct platform_device *pdev)
* Setup Async configuration register in case we did not boot
* Setup Async configuration register in case we did not boot
* from NAND and so bootloader did not bother to set it up.
* from NAND and so bootloader did not bother to set it up.
*/
*/
val
=
davinci_aemif_readl
(
base
,
A1CR_OFFSET
+
pd
ev
->
id
*
4
);
val
=
davinci_aemif_readl
(
base
,
A1CR_OFFSET
+
pd
ata
->
core_chipsel
*
4
);
/*
/*
* Extended Wait is not valid and Select Strobe mode is not
* Extended Wait is not valid and Select Strobe mode is not
* used
* used
...
@@ -198,13 +198,13 @@ int davinci_aemif_setup(struct platform_device *pdev)
...
@@ -198,13 +198,13 @@ int davinci_aemif_setup(struct platform_device *pdev)
if
(
pdata
->
options
&
NAND_BUSWIDTH_16
)
if
(
pdata
->
options
&
NAND_BUSWIDTH_16
)
val
|=
0x1
;
val
|=
0x1
;
davinci_aemif_writel
(
base
,
A1CR_OFFSET
+
pd
ev
->
id
*
4
,
val
);
davinci_aemif_writel
(
base
,
A1CR_OFFSET
+
pd
ata
->
core_chipsel
*
4
,
val
);
clkrate
=
clk_get_rate
(
clk
);
clkrate
=
clk_get_rate
(
clk
);
if
(
pdata
->
timing
)
if
(
pdata
->
timing
)
ret
=
davinci_aemif_setup_timing
(
pdata
->
timing
,
base
,
pdev
->
id
,
ret
=
davinci_aemif_setup_timing
(
pdata
->
timing
,
base
,
clkrate
);
pdata
->
core_chipsel
,
clkrate
);
if
(
ret
<
0
)
if
(
ret
<
0
)
dev_dbg
(
&
pdev
->
dev
,
"NAND timing values setup fail
\n
"
);
dev_dbg
(
&
pdev
->
dev
,
"NAND timing values setup fail
\n
"
);
...
...
arch/arm/mach-davinci/board-da830-evm.c
View file @
ccfadbb7
...
@@ -310,6 +310,7 @@ static struct davinci_aemif_timing da830_evm_nandflash_timing = {
...
@@ -310,6 +310,7 @@ static struct davinci_aemif_timing da830_evm_nandflash_timing = {
};
};
static
struct
davinci_nand_pdata
da830_evm_nand_pdata
=
{
static
struct
davinci_nand_pdata
da830_evm_nand_pdata
=
{
.
core_chipsel
=
1
,
.
parts
=
da830_evm_nand_partitions
,
.
parts
=
da830_evm_nand_partitions
,
.
nr_parts
=
ARRAY_SIZE
(
da830_evm_nand_partitions
),
.
nr_parts
=
ARRAY_SIZE
(
da830_evm_nand_partitions
),
.
ecc_mode
=
NAND_ECC_HW
,
.
ecc_mode
=
NAND_ECC_HW
,
...
...
arch/arm/mach-davinci/board-da850-evm.c
View file @
ccfadbb7
...
@@ -244,6 +244,7 @@ static struct davinci_aemif_timing da850_evm_nandflash_timing = {
...
@@ -244,6 +244,7 @@ static struct davinci_aemif_timing da850_evm_nandflash_timing = {
};
};
static
struct
davinci_nand_pdata
da850_evm_nandflash_data
=
{
static
struct
davinci_nand_pdata
da850_evm_nandflash_data
=
{
.
core_chipsel
=
1
,
.
parts
=
da850_evm_nandflash_partition
,
.
parts
=
da850_evm_nandflash_partition
,
.
nr_parts
=
ARRAY_SIZE
(
da850_evm_nandflash_partition
),
.
nr_parts
=
ARRAY_SIZE
(
da850_evm_nandflash_partition
),
.
ecc_mode
=
NAND_ECC_HW
,
.
ecc_mode
=
NAND_ECC_HW
,
...
...
arch/arm/mach-davinci/board-dm355-evm.c
View file @
ccfadbb7
...
@@ -77,6 +77,7 @@ static struct mtd_partition davinci_nand_partitions[] = {
...
@@ -77,6 +77,7 @@ static struct mtd_partition davinci_nand_partitions[] = {
};
};
static
struct
davinci_nand_pdata
davinci_nand_data
=
{
static
struct
davinci_nand_pdata
davinci_nand_data
=
{
.
core_chipsel
=
0
,
.
mask_chipsel
=
BIT
(
14
),
.
mask_chipsel
=
BIT
(
14
),
.
parts
=
davinci_nand_partitions
,
.
parts
=
davinci_nand_partitions
,
.
nr_parts
=
ARRAY_SIZE
(
davinci_nand_partitions
),
.
nr_parts
=
ARRAY_SIZE
(
davinci_nand_partitions
),
...
...
arch/arm/mach-davinci/board-dm355-leopard.c
View file @
ccfadbb7
...
@@ -72,6 +72,7 @@ static struct mtd_partition davinci_nand_partitions[] = {
...
@@ -72,6 +72,7 @@ static struct mtd_partition davinci_nand_partitions[] = {
};
};
static
struct
davinci_nand_pdata
davinci_nand_data
=
{
static
struct
davinci_nand_pdata
davinci_nand_data
=
{
.
core_chipsel
=
0
,
.
mask_chipsel
=
BIT
(
14
),
.
mask_chipsel
=
BIT
(
14
),
.
parts
=
davinci_nand_partitions
,
.
parts
=
davinci_nand_partitions
,
.
nr_parts
=
ARRAY_SIZE
(
davinci_nand_partitions
),
.
nr_parts
=
ARRAY_SIZE
(
davinci_nand_partitions
),
...
...
arch/arm/mach-davinci/board-dm365-evm.c
View file @
ccfadbb7
...
@@ -138,6 +138,7 @@ static struct mtd_partition davinci_nand_partitions[] = {
...
@@ -138,6 +138,7 @@ static struct mtd_partition davinci_nand_partitions[] = {
};
};
static
struct
davinci_nand_pdata
davinci_nand_data
=
{
static
struct
davinci_nand_pdata
davinci_nand_data
=
{
.
core_chipsel
=
0
,
.
mask_chipsel
=
BIT
(
14
),
.
mask_chipsel
=
BIT
(
14
),
.
parts
=
davinci_nand_partitions
,
.
parts
=
davinci_nand_partitions
,
.
nr_parts
=
ARRAY_SIZE
(
davinci_nand_partitions
),
.
nr_parts
=
ARRAY_SIZE
(
davinci_nand_partitions
),
...
...
arch/arm/mach-davinci/board-dm644x-evm.c
View file @
ccfadbb7
...
@@ -152,6 +152,7 @@ static struct davinci_aemif_timing davinci_evm_nandflash_timing = {
...
@@ -152,6 +152,7 @@ static struct davinci_aemif_timing davinci_evm_nandflash_timing = {
};
};
static
struct
davinci_nand_pdata
davinci_evm_nandflash_data
=
{
static
struct
davinci_nand_pdata
davinci_evm_nandflash_data
=
{
.
core_chipsel
=
0
,
.
parts
=
davinci_evm_nandflash_partition
,
.
parts
=
davinci_evm_nandflash_partition
,
.
nr_parts
=
ARRAY_SIZE
(
davinci_evm_nandflash_partition
),
.
nr_parts
=
ARRAY_SIZE
(
davinci_evm_nandflash_partition
),
.
ecc_mode
=
NAND_ECC_HW
,
.
ecc_mode
=
NAND_ECC_HW
,
...
...
arch/arm/mach-davinci/board-dm646x-evm.c
View file @
ccfadbb7
...
@@ -84,6 +84,7 @@ static struct davinci_aemif_timing dm6467tevm_nandflash_timing = {
...
@@ -84,6 +84,7 @@ static struct davinci_aemif_timing dm6467tevm_nandflash_timing = {
};
};
static
struct
davinci_nand_pdata
davinci_nand_data
=
{
static
struct
davinci_nand_pdata
davinci_nand_data
=
{
.
core_chipsel
=
0
,
.
mask_cle
=
0x80000
,
.
mask_cle
=
0x80000
,
.
mask_ale
=
0x40000
,
.
mask_ale
=
0x40000
,
.
parts
=
davinci_nand_partitions
,
.
parts
=
davinci_nand_partitions
,
...
...
arch/arm/mach-davinci/board-mityomapl138.c
View file @
ccfadbb7
...
@@ -400,6 +400,7 @@ static struct mtd_partition mityomapl138_nandflash_partition[] = {
...
@@ -400,6 +400,7 @@ static struct mtd_partition mityomapl138_nandflash_partition[] = {
};
};
static
struct
davinci_nand_pdata
mityomapl138_nandflash_data
=
{
static
struct
davinci_nand_pdata
mityomapl138_nandflash_data
=
{
.
core_chipsel
=
1
,
.
parts
=
mityomapl138_nandflash_partition
,
.
parts
=
mityomapl138_nandflash_partition
,
.
nr_parts
=
ARRAY_SIZE
(
mityomapl138_nandflash_partition
),
.
nr_parts
=
ARRAY_SIZE
(
mityomapl138_nandflash_partition
),
.
ecc_mode
=
NAND_ECC_HW
,
.
ecc_mode
=
NAND_ECC_HW
,
...
...
arch/arm/mach-davinci/board-neuros-osd2.c
View file @
ccfadbb7
...
@@ -87,6 +87,7 @@ static struct mtd_partition davinci_ntosd2_nandflash_partition[] = {
...
@@ -87,6 +87,7 @@ static struct mtd_partition davinci_ntosd2_nandflash_partition[] = {
};
};
static
struct
davinci_nand_pdata
davinci_ntosd2_nandflash_data
=
{
static
struct
davinci_nand_pdata
davinci_ntosd2_nandflash_data
=
{
.
core_chipsel
=
0
,
.
parts
=
davinci_ntosd2_nandflash_partition
,
.
parts
=
davinci_ntosd2_nandflash_partition
,
.
nr_parts
=
ARRAY_SIZE
(
davinci_ntosd2_nandflash_partition
),
.
nr_parts
=
ARRAY_SIZE
(
davinci_ntosd2_nandflash_partition
),
.
ecc_mode
=
NAND_ECC_HW
,
.
ecc_mode
=
NAND_ECC_HW
,
...
...
drivers/mtd/nand/raw/davinci_nand.c
View file @
ccfadbb7
...
@@ -547,7 +547,7 @@ static struct davinci_nand_pdata
...
@@ -547,7 +547,7 @@ static struct davinci_nand_pdata
return
ERR_PTR
(
-
ENOMEM
);
return
ERR_PTR
(
-
ENOMEM
);
if
(
!
of_property_read_u32
(
pdev
->
dev
.
of_node
,
if
(
!
of_property_read_u32
(
pdev
->
dev
.
of_node
,
"ti,davinci-chipselect"
,
&
prop
))
"ti,davinci-chipselect"
,
&
prop
))
pd
ev
->
id
=
prop
;
pd
ata
->
core_chipsel
=
prop
;
else
else
return
ERR_PTR
(
-
EINVAL
);
return
ERR_PTR
(
-
EINVAL
);
...
@@ -629,7 +629,7 @@ static int nand_davinci_probe(struct platform_device *pdev)
...
@@ -629,7 +629,7 @@ static int nand_davinci_probe(struct platform_device *pdev)
return
-
ENODEV
;
return
-
ENODEV
;
/* which external chipselect will we be managing? */
/* which external chipselect will we be managing? */
if
(
pd
ev
->
id
<
0
||
pdev
->
id
>
3
)
if
(
pd
ata
->
core_chipsel
<
0
||
pdata
->
core_chipsel
>
3
)
return
-
ENODEV
;
return
-
ENODEV
;
info
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
*
info
),
GFP_KERNEL
);
info
=
devm_kzalloc
(
&
pdev
->
dev
,
sizeof
(
*
info
),
GFP_KERNEL
);
...
@@ -685,7 +685,7 @@ static int nand_davinci_probe(struct platform_device *pdev)
...
@@ -685,7 +685,7 @@ static int nand_davinci_probe(struct platform_device *pdev)
info
->
ioaddr
=
(
uint32_t
__force
)
vaddr
;
info
->
ioaddr
=
(
uint32_t
__force
)
vaddr
;
info
->
current_cs
=
info
->
ioaddr
;
info
->
current_cs
=
info
->
ioaddr
;
info
->
core_chipsel
=
pd
ev
->
id
;
info
->
core_chipsel
=
pd
ata
->
core_chipsel
;
info
->
mask_chipsel
=
pdata
->
mask_chipsel
;
info
->
mask_chipsel
=
pdata
->
mask_chipsel
;
/* use nandboot-capable ALE/CLE masks by default */
/* use nandboot-capable ALE/CLE masks by default */
...
...
include/linux/platform_data/mtd-davinci.h
View file @
ccfadbb7
...
@@ -56,6 +56,16 @@ struct davinci_nand_pdata { /* platform_data */
...
@@ -56,6 +56,16 @@ struct davinci_nand_pdata { /* platform_data */
uint32_t
mask_ale
;
uint32_t
mask_ale
;
uint32_t
mask_cle
;
uint32_t
mask_cle
;
/*
* 0-indexed chip-select number of the asynchronous
* interface to which the NAND device has been connected.
*
* So, if you have NAND connected to CS3 of DA850, you
* will pass '1' here. Since the asynchronous interface
* on DA850 starts from CS2.
*/
uint32_t
core_chipsel
;
/* for packages using two chipselects */
/* for packages using two chipselects */
uint32_t
mask_chipsel
;
uint32_t
mask_chipsel
;
...
...
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