Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
3513f2e1
Commit
3513f2e1
authored
Sep 08, 2009
by
Kevin Hilman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'davinci-backports'
parents
b61dd8a7
c3767d47
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
92 additions
and
3 deletions
+92
-3
drivers/mtd/mtdpart.c
drivers/mtd/mtdpart.c
+40
-0
drivers/net/davinci_emac.c
drivers/net/davinci_emac.c
+1
-1
drivers/staging/panel/panel.c
drivers/staging/panel/panel.c
+48
-2
include/linux/mtd/partitions.h
include/linux/mtd/partitions.h
+3
-0
No files found.
drivers/mtd/mtdpart.c
View file @
3513f2e1
...
...
@@ -26,6 +26,7 @@ static LIST_HEAD(mtd_partitions);
struct
mtd_part
{
struct
mtd_info
mtd
;
struct
mtd_info
*
master
;
struct
memory_accessor
macc
;
uint64_t
offset
;
struct
list_head
list
;
};
...
...
@@ -327,6 +328,39 @@ int del_mtd_partitions(struct mtd_info *master)
}
EXPORT_SYMBOL
(
del_mtd_partitions
);
/*
* This lets other kernel code access the flash data. For example, it
* might hold a board's Ethernet address, or board-specific calibration
* data generated on the manufacturing floor.
*/
static
ssize_t
mtd_macc_read
(
struct
memory_accessor
*
macc
,
char
*
buf
,
off_t
offset
,
size_t
count
)
{
struct
mtd_part
*
part
=
container_of
(
macc
,
struct
mtd_part
,
macc
);
ssize_t
ret
=
-
EIO
;
size_t
retlen
;
if
(
part_read
((
struct
mtd_info
*
)
part
,
offset
,
count
,
&
retlen
,
buf
)
==
0
)
ret
=
retlen
;
return
ret
;
}
static
ssize_t
mtd_macc_write
(
struct
memory_accessor
*
macc
,
const
char
*
buf
,
off_t
offset
,
size_t
count
)
{
struct
mtd_part
*
part
=
container_of
(
macc
,
struct
mtd_part
,
macc
);
ssize_t
ret
=
-
EIO
;
size_t
retlen
;
if
(
part_write
((
struct
mtd_info
*
)
part
,
offset
,
count
,
&
retlen
,
buf
)
==
0
)
ret
=
retlen
;
return
ret
;
}
static
struct
mtd_part
*
add_one_partition
(
struct
mtd_info
*
master
,
const
struct
mtd_partition
*
part
,
int
partno
,
uint64_t
cur_offset
)
...
...
@@ -364,6 +398,9 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
slave
->
mtd
.
read
=
part_read
;
slave
->
mtd
.
write
=
part_write
;
slave
->
macc
.
read
=
mtd_macc_read
;
slave
->
macc
.
write
=
mtd_macc_write
;
if
(
master
->
panic_write
)
slave
->
mtd
.
panic_write
=
part_panic_write
;
...
...
@@ -428,6 +465,9 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
printk
(
KERN_NOTICE
"0x%012llx-0x%012llx :
\"
%s
\"\n
"
,
(
unsigned
long
long
)
slave
->
offset
,
(
unsigned
long
long
)(
slave
->
offset
+
slave
->
mtd
.
size
),
slave
->
mtd
.
name
);
if
(
part
->
setup
)
part
->
setup
(
&
slave
->
macc
,
(
void
*
)
part
->
context
);
/* let's do some sanity checks */
if
(
slave
->
offset
>=
master
->
size
)
{
/* let's register it anyway to preserve ordering */
...
...
drivers/net/davinci_emac.c
View file @
3513f2e1
...
...
@@ -2817,7 +2817,7 @@ static int __init davinci_emac_init(void)
{
return
platform_driver_register
(
&
davinci_emac_driver
);
}
module_init
(
davinci_emac_init
);
late_initcall
(
davinci_emac_init
);
/**
* davinci_emac_exit: EMAC driver module exit
...
...
drivers/staging/panel/panel.c
View file @
3513f2e1
...
...
@@ -243,6 +243,7 @@ static unsigned char lcd_bits[LCD_PORTS][LCD_BITS][BIT_STATES];
*/
#define LCD_PROTO_PARALLEL 0
#define LCD_PROTO_SERIAL 1
#define LCD_PROTO_TI_DA8XX_LCD 2
/*
* LCD character sets
...
...
@@ -440,7 +441,8 @@ MODULE_PARM_DESC(lcd_type,
static
int
lcd_proto
=
-
1
;
module_param
(
lcd_proto
,
int
,
0000
);
MODULE_PARM_DESC
(
lcd_proto
,
"LCD communication: 0=parallel (//), 1=serial"
);
MODULE_PARM_DESC
(
lcd_proto
,
"LCD communication: 0=parallel (//), 1=serial,"
"2=TI LCD Interface"
);
static
int
lcd_charset
=
-
1
;
module_param
(
lcd_charset
,
int
,
0000
);
...
...
@@ -797,6 +799,26 @@ static void lcd_write_data_p8(int data)
spin_unlock
(
&
pprt_lock
);
}
/* send a command to the TI LCD panel */
static
void
lcd_write_cmd_tilcd
(
int
cmd
)
{
spin_lock
(
&
pprt_lock
);
/* present the data to the control port */
w_ctr
(
pprt
,
cmd
);
udelay
(
60
);
spin_unlock
(
&
pprt_lock
);
}
/* send data to the TI LCD panel */
static
void
lcd_write_data_tilcd
(
int
data
)
{
spin_lock
(
&
pprt_lock
);
/* present the data to the data port */
w_dtr
(
pprt
,
data
);
udelay
(
60
);
spin_unlock
(
&
pprt_lock
);
}
static
void
lcd_gotoxy
(
void
)
{
lcd_write_cmd
(
0x80
/* set DDRAM address */
...
...
@@ -870,6 +892,26 @@ static void lcd_clear_fast_p8(void)
lcd_gotoxy
();
}
/* fills the display with spaces and resets X/Y */
static
void
lcd_clear_fast_tilcd
(
void
)
{
int
pos
;
lcd_addr_x
=
lcd_addr_y
=
0
;
lcd_gotoxy
();
spin_lock
(
&
pprt_lock
);
for
(
pos
=
0
;
pos
<
lcd_height
*
lcd_hwidth
;
pos
++
)
{
/* present the data to the data port */
w_dtr
(
pprt
,
' '
);
udelay
(
60
);
}
spin_unlock
(
&
pprt_lock
);
lcd_addr_x
=
lcd_addr_y
=
0
;
lcd_gotoxy
();
}
/* clears the display and resets X/Y */
static
void
lcd_clear_display
(
void
)
{
...
...
@@ -1396,7 +1438,7 @@ void lcd_init(void)
if
(
lcd_da_pin
==
PIN_NOT_SET
)
lcd_da_pin
=
DEFAULT_LCD_PIN_SDA
;
}
else
{
/* PARALLEL */
}
else
if
(
lcd_proto
==
LCD_PROTO_PARALLEL
)
{
/* PARALLEL */
lcd_write_cmd
=
lcd_write_cmd_p8
;
lcd_write_data
=
lcd_write_data_p8
;
lcd_clear_fast
=
lcd_clear_fast_p8
;
...
...
@@ -1407,6 +1449,10 @@ void lcd_init(void)
lcd_rs_pin
=
DEFAULT_LCD_PIN_RS
;
if
(
lcd_rw_pin
==
PIN_NOT_SET
)
lcd_rw_pin
=
DEFAULT_LCD_PIN_RW
;
}
else
{
lcd_write_cmd
=
lcd_write_cmd_tilcd
;
lcd_write_data
=
lcd_write_data_tilcd
;
lcd_clear_fast
=
lcd_clear_fast_tilcd
;
}
if
(
lcd_bl_pin
==
PIN_NOT_SET
)
...
...
include/linux/mtd/partitions.h
View file @
3513f2e1
...
...
@@ -10,6 +10,7 @@
#define MTD_PARTITIONS_H
#include <linux/types.h>
#include <linux/memory.h>
/*
...
...
@@ -40,6 +41,8 @@ struct mtd_partition {
uint64_t
offset
;
/* offset within the master MTD space */
uint32_t
mask_flags
;
/* master MTD flags to mask out for this partition */
struct
nand_ecclayout
*
ecclayout
;
/* out of band layout for this partition (NAND only)*/
void
(
*
setup
)(
struct
memory_accessor
*
,
void
*
context
);
void
*
context
;
};
#define MTDPART_OFS_NXTBLK (-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