Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26778
b: refs/heads/master
c: 338f756
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed May 16, 2006
1 parent a498839 commit 7b2d7d6
Show file tree
Hide file tree
Showing 38 changed files with 167 additions and 2,243 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9676489866a75fdd56b0d3e40ec7884298bb1338
refs/heads/master: 338f7566e5c26a9547e25d54863ae4e4e5c856d1
234 changes: 0 additions & 234 deletions trunk/Documentation/spi/pxa2xx

This file was deleted.

34 changes: 1 addition & 33 deletions trunk/Documentation/spi/spi-summary
Original file line number Diff line number Diff line change
Expand Up @@ -414,33 +414,7 @@ to get the driver-private data allocated for that device.
The driver will initialize the fields of that spi_master, including the
bus number (maybe the same as the platform device ID) and three methods
used to interact with the SPI core and SPI protocol drivers. It will
also initialize its own internal state. (See below about bus numbering
and those methods.)

After you initialize the spi_master, then use spi_register_master() to
publish it to the rest of the system. At that time, device nodes for
the controller and any predeclared spi devices will be made available,
and the driver model core will take care of binding them to drivers.

If you need to remove your SPI controller driver, spi_unregister_master()
will reverse the effect of spi_register_master().


BUS NUMBERING

Bus numbering is important, since that's how Linux identifies a given
SPI bus (shared SCK, MOSI, MISO). Valid bus numbers start at zero. On
SOC systems, the bus numbers should match the numbers defined by the chip
manufacturer. For example, hardware controller SPI2 would be bus number 2,
and spi_board_info for devices connected to it would use that number.

If you don't have such hardware-assigned bus number, and for some reason
you can't just assign them, then provide a negative bus number. That will
then be replaced by a dynamically assigned number. You'd then need to treat
this as a non-static configuration (see above).


SPI MASTER METHODS
also initialize its own internal state.

master->setup(struct spi_device *spi)
This sets up the device clock rate, SPI mode, and word sizes.
Expand All @@ -457,9 +431,6 @@ SPI MASTER METHODS
state it dynamically associates with that device. If you do that,
be sure to provide the cleanup() method to free that state.


SPI MESSAGE QUEUE

The bulk of the driver will be managing the I/O queue fed by transfer().

That queue could be purely conceptual. For example, a driver used only
Expand All @@ -469,9 +440,6 @@ But the queue will probably be very real, using message->queue, PIO,
often DMA (especially if the root filesystem is in SPI flash), and
execution contexts like IRQ handlers, tasklets, or workqueues (such
as keventd). Your driver can be as fancy, or as simple, as you need.
Such a transfer() method would normally just add the message to a
queue, and then start some asynchronous transfer engine (unless it's
already running).


THANKS TO
Expand Down
6 changes: 0 additions & 6 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2518,12 +2518,6 @@ M: perex@suse.cz
L: alsa-devel@alsa-project.org
S: Maintained

SPI SUBSYSTEM
P: David Brownell
M: dbrownell@users.sourceforge.net
L: spi-devel-general@lists.sourceforge.net
S: Maintained

TPM DEVICE DRIVER
P: Kylene Hall
M: kjhall@us.ibm.com
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/arm/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ int main(void)
DEFINE(MACHINFO_NAME, offsetof(struct machine_desc, name));
DEFINE(MACHINFO_PHYSIO, offsetof(struct machine_desc, phys_io));
DEFINE(MACHINFO_PGOFFIO, offsetof(struct machine_desc, io_pg_offst));
BLANK();
DEFINE(PROC_INFO_SZ, sizeof(struct proc_info_list));
DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush));
DEFINE(PROCINFO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mmu_flags));
return 0;
Expand Down
23 changes: 6 additions & 17 deletions trunk/arch/arm/kernel/dma-isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,23 +143,12 @@ static struct dma_ops isa_dma_ops = {
.residue = isa_get_dma_residue,
};

static struct resource dma_resources[] = { {
.name = "dma1",
.start = 0x0000,
.end = 0x000f
}, {
.name = "dma low page",
.start = 0x0080,
.end = 0x008f
}, {
.name = "dma2",
.start = 0x00c0,
.end = 0x00df
}, {
.name = "dma high page",
.start = 0x0480,
.end = 0x048f
} };
static struct resource dma_resources[] = {
{ "dma1", 0x0000, 0x000f },
{ "dma low page", 0x0080, 0x008f },
{ "dma2", 0x00c0, 0x00df },
{ "dma high page", 0x0480, 0x048f }
};

void __init isa_init_dma(dma_t *dma)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void free_thread_info(struct thread_info *thread)
struct thread_info_list *th = &get_cpu_var(thread_info_list);
if (th->nr < EXTRA_TASK_STRUCT) {
unsigned long *p = (unsigned long *)thread;
p[0] = (unsigned long)th->head;
p[0] = th->head;
th->head = p;
th->nr += 1;
put_cpu_var(thread_info_list);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/lib/backtrace.S
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ ENTRY(c_backtrace)
#define reg r5
#define stack r6

.Ldumpstm: stmfd sp!, {instr, reg, stack, r7, r8, lr}
.Ldumpstm: stmfd sp!, {instr, reg, stack, r7, lr}
mov stack, r0
mov instr, r1
mov reg, #9
Expand All @@ -145,7 +145,7 @@ ENTRY(c_backtrace)
adrne r0, .Lcr
blne printk
mov r0, stack
LOADREGS(fd, sp!, {instr, reg, stack, r7, r8, pc})
LOADREGS(fd, sp!, {instr, reg, stack, r7, pc})

.Lfp: .asciz " r%d = %08X%c"
.Lcr: .asciz "\n"
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/lib/div64.S
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ ENTRY(__do_div64)
moveq pc, lr

@ Division by 0:
str lr, [sp, #-8]!
str lr, [sp, #-4]!
bl __div0

@ as wrong as it could be...
mov yl, #0
mov yh, #0
mov xh, #0
ldr pc, [sp], #8
ldr pc, [sp], #4

Loading

0 comments on commit 7b2d7d6

Please sign in to comment.