* Re : MPC8245+2.6.12=oops
From: Sam Song @ 2005-08-02 13:38 UTC (permalink / raw)
To: Carl Ljungmark; +Cc: linuxppc-embedded
In-Reply-To: <op.suvg7mug0c7u6q@clj.sysgo.com>
Carl Ljungmark <carl.ljungmark@sysgo.com> wrote:
> Trying to boot linux 2.6.12 on an MPC8245 board from
> MEN (a12) with MenMon
> firmware. Nothing is printed to the console (ttyS0),
> but the __log_buf contains this:
>
> <4>entering platform_init.
Seems sth wrong on target init configuration. Pls
check some values like MPC10X_MAPB_EUMB_BASE or
UART related stuff like SERIAL_PORT_DFNS. Well, I
just have the successful experience on a MPC8241
target based on SANDPOINT board with 2.6.12-rc2 and
2.6.13-rc3.
In addition, enable early console is also a help to
debug.
Best regards,
Sam
__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com
^ permalink raw reply
* Re: Serial console
From: Kumar Gala @ 2005-08-02 13:39 UTC (permalink / raw)
To: JohnsonCheng; +Cc: linuxppc-embedded
In-Reply-To: <20050802034517.F3D0167E42@ozlabs.org>
On Aug 1, 2005, at 10:38 PM, JohnsonCheng wrote:
> Dear Daniel,
>
> I also meet this problem on MPC8245 with linux-2.6.12.3, and I =20
> found it uses
> LEVEL for interrupt in sandpoint.c. Do you have any idea for it?
All internal interrupts on the MPC8245/1 should be LEVEL interrupts.
- kumar
> -----Original Message-----
> From: linuxppc-embedded-bounces@ozlabs.org
> [mailto:linuxppc-embedded-bounces@ozlabs.org] On Behalf Of Daniel Ann
> Sent: Monday, August 01, 2005 9:27 AM
> To: Anton W=F6llert
> Cc: linuxppc-embedded@ozlabs.org
> Subject: Re: Serial console
>
> Thanks for your input Anton.
> I'm not all that certain about sandpoint platform has its own serial
> driver so I've worked with 8250.c. Anyway, I've got it working now. It
> was problem with interrupt. As soon as I changed interrupt from EGDE
> to LEVEL it began working. Altho I'm faced with yet another problem
> with openpic but I'm digging thru it at the moment.
>
> BTW, I have no idea why EDGE didnt work and LEVEL does.
>
> Cheers,
> Daniel
>
> On 7/30/05, Anton W=F6llert <a.woellert@gmail.com> wrote:
>
>> Daniel Ann wrote:
>>
>>> Hi folks,
>>>
>>> Having all the kernel boot up log on console means that I've done =20=
>>> some
>>> part right. But why am I not getting anything from the user =20
>>> processes
>>> on the console screen ?
>>>
>>> Is there anything I need to do on the kernel config ?
>>>
>>>
>>
>> Hi, we've had the same problem some time ago on a tqm850l =20
>> (mpc850). Our
>> problem was, that we had registered two serial consoles in the kernel
>> config or something like that. we had to disable all serial-driver =20=
>> stuff
>> and enable just the platform-specific serial-console driver. we =20
>> tracked
>> this down with inserting a printk(buf) into the tty_write fs-op of =20=
>> the
>> serial-port driver in drivers/char/tty_io.c. the ttyS0 was used =20
>> but has
>> taken another serial-driver than the platform specific.
>>
>> may this help you :)
>>
>>
>> anton
>>
>>
>
>
> --=20
> Daniel
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply
* MPC8245/1 UARTs and linux-2.6.13-rc5
From: Kumar Gala @ 2005-08-02 13:44 UTC (permalink / raw)
To: linuxppc-embedded Linux list
For all people have issues with the UARTs on MPC8245/1. In the
2.6.13 kernel we reworked the support for UARTs to be platform
devices. If you look at the 2.6.13-rc5 release you will see the
changes that went in. Additionally, the sandpoint reference platform
code was updated to take advantage of the changes.
Hopefully, these changes will make some of the issues you might be
facing less of a problem.
- kumar
^ permalink raw reply
* [PATCH] cpm_uart: make dpram allocation actually work
From: Pantelis Antoniou @ 2005-08-02 16:09 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
Hi Marcelo
While the idea of allocating console buffers from dpram is sound,
the initial implementation didn't actually work :)
The following patch fixes it (tested and booted on 2.6.13-rc4).
Regards
Pantelis
--------------------------------------------------------------
Signed-Off-By: Pantelis Antoniou <panto@intracom.gr>
[-- Attachment #2: cpm_uart-dpram-fix.patch --]
[-- Type: text/x-diff, Size: 3988 bytes --]
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -70,6 +70,20 @@ static void cpm_uart_initbd(struct uart_
/**************************************************************/
+static inline unsigned long cpu2cpm_addr(void *addr)
+{
+ if ((unsigned long)addr >= CPM_ADDR)
+ return (unsigned long)addr;
+ return virt_to_bus(addr);
+}
+
+static inline void *cpm2cpu_addr(unsigned long addr)
+{
+ if (addr >= CPM_ADDR)
+ return (void *)addr;
+ return bus_to_virt(addr);
+}
+
/*
* Check, if transmit buffers are processed
*/
@@ -243,7 +257,7 @@ static void cpm_uart_int_rx(struct uart_
}
/* get pointer */
- cp = (unsigned char *)bus_to_virt(bdp->cbd_bufaddr);
+ cp = cpm2cpu_addr(bdp->cbd_bufaddr);
/* loop through the buffer */
while (i-- > 0) {
@@ -569,7 +583,8 @@ static int cpm_uart_tx_pump(struct uart_
/* Pick next descriptor and fill from buffer */
bdp = pinfo->tx_cur;
- p = bus_to_virt(bdp->cbd_bufaddr);
+ p = cpm2cpu_addr(bdp->cbd_bufaddr);
+
*p++ = xmit->buf[xmit->tail];
bdp->cbd_datlen = 1;
bdp->cbd_sc |= BD_SC_READY;
@@ -595,7 +610,7 @@ static int cpm_uart_tx_pump(struct uart_
while (!(bdp->cbd_sc & BD_SC_READY) && (xmit->tail != xmit->head)) {
count = 0;
- p = bus_to_virt(bdp->cbd_bufaddr);
+ p = cpm2cpu_addr(bdp->cbd_bufaddr);
while (count < pinfo->tx_fifosize) {
*p++ = xmit->buf[xmit->tail];
xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
@@ -643,12 +658,12 @@ static void cpm_uart_initbd(struct uart_
mem_addr = pinfo->mem_addr;
bdp = pinfo->rx_cur = pinfo->rx_bd_base;
for (i = 0; i < (pinfo->rx_nrfifos - 1); i++, bdp++) {
- bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+ bdp->cbd_bufaddr = cpu2cpm_addr(mem_addr);
bdp->cbd_sc = BD_SC_EMPTY | BD_SC_INTRPT;
mem_addr += pinfo->rx_fifosize;
}
- bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+ bdp->cbd_bufaddr = cpu2cpm_addr(mem_addr);
bdp->cbd_sc = BD_SC_WRAP | BD_SC_EMPTY | BD_SC_INTRPT;
/* Set the physical address of the host memory
@@ -658,12 +673,12 @@ static void cpm_uart_initbd(struct uart_
mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize);
bdp = pinfo->tx_cur = pinfo->tx_bd_base;
for (i = 0; i < (pinfo->tx_nrfifos - 1); i++, bdp++) {
- bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+ bdp->cbd_bufaddr = cpu2cpm_addr(mem_addr);
bdp->cbd_sc = BD_SC_INTRPT;
mem_addr += pinfo->tx_fifosize;
}
- bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+ bdp->cbd_bufaddr = cpu2cpm_addr(mem_addr);
bdp->cbd_sc = BD_SC_WRAP | BD_SC_INTRPT;
}
@@ -983,10 +998,7 @@ static void cpm_uart_console_write(struc
* If the buffer address is in the CPM DPRAM, don't
* convert it.
*/
- if ((uint) (bdp->cbd_bufaddr) > (uint) CPM_ADDR)
- cp = (unsigned char *) (bdp->cbd_bufaddr);
- else
- cp = bus_to_virt(bdp->cbd_bufaddr);
+ cp = cpm2cpu_addr(bdp->cbd_bufaddr);
*cp = *s;
@@ -1003,10 +1015,7 @@ static void cpm_uart_console_write(struc
while ((bdp->cbd_sc & BD_SC_READY) != 0)
;
- if ((uint) (bdp->cbd_bufaddr) > (uint) CPM_ADDR)
- cp = (unsigned char *) (bdp->cbd_bufaddr);
- else
- cp = bus_to_virt(bdp->cbd_bufaddr);
+ cp = cpm2cpu_addr(bdp->cbd_bufaddr);
*cp = 13;
bdp->cbd_datlen = 1;
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
--- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
@@ -185,6 +185,8 @@ int cpm_uart_allocbuf(struct uart_cpm_po
memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) +
L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize);
if (is_con) {
+ /* was hostalloc but changed cause it blows away the */
+ /* large tlb mapping when pinning the kernel area */
mem_addr = (u8 *) cpm_dpram_addr(cpm_dpalloc(memsz, 8));
dma_addr = 0;
} else
^ permalink raw reply
* [PATCH] cpm_uart: Made non-console uart work
From: Vitaly Bordug @ 2005-08-02 15:24 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-embedded list, Pantelis Antoniou
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
Kumar, Pantelis,
This patch makes non-console UART work on both 8xx and 82xx. Various
issues are resolved:
- removed unnecessary STOP_TX commands in shutdown - no need to
completely stop CPM TX and reinit BDs each time the port is closing;
- when mem_addr has been allocated via dma_coherent_alloc, virt_to_bus
on it will not tell the truth in most cases
- SCC UART needs to wait several character times even after all the BDs
have READY bit cleared
- adds needed board-specific bits for 86xADS
Tested on 8272ADS, 885ADS and 866ADS development boards.
---------------------------------
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
--
Sincerely,
Vitaly
[-- Attachment #2: cpm_uart_fixes.patch --]
[-- Type: text/x-patch, Size: 10899 bytes --]
diff --git a/drivers/serial/cpm_uart/cpm_uart.h b/drivers/serial/cpm_uart/cpm_uart.h
--- a/drivers/serial/cpm_uart/cpm_uart.h
+++ b/drivers/serial/cpm_uart/cpm_uart.h
@@ -40,6 +40,8 @@
#define TX_NUM_FIFO 4
#define TX_BUF_SIZE 32
+#define SCC_WAIT_CLOSING 100
+
struct uart_cpm_port {
struct uart_port port;
u16 rx_nrfifos;
@@ -67,6 +69,8 @@ struct uart_cpm_port {
int bits;
/* Keep track of 'odd' SMC2 wirings */
int is_portb;
+ /* wait on close if needed */
+ int wait_closing;
};
extern int cpm_uart_port_map[UART_NR];
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -12,6 +12,7 @@
*
* Copyright (C) 2004 Freescale Semiconductor, Inc.
* (C) 2004 Intracom, S.A.
+ * (C) 2005 MontaVista Software, Inc. by Vitaly Bordug <vbordug@ru.mvista.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
@@ -143,10 +144,13 @@ static void cpm_uart_start_tx(struct uar
}
if (cpm_uart_tx_pump(port) != 0) {
- if (IS_SMC(pinfo))
+ if (IS_SMC(pinfo)) {
smcp->smc_smcm |= SMCM_TX;
- else
+ smcp->smc_smcmr |= SMCMR_TEN;
+ } else {
sccp->scc_sccm |= UART_SCCM_TX;
+ pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT;
+ }
}
}
@@ -265,13 +269,15 @@ static void cpm_uart_int_rx(struct uart_
} /* End while (i--) */
/* This BD is ready to be used again. Clear status. get next */
- bdp->cbd_sc &= ~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV);
+ bdp->cbd_sc &= ~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV | BD_SC_ID);
bdp->cbd_sc |= BD_SC_EMPTY;
- if (bdp->cbd_sc & BD_SC_WRAP)
- bdp = pinfo->rx_bd_base;
- else
- bdp++;
+ if (bdp->cbd_datlen) {
+ if (bdp->cbd_sc & BD_SC_WRAP)
+ bdp = pinfo->rx_bd_base;
+ else
+ bdp++;
+ }
} /* End for (;;) */
/* Write back buffer pointer */
@@ -336,22 +342,22 @@ static irqreturn_t cpm_uart_int(int irq,
if (IS_SMC(pinfo)) {
events = smcp->smc_smce;
+ smcp->smc_smce = events;
if (events & SMCM_BRKE)
uart_handle_break(port);
if (events & SMCM_RX)
cpm_uart_int_rx(port, regs);
if (events & SMCM_TX)
cpm_uart_int_tx(port, regs);
- smcp->smc_smce = events;
} else {
events = sccp->scc_scce;
+ sccp->scc_scce = events;
if (events & UART_SCCM_BRKE)
uart_handle_break(port);
if (events & UART_SCCM_RX)
cpm_uart_int_rx(port, regs);
if (events & UART_SCCM_TX)
cpm_uart_int_tx(port, regs);
- sccp->scc_scce = events;
}
return (events) ? IRQ_HANDLED : IRQ_NONE;
}
@@ -360,6 +366,7 @@ static int cpm_uart_startup(struct uart_
{
int retval;
struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
+ int line = pinfo - cpm_uart_ports;
pr_debug("CPM uart[%d]:startup\n", port->line);
@@ -374,18 +381,30 @@ static int cpm_uart_startup(struct uart_
pinfo->smcp->smc_smcmr |= SMCMR_REN;
} else {
pinfo->sccp->scc_sccm |= UART_SCCM_RX;
+ pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENR;
}
+ cpm_line_cr_cmd(line,CPM_CR_RESTART_TX);
return 0;
}
+inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo)
+{
+ unsigned long orig_jiffies = jiffies;
+ while(1)
+ {
+ schedule_timeout(2);
+ if(time_after(jiffies, orig_jiffies + pinfo->wait_closing))
+ break;
+ }
+}
+
/*
* Shutdown the uart
*/
static void cpm_uart_shutdown(struct uart_port *port)
{
struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
- int line = pinfo - cpm_uart_ports;
pr_debug("CPM uart[%d]:shutdown\n", port->line);
@@ -394,6 +413,12 @@ static void cpm_uart_shutdown(struct uar
/* If the port is not the console, disable Rx and Tx. */
if (!(pinfo->flags & FLAG_CONSOLE)) {
+ /* Wait for all the BDs marked sent */
+ while(!cpm_uart_tx_empty(port))
+ schedule_timeout(2);
+ if(pinfo->wait_closing)
+ cpm_uart_wait_until_send(pinfo);
+
/* Stop uarts */
if (IS_SMC(pinfo)) {
volatile smc_t *smcp = pinfo->smcp;
@@ -405,9 +430,6 @@ static void cpm_uart_shutdown(struct uar
sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
}
- /* Shut them really down and reinit buffer descriptors */
- cpm_line_cr_cmd(line, CPM_CR_STOP_TX);
- cpm_uart_initbd(pinfo);
}
}
@@ -569,7 +591,10 @@ static int cpm_uart_tx_pump(struct uart_
/* Pick next descriptor and fill from buffer */
bdp = pinfo->tx_cur;
- p = bus_to_virt(bdp->cbd_bufaddr);
+ if (pinfo->dma_addr)
+ p=(u8*)((ulong)(pinfo->mem_addr) + bdp->cbd_bufaddr - pinfo->dma_addr);
+ else
+ p = bus_to_virt(bdp->cbd_bufaddr);
*p++ = xmit->buf[xmit->tail];
bdp->cbd_datlen = 1;
bdp->cbd_sc |= BD_SC_READY;
@@ -595,7 +620,10 @@ static int cpm_uart_tx_pump(struct uart_
while (!(bdp->cbd_sc & BD_SC_READY) && (xmit->tail != xmit->head)) {
count = 0;
- p = bus_to_virt(bdp->cbd_bufaddr);
+ if (pinfo->dma_addr)
+ p=(u8*)((ulong)(pinfo->mem_addr) + bdp->cbd_bufaddr - pinfo->dma_addr);
+ else
+ p = bus_to_virt(bdp->cbd_bufaddr);
while (count < pinfo->tx_fifosize) {
*p++ = xmit->buf[xmit->tail];
xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
@@ -606,6 +634,7 @@ static int cpm_uart_tx_pump(struct uart_
}
bdp->cbd_datlen = count;
bdp->cbd_sc |= BD_SC_READY;
+ __asm__("eieio");
/* Get next BD. */
if (bdp->cbd_sc & BD_SC_WRAP)
bdp = pinfo->tx_bd_base;
@@ -632,6 +661,7 @@ static void cpm_uart_initbd(struct uart_
{
int i;
u8 *mem_addr;
+ u8* dma_addr;
volatile cbd_t *bdp;
pr_debug("CPM uart[%d]:initbd\n", pinfo->port.line);
@@ -641,14 +671,23 @@ static void cpm_uart_initbd(struct uart_
* virtual address for us to work with.
*/
mem_addr = pinfo->mem_addr;
+ dma_addr = (u8*)(pinfo->dma_addr);
bdp = pinfo->rx_cur = pinfo->rx_bd_base;
for (i = 0; i < (pinfo->rx_nrfifos - 1); i++, bdp++) {
- bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+ if (pinfo->dma_addr)
+ bdp->cbd_bufaddr = (ulong)dma_addr;
+ else
+ bdp->cbd_bufaddr = virt_to_bus(mem_addr);
bdp->cbd_sc = BD_SC_EMPTY | BD_SC_INTRPT;
+ bdp->cbd_datlen = 0;
mem_addr += pinfo->rx_fifosize;
+ dma_addr += pinfo->rx_fifosize;
}
-
- bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+ if (pinfo->dma_addr)
+ bdp->cbd_bufaddr = (ulong)dma_addr;
+ else
+ bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+ bdp->cbd_datlen = 0;
bdp->cbd_sc = BD_SC_WRAP | BD_SC_EMPTY | BD_SC_INTRPT;
/* Set the physical address of the host memory
@@ -656,14 +695,21 @@ static void cpm_uart_initbd(struct uart_
* virtual address for us to work with.
*/
mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize);
+ dma_addr = (u8*)(pinfo->dma_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize));
bdp = pinfo->tx_cur = pinfo->tx_bd_base;
for (i = 0; i < (pinfo->tx_nrfifos - 1); i++, bdp++) {
- bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+ if (pinfo->dma_addr)
+ bdp->cbd_bufaddr = (ulong)dma_addr;
+ else
+ bdp->cbd_bufaddr = virt_to_bus(mem_addr);
bdp->cbd_sc = BD_SC_INTRPT;
mem_addr += pinfo->tx_fifosize;
+ dma_addr += pinfo->tx_fifosize;
}
-
- bdp->cbd_bufaddr = virt_to_bus(mem_addr);
+ if (pinfo->dma_addr)
+ bdp->cbd_bufaddr = (ulong)dma_addr;
+ else
+ bdp->cbd_bufaddr = virt_to_bus(mem_addr);
bdp->cbd_sc = BD_SC_WRAP | BD_SC_INTRPT;
}
@@ -763,6 +809,8 @@ static void cpm_uart_init_smc(struct uar
/* Using idle charater time requires some additional tuning. */
up->smc_mrblr = pinfo->rx_fifosize;
up->smc_maxidl = pinfo->rx_fifosize;
+ up->smc_brklen = 0;
+ up->smc_brkec = 0;
up->smc_brkcr = 1;
cpm_line_cr_cmd(line, CPM_CR_INIT_TRX);
@@ -815,6 +863,10 @@ static int cpm_uart_request_port(struct
return ret;
cpm_uart_initbd(pinfo);
+ if (IS_SMC(pinfo))
+ cpm_uart_init_smc(pinfo);
+ else
+ cpm_uart_init_scc(pinfo);
return 0;
}
@@ -902,6 +954,7 @@ struct uart_cpm_port cpm_uart_ports[UART
.rx_nrfifos = RX_NUM_FIFO,
.rx_fifosize = RX_BUF_SIZE,
.set_lineif = scc1_lineif,
+ .wait_closing = SCC_WAIT_CLOSING,
},
[UART_SCC2] = {
.port = {
@@ -915,6 +968,7 @@ struct uart_cpm_port cpm_uart_ports[UART
.rx_nrfifos = RX_NUM_FIFO,
.rx_fifosize = RX_BUF_SIZE,
.set_lineif = scc2_lineif,
+ .wait_closing = SCC_WAIT_CLOSING,
},
[UART_SCC3] = {
.port = {
@@ -928,6 +982,7 @@ struct uart_cpm_port cpm_uart_ports[UART
.rx_nrfifos = RX_NUM_FIFO,
.rx_fifosize = RX_BUF_SIZE,
.set_lineif = scc3_lineif,
+ .wait_closing = SCC_WAIT_CLOSING,
},
[UART_SCC4] = {
.port = {
@@ -941,6 +996,7 @@ struct uart_cpm_port cpm_uart_ports[UART
.rx_nrfifos = RX_NUM_FIFO,
.rx_fifosize = RX_BUF_SIZE,
.set_lineif = scc4_lineif,
+ .wait_closing = SCC_WAIT_CLOSING,
},
};
@@ -1081,6 +1137,7 @@ static int __init cpm_uart_console_setup
return ret;
cpm_uart_initbd(pinfo);
+ cpm_uart_init_scc(pinfo);
if (IS_SMC(pinfo))
cpm_uart_init_smc(pinfo);
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
--- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
@@ -82,6 +82,16 @@ void cpm_line_cr_cmd(int line, int cmd)
void smc1_lineif(struct uart_cpm_port *pinfo)
{
volatile cpm8xx_t *cp = cpmp;
+
+#if defined (CONFIG_MPC885ADS)
+ /* Enable SMC1 transceivers */
+ {
+ cp->cp_pepar |= 0x000000c0;
+ cp->cp_pedir &= ~0x000000c0;
+ cp->cp_peso &= ~0x00000040;
+ cp->cp_peso |= 0x00000080;
+ }
+#elif defined (CONFIG_MPC86XADS)
unsigned int iobits = 0x000000c0;
if (!pinfo->is_portb) {
@@ -93,41 +103,31 @@ void smc1_lineif(struct uart_cpm_port *p
((immap_t *)IMAP_ADDR)->im_ioport.iop_padir &= ~iobits;
((immap_t *)IMAP_ADDR)->im_ioport.iop_paodr &= ~iobits;
}
-
-#ifdef CONFIG_MPC885ADS
- /* Enable SMC1 transceivers */
- {
- volatile uint __iomem *bcsr1 = ioremap(BCSR1, 4);
- uint tmp;
-
- tmp = in_be32(bcsr1);
- tmp &= ~BCSR1_RS232EN_1;
- out_be32(bcsr1, tmp);
- iounmap(bcsr1);
- }
#endif
-
pinfo->brg = 1;
}
void smc2_lineif(struct uart_cpm_port *pinfo)
{
-#ifdef CONFIG_MPC885ADS
volatile cpm8xx_t *cp = cpmp;
- volatile uint __iomem *bcsr1;
- uint tmp;
-
+#if defined (CONFIG_MPC885ADS)
cp->cp_pepar |= 0x00000c00;
cp->cp_pedir &= ~0x00000c00;
cp->cp_peso &= ~0x00000400;
cp->cp_peso |= 0x00000800;
+#elif defined (CONFIG_MPC86XADS)
+ unsigned int iobits = 0x00000c00;
+
+ if (!pinfo->is_portb) {
+ cp->cp_pbpar |= iobits;
+ cp->cp_pbdir &= ~iobits;
+ cp->cp_pbodr &= ~iobits;
+ } else {
+ ((immap_t *)IMAP_ADDR)->im_ioport.iop_papar |= iobits;
+ ((immap_t *)IMAP_ADDR)->im_ioport.iop_padir &= ~iobits;
+ ((immap_t *)IMAP_ADDR)->im_ioport.iop_paodr &= ~iobits;
+ }
- /* Enable SMC2 transceivers */
- bcsr1 = ioremap(BCSR1, 4);
- tmp = in_be32(bcsr1);
- tmp &= ~BCSR1_RS232EN_2;
- out_be32(bcsr1, tmp);
- iounmap(bcsr1);
#endif
pinfo->brg = 2;
^ permalink raw reply
* Re: mpc8248 SEC -- interrupt handler 'is' invoked
From: Vikas Aggarwal @ 2005-08-02 15:45 UTC (permalink / raw)
To: Kim Phillips; +Cc: linuxppc-embedded
In-Reply-To: <20050801123728.62764c7e.kim.phillips@freescale.com>
Hi Kim,
Code excerpts are at after the TRACE.
TRACE Messages from the test ---------
bash-2.05b# modprobe secmpc8248
bash-2.05b# ^[[K/lib/modules/2.6.10-rc3/\akernel/crypto/mpc8248/test
SEC1Open() called, inode 0xc0a564cc, file 0xc024e2f4
*** Test RNG ***
First ID=21474820 ChannelPointerStatusRegister[0]=0x0:
ChannelPointerStatusRegister[0]=0x7
ChannelPointerStatusRegister[1]=0x0: ChannelPointerStatusRegister[1]=0x7
ChannelPointerStatusRegister[2]=0x0: ChannelPointerStatusRegister[2]=0x7
ChannelPointerStatusRegister[3]=0x0: ChannelPointerStatusRegister[3]=0x7
ProcessRequest(): free channel = 0
RequestToDpd(): req @0x7ffff820 ch1
RequestToDpd(): get entry for opId 0x00001000
RequestToDpd(): VerifyRequest(0x7ffff820, 0xc11b9cf0)
RequestToDpd(): clear DPD 0xc11bb910
RequestToDpd(): converting entry4 4->0xc09ffc5c vikas
RequestToDpd(): set length = 160
DPD header = 0x40000011
Primary EU/Mode 0x04:00, Secondary EU/Mode 0x00:00, Desc Type 0x01, Snoop
Output Data Mode, Done
DPD ptr:len/ext p0 = 0x00000000:00000000
DPD ptr:len/ext p1 = 0x00000000:00000000
DPD ptr:len/ext p2 = 0x00000000:00000000
DPD ptr:len/ext p3 = 0x00000000:00000000
DPD ptr:len/ext p4 = 0x009ffc5c:000000a0
DPD ptr:len/ext p5 = 0x00000000:00000000
DPD ptr:len/ext p6 = 0x00000000:00000000
RequestToDpd() EndOfFunc: req @0x00000000 ch1
ProcessRequest() endOffunc: free channel = 0
InterruptServiceRoutine()
ProcessingComplete(): IntStatus - 0x0000000000000040
ProcessingComplete():->Controller_MEAR=0x011bb910
ChannelPointerStatusRegister[0]=0x7: ChannelPointerStatusRegister[0]=0x2007
ChannelPointerStatusRegister[1]=0x0: ChannelPointerStatusRegister[1]=0x7
ChannelPointerStatusRegister[2]=0x0: ChannelPointerStatusRegister[2]=0x7
ChannelPointerStatusRegister[3]=0x0: ChannelPointerStatusRegister[3]=0x7
Unknown
ProcessingComplete Done
ID1
nfs: server 192.168.2.4 not responding, still trying
nfs: server 192.168.2.4 OK
Request Ti ChannelPointerStatusRegister[0]=0x7:
ChannelPointerStatusRegister[0]=0x2007
ChannelPointerStatusRegister[1]=0x0: ChannelPointerStatusRegister[1]=0x7
ChannelPointerStatusRegister[2]=0x0: ChannelPointerStatusRegister[2]=0x7
ChannelPointerStatusRegister[3]=0x0: ChannelPointerStatusRegister[3]=0x7
testSEC1Close() called
ReleaseChannel(1, taskID=0x 148, lock=1)
bash-2.05b#
------------TRACE COMPLETE ------------------------
This is how i write the address of RNG buffer(sec1_dpd.c.
DPDPTR->fld[i].ptr = virt_to_phys(*(unsigned int *) ((unsigned int)pReq +
pDesc->fld[i].ptrOffset1st));
This is how i write the length of RNG buffer(sec1_dpd.c.
DPDPTR->fld[i].len = *(unsigned int *) ((unsigned int)pReq +
pDesc->fld[i].lenOffset1st);
DPDPTR->nxt_dpd_ptr = 0;
This is how i write the DPD's address?(sec1_request.c).
*(ChannelNextDescriptorRegister[freeChannel]+1) =
dma_map_single(NULL,(volatile void
*)(ChannelAssignments[freeChannel].Dpds[0]),64,DMA_BIDIRECTIONAL);
DPD_TABLE
-----------------------------------------------
/* DPD_FLD_DETAILS_ENTRY
Describes where and how a field in a request goes to a field in a DPD
*/
typedef struct
{
char *txt; /* Description of the
field within the request
a NULL indicates the end
of field entries */
unsigned int lenOffset1st; /* Offset into request
pointer
for the initial length
field */
unsigned int lenOffsetNxt; /* Offset into request
pointer
for the next length field
Used when input points to
output of the previous
request */
unsigned int ptrOffset1st; /* Offset into request
pointer
for the initial data
area */
unsigned int extOffset;
FLD_TYPE dataType; /* Data type either:
a "Read" or "Write"
area */
BOOLEAN (*pFncSize)(unsigned long len); /* Pointer to
function that checks
whether the length is
consistent with the
request */
} DPD_FLD_DETAILS_ENTRY;
/*! \struct DPD_DETAILS_ENTRY
\brief Describes how a request is broken into a single DPD or a set of
chained
DPDs
*/
typedef struct DPD_DETAILS_ENTRY
{
unsigned long opId; /* Operation ID for entry */
char *txt; /* Description of request
a NULL indicates the end
of the table */
unsigned long sz; /* Size of request */
const unsigned long *hdrDesc; /* Descriptor Header */
unsigned int lenOffsetBlockLen; /* Offset into request
pointer
for total length of
data */
DPD_FLD_DETAILS_ENTRY fld[NUM_DPD_FLDS];
} DPD_DETAILS_ENTRY; /* Each request is enumerated here */
#ifndef offsetof
/* offsetof(s,m)
Macro that identifies the byte offset of a field m within a structure s
*/
#define offsetof(s,m) (size_t)&(((s *)0)->m)
#endif
#define STD_OFFSETS(s,l1,l2,p1,p2) offsetof(s,l1), offsetof(s,l2),\
offsetof(s,p1), 0
#define EXT_OFFSETS(s,l1,l2,p1,p2) offsetof(s,l1), offsetof(s,l2),\
offsetof(s,p1), offsetof(s,p2)
#define NULL_PTR_OFFSETS(s,l1,l2) offsetof(s,l1), offsetof(s,l2), 0, 0
#define ZERO_LEN_OFFSETS(s,p1,p2) 0, 0, offsetof(s,p1), offsetof(s,p2)
#define ALL_ZERO_OFFSETS 0, 0, 0, 0
static char NIL[] = {"NIL"};
DPD_DETAILS_ENTRY DpdDetails[] =
{
/* DPD_RNG_GROUP */
{
DPD_RNG_GROUP, "DPD_RNG_GROUP",
sizeof(RNG_REQ), RngDesc,
offsetof(RNG_REQ,rngBytes),
{
{NIL, ALL_ZERO_OFFSETS, Read, NULL},
{NIL, ALL_ZERO_OFFSETS, Read, NULL},
{NIL, ALL_ZERO_OFFSETS, Read, NULL},
{NIL, ALL_ZERO_OFFSETS, Read, NULL},
{"rngData",
STD_OFFSETS(RNG_REQ,rngBytes,rngBytes,rngData,rngData), Write,
NULL},
{NULL, ALL_ZERO_OFFSETS, Read, NULL}
},
},
/* DPD_DES_CBC_GROUP */
{
----------------------------------
testRNG user-space function-----------
int testRng(int fd)
{
RNG_REQ rngReq;
int device=0, status;
/* RNG test */
printf("\n*** Test RNG ***\n");
memset(&rngReq, 0, sizeof(rngReq));
memset(rngBuf, 0, RNG_TESTSIZE);
rngReq.opId = DPD_RNG_GETRN;
rngReq.rngBytes = RNG_TESTSIZE;
rngReq.rngData = rngBuf;
status = putKmem(fd, "vikas\n\0", &rngReq.rngData, RNG_TESTSIZE);
if (status)
return status;
armCompletion(&rngReq);
{
int status1;
SEC1_STATUS statusReq;
printf("\nFirst ID=%d\n",statusReq.IdRegister);
status1 = ioctl(fd, IOCTL_GET_STATUS, (int)&statusReq);
}
status = ioctl(fd, IOCTL_PROC_REQ, (int)&rngReq);
printf("\nID1\n");
if (status = waitCompletion("testRng(): data extraction test", status,
&rngReq))
{
int status1;
SEC1_STATUS statusReq;
printf("\nID=%d\n",statusReq.IdRegister);
status1 = ioctl(fd, IOCTL_GET_STATUS, (int)&statusReq);
fflush(stdout);
freeKmem(fd, &rngReq.rngData);
return status;
}
printf("\nID2\n");
fflush(stdout);
getKmem(fd, rngBuf, &rngReq.rngData, RNG_TESTSIZE);
freeKmem(fd, &rngReq.rngData);
/* check random buffer content for nonzero */
if (rngBuf[0]) {
printf("*** Test RNG Data ***\n");
status = 0;
} else {
printf("*** Test RNG Failed ***\n");
status = -1;
}
return status;
}
------------------------------------------------------------------
> On Sun, 31 Jul 2005 20:48:16 -0400 (EDT)
> "Vikas Aggarwal" <va824363@albany.edu> wrote:
>
>> Tried it as u said . No luck :(
>> But something more i noted now in CPSR(channel pointer status
>> register=0x2040) that before ISR invoked it has 0x0:0x7.
>>
>> After ISR invoked it has 0x7:0x2007 . The 7 in low bits means
>> channel_error and 2 is at "reserved" bits as per documentation, don't
>> know
>> what that means.
>>
>> I also tried kmalloc with GFP_DMA, for the memory where i create the
>> Descriptor.
>> Please keep giving ideas for debugging this as this is what driving me
>> right now.
>> regards
>> -vikas
>
>
> So you reset the master, then the channel, allocate the RNG descriptor,
> allocate the random data buffer, fill the descriptor with values for an
> RNG request the size of your buffer (filling with the physical address of
> your random data buffer), and submit the descriptor's physical address to
> the FR..
>
> btw, I'm finding it hard to help without seeing sec register transaction
> data, descriptor data, virtual and physical addresses, etc.
>
> Kim
>
^ permalink raw reply
* Re: Reply: Bad Magic Number when boot linux kernel with ppcboot (PPC860 board)
From: Mark A. Greer @ 2005-08-02 17:35 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: FCG WANG Baohua, linuxppc-embedded
In-Reply-To: <20050802071522.AE98C353BF9@atlas.denx.de>
On Tue, Aug 02, 2005 at 09:15:22AM +0200, Wolfgang Denk wrote:
> In message <A9DE2BAF233E444FA9C5E77A5825A01E8652FA@ydmail.sbell.com.cn> you wrote:
> >
> > => bootm 0x180000
> > ## Booting image at 00000000 ...
> > Bad Magic Number
> > =>
>
> The funny thing is that you seem to enter "0x180000" but the address
> printed is 00000000. make sure you have no funny characters or
> control keys in this number. Re-type it carefully. Omit the "0x"
> part, i. e. try a plain "bootm 180000'
Plus, use 'bootm' for a .uboot file, 'bootelf' for a zImage.
^ permalink raw reply
* Re: [PATCH] cpm_uart: Made non-console uart work
From: Kumar Gala @ 2005-08-02 18:35 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-embedded list, Pantelis Antoniou
In-Reply-To: <42EF9022.5050707@ru.mvista.com>
I want to test this out on the 8560 ADS to see if works there as well
before pushing upstream.
- kumar
On Aug 2, 2005, at 10:24 AM, Vitaly Bordug wrote:
> Kumar, Pantelis,
>
> This patch makes non-console UART work on both 8xx and 82xx. Various
> issues are resolved:
> - removed unnecessary STOP_TX commands in shutdown - no need to
> completely stop CPM TX and reinit BDs each time the port is closing;
> - when mem_addr has been allocated via dma_coherent_alloc, virt_to_bus
> on it will not tell the truth in most cases
> - SCC UART needs to wait several character times even after all the
> BDs
> have READY bit cleared
> - adds needed board-specific bits for 86xADS
>
> Tested on 8272ADS, 885ADS and 866ADS development boards.
> ---------------------------------
> Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
>
> --
> Sincerely,
> Vitaly
>
>
> <cpm_uart_fixes.patch>
>
^ permalink raw reply
* Re: [PATCH] cpm_uart: Made non-console uart work
From: Pantelis Antoniou @ 2005-08-02 21:26 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: Kumar Gala, linuxppc-embedded list
In-Reply-To: <42EF9022.5050707@ru.mvista.com>
On Tuesday 02 August 2005 18:24, Vitaly Bordug wrote:
> Kumar, Pantelis,
>
> This patch makes non-console UART work on both 8xx and 82xx. Various
> issues are resolved:
> - removed unnecessary STOP_TX commands in shutdown - no need to
> completely stop CPM TX and reinit BDs each time the port is closing;
> - when mem_addr has been allocated via dma_coherent_alloc, virt_to_bus
> on it will not tell the truth in most cases
> - SCC UART needs to wait several character times even after all the BDs
> have READY bit cleared
> - adds needed board-specific bits for 86xADS
>
> Tested on 8272ADS, 885ADS and 866ADS development boards.
> ---------------------------------
> Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Vitaly, this patch is clearly in conflict with mine.
Mind taking a look at my patch and include the changes I've made?
You'll only have to change the cpm2cpu & cpu2cpm functions...
I would also argue that the STOP_TX command is needed at shutdown, since
this is the canonical way serial ports operate in linux. Also you might want
to change the protocol running on an SCC port after shutdown.
The rest are fine...
Regards
Pantelis
^ permalink raw reply
* Re: [PATCH] cpm_uart: Made non-console uart work
From: Pantelis Antoniou @ 2005-08-02 21:39 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: Kumar Gala, linuxppc-embedded list
In-Reply-To: <42EF9022.5050707@ru.mvista.com>
On Tuesday 02 August 2005 18:24, Vitaly Bordug wrote:
> Kumar, Pantelis,
>
[snip]
Some more comments.
> diff --git a/drivers/serial/cpm_uart/cpm_uart.h
b/drivers/serial/cpm_uart/cpm_uart.h
> --- a/drivers/serial/cpm_uart/cpm_uart.h
> +++ b/drivers/serial/cpm_uart/cpm_uart.h
> @@ -40,6 +40,8 @@
> #define TX_NUM_FIFO 4
> #define TX_BUF_SIZE 32
>
> +#define SCC_WAIT_CLOSING 100
> +
> struct uart_cpm_port {
> struct uart_port port;
> u16 rx_nrfifos;
> @@ -67,6 +69,8 @@ struct uart_cpm_port {
> int bits;
> /* Keep track of 'odd' SMC2 wirings */
> int is_portb;
> + /* wait on close if needed */
> + int wait_closing;
> };
>
> extern int cpm_uart_port_map[UART_NR];
> diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c
b/drivers/serial/cpm_uart/cpm_uart_core.c
> --- a/drivers/serial/cpm_uart/cpm_uart_core.c
> +++ b/drivers/serial/cpm_uart/cpm_uart_core.c
> @@ -12,6 +12,7 @@
> *
> * Copyright (C) 2004 Freescale Semiconductor, Inc.
> * (C) 2004 Intracom, S.A.
> + * (C) 2005 MontaVista Software, Inc. by Vitaly Bordug
<vbordug@ru.mvista.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
> @@ -143,10 +144,13 @@ static void cpm_uart_start_tx(struct uar
> }
>
> if (cpm_uart_tx_pump(port) != 0) {
> - if (IS_SMC(pinfo))
> + if (IS_SMC(pinfo)) {
> smcp->smc_smcm |= SMCM_TX;
> - else
> + smcp->smc_smcmr |= SMCMR_TEN;
> + } else {
> sccp->scc_sccm |= UART_SCCM_TX;
> + pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENT;
> + }
Why the need to mess with the global SCC transmit enable here?
It's dubious IMO.
> }
> }
>
> @@ -265,13 +269,15 @@ static void cpm_uart_int_rx(struct uart_
> } /* End while (i--) */
>
> /* This BD is ready to be used again. Clear status. get next */
> - bdp->cbd_sc &= ~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV);
> + bdp->cbd_sc &= ~(BD_SC_BR | BD_SC_FR | BD_SC_PR | BD_SC_OV | BD_SC_ID);
> bdp->cbd_sc |= BD_SC_EMPTY;
>
> - if (bdp->cbd_sc & BD_SC_WRAP)
> - bdp = pinfo->rx_bd_base;
> - else
> - bdp++;
> + if (bdp->cbd_datlen) {
> + if (bdp->cbd_sc & BD_SC_WRAP)
> + bdp = pinfo->rx_bd_base;
> + else
> + bdp++;
> + }
Why is that? Where ever we queue a buffer descriptor with zero length.
If we ever do that we're screwed in more ways than that.
> } /* End for (;;) */
>
> /* Write back buffer pointer */
> @@ -336,22 +342,22 @@ static irqreturn_t cpm_uart_int(int irq,
>
> if (IS_SMC(pinfo)) {
> events = smcp->smc_smce;
> + smcp->smc_smce = events;
> if (events & SMCM_BRKE)
> uart_handle_break(port);
> if (events & SMCM_RX)
> cpm_uart_int_rx(port, regs);
> if (events & SMCM_TX)
> cpm_uart_int_tx(port, regs);
> - smcp->smc_smce = events;
> } else {
> events = sccp->scc_scce;
> + sccp->scc_scce = events;
> if (events & UART_SCCM_BRKE)
> uart_handle_break(port);
> if (events & UART_SCCM_RX)
> cpm_uart_int_rx(port, regs);
> if (events & UART_SCCM_TX)
> cpm_uart_int_tx(port, regs);
> - sccp->scc_scce = events;
This is a good catch...
> }
> return (events) ? IRQ_HANDLED : IRQ_NONE;
> }
> @@ -360,6 +366,7 @@ static int cpm_uart_startup(struct uart_
> {
> int retval;
> struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
> + int line = pinfo - cpm_uart_ports;
>
> pr_debug("CPM uart[%d]:startup\n", port->line);
>
> @@ -374,18 +381,30 @@ static int cpm_uart_startup(struct uart_
> pinfo->smcp->smc_smcmr |= SMCMR_REN;
> } else {
> pinfo->sccp->scc_sccm |= UART_SCCM_RX;
> + pinfo->sccp->scc_gsmrl |= SCC_GSMRL_ENR;
dido as above.
> }
>
> + cpm_line_cr_cmd(line,CPM_CR_RESTART_TX);
> return 0;
> }
>
> +inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo)
> +{
> + unsigned long orig_jiffies = jiffies;
> + while(1)
> + {
> + schedule_timeout(2);
> + if(time_after(jiffies, orig_jiffies + pinfo->wait_closing))
> + break;
> + }
> +}
> +
perhaps, more like...
unsigned long target_jiffies = jiffies + pinfo->wait_closing;
while (!time_after(jiffies, target_jiffies))
schedule();
> /*
> * Shutdown the uart
> */
> static void cpm_uart_shutdown(struct uart_port *port)
> {
> struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
> - int line = pinfo - cpm_uart_ports;
>
> pr_debug("CPM uart[%d]:shutdown\n", port->line);
>
> @@ -394,6 +413,12 @@ static void cpm_uart_shutdown(struct uar
>
> /* If the port is not the console, disable Rx and Tx. */
> if (!(pinfo->flags & FLAG_CONSOLE)) {
> + /* Wait for all the BDs marked sent */
> + while(!cpm_uart_tx_empty(port))
> + schedule_timeout(2);
> + if(pinfo->wait_closing)
> + cpm_uart_wait_until_send(pinfo);
> +
> /* Stop uarts */
> if (IS_SMC(pinfo)) {
> volatile smc_t *smcp = pinfo->smcp;
> @@ -405,9 +430,6 @@ static void cpm_uart_shutdown(struct uar
> sccp->scc_sccm &= ~(UART_SCCM_TX | UART_SCCM_RX);
> }
>
> - /* Shut them really down and reinit buffer descriptors */
> - cpm_line_cr_cmd(line, CPM_CR_STOP_TX);
> - cpm_uart_initbd(pinfo);
> }
> }
>
> @@ -569,7 +591,10 @@ static int cpm_uart_tx_pump(struct uart_
> /* Pick next descriptor and fill from buffer */
> bdp = pinfo->tx_cur;
>
> - p = bus_to_virt(bdp->cbd_bufaddr);
> + if (pinfo->dma_addr)
> + p=(u8*)((ulong)(pinfo->mem_addr) + bdp->cbd_bufaddr - pinfo->dma_addr);
> + else
> + p = bus_to_virt(bdp->cbd_bufaddr);
this looks bogus to me...
> *p++ = xmit->buf[xmit->tail];
> bdp->cbd_datlen = 1;
> bdp->cbd_sc |= BD_SC_READY;
> @@ -595,7 +620,10 @@ static int cpm_uart_tx_pump(struct uart_
>
> while (!(bdp->cbd_sc & BD_SC_READY) && (xmit->tail != xmit->head)) {
> count = 0;
> - p = bus_to_virt(bdp->cbd_bufaddr);
> + if (pinfo->dma_addr)
> + p=(u8*)((ulong)(pinfo->mem_addr) + bdp->cbd_bufaddr - pinfo->dma_addr);
> + else
> + p = bus_to_virt(bdp->cbd_bufaddr);
> while (count < pinfo->tx_fifosize) {
> *p++ = xmit->buf[xmit->tail];
> xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
> @@ -606,6 +634,7 @@ static int cpm_uart_tx_pump(struct uart_
> }
> bdp->cbd_datlen = count;
> bdp->cbd_sc |= BD_SC_READY;
> + __asm__("eieio");
> /* Get next BD. */
> if (bdp->cbd_sc & BD_SC_WRAP)
> bdp = pinfo->tx_bd_base;
> @@ -632,6 +661,7 @@ static void cpm_uart_initbd(struct uart_
> {
> int i;
> u8 *mem_addr;
> + u8* dma_addr;
> volatile cbd_t *bdp;
>
> pr_debug("CPM uart[%d]:initbd\n", pinfo->port.line);
> @@ -641,14 +671,23 @@ static void cpm_uart_initbd(struct uart_
> * virtual address for us to work with.
> */
> mem_addr = pinfo->mem_addr;
> + dma_addr = (u8*)(pinfo->dma_addr);
> bdp = pinfo->rx_cur = pinfo->rx_bd_base;
> for (i = 0; i < (pinfo->rx_nrfifos - 1); i++, bdp++) {
> - bdp->cbd_bufaddr = virt_to_bus(mem_addr);
> + if (pinfo->dma_addr)
> + bdp->cbd_bufaddr = (ulong)dma_addr;
> + else
> + bdp->cbd_bufaddr = virt_to_bus(mem_addr);
> bdp->cbd_sc = BD_SC_EMPTY | BD_SC_INTRPT;
> + bdp->cbd_datlen = 0;
> mem_addr += pinfo->rx_fifosize;
> + dma_addr += pinfo->rx_fifosize;
> }
> -
> - bdp->cbd_bufaddr = virt_to_bus(mem_addr);
> + if (pinfo->dma_addr)
> + bdp->cbd_bufaddr = (ulong)dma_addr;
> + else
> + bdp->cbd_bufaddr = virt_to_bus(mem_addr);
> + bdp->cbd_datlen = 0;
> bdp->cbd_sc = BD_SC_WRAP | BD_SC_EMPTY | BD_SC_INTRPT;
>
> /* Set the physical address of the host memory
> @@ -656,14 +695,21 @@ static void cpm_uart_initbd(struct uart_
> * virtual address for us to work with.
> */
> mem_addr = pinfo->mem_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos *
pinfo->rx_fifosize);
> + dma_addr = (u8*)(pinfo->dma_addr + L1_CACHE_ALIGN(pinfo->rx_nrfifos *
pinfo->rx_fifosize));
> bdp = pinfo->tx_cur = pinfo->tx_bd_base;
> for (i = 0; i < (pinfo->tx_nrfifos - 1); i++, bdp++) {
> - bdp->cbd_bufaddr = virt_to_bus(mem_addr);
> + if (pinfo->dma_addr)
> + bdp->cbd_bufaddr = (ulong)dma_addr;
> + else
> + bdp->cbd_bufaddr = virt_to_bus(mem_addr);
> bdp->cbd_sc = BD_SC_INTRPT;
> mem_addr += pinfo->tx_fifosize;
> + dma_addr += pinfo->tx_fifosize;
> }
> -
> - bdp->cbd_bufaddr = virt_to_bus(mem_addr);
> + if (pinfo->dma_addr)
> + bdp->cbd_bufaddr = (ulong)dma_addr;
> + else
> + bdp->cbd_bufaddr = virt_to_bus(mem_addr);
> bdp->cbd_sc = BD_SC_WRAP | BD_SC_INTRPT;
> }
>
> @@ -763,6 +809,8 @@ static void cpm_uart_init_smc(struct uar
> /* Using idle charater time requires some additional tuning. */
> up->smc_mrblr = pinfo->rx_fifosize;
> up->smc_maxidl = pinfo->rx_fifosize;
> + up->smc_brklen = 0;
> + up->smc_brkec = 0;
> up->smc_brkcr = 1;
>
> cpm_line_cr_cmd(line, CPM_CR_INIT_TRX);
> @@ -815,6 +863,10 @@ static int cpm_uart_request_port(struct
> return ret;
>
> cpm_uart_initbd(pinfo);
> + if (IS_SMC(pinfo))
> + cpm_uart_init_smc(pinfo);
> + else
> + cpm_uart_init_scc(pinfo);
>
> return 0;
> }
> @@ -902,6 +954,7 @@ struct uart_cpm_port cpm_uart_ports[UART
> .rx_nrfifos = RX_NUM_FIFO,
> .rx_fifosize = RX_BUF_SIZE,
> .set_lineif = scc1_lineif,
> + .wait_closing = SCC_WAIT_CLOSING,
> },
> [UART_SCC2] = {
> .port = {
> @@ -915,6 +968,7 @@ struct uart_cpm_port cpm_uart_ports[UART
> .rx_nrfifos = RX_NUM_FIFO,
> .rx_fifosize = RX_BUF_SIZE,
> .set_lineif = scc2_lineif,
> + .wait_closing = SCC_WAIT_CLOSING,
> },
> [UART_SCC3] = {
> .port = {
> @@ -928,6 +982,7 @@ struct uart_cpm_port cpm_uart_ports[UART
> .rx_nrfifos = RX_NUM_FIFO,
> .rx_fifosize = RX_BUF_SIZE,
> .set_lineif = scc3_lineif,
> + .wait_closing = SCC_WAIT_CLOSING,
> },
> [UART_SCC4] = {
> .port = {
> @@ -941,6 +996,7 @@ struct uart_cpm_port cpm_uart_ports[UART
> .rx_nrfifos = RX_NUM_FIFO,
> .rx_fifosize = RX_BUF_SIZE,
> .set_lineif = scc4_lineif,
> + .wait_closing = SCC_WAIT_CLOSING,
> },
> };
>
> @@ -1081,6 +1137,7 @@ static int __init cpm_uart_console_setup
> return ret;
>
> cpm_uart_initbd(pinfo);
> + cpm_uart_init_scc(pinfo);
>
> if (IS_SMC(pinfo))
> cpm_uart_init_smc(pinfo);
> diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
> --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
> +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
> @@ -82,6 +82,16 @@ void cpm_line_cr_cmd(int line, int cmd)
> void smc1_lineif(struct uart_cpm_port *pinfo)
> {
> volatile cpm8xx_t *cp = cpmp;
> +
> +#if defined (CONFIG_MPC885ADS)
> + /* Enable SMC1 transceivers */
> + {
> + cp->cp_pepar |= 0x000000c0;
> + cp->cp_pedir &= ~0x000000c0;
> + cp->cp_peso &= ~0x00000040;
> + cp->cp_peso |= 0x00000080;
> + }
> +#elif defined (CONFIG_MPC86XADS)
> unsigned int iobits = 0x000000c0;
>
> if (!pinfo->is_portb) {
> @@ -93,41 +103,31 @@ void smc1_lineif(struct uart_cpm_port *p
> ((immap_t *)IMAP_ADDR)->im_ioport.iop_padir &= ~iobits;
> ((immap_t *)IMAP_ADDR)->im_ioport.iop_paodr &= ~iobits;
> }
> -
> -#ifdef CONFIG_MPC885ADS
> - /* Enable SMC1 transceivers */
> - {
> - volatile uint __iomem *bcsr1 = ioremap(BCSR1, 4);
> - uint tmp;
> -
> - tmp = in_be32(bcsr1);
> - tmp &= ~BCSR1_RS232EN_1;
> - out_be32(bcsr1, tmp);
> - iounmap(bcsr1);
> - }
> #endif
> -
> pinfo->brg = 1;
> }
>
> void smc2_lineif(struct uart_cpm_port *pinfo)
> {
> -#ifdef CONFIG_MPC885ADS
> volatile cpm8xx_t *cp = cpmp;
> - volatile uint __iomem *bcsr1;
> - uint tmp;
> -
> +#if defined (CONFIG_MPC885ADS)
> cp->cp_pepar |= 0x00000c00;
> cp->cp_pedir &= ~0x00000c00;
> cp->cp_peso &= ~0x00000400;
> cp->cp_peso |= 0x00000800;
> +#elif defined (CONFIG_MPC86XADS)
> + unsigned int iobits = 0x00000c00;
> +
> + if (!pinfo->is_portb) {
> + cp->cp_pbpar |= iobits;
> + cp->cp_pbdir &= ~iobits;
> + cp->cp_pbodr &= ~iobits;
> + } else {
> + ((immap_t *)IMAP_ADDR)->im_ioport.iop_papar |= iobits;
> + ((immap_t *)IMAP_ADDR)->im_ioport.iop_padir &= ~iobits;
> + ((immap_t *)IMAP_ADDR)->im_ioport.iop_paodr &= ~iobits;
> + }
>
> - /* Enable SMC2 transceivers */
> - bcsr1 = ioremap(BCSR1, 4);
> - tmp = in_be32(bcsr1);
> - tmp &= ~BCSR1_RS232EN_2;
> - out_be32(bcsr1, tmp);
> - iounmap(bcsr1);
> #endif
>
> pinfo->brg = 2;
>
^ permalink raw reply
* Beginning Merger Patch
From: Jon Loeliger @ 2005-08-02 22:59 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org, linuxppc64-dev
Folks,
I have grabbed my asbestos suit.
Here is a patch to begin the process of merging
the PPC32 and PPC64 include directories into a
new common "powerpc" arch.
This patch introduces the include/asm-powerpc directory.
It then places into it, all of the files in asm-ppc and
asm-ppc64 that are essentially identical. A stub is left
in asm-ppc and asm-ppc64 pointing to the unified files.
No real thought went into this set of files; these are
the dead-simple identical files for starters!
This patch can be rsync'ed from here:
rsync www.jdl.com::pub/software/patches/linux-20050802-01.patch 20050802-01.patch
It may be cg-pull'ed from this tree:
cg-clone http://www.jdl.com/pub/software/linux-2.6-jdl.git
or
cg-clone rsync://www.jdl.com/pub/software/linux-2.6-jdl.git
Oh yeah.
jdl
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
commit 2c6a0ac49cb3ec2b73fc48b015aa3550e2df27c7
tree f12b4db25885fb67cacf1597daf2a789140c974d
parent 9a351e30d72d409ec62c83f380e330e0baa584b4
author Jon Loeliger <jdl@freescale.com> Tue, 02 Aug 2005 14:27:26 -0500
committer Jon Loeliger <jdl@freescale.com> Tue, 02 Aug 2005 14:27:26 -0500
include/asm-powerpc/8253pit.h | 10 +++++++++
include/asm-powerpc/agp.h | 23 +++++++++++++++++++++
include/asm-powerpc/cputime.h | 1 +
include/asm-powerpc/emergency-restart.h | 1 +
include/asm-powerpc/errno.h | 18 ++++++++++++++++
include/asm-powerpc/hdreg.h | 1 +
include/asm-powerpc/ipc.h | 1 +
include/asm-powerpc/linkage.h | 6 +++++
include/asm-powerpc/local.h | 1 +
include/asm-powerpc/parport.h | 18 ++++++++++++++++
include/asm-powerpc/percpu.h | 1 +
include/asm-powerpc/poll.h | 32 +++++++++++++++++++++++++++++
include/asm-powerpc/resource.h | 1 +
include/asm-powerpc/shmparam.h | 13 ++++++++++++
include/asm-powerpc/xor.h | 1 +
include/asm-ppc/8253pit.h | 12 ++---------
include/asm-ppc/agp.h | 25 ++---------------------
include/asm-ppc/cputime.h | 5 -----
include/asm-ppc/emergency-restart.h | 5 -----
include/asm-ppc/errno.h | 13 ++----------
include/asm-ppc/linkage.h | 8 ++-----
include/asm-ppc/local.h | 5 -----
include/asm-ppc/parport.h | 19 +----------------
include/asm-ppc/percpu.h | 5 -----
include/asm-ppc/poll.h | 25 ++---------------------
include/asm-ppc/resource.h | 5 -----
include/asm-ppc/shmparam.h | 7 ++----
include/asm-ppc64/8253pit.h | 12 ++---------
include/asm-ppc64/agp.h | 25 ++---------------------
include/asm-ppc64/cputime.h | 5 -----
include/asm-ppc64/emergency-restart.h | 5 -----
include/asm-ppc64/errno.h | 20 ++----------------
include/asm-ppc64/linkage.h | 8 ++-----
include/asm-ppc64/parport.h | 19 +----------------
include/asm-ppc64/percpu.h | 5 -----
include/asm-ppc64/poll.h | 34 ++-----------------------------
include/asm-ppc64/resource.h | 5 -----
include/asm-ppc64/shmparam.h | 15 ++------------
38 files changed, 154 insertions(+), 261 deletions(-)
diff --git a/include/asm-powerpc/8253pit.h b/include/asm-powerpc/8253pit.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/8253pit.h
@@ -0,0 +1,10 @@
+/*
+ * 8253/8254 Programmable Interval Timer
+ */
+
+#ifndef _ASM_POWERPC_8253PIT_H
+#define _ASM_POWERPC_8253PIT_H
+
+#define PIT_TICK_RATE 1193182UL
+
+#endif /* _ASM_POWERPC_8253PIT_H */
diff --git a/include/asm-powerpc/agp.h b/include/asm-powerpc/agp.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/agp.h
@@ -0,0 +1,23 @@
+#ifndef _ASM_POWERPC_AGP_H
+#define _ASM_POWERPC_AGP_H
+
+#include <asm/io.h>
+
+/* nothing much needed here */
+
+#define map_page_into_agp(page)
+#define unmap_page_from_agp(page)
+#define flush_agp_mappings()
+#define flush_agp_cache() mb()
+
+/* Convert a physical address to an address suitable for the GART. */
+#define phys_to_gart(x) (x)
+#define gart_to_phys(x) (x)
+
+/* GATT allocation. Returns/accepts GATT kernel virtual address. */
+#define alloc_gatt_pages(order) \
+ ((char *)__get_free_pages(GFP_KERNEL, (order)))
+#define free_gatt_pages(table, order) \
+ free_pages((unsigned long)(table), (order))
+
+#endif /* _ASM_POWERPC_AGP_H */
diff --git a/include/asm-powerpc/cputime.h b/include/asm-powerpc/cputime.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/cputime.h
@@ -0,0 +1 @@
+#include <asm-generic/cputime.h>
diff --git a/include/asm-powerpc/emergency-restart.h b/include/asm-powerpc/emergency-restart.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/emergency-restart.h
@@ -0,0 +1 @@
+#include <asm-generic/emergency-restart.h>
diff --git a/include/asm-powerpc/errno.h b/include/asm-powerpc/errno.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/errno.h
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */
+
+#ifndef _ASM_POWERPC_ERRNO_H
+#define _ASM_POWERPC_ERRNO_H
+
+#include <asm-generic/errno.h>
+
+#undef EDEADLOCK
+#define EDEADLOCK 58 /* File locking deadlock error */
+
+#define _LAST_ERRNO 516
+
+#endif /* _ASM_POWERPC_ERRNO_H */
diff --git a/include/asm-powerpc/hdreg.h b/include/asm-powerpc/hdreg.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/hdreg.h
@@ -0,0 +1 @@
+#include <asm-generic/hdreg.h>
diff --git a/include/asm-powerpc/ipc.h b/include/asm-powerpc/ipc.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/ipc.h
@@ -0,0 +1 @@
+#include <asm-generic/ipc.h>
diff --git a/include/asm-powerpc/linkage.h b/include/asm-powerpc/linkage.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/linkage.h
@@ -0,0 +1,6 @@
+#ifndef _ASM_POWERPC_LINKAGE_H
+#define _ASM_POWERPC_LINKAGE_H
+
+/* Nothing to see here... */
+
+#endif /* _ASM_POWERPC_LINKAGE_H */
diff --git a/include/asm-powerpc/local.h b/include/asm-powerpc/local.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/local.h
@@ -0,0 +1 @@
+#include <asm-generic/local.h>
diff --git a/include/asm-powerpc/parport.h b/include/asm-powerpc/parport.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/parport.h
@@ -0,0 +1,18 @@
+/*
+ * parport.h: platform-specific PC-style parport initialisation
+ *
+ * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
+ *
+ * This file should only be included by drivers/parport/parport_pc.c.
+ */
+
+#ifndef _ASM_POWERPC_PARPORT_H
+#define _ASM_POWERPC_PARPORT_H
+
+static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
+static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
+{
+ return parport_pc_find_isa_ports (autoirq, autodma);
+}
+
+#endif /* _ASM_POWERPC_PARPORT_H */
diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/percpu.h
@@ -0,0 +1 @@
+#include <asm-generic/percpu.h>
diff --git a/include/asm-powerpc/poll.h b/include/asm-powerpc/poll.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/poll.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2001 PPC64 Team, IBM Corp
+ *
+ * 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.
+ */
+
+#ifndef _ASM_POWERPC_POLL_H
+#define _ASM_POWERPC_POLL_H
+
+#define POLLIN 0x0001
+#define POLLPRI 0x0002
+#define POLLOUT 0x0004
+#define POLLERR 0x0008
+#define POLLHUP 0x0010
+#define POLLNVAL 0x0020
+#define POLLRDNORM 0x0040
+#define POLLRDBAND 0x0080
+#define POLLWRNORM 0x0100
+#define POLLWRBAND 0x0200
+#define POLLMSG 0x0400
+#define POLLREMOVE 0x1000
+
+struct pollfd {
+ int fd;
+ short events;
+ short revents;
+};
+
+#endif /* _ASM_POWERPC_POLL_H */
diff --git a/include/asm-powerpc/resource.h b/include/asm-powerpc/resource.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/resource.h
@@ -0,0 +1 @@
+#include <asm-generic/resource.h>
diff --git a/include/asm-powerpc/shmparam.h b/include/asm-powerpc/shmparam.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/shmparam.h
@@ -0,0 +1,13 @@
+/*
+ * 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.
+ */
+
+#ifndef _ASM_POWERPC_SHMPARAM_H
+#define _ASM_POWERPC_SHMPARAM_H
+
+#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
+
+#endif /* _ASM_POWERPC_SHMPARAM_H */
diff --git a/include/asm-powerpc/xor.h b/include/asm-powerpc/xor.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/xor.h
@@ -0,0 +1 @@
+#include <asm-generic/xor.h>
diff --git a/include/asm-ppc/8253pit.h b/include/asm-ppc/8253pit.h
--- a/include/asm-ppc/8253pit.h
+++ b/include/asm-ppc/8253pit.h
@@ -1,10 +1,2 @@
-/*
- * 8253/8254 Programmable Interval Timer
- */
-
-#ifndef _8253PIT_H
-#define _8253PIT_H
-
-#define PIT_TICK_RATE 1193182UL
-
-#endif
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/8253pit.h>
diff --git a/include/asm-ppc/agp.h b/include/asm-ppc/agp.h
--- a/include/asm-ppc/agp.h
+++ b/include/asm-ppc/agp.h
@@ -1,23 +1,2 @@
-#ifndef AGP_H
-#define AGP_H 1
-
-#include <asm/io.h>
-
-/* nothing much needed here */
-
-#define map_page_into_agp(page)
-#define unmap_page_from_agp(page)
-#define flush_agp_mappings()
-#define flush_agp_cache() mb()
-
-/* Convert a physical address to an address suitable for the GART. */
-#define phys_to_gart(x) (x)
-#define gart_to_phys(x) (x)
-
-/* GATT allocation. Returns/accepts GATT kernel virtual address. */
-#define alloc_gatt_pages(order) \
- ((char *)__get_free_pages(GFP_KERNEL, (order)))
-#define free_gatt_pages(table, order) \
- free_pages((unsigned long)(table), (order))
-
-#endif
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/agp.h>
diff --git a/include/asm-ppc/cputime.h b/include/asm-ppc/cputime.h
--- a/include/asm-ppc/cputime.h
+++ b/include/asm-ppc/cputime.h
@@ -1,6 +1 @@
-#ifndef __PPC_CPUTIME_H
-#define __PPC_CPUTIME_H
-
#include <asm-generic/cputime.h>
-
-#endif /* __PPC_CPUTIME_H */
diff --git a/include/asm-ppc/emergency-restart.h b/include/asm-ppc/emergency-restart.h
--- a/include/asm-ppc/emergency-restart.h
+++ b/include/asm-ppc/emergency-restart.h
@@ -1,6 +1 @@
-#ifndef _ASM_EMERGENCY_RESTART_H
-#define _ASM_EMERGENCY_RESTART_H
-
#include <asm-generic/emergency-restart.h>
-
-#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-ppc/errno.h b/include/asm-ppc/errno.h
--- a/include/asm-ppc/errno.h
+++ b/include/asm-ppc/errno.h
@@ -1,11 +1,2 @@
-#ifndef _PPC_ERRNO_H
-#define _PPC_ERRNO_H
-
-#include <asm-generic/errno.h>
-
-#undef EDEADLOCK
-#define EDEADLOCK 58 /* File locking deadlock error */
-
-#define _LAST_ERRNO 516
-
-#endif
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/errno.h>
diff --git a/include/asm-ppc/linkage.h b/include/asm-ppc/linkage.h
--- a/include/asm-ppc/linkage.h
+++ b/include/asm-ppc/linkage.h
@@ -1,6 +1,2 @@
-#ifndef __ASM_LINKAGE_H
-#define __ASM_LINKAGE_H
-
-/* Nothing to see here... */
-
-#endif
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/linkage.h>
diff --git a/include/asm-ppc/local.h b/include/asm-ppc/local.h
--- a/include/asm-ppc/local.h
+++ b/include/asm-ppc/local.h
@@ -1,6 +1 @@
-#ifndef __PPC_LOCAL_H
-#define __PPC_LOCAL_H
-
#include <asm-generic/local.h>
-
-#endif /* __PPC_LOCAL_H */
diff --git a/include/asm-ppc/parport.h b/include/asm-ppc/parport.h
--- a/include/asm-ppc/parport.h
+++ b/include/asm-ppc/parport.h
@@ -1,18 +1 @@
-/*
- * parport.h: platform-specific PC-style parport initialisation
- *
- * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
- *
- * This file should only be included by drivers/parport/parport_pc.c.
- */
-
-#ifndef _ASM_PPC_PARPORT_H
-#define _ASM_PPC_PARPORT_H
-
-static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
-static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
-{
- return parport_pc_find_isa_ports (autoirq, autodma);
-}
-
-#endif /* !(_ASM_PPC_PARPORT_H) */
+#include <asm-powerpc/parport.h>
diff --git a/include/asm-ppc/percpu.h b/include/asm-ppc/percpu.h
--- a/include/asm-ppc/percpu.h
+++ b/include/asm-ppc/percpu.h
@@ -1,6 +1 @@
-#ifndef __ARCH_PPC_PERCPU__
-#define __ARCH_PPC_PERCPU__
-
#include <asm-generic/percpu.h>
-
-#endif /* __ARCH_PPC_PERCPU__ */
diff --git a/include/asm-ppc/poll.h b/include/asm-ppc/poll.h
--- a/include/asm-ppc/poll.h
+++ b/include/asm-ppc/poll.h
@@ -1,23 +1,2 @@
-#ifndef __PPC_POLL_H
-#define __PPC_POLL_H
-
-#define POLLIN 0x0001
-#define POLLPRI 0x0002
-#define POLLOUT 0x0004
-#define POLLERR 0x0008
-#define POLLHUP 0x0010
-#define POLLNVAL 0x0020
-#define POLLRDNORM 0x0040
-#define POLLRDBAND 0x0080
-#define POLLWRNORM 0x0100
-#define POLLWRBAND 0x0200
-#define POLLMSG 0x0400
-#define POLLREMOVE 0x1000
-
-struct pollfd {
- int fd;
- short events;
- short revents;
-};
-
-#endif
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/poll.h>
diff --git a/include/asm-ppc/resource.h b/include/asm-ppc/resource.h
--- a/include/asm-ppc/resource.h
+++ b/include/asm-ppc/resource.h
@@ -1,6 +1 @@
-#ifndef _PPC_RESOURCE_H
-#define _PPC_RESOURCE_H
-
#include <asm-generic/resource.h>
-
-#endif
diff --git a/include/asm-ppc/shmparam.h b/include/asm-ppc/shmparam.h
--- a/include/asm-ppc/shmparam.h
+++ b/include/asm-ppc/shmparam.h
@@ -1,6 +1,3 @@
-#ifndef _PPC_SHMPARAM_H
-#define _PPC_SHMPARAM_H
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/shmparam.h>
-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
-
-#endif /* _PPC_SHMPARAM_H */
diff --git a/include/asm-ppc64/8253pit.h b/include/asm-ppc64/8253pit.h
--- a/include/asm-ppc64/8253pit.h
+++ b/include/asm-ppc64/8253pit.h
@@ -1,10 +1,2 @@
-/*
- * 8253/8254 Programmable Interval Timer
- */
-
-#ifndef _8253PIT_H
-#define _8253PIT_H
-
-#define PIT_TICK_RATE 1193182UL
-
-#endif
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/8253pit.h>
diff --git a/include/asm-ppc64/agp.h b/include/asm-ppc64/agp.h
--- a/include/asm-ppc64/agp.h
+++ b/include/asm-ppc64/agp.h
@@ -1,23 +1,2 @@
-#ifndef AGP_H
-#define AGP_H 1
-
-#include <asm/io.h>
-
-/* nothing much needed here */
-
-#define map_page_into_agp(page)
-#define unmap_page_from_agp(page)
-#define flush_agp_mappings()
-#define flush_agp_cache() mb()
-
-/* Convert a physical address to an address suitable for the GART. */
-#define phys_to_gart(x) (x)
-#define gart_to_phys(x) (x)
-
-/* GATT allocation. Returns/accepts GATT kernel virtual address. */
-#define alloc_gatt_pages(order) \
- ((char *)__get_free_pages(GFP_KERNEL, (order)))
-#define free_gatt_pages(table, order) \
- free_pages((unsigned long)(table), (order))
-
-#endif
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/agp.h>
diff --git a/include/asm-ppc64/cputime.h b/include/asm-ppc64/cputime.h
--- a/include/asm-ppc64/cputime.h
+++ b/include/asm-ppc64/cputime.h
@@ -1,6 +1 @@
-#ifndef __PPC_CPUTIME_H
-#define __PPC_CPUTIME_H
-
#include <asm-generic/cputime.h>
-
-#endif /* __PPC_CPUTIME_H */
diff --git a/include/asm-ppc64/emergency-restart.h b/include/asm-ppc64/emergency-restart.h
--- a/include/asm-ppc64/emergency-restart.h
+++ b/include/asm-ppc64/emergency-restart.h
@@ -1,6 +1 @@
-#ifndef _ASM_EMERGENCY_RESTART_H
-#define _ASM_EMERGENCY_RESTART_H
-
#include <asm-generic/emergency-restart.h>
-
-#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-ppc64/errno.h b/include/asm-ppc64/errno.h
--- a/include/asm-ppc64/errno.h
+++ b/include/asm-ppc64/errno.h
@@ -1,18 +1,2 @@
-#ifndef _PPC64_ERRNO_H
-#define _PPC64_ERRNO_H
-
-/*
- * 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.
- */
-
-#include <asm-generic/errno.h>
-
-#undef EDEADLOCK
-#define EDEADLOCK 58 /* File locking deadlock error */
-
-#define _LAST_ERRNO 516
-
-#endif
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/errno.h>
diff --git a/include/asm-ppc64/linkage.h b/include/asm-ppc64/linkage.h
--- a/include/asm-ppc64/linkage.h
+++ b/include/asm-ppc64/linkage.h
@@ -1,6 +1,2 @@
-#ifndef __ASM_LINKAGE_H
-#define __ASM_LINKAGE_H
-
-/* Nothing to see here... */
-
-#endif
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/linkage.h>
diff --git a/include/asm-ppc64/parport.h b/include/asm-ppc64/parport.h
--- a/include/asm-ppc64/parport.h
+++ b/include/asm-ppc64/parport.h
@@ -1,18 +1 @@
-/*
- * parport.h: platform-specific PC-style parport initialisation
- *
- * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
- *
- * This file should only be included by drivers/parport/parport_pc.c.
- */
-
-#ifndef _ASM_PPC64_PARPORT_H
-#define _ASM_PPC64_PARPORT_H
-
-static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
-static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
-{
- return parport_pc_find_isa_ports (autoirq, autodma);
-}
-
-#endif /* !(_ASM_PPC_PARPORT_H) */
+#include <asm-powerpc/parport.h>
diff --git a/include/asm-ppc64/percpu.h b/include/asm-ppc64/percpu.h
--- a/include/asm-ppc64/percpu.h
+++ b/include/asm-ppc64/percpu.h
@@ -1,6 +1 @@
-#ifndef __ARCH_PPC64_PERCPU__
-#define __ARCH_PPC64_PERCPU__
-
#include <asm-generic/percpu.h>
-
-#endif /* __ARCH_PPC64_PERCPU__ */
diff --git a/include/asm-ppc64/poll.h b/include/asm-ppc64/poll.h
--- a/include/asm-ppc64/poll.h
+++ b/include/asm-ppc64/poll.h
@@ -1,32 +1,2 @@
-#ifndef __PPC64_POLL_H
-#define __PPC64_POLL_H
-
-/*
- * Copyright (C) 2001 PPC64 Team, IBM Corp
- *
- * 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.
- */
-
-#define POLLIN 0x0001
-#define POLLPRI 0x0002
-#define POLLOUT 0x0004
-#define POLLERR 0x0008
-#define POLLHUP 0x0010
-#define POLLNVAL 0x0020
-#define POLLRDNORM 0x0040
-#define POLLRDBAND 0x0080
-#define POLLWRNORM 0x0100
-#define POLLWRBAND 0x0200
-#define POLLMSG 0x0400
-#define POLLREMOVE 0x1000
-
-struct pollfd {
- int fd;
- short events;
- short revents;
-};
-
-#endif /* __PPC64_POLL_H */
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/poll.h>
diff --git a/include/asm-ppc64/resource.h b/include/asm-ppc64/resource.h
--- a/include/asm-ppc64/resource.h
+++ b/include/asm-ppc64/resource.h
@@ -1,6 +1 @@
-#ifndef _PPC64_RESOURCE_H
-#define _PPC64_RESOURCE_H
-
#include <asm-generic/resource.h>
-
-#endif /* _PPC64_RESOURCE_H */
diff --git a/include/asm-ppc64/shmparam.h b/include/asm-ppc64/shmparam.h
--- a/include/asm-ppc64/shmparam.h
+++ b/include/asm-ppc64/shmparam.h
@@ -1,13 +1,2 @@
-#ifndef _PPC64_SHMPARAM_H
-#define _PPC64_SHMPARAM_H
-
-/*
- * 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.
- */
-
-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
-
-#endif /* _PPC64_SHMPARAM_H */
+/* ppc and ppc64 are being merged into powerpc */
+#include <asm-powerpc/shmparam.h>
^ permalink raw reply
* Re: Beginning Merger Patch
From: Eugene Surovegin @ 2005-08-02 23:05 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org, linuxppc64-dev
In-Reply-To: <1123023575.2614.25.camel@cashmere.sps.mot.com>
On Tue, Aug 02, 2005 at 05:59:35PM -0500, Jon Loeliger wrote:
> Here is a patch to begin the process of merging
> the PPC32 and PPC64 include directories into a
> new common "powerpc" arch.
>
> This patch introduces the include/asm-powerpc directory.
> It then places into it, all of the files in asm-ppc and
> asm-ppc64 that are essentially identical. A stub is left
> in asm-ppc and asm-ppc64 pointing to the unified files.
> No real thought went into this set of files; these are
> the dead-simple identical files for starters!
Hmm, I got an impression that we wouldn't touch ppc and ppc64 for
now and just _copy_ or create clean stuff into powerpc. I think this
will be much safer, at least at the beginning.
--
Eugene
^ permalink raw reply
* Re: Beginning Merger Patch
From: Dan Malek @ 2005-08-02 23:10 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc64-dev, linuxppc-dev@ozlabs.org
In-Reply-To: <1123023575.2614.25.camel@cashmere.sps.mot.com>
On Aug 2, 2005, at 6:59 PM, Jon Loeliger wrote:
> ..... A stub is left
> in asm-ppc and asm-ppc64 pointing to the unified files.
Why bother? You may as well change all of the source
files, too, or else that will never get done :-)
Thanks.
-- Dan
^ permalink raw reply
* Re: Beginning Merger Patch
From: Dan Malek @ 2005-08-02 23:12 UTC (permalink / raw)
To: Eugene Surovegin; +Cc: linuxppc64-dev, linuxppc-dev@ozlabs.org
In-Reply-To: <20050802230537.GA9125@gate.ebshome.net>
On Aug 2, 2005, at 7:05 PM, Eugene Surovegin wrote:
> Hmm, I got an impression that we wouldn't touch ppc and ppc64 for
> now and just _copy_ or create clean stuff into powerpc. I think this
> will be much safer, at least at the beginning.
Shouldn't this be a 2.7 project?
-- Dan
^ permalink raw reply
* Re: Beginning Merger Patch
From: Eugene Surovegin @ 2005-08-02 23:17 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc64-dev, linuxppc-dev@ozlabs.org
In-Reply-To: <f316a2ceff0d79bb6cf9d8530555496b@embeddededge.com>
On Tue, Aug 02, 2005 at 07:12:05PM -0400, Dan Malek wrote:
>
> On Aug 2, 2005, at 7:05 PM, Eugene Surovegin wrote:
>
> >Hmm, I got an impression that we wouldn't touch ppc and ppc64 for
> >now and just _copy_ or create clean stuff into powerpc. I think this
> >will be much safer, at least at the beginning.
>
> Shouldn't this be a 2.7 project?
Maybe, I'm still waiting for official announcement from the maintainer
:)
--
Eugene
^ permalink raw reply
* Re: Serial console
From: Daniel Ann @ 2005-08-03 0:16 UTC (permalink / raw)
To: Kumar Gala; +Cc: JohnsonCheng, linuxppc-embedded
In-Reply-To: <E227A82E-9A6F-449F-9CD9-9FD6D1893082@freescale.com>
Right. Guess I found it hard way :)
After using LEVEL interrupt, it all works now.
On 8/2/05, Kumar Gala <kumar.gala@freescale.com> wrote:
>=20
> On Aug 1, 2005, at 10:38 PM, JohnsonCheng wrote:
>=20
> > Dear Daniel,
> >
> > I also meet this problem on MPC8245 with linux-2.6.12.3, and I
> > found it uses
> > LEVEL for interrupt in sandpoint.c. Do you have any idea for it?
>=20
> All internal interrupts on the MPC8245/1 should be LEVEL interrupts.
>=20
> - kumar
>=20
> > -----Original Message-----
> > From: linuxppc-embedded-bounces@ozlabs.org
> > [mailto:linuxppc-embedded-bounces@ozlabs.org] On Behalf Of Daniel Ann
> > Sent: Monday, August 01, 2005 9:27 AM
> > To: Anton W=F6llert
> > Cc: linuxppc-embedded@ozlabs.org
> > Subject: Re: Serial console
> >
> > Thanks for your input Anton.
> > I'm not all that certain about sandpoint platform has its own serial
> > driver so I've worked with 8250.c. Anyway, I've got it working now. It
> > was problem with interrupt. As soon as I changed interrupt from EGDE
> > to LEVEL it began working. Altho I'm faced with yet another problem
> > with openpic but I'm digging thru it at the moment.
> >
> > BTW, I have no idea why EDGE didnt work and LEVEL does.
> >
> > Cheers,
> > Daniel
> >
> > On 7/30/05, Anton W=F6llert <a.woellert@gmail.com> wrote:
> >
> >> Daniel Ann wrote:
> >>
> >>> Hi folks,
> >>>
> >>> Having all the kernel boot up log on console means that I've done
> >>> some
> >>> part right. But why am I not getting anything from the user
> >>> processes
> >>> on the console screen ?
> >>>
> >>> Is there anything I need to do on the kernel config ?
> >>>
> >>>
> >>
> >> Hi, we've had the same problem some time ago on a tqm850l
> >> (mpc850). Our
> >> problem was, that we had registered two serial consoles in the kernel
> >> config or something like that. we had to disable all serial-driver
> >> stuff
> >> and enable just the platform-specific serial-console driver. we
> >> tracked
> >> this down with inserting a printk(buf) into the tty_write fs-op of
> >> the
> >> serial-port driver in drivers/char/tty_io.c. the ttyS0 was used
> >> but has
> >> taken another serial-driver than the platform specific.
> >>
> >> may this help you :)
> >>
> >>
> >> anton
> >>
> >>
> >
> >
> > --
> > Daniel
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> >
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> >
>=20
>=20
--=20
Daniel
^ permalink raw reply
* Re: A PPC kernel issue with UART ??
From: Daniel Ann @ 2005-08-03 0:21 UTC (permalink / raw)
To: JohnsonCheng; +Cc: linuxppc-embedded
In-Reply-To: <20050802114145.36B2667D77@ozlabs.org>
Johnson,
You know what? I've had the exact same problem only day or two ago. I
think the mail subject was "serial console" or something similar. Have
a read at it.
BTW, My problem was with interrupt setting.
Daniel.
On 8/2/05, JohnsonCheng <johnsoncheng@qnap.com.tw> wrote:
>=20
>=20
> Dear All,
>=20
> =20
>=20
> I meet a wired UART problem on linux-2.6 with MPC8241 chip.
>=20
> =20
>=20
> My Environment is as following:=20
>=20
> CPU: MPC8241
>=20
> Linux: 2.6.12.3
>=20
> COM1 offset: 0x4500, COM2 offset: 0x4600
>=20
> =20
>=20
> When I booting my rootfs, it hangs at following message:
>=20
> RAMDISK: Compressed image found at block 0
>=20
> VFS: Mounted root (ext2 filesystem) readonly.
>=20
> Freeing unused kernel memory: 104k init
>=20
> EXT2-fs warning: checktime reached, running e2fsck is recommended
>=20
> =20
>=20
> I had add printk in tty_write() of drivers/char/tty_io.c, the message fro=
m
> rootfs have printed.
>=20
> The conclusion is that message can be printed by printk() in linux kernel=
,
> but can't be printed by printf() in user mode. I think it must be somethi=
ng
> wrong for my UART configurations, does anybody know it??
>=20
> =20
>=20
> =20
>=20
> Best Regards,
>=20
> Johnson Cheng
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
>=20
--=20
Daniel
^ permalink raw reply
* Re: MPC8245/1 UARTs and linux-2.6.13-rc5
From: Daniel Ann @ 2005-08-03 1:15 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-embedded Linux list
In-Reply-To: <0901C40A-7BC0-4227-BEE2-195478DF0CD0@freescale.com>
Kumar,
Just on the subject, I'm finding that I have to define STD_COM_FLAGS
with ASYNC_SKIP_TEST to get my 8245 uart to display on console.
Purpose of ASYNC_SKIP_TEST is to skip below section of code found in
8250.c
[snip]
static void autoconfig(struct uart_8250_port *up, unsigned int probeflags)
[snip]
if (!(up->port.flags & UPF_SKIP_TEST)) {
serial_outp(up, UART_MCR, UART_MCR_LOOP | 0x0A);
status1 =3D serial_inp(up, UART_MSR) & 0xF0;
serial_outp(up, UART_MCR, save_mcr);
if (status1 !=3D 0x90) {
DEBUG_AUTOCONF("LOOP test failed (%02x) ",
status1);
goto out;
}
}
[end]
If I dont skip, then kernel boots up fine, with all the kernel printk,
but from /sbin/init onwards, I get no display and looking at the uart
interrupt using debugger, I see that interrupt hasnt been enabled. But
if I skip, all works like a charm.
Any idea why ?
On 8/2/05, Kumar Gala <kumar.gala@freescale.com> wrote:
> For all people have issues with the UARTs on MPC8245/1. In the
> 2.6.13 kernel we reworked the support for UARTs to be platform
> devices. If you look at the 2.6.13-rc5 release you will see the
> changes that went in. Additionally, the sandpoint reference platform
> code was updated to take advantage of the changes.
>=20
> Hopefully, these changes will make some of the issues you might be
> facing less of a problem.
>=20
> - kumar
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
--=20
Daniel
^ permalink raw reply
* Issue with running depmod after cross compiling
From: Daniel Ann @ 2005-08-03 1:27 UTC (permalink / raw)
To: linuxppc-embedded
Hey folks,
For certain, I understand why running make module_install fails if I
run it after cross compiling the kernel+module.
What I'm doing now is, I've just commented out the bit in Makefile
(where it exec's depmod), and everythings cool.
BUT, problem with this method is, I get none of the module.dep and
many related files for auto loading of module.
What would be considered reasonable if I was to solve this ?
Thanks for your thought on this in advance.
--=20
Daniel
^ permalink raw reply
* Re: Beginning Merger Patch
From: Nathan Lynch @ 2005-08-03 2:17 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org, linuxppc64-dev
In-Reply-To: <1123023575.2614.25.camel@cashmere.sps.mot.com>
Jon Loeliger wrote:
> Folks,
>
> I have grabbed my asbestos suit.
>
> Here is a patch to begin the process of merging
> the PPC32 and PPC64 include directories into a
> new common "powerpc" arch.
Perhaps you could briefly explain the motivation for this?
I think I've heard/read that something like this was in the works, but
I'd like to know what the problem is, and why it should be solved this
way instead of e.g. x86_64's method of including headers directly from
asm-i386.
Nathan
^ permalink raw reply
* Re: Beginning Merger Patch
From: Josh Boyer @ 2005-08-03 2:38 UTC (permalink / raw)
To: Eugene Surovegin; +Cc: linuxppc-dev@ozlabs.org, linuxppc64-dev
In-Reply-To: <20050802230537.GA9125@gate.ebshome.net>
On Tue, 2005-08-02 at 16:05 -0700, Eugene Surovegin wrote:
> On Tue, Aug 02, 2005 at 05:59:35PM -0500, Jon Loeliger wrote:
> > Here is a patch to begin the process of merging
> > the PPC32 and PPC64 include directories into a
> > new common "powerpc" arch.
> >
> > This patch introduces the include/asm-powerpc directory.
> > It then places into it, all of the files in asm-ppc and
> > asm-ppc64 that are essentially identical. A stub is left
> > in asm-ppc and asm-ppc64 pointing to the unified files.
> > No real thought went into this set of files; these are
> > the dead-simple identical files for starters!
>
> Hmm, I got an impression that we wouldn't touch ppc and ppc64 for
> now and just _copy_ or create clean stuff into powerpc. I think this
> will be much safer, at least at the beginning.
Safer, maybe. But then you have triple maintenance, since all the files
in question were just duplicates.
Patches like this don't need to be applied right away. They take time
and lots of vetting. They can live as separate entities until they are
really ready to be committed. That being said, I say go whole-hog and
do it as Jon has done. Especially considering that he has a git tree
that can be worked from.
josh
^ permalink raw reply
* Re: Beginning Merger Patch
From: Eugene Surovegin @ 2005-08-03 2:58 UTC (permalink / raw)
To: Nathan Lynch; +Cc: linuxppc-dev@ozlabs.org, linuxppc64-dev
In-Reply-To: <20050803021742.GB3985@otto>
On Tue, Aug 02, 2005 at 09:17:42PM -0500, Nathan Lynch wrote:
> Jon Loeliger wrote:
> > Folks,
> >
> > I have grabbed my asbestos suit.
> >
> > Here is a patch to begin the process of merging
> > the PPC32 and PPC64 include directories into a
> > new common "powerpc" arch.
>
> Perhaps you could briefly explain the motivation for this?
>
> I think I've heard/read that something like this was in the works, but
> I'd like to know what the problem is, and why it should be solved this
> way instead of e.g. x86_64's method of including headers directly from
> asm-i386.
I think the reason for such approach is that there will be no asm-ppc
and asm-ppc64 in the end of this transition. This differs
significantly from i386/x86_64 situation.
--
Eugene
^ permalink raw reply
* Merging ppc32 and ppc64
From: Paul Mackerras @ 2005-08-03 3:07 UTC (permalink / raw)
To: linuxppc-dev, linuxppc64-dev
At OLS I discussed the idea of merging the ppc32 and ppc64
architectures in the Linux kernel with various ppc32 and ppc64 kernel
hackers and users. There was broad agreement that this would be a
good thing to do, so we are going to go ahead and do it.
The plan is to create include/asm-powerpc and arch/powerpc directories
for the merged architecture and move stuff in there as it gets
merged. The existing ppc32 and ppc64 directories will stay around
until they are no longer useful. The intention is not to break
anything that currently works; however, we do not plan to move unused
and unmaintained platforms into the merged architecture.
The advantage of merging is that it will reduce the maintenance effort
and reduce the instances where a common bug gets fixed in one
architecture but not the other. It will also make it easier to
support 64-bit embedded systems as they become more common.
I don't see the merge as changing the actual code that gets executed
on any given platform very much, except in one respect: we are going
to standardize on a flattened device tree as the way that information
about the platform gets passed from the boot loader to the kernel.
Comments? Flames? :)
Paul.
^ permalink raw reply
* Re: Beginning Merger Patch
From: Paul Mackerras @ 2005-08-03 3:08 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc64-dev, linuxppc-dev@ozlabs.org
In-Reply-To: <f316a2ceff0d79bb6cf9d8530555496b@embeddededge.com>
Dan Malek writes:
> Shouldn't this be a 2.7 project?
I don't think so; I don't think it's going to be as dramatically
invasive as to need to wait for a 2.7, and in any case, there is no
sign of 2.7 on the horizon.
Paul.
^ permalink raw reply
* RE: A PPC kernel issue with UART ??
From: JohnsonCheng @ 2005-08-03 3:11 UTC (permalink / raw)
To: 'Daniel Ann'; +Cc: linuxppc-embedded
In-Reply-To: <9b7ca6570508021721773d06f0@mail.gmail.com>
Actually, I had reviews all article about "serial console", just know I have
to use LEVEL for interrupt, not EDGE. Unfortunately the default interrupt
setting for kernel is with LEVEL, IRQ_SENSE_LEVEL, I think I don't need to
modify it.
But I found I add ASYNC_SKIP_TEST flag to UART in sandpoint.h can fix my
problem.
Thanks,
Johnson Cheng
-----Original Message-----
From: linuxppc-embedded-bounces@ozlabs.org
[mailto:linuxppc-embedded-bounces@ozlabs.org] On Behalf Of Daniel Ann
Sent: Wednesday, August 03, 2005 8:22 AM
To: JohnsonCheng
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: A PPC kernel issue with UART ??
Johnson,
You know what? I've had the exact same problem only day or two ago. I
think the mail subject was "serial console" or something similar. Have
a read at it.
BTW, My problem was with interrupt setting.
Daniel.
On 8/2/05, JohnsonCheng <johnsoncheng@qnap.com.tw> wrote:
>
>
> Dear All,
>
>
>
> I meet a wired UART problem on linux-2.6 with MPC8241 chip.
>
>
>
> My Environment is as following:
>
> CPU: MPC8241
>
> Linux: 2.6.12.3
>
> COM1 offset: 0x4500, COM2 offset: 0x4600
>
>
>
> When I booting my rootfs, it hangs at following message:
>
> RAMDISK: Compressed image found at block 0
>
> VFS: Mounted root (ext2 filesystem) readonly.
>
> Freeing unused kernel memory: 104k init
>
> EXT2-fs warning: checktime reached, running e2fsck is recommended
>
>
>
> I had add printk in tty_write() of drivers/char/tty_io.c, the message from
> rootfs have printed.
>
> The conclusion is that message can be printed by printk() in linux kernel,
> but can't be printed by printf() in user mode. I think it must be
something
> wrong for my UART configurations, does anybody know it??
>
>
>
>
>
> Best Regards,
>
> Johnson Cheng
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
--
Daniel
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox