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
c95dc93d
Commit
c95dc93d
authored
Nov 25, 2009
by
Kevin Hilman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'davinci-upstream-accepted' into davinci-reset
parents
3a0ee1fb
f62c0f46
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1128 additions
and
21 deletions
+1128
-21
arch/arm/mach-davinci/include/mach/keyscan.h
arch/arm/mach-davinci/include/mach/keyscan.h
+41
-0
drivers/input/keyboard/Kconfig
drivers/input/keyboard/Kconfig
+10
-0
drivers/input/keyboard/Makefile
drivers/input/keyboard/Makefile
+1
-0
drivers/input/keyboard/davinci_keyscan.c
drivers/input/keyboard/davinci_keyscan.c
+337
-0
drivers/mtd/mtdpart.c
drivers/mtd/mtdpart.c
+40
-0
drivers/mtd/nand/davinci_nand.c
drivers/mtd/nand/davinci_nand.c
+1
-1
drivers/net/davinci_emac.c
drivers/net/davinci_emac.c
+11
-15
drivers/rtc/Kconfig
drivers/rtc/Kconfig
+10
-0
drivers/rtc/Makefile
drivers/rtc/Makefile
+1
-0
drivers/rtc/rtc-davinci.c
drivers/rtc/rtc-davinci.c
+673
-0
drivers/rtc/rtc-omap.c
drivers/rtc/rtc-omap.c
+0
-5
include/linux/mtd/partitions.h
include/linux/mtd/partitions.h
+3
-0
No files found.
arch/arm/mach-davinci/include/mach/keyscan.h
0 → 100644
View file @
c95dc93d
/*
* Copyright (C) 2009 Texas Instruments, Inc
*
* Author: Miguel Aguilar <miguel.aguilar@ridgerun.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DAVINCI_KEYSCAN_H
#define DAVINCI_KEYSCAN_H
#include <linux/io.h>
enum
davinci_matrix_types
{
DAVINCI_KEYSCAN_MATRIX_4X4
,
DAVINCI_KEYSCAN_MATRIX_5X3
,
};
struct
davinci_ks_platform_data
{
unsigned
short
*
keymap
;
u32
keymapsize
;
u8
rep
:
1
;
u8
strobe
;
u8
interval
;
u8
matrix_type
;
};
#endif
drivers/input/keyboard/Kconfig
View file @
c95dc93d
...
@@ -423,4 +423,14 @@ config KEYBOARD_W90P910
...
@@ -423,4 +423,14 @@ config KEYBOARD_W90P910
To compile this driver as a module, choose M here: the
To compile this driver as a module, choose M here: the
module will be called w90p910_keypad.
module will be called w90p910_keypad.
config KEYBOARD_DAVINCI
tristate "TI DaVinci Key Scan"
depends on ARCH_DAVINCI_DM365
help
Say Y to enable keypad module support for the TI DaVinci
platforms (DM365).
To compile this driver as a module, choose M here: the
module will be called davinci_keyscan.
endif
endif
drivers/input/keyboard/Makefile
View file @
c95dc93d
...
@@ -37,3 +37,4 @@ obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o
...
@@ -37,3 +37,4 @@ obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o
obj-$(CONFIG_KEYBOARD_TWL4030)
+=
twl4030_keypad.o
obj-$(CONFIG_KEYBOARD_TWL4030)
+=
twl4030_keypad.o
obj-$(CONFIG_KEYBOARD_XTKBD)
+=
xtkbd.o
obj-$(CONFIG_KEYBOARD_XTKBD)
+=
xtkbd.o
obj-$(CONFIG_KEYBOARD_W90P910)
+=
w90p910_keypad.o
obj-$(CONFIG_KEYBOARD_W90P910)
+=
w90p910_keypad.o
obj-$(CONFIG_KEYBOARD_DAVINCI)
+=
davinci_keyscan.o
drivers/input/keyboard/davinci_keyscan.c
0 → 100644
View file @
c95dc93d
/*
* DaVinci Key Scan Driver for TI platforms
*
* Copyright (C) 2009 Texas Instruments, Inc
*
* Author: Miguel Aguilar <miguel.aguilar@ridgerun.com>
*
* Intial Code: Sandeep Paulraj <s-paulraj@ti.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/types.h>
#include <linux/input.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/errno.h>
#include <asm/irq.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/keyscan.h>
/* Key scan registers */
#define DAVINCI_KEYSCAN_KEYCTRL 0x0000
#define DAVINCI_KEYSCAN_INTENA 0x0004
#define DAVINCI_KEYSCAN_INTFLAG 0x0008
#define DAVINCI_KEYSCAN_INTCLR 0x000c
#define DAVINCI_KEYSCAN_STRBWIDTH 0x0010
#define DAVINCI_KEYSCAN_INTERVAL 0x0014
#define DAVINCI_KEYSCAN_CONTTIME 0x0018
#define DAVINCI_KEYSCAN_CURRENTST 0x001c
#define DAVINCI_KEYSCAN_PREVSTATE 0x0020
#define DAVINCI_KEYSCAN_EMUCTRL 0x0024
#define DAVINCI_KEYSCAN_IODFTCTRL 0x002c
/* Key Control Register (KEYCTRL) */
#define DAVINCI_KEYSCAN_KEYEN 0x00000001
#define DAVINCI_KEYSCAN_PREVMODE 0x00000002
#define DAVINCI_KEYSCAN_CHATOFF 0x00000004
#define DAVINCI_KEYSCAN_AUTODET 0x00000008
#define DAVINCI_KEYSCAN_SCANMODE 0x00000010
#define DAVINCI_KEYSCAN_OUTTYPE 0x00000020
/* Masks for the interrupts */
#define DAVINCI_KEYSCAN_INT_CONT 0x00000008
#define DAVINCI_KEYSCAN_INT_OFF 0x00000004
#define DAVINCI_KEYSCAN_INT_ON 0x00000002
#define DAVINCI_KEYSCAN_INT_CHANGE 0x00000001
#define DAVINCI_KEYSCAN_INT_ALL 0x0000000f
struct
davinci_ks
{
struct
input_dev
*
input
;
struct
davinci_ks_platform_data
*
pdata
;
int
irq
;
void
__iomem
*
base
;
resource_size_t
pbase
;
size_t
base_size
;
unsigned
short
keymap
[];
};
/* Initializing the kp Module */
static
int
__init
davinci_ks_initialize
(
struct
davinci_ks
*
davinci_ks
)
{
struct
device
*
dev
=
&
davinci_ks
->
input
->
dev
;
struct
davinci_ks_platform_data
*
pdata
=
davinci_ks
->
pdata
;
u32
matrix_ctrl
;
/* Enable all interrupts */
__raw_writel
(
DAVINCI_KEYSCAN_INT_ALL
,
davinci_ks
->
base
+
DAVINCI_KEYSCAN_INTENA
);
/* Clear interrupts if any */
__raw_writel
(
DAVINCI_KEYSCAN_INT_ALL
,
davinci_ks
->
base
+
DAVINCI_KEYSCAN_INTCLR
);
/* Setup the scan period = strobe + interval */
__raw_writel
(
pdata
->
strobe
,
davinci_ks
->
base
+
DAVINCI_KEYSCAN_STRBWIDTH
);
__raw_writel
(
pdata
->
interval
,
davinci_ks
->
base
+
DAVINCI_KEYSCAN_INTERVAL
);
__raw_writel
(
0x01
,
davinci_ks
->
base
+
DAVINCI_KEYSCAN_CONTTIME
);
/* Define matrix type */
switch
(
pdata
->
matrix_type
)
{
case
DAVINCI_KEYSCAN_MATRIX_4X4
:
matrix_ctrl
=
0
;
break
;
case
DAVINCI_KEYSCAN_MATRIX_5X3
:
matrix_ctrl
=
(
1
<<
6
);
break
;
default:
dev_err
(
dev
->
parent
,
"wrong matrix type
\n
"
);
return
-
EINVAL
;
}
/* Enable key scan module and set matrix type */
__raw_writel
(
DAVINCI_KEYSCAN_AUTODET
|
DAVINCI_KEYSCAN_KEYEN
|
matrix_ctrl
,
davinci_ks
->
base
+
DAVINCI_KEYSCAN_KEYCTRL
);
return
0
;
}
static
irqreturn_t
davinci_ks_interrupt
(
int
irq
,
void
*
dev_id
)
{
struct
davinci_ks
*
davinci_ks
=
dev_id
;
struct
device
*
dev
=
&
davinci_ks
->
input
->
dev
;
unsigned
short
*
keymap
=
davinci_ks
->
keymap
;
int
keymapsize
=
davinci_ks
->
pdata
->
keymapsize
;
u32
prev_status
,
new_status
,
changed
;
bool
release
;
int
keycode
=
KEY_UNKNOWN
;
int
i
;
/* Disable interrupt */
__raw_writel
(
0x0
,
davinci_ks
->
base
+
DAVINCI_KEYSCAN_INTENA
);
/* Reading previous and new status of the key scan */
prev_status
=
__raw_readl
(
davinci_ks
->
base
+
DAVINCI_KEYSCAN_PREVSTATE
);
new_status
=
__raw_readl
(
davinci_ks
->
base
+
DAVINCI_KEYSCAN_CURRENTST
);
changed
=
prev_status
^
new_status
;
if
(
changed
)
{
/*
* It goes through all bits in 'changed' to ensure
* that no key changes are being missed
*/
for
(
i
=
0
;
i
<
keymapsize
;
i
++
)
{
if
((
changed
>>
i
)
&
0x1
)
{
keycode
=
keymap
[
i
];
release
=
(
new_status
>>
i
)
&
0x1
;
dev_dbg
(
dev
->
parent
,
"key %d %s
\n
"
,
keycode
,
release
?
"released"
:
"pressed"
);
input_report_key
(
davinci_ks
->
input
,
keycode
,
!
release
);
input_sync
(
davinci_ks
->
input
);
}
}
/* Clearing interrupt */
__raw_writel
(
DAVINCI_KEYSCAN_INT_ALL
,
davinci_ks
->
base
+
DAVINCI_KEYSCAN_INTCLR
);
}
/* Enable interrupts */
__raw_writel
(
0x1
,
davinci_ks
->
base
+
DAVINCI_KEYSCAN_INTENA
);
return
IRQ_HANDLED
;
}
static
int
__init
davinci_ks_probe
(
struct
platform_device
*
pdev
)
{
struct
davinci_ks
*
davinci_ks
;
struct
input_dev
*
key_dev
;
struct
resource
*
res
,
*
mem
;
struct
device
*
dev
=
&
pdev
->
dev
;
struct
davinci_ks_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
int
error
,
i
;
if
(
!
pdata
->
keymap
)
{
dev_dbg
(
dev
,
"no keymap from pdata
\n
"
);
return
-
EINVAL
;
}
davinci_ks
=
kzalloc
(
sizeof
(
struct
davinci_ks
)
+
sizeof
(
unsigned
short
)
*
pdata
->
keymapsize
,
GFP_KERNEL
);
if
(
!
davinci_ks
)
{
dev_dbg
(
dev
,
"could not allocate memory for private data
\n
"
);
return
-
ENOMEM
;
}
memcpy
(
davinci_ks
->
keymap
,
pdata
->
keymap
,
sizeof
(
unsigned
short
)
*
pdata
->
keymapsize
);
key_dev
=
input_allocate_device
();
if
(
!
key_dev
)
{
dev_dbg
(
dev
,
"could not allocate input device
\n
"
);
error
=
-
ENOMEM
;
goto
fail1
;
}
davinci_ks
->
input
=
key_dev
;
davinci_ks
->
irq
=
platform_get_irq
(
pdev
,
0
);
if
(
davinci_ks
->
irq
<
0
)
{
dev_err
(
dev
,
"no key scan irq
\n
"
);
error
=
davinci_ks
->
irq
;
goto
fail2
;
}
res
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
if
(
!
res
)
{
dev_err
(
dev
,
"no mem resource
\n
"
);
error
=
-
EINVAL
;
goto
fail2
;
}
davinci_ks
->
pbase
=
res
->
start
;
davinci_ks
->
base_size
=
resource_size
(
res
);
mem
=
request_mem_region
(
davinci_ks
->
pbase
,
davinci_ks
->
base_size
,
pdev
->
name
);
if
(
!
mem
)
{
dev_err
(
dev
,
"key scan registers at %08x are not free
\n
"
,
davinci_ks
->
pbase
);
error
=
-
EBUSY
;
goto
fail2
;
}
davinci_ks
->
base
=
ioremap
(
davinci_ks
->
pbase
,
davinci_ks
->
base_size
);
if
(
!
davinci_ks
->
base
)
{
dev_err
(
dev
,
"can't ioremap MEM resource.
\n
"
);
error
=
-
ENOMEM
;
goto
fail3
;
}
/* Enable auto repeat feature of Linux input subsystem */
if
(
pdata
->
rep
)
__set_bit
(
EV_REP
,
key_dev
->
evbit
);
/* Setup input device */
__set_bit
(
EV_KEY
,
key_dev
->
evbit
);
/* Setup the platform data */
davinci_ks
->
pdata
=
pdata
;
for
(
i
=
0
;
i
<
davinci_ks
->
pdata
->
keymapsize
;
i
++
)
__set_bit
(
davinci_ks
->
pdata
->
keymap
[
i
],
key_dev
->
keybit
);
key_dev
->
name
=
"davinci_keyscan"
;
key_dev
->
phys
=
"davinci_keyscan/input0"
;
key_dev
->
dev
.
parent
=
&
pdev
->
dev
;
key_dev
->
id
.
bustype
=
BUS_HOST
;
key_dev
->
id
.
vendor
=
0x0001
;
key_dev
->
id
.
product
=
0x0001
;
key_dev
->
id
.
version
=
0x0001
;
key_dev
->
keycode
=
davinci_ks
->
keymap
;
key_dev
->
keycodesize
=
sizeof
(
davinci_ks
->
keymap
[
0
]);
key_dev
->
keycodemax
=
davinci_ks
->
pdata
->
keymapsize
;
error
=
input_register_device
(
davinci_ks
->
input
);
if
(
error
<
0
)
{
dev_err
(
dev
,
"unable to register davinci key scan device
\n
"
);
goto
fail4
;
}
error
=
request_irq
(
davinci_ks
->
irq
,
davinci_ks_interrupt
,
IRQF_DISABLED
,
pdev
->
name
,
davinci_ks
);
if
(
error
<
0
)
{
dev_err
(
dev
,
"unable to register davinci key scan interrupt
\n
"
);
goto
fail5
;
}
error
=
davinci_ks_initialize
(
davinci_ks
);
if
(
error
<
0
)
{
dev_err
(
dev
,
"unable to initialize davinci key scan device
\n
"
);
goto
fail6
;
}
platform_set_drvdata
(
pdev
,
davinci_ks
);
return
0
;
fail6:
free_irq
(
davinci_ks
->
irq
,
davinci_ks
);
fail5:
input_unregister_device
(
davinci_ks
->
input
);
key_dev
=
NULL
;
fail4:
iounmap
(
davinci_ks
->
base
);
fail3:
release_mem_region
(
davinci_ks
->
pbase
,
davinci_ks
->
base_size
);
fail2:
input_free_device
(
key_dev
);
fail1:
kfree
(
davinci_ks
);
return
error
;
}
static
int
__devexit
davinci_ks_remove
(
struct
platform_device
*
pdev
)
{
struct
davinci_ks
*
davinci_ks
=
platform_get_drvdata
(
pdev
);
free_irq
(
davinci_ks
->
irq
,
davinci_ks
);
input_unregister_device
(
davinci_ks
->
input
);
iounmap
(
davinci_ks
->
base
);
release_mem_region
(
davinci_ks
->
pbase
,
davinci_ks
->
base_size
);
platform_set_drvdata
(
pdev
,
NULL
);
kfree
(
davinci_ks
);
return
0
;
}
static
struct
platform_driver
davinci_ks_driver
=
{
.
driver
=
{
.
name
=
"davinci_keyscan"
,
.
owner
=
THIS_MODULE
,
},
.
remove
=
__devexit_p
(
davinci_ks_remove
),
};
static
int
__init
davinci_ks_init
(
void
)
{
return
platform_driver_probe
(
&
davinci_ks_driver
,
davinci_ks_probe
);
}
module_init
(
davinci_ks_init
);
static
void
__exit
davinci_ks_exit
(
void
)
{
platform_driver_unregister
(
&
davinci_ks_driver
);
}
module_exit
(
davinci_ks_exit
);
MODULE_AUTHOR
(
"Miguel Aguilar"
);
MODULE_DESCRIPTION
(
"Texas Instruments DaVinci Key Scan Driver"
);
MODULE_LICENSE
(
"GPL"
);
drivers/mtd/mtdpart.c
View file @
c95dc93d
...
@@ -26,6 +26,7 @@ static LIST_HEAD(mtd_partitions);
...
@@ -26,6 +26,7 @@ static LIST_HEAD(mtd_partitions);
struct
mtd_part
{
struct
mtd_part
{
struct
mtd_info
mtd
;
struct
mtd_info
mtd
;
struct
mtd_info
*
master
;
struct
mtd_info
*
master
;
struct
memory_accessor
macc
;
uint64_t
offset
;
uint64_t
offset
;
struct
list_head
list
;
struct
list_head
list
;
};
};
...
@@ -327,6 +328,39 @@ int del_mtd_partitions(struct mtd_info *master)
...
@@ -327,6 +328,39 @@ int del_mtd_partitions(struct mtd_info *master)
}
}
EXPORT_SYMBOL
(
del_mtd_partitions
);
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
,
static
struct
mtd_part
*
add_one_partition
(
struct
mtd_info
*
master
,
const
struct
mtd_partition
*
part
,
int
partno
,
const
struct
mtd_partition
*
part
,
int
partno
,
uint64_t
cur_offset
)
uint64_t
cur_offset
)
...
@@ -364,6 +398,9 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
...
@@ -364,6 +398,9 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
slave
->
mtd
.
read
=
part_read
;
slave
->
mtd
.
read
=
part_read
;
slave
->
mtd
.
write
=
part_write
;
slave
->
mtd
.
write
=
part_write
;
slave
->
macc
.
read
=
mtd_macc_read
;
slave
->
macc
.
write
=
mtd_macc_write
;
if
(
master
->
panic_write
)
if
(
master
->
panic_write
)
slave
->
mtd
.
panic_write
=
part_panic_write
;
slave
->
mtd
.
panic_write
=
part_panic_write
;
...
@@ -428,6 +465,9 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
...
@@ -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
,
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
);
(
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 */
/* let's do some sanity checks */
if
(
slave
->
offset
>=
master
->
size
)
{
if
(
slave
->
offset
>=
master
->
size
)
{
/* let's register it anyway to preserve ordering */
/* let's register it anyway to preserve ordering */
...
...
drivers/mtd/nand/davinci_nand.c
View file @
c95dc93d
...
@@ -599,7 +599,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
...
@@ -599,7 +599,7 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
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 */
info
->
mask_ale
=
pdata
->
mask_
c
le
?
:
MASK_ALE
;
info
->
mask_ale
=
pdata
->
mask_
a
le
?
:
MASK_ALE
;
info
->
mask_cle
=
pdata
->
mask_cle
?
:
MASK_CLE
;
info
->
mask_cle
=
pdata
->
mask_cle
?
:
MASK_CLE
;
/* Set address of hardware control function */
/* Set address of hardware control function */
...
...
drivers/net/davinci_emac.c
View file @
c95dc93d
...
@@ -164,16 +164,14 @@ static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1";
...
@@ -164,16 +164,14 @@ static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1";
# define EMAC_MBP_MCASTCHAN(ch) ((ch) & 0x7)
# define EMAC_MBP_MCASTCHAN(ch) ((ch) & 0x7)
/* EMAC mac_control register */
/* EMAC mac_control register */
#define EMAC_MACCONTROL_TXPTYPE (0x200)
#define EMAC_MACCONTROL_TXPTYPE BIT(9)
#define EMAC_MACCONTROL_TXPACEEN (0x40)
#define EMAC_MACCONTROL_TXPACEEN BIT(6)
#define EMAC_MACCONTROL_MIIEN (0x20)
#define EMAC_MACCONTROL_GMIIEN BIT(5)
#define EMAC_MACCONTROL_GIGABITEN (0x80)
#define EMAC_MACCONTROL_GIGABITEN BIT(7)
#define EMAC_MACCONTROL_GIGABITEN_SHIFT (7)
#define EMAC_MACCONTROL_FULLDUPLEXEN BIT(0)
#define EMAC_MACCONTROL_FULLDUPLEXEN (0x1)
#define EMAC_MACCONTROL_RMIISPEED_MASK BIT(15)
#define EMAC_MACCONTROL_RMIISPEED_MASK BIT(15)
/* GIGABIT MODE related bits */
/* GIGABIT MODE related bits */
#define EMAC_DM646X_MACCONTORL_GMIIEN BIT(5)
#define EMAC_DM646X_MACCONTORL_GIG BIT(7)
#define EMAC_DM646X_MACCONTORL_GIG BIT(7)
#define EMAC_DM646X_MACCONTORL_GIGFORCE BIT(17)
#define EMAC_DM646X_MACCONTORL_GIGFORCE BIT(17)
...
@@ -192,10 +190,10 @@ static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1";
...
@@ -192,10 +190,10 @@ static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1";
#define EMAC_RX_BUFFER_OFFSET_MASK (0xFFFF)
#define EMAC_RX_BUFFER_OFFSET_MASK (0xFFFF)
/* MAC_IN_VECTOR (0x180) register bit fields */
/* MAC_IN_VECTOR (0x180) register bit fields */
#define EMAC_DM644X_MAC_IN_VECTOR_HOST_INT
(0x20000
)
#define EMAC_DM644X_MAC_IN_VECTOR_HOST_INT
BIT(17
)
#define EMAC_DM644X_MAC_IN_VECTOR_STATPEND_INT
(0x10000
)
#define EMAC_DM644X_MAC_IN_VECTOR_STATPEND_INT
BIT(16
)
#define EMAC_DM644X_MAC_IN_VECTOR_RX_INT_VEC
(0x0100
)
#define EMAC_DM644X_MAC_IN_VECTOR_RX_INT_VEC
BIT(8
)
#define EMAC_DM644X_MAC_IN_VECTOR_TX_INT_VEC
(0x01
)
#define EMAC_DM644X_MAC_IN_VECTOR_TX_INT_VEC
BIT(0
)
/** NOTE:: For DM646x the IN_VECTOR has changed */
/** NOTE:: For DM646x the IN_VECTOR has changed */
#define EMAC_DM646X_MAC_IN_VECTOR_RX_INT_VEC BIT(EMAC_DEF_RX_CH)
#define EMAC_DM646X_MAC_IN_VECTOR_RX_INT_VEC BIT(EMAC_DEF_RX_CH)
...
@@ -203,7 +201,6 @@ static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1";
...
@@ -203,7 +201,6 @@ static const char emac_version_string[] = "TI DaVinci EMAC Linux v6.1";
#define EMAC_DM646X_MAC_IN_VECTOR_HOST_INT BIT(26)
#define EMAC_DM646X_MAC_IN_VECTOR_HOST_INT BIT(26)
#define EMAC_DM646X_MAC_IN_VECTOR_STATPEND_INT BIT(27)
#define EMAC_DM646X_MAC_IN_VECTOR_STATPEND_INT BIT(27)
/* CPPI bit positions */
/* CPPI bit positions */
#define EMAC_CPPI_SOP_BIT BIT(31)
#define EMAC_CPPI_SOP_BIT BIT(31)
#define EMAC_CPPI_EOP_BIT BIT(30)
#define EMAC_CPPI_EOP_BIT BIT(30)
...
@@ -750,8 +747,7 @@ static void emac_update_phystatus(struct emac_priv *priv)
...
@@ -750,8 +747,7 @@ static void emac_update_phystatus(struct emac_priv *priv)
if
(
priv
->
speed
==
SPEED_1000
&&
(
priv
->
version
==
EMAC_VERSION_2
))
{
if
(
priv
->
speed
==
SPEED_1000
&&
(
priv
->
version
==
EMAC_VERSION_2
))
{
mac_control
=
emac_read
(
EMAC_MACCONTROL
);
mac_control
=
emac_read
(
EMAC_MACCONTROL
);
mac_control
|=
(
EMAC_DM646X_MACCONTORL_GMIIEN
|
mac_control
|=
(
EMAC_DM646X_MACCONTORL_GIG
|
EMAC_DM646X_MACCONTORL_GIG
|
EMAC_DM646X_MACCONTORL_GIGFORCE
);
EMAC_DM646X_MACCONTORL_GIGFORCE
);
}
else
{
}
else
{
/* Clear the GIG bit and GIGFORCE bit */
/* Clear the GIG bit and GIGFORCE bit */
...
@@ -2108,7 +2104,7 @@ static int emac_hw_enable(struct emac_priv *priv)
...
@@ -2108,7 +2104,7 @@ static int emac_hw_enable(struct emac_priv *priv)
/* Enable MII */
/* Enable MII */
val
=
emac_read
(
EMAC_MACCONTROL
);
val
=
emac_read
(
EMAC_MACCONTROL
);
val
|=
(
EMAC_MACCONTROL_MIIEN
);
val
|=
(
EMAC_MACCONTROL_
G
MIIEN
);
emac_write
(
EMAC_MACCONTROL
,
val
);
emac_write
(
EMAC_MACCONTROL
,
val
);
/* Enable NAPI and interrupts */
/* Enable NAPI and interrupts */
...
...
drivers/rtc/Kconfig
View file @
c95dc93d
...
@@ -576,6 +576,16 @@ config RTC_DRV_AB3100
...
@@ -576,6 +576,16 @@ config RTC_DRV_AB3100
comment "on-CPU RTC drivers"
comment "on-CPU RTC drivers"
config RTC_DRV_DAVINCI
tristate "TI DaVinci RTC"
depends on ARCH_DAVINCI_DM365
help
If you say yes here you get support for the RTC on the
DaVinci platforms (DM365).
This driver can also be built as a module. If so, the module
will be called rtc-davinci.
config RTC_DRV_OMAP
config RTC_DRV_OMAP
tristate "TI OMAP1"
tristate "TI OMAP1"
depends on ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730
depends on ARCH_OMAP15XX || ARCH_OMAP16XX || ARCH_OMAP730
...
...
drivers/rtc/Makefile
View file @
c95dc93d
...
@@ -26,6 +26,7 @@ obj-$(CONFIG_RTC_DRV_BFIN) += rtc-bfin.o
...
@@ -26,6 +26,7 @@ obj-$(CONFIG_RTC_DRV_BFIN) += rtc-bfin.o
obj-$(CONFIG_RTC_DRV_BQ4802)
+=
rtc-bq4802.o
obj-$(CONFIG_RTC_DRV_BQ4802)
+=
rtc-bq4802.o
obj-$(CONFIG_RTC_DRV_CMOS)
+=
rtc-cmos.o
obj-$(CONFIG_RTC_DRV_CMOS)
+=
rtc-cmos.o
obj-$(CONFIG_RTC_DRV_COH901331)
+=
rtc-coh901331.o
obj-$(CONFIG_RTC_DRV_COH901331)
+=
rtc-coh901331.o
obj-$(CONFIG_RTC_DRV_DAVINCI)
+=
rtc-davinci.o
obj-$(CONFIG_RTC_DRV_DM355EVM)
+=
rtc-dm355evm.o
obj-$(CONFIG_RTC_DRV_DM355EVM)
+=
rtc-dm355evm.o
obj-$(CONFIG_RTC_DRV_DS1216)
+=
rtc-ds1216.o
obj-$(CONFIG_RTC_DRV_DS1216)
+=
rtc-ds1216.o
obj-$(CONFIG_RTC_DRV_DS1286)
+=
rtc-ds1286.o
obj-$(CONFIG_RTC_DRV_DS1286)
+=
rtc-ds1286.o
...
...
drivers/rtc/rtc-davinci.c
0 → 100644
View file @
c95dc93d
This diff is collapsed.
Click to expand it.
drivers/rtc/rtc-omap.c
View file @
c95dc93d
...
@@ -399,17 +399,12 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
...
@@ -399,17 +399,12 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
new_ctrl
|=
OMAP_RTC_CTRL_STOP
;
new_ctrl
|=
OMAP_RTC_CTRL_STOP
;
/* BOARD-SPECIFIC CUSTOMIZATION CAN GO HERE:
/* BOARD-SPECIFIC CUSTOMIZATION CAN GO HERE:
*
* - Boards wired so that RTC_WAKE_INT does something, and muxed
* right (W13_1610_RTC_WAKE_INT is the default after chip reset),
* should initialize the device wakeup flag appropriately.
*
*
* - Boards wired so RTC_ON_nOFF is used as the reset signal,
* - Boards wired so RTC_ON_nOFF is used as the reset signal,
* rather than nPWRON_RESET, should forcibly enable split
* rather than nPWRON_RESET, should forcibly enable split
* power mode. (Some chip errata report that RTC_CTRL_SPLIT
* power mode. (Some chip errata report that RTC_CTRL_SPLIT
* is write-only, and always reads as zero...)
* is write-only, and always reads as zero...)
*/
*/
device_init_wakeup
(
&
pdev
->
dev
,
0
);
if
(
new_ctrl
&
(
u8
)
OMAP_RTC_CTRL_SPLIT
)
if
(
new_ctrl
&
(
u8
)
OMAP_RTC_CTRL_SPLIT
)
pr_info
(
"%s: split power mode
\n
"
,
pdev
->
name
);
pr_info
(
"%s: split power mode
\n
"
,
pdev
->
name
);
...
...
include/linux/mtd/partitions.h
View file @
c95dc93d
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#define MTD_PARTITIONS_H
#define MTD_PARTITIONS_H
#include <linux/types.h>
#include <linux/types.h>
#include <linux/memory.h>
/*
/*
...
@@ -40,6 +41,8 @@ struct mtd_partition {
...
@@ -40,6 +41,8 @@ struct mtd_partition {
uint64_t
offset
;
/* offset within the master MTD space */
uint64_t
offset
;
/* offset within the master MTD space */
uint32_t
mask_flags
;
/* master MTD flags to mask out for this partition */
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)*/
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)
#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