9
0
Fork 0
Commit Graph

193 Commits

Author SHA1 Message Date
Sascha Hauer 159109f5ff serial i.MX: Make locally used variables static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-27 21:01:10 +01:00
Vicente ea43a5e296 omap4: add serial communications over usb boot
Signed-off-by: Vicente <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-16 15:32:31 +01:00
Sascha Hauer bf38ac7b89 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/boards/guf-neso/lowlevel.c
	arch/arm/boards/pcm038/lowlevel.c
	commands/Makefile
2012-11-16 14:01:09 +01:00
Alexander Shiyan bedf7dfce5 ARM: clps711x: Add serial driver
This patch adds a simple serial driver for CLPS711X architecture.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-02 11:24:58 +01:00
Sascha Hauer b1b76f6027 ARM i.MX: get rid of imx-regs.h
- remove now unused __REG definitions
- include individual SoC register files instead of imx-regs.h
- move IMX_GPIO_NR to generic.h
- finally remove imx-regs.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 20:22:02 +02:00
Sascha Hauer 3e1f8a05b9 serial i.MX: Use devtype data to determine uart version
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-05 12:32:06 +02:00
Sascha Hauer 94de405d8f Merge branch 'for-next/imx-clk' 2012-10-04 15:24:57 +02:00
Sascha Hauer d4edd480b2 ARM i.MX: Remove old clock support
The old clock support is now unused. Remove it. The former i.MX clko
command is superseeded by generic clock manipulation commands.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:57 +02:00
Sascha Hauer e3bc3f751d serial i.MX: Switch to clk support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 15:19:56 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Sascha Hauer 6f018668d6 Merge branch 'for-next/amba' 2012-10-03 21:10:05 +02:00
Sascha Hauer 2fef30b560 serial i.MX: oftree support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 18:14:40 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Jean-Christophe PLAGNIOL-VILLARD 75a0136cca amba-pl011: add st specific init
This is need on the new IP for ux500

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-11 12:48:34 +08:00
Jean-Christophe PLAGNIOL-VILLARD 09d593b670 amba-pl011: switch to amba bus
switch as the same time the nomadik and versatile arch that use the driver.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-11 12:48:34 +08:00
Juergen Beisert 10bfdcc175 serial Samsung: add the S3C64xx requirements
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-01 17:51:45 +02:00
Sascha Hauer a934d16a2a Merge branch 'for-next/samsung'
Conflicts:
	arch/arm/Makefile
	arch/arm/mach-samsung/Makefile
	arch/arm/mach-samsung/include/mach/s5pcxx-iomap.h
2012-08-01 17:50:18 +02:00
Juergen Beisert 1fdb1cf1c4 Samsung/serial: make the clock source configureable
Instead of taking the value from somewhere, use the selected architecture to
select one. This ensures the selected clock source corresponds to the values
setup in the clocks-*.c from the mach directory.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:39 +02:00
Juergen Beisert 24c110da94 Samsung/serial: unify UCON register settings
This should work on S3C24XX and S3C64XX SoCs.

Tested at runtime on a Mini2440 and Mini6410.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:38 +02:00
Juergen Beisert c5066ad4cd Samsung/serial: move the decision about an improved UART into Kconfig
More or less just cosmetic (removing ifdefs!).

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:38 +02:00
Juergen Beisert 4b2dfa8188 Samsung/serial: there is no need to ifdef the slot table
The '__maybe_unused' attribute prevents the compiler from warning about an
unused variable and the 'static' will remove it entirely if it's not used.
This patch is only cosmetic.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:38 +02:00
Juergen Beisert 78d124b967 Samsung/serial: there is no need to ifdef these register defines
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:38 +02:00
Juergen Beisert abd875def2 Samsung/serial: make the code more readable
This bit magic is just setting and reading the UART's selected clock source.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:38 +02:00
Juergen Beisert 49347e4cbb Samsung/serial: remove more ugly ifdef lines
More or less just cosmetic. Easier to read, and lets the compiler remove unused
code.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:38 +02:00
Antony Pavlov dab7dfcec3 serial_ns16550: change the driver's name
The name "serial_ns16550" is not handy because the devices
will have the names like "serial_ns165500", "serial_ns165501",
"serial_ns165502" etc.

The names like "ns16550_serial0" and "ns16550_serial1" look
much better.

Also it is reasonable to make serial driver's names unification.
E.g. see the names for drivers in drivers/serial directory:
 "netx_serial",
 "mpc5xxx_serial",
 "altera_serial",
 "s3c_serial",
 "imx_serial",
 "pxa_serial",
 "blackfin_serial",
 "stm_serial",
 "pl010_serial",
and even "g_serial" in ./drivers/usb/gadget/serial.c

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-20 10:01:25 +02:00
Alexey Galakhov 932f54688f Support most Samsung SoCs in S3C serial driver
Ok, I assume this should go into separate series. It fits both S5PV210 and S3C6410.

This adds support for S3C and S5P architectures (all of my knowledge) to the
serial driver. Since the only difference between them is in clock handling,
this is moved to an arch-dependent separate function.

Most modern architectures should define S3C_UART_HAS_UBRDIVSLOT and S3C_UART_HAS_UINTM.

This adds support for most

Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
Signed-off-by: Juergen Beisewrt <kernel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-14 19:46:02 +02:00
Michael Trensch eecbcafa3f netX: UART may not initialize correctly.
The netX internal UART latches register settings and internally uses
them only if written in the correct order. Other orders may work, but
sometimes the UART gets stuck, as the baudrate has not correctly been
set.

Signed-off-by: Michael Trensch <MTrensch@gmail.com>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Sascha Hauer ba361ee78f Merge branch 'pu/mx6-v2' into next
Conflicts:
	arch/arm/Makefile
	arch/arm/mach-imx/Kconfig

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:38:23 +02:00
Sascha Hauer e0c18c0866 serial i.MX: i.MX6 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer abe4560c8a Use DEVICE_ID_DYNAMIC where applicable
We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids,
Use it where applicable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-16 09:43:02 +02:00
Juergen Beisert 069e1f45c8 serial S3: fix local structure malloc
Patch 2c54046510 introduces a private structure
for the S3C based UARTs but still reserves the memory for the smaller
structure which fails at runtime.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-13 13:23:46 +01:00
Robert Jarzmik f67fc4fb7a drivers/serial: trivial regression fix
Fix commit "serial pxa: fix unregister", which forgot a
semicolon, breaking serial_pxa compilation.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-29 08:28:20 +01:00
Sascha Hauer 2c54046510 serial s3c: add a driver private struct
Do not use dev->priv as a register base, but use a driver private
struct instead. Also, remove usage of dev->type_data

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:18 +01:00
Sascha Hauer 6dfb9fec5f serial stm: fix unregister
- Add missing console_unregister call
- use dev->priv instead of dev->type_data

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Sascha Hauer 0f7b86f1cb serial imx: fix unregister
- Add missing console_unregister call
- use dev->priv instead of dev->type_data

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Sascha Hauer b059ed8184 serial pxa: fix unregister
- Add missing console_unregister call
- use dev->priv instead of dev->type_data

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Sascha Hauer 837a0c2e04 serial drivers: remove unused type_data
Several serial drivers set the type_data field without ever using it,
so just remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:14 +01:00
Antony Pavlov cb76204fa8 ns16550: fix ier selection
The document "PC16550D Universal Asynchronous
Receiver Transmitter with FIFOs" (vers. June 1995,
http://www.national.com/ds/PC/PC16550D.pdf) states
that IER (Interrupt Enable Register) is accessible
if the bit DLAB = 0 (DLAB is bit 7 in LCR; in barebox
DLAB known as LCR_BKSE).

So before IER access we need set DLAB to 0.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Antony Pavlov b36dd65f15 ns16550: write zero to ier only once
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Antony Pavlov fd434ce24a ns16550: make ns16550_serial_init_port() shorter
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Antony Pavlov 5891ba14b8 ns16550: support for UART with broken FIFO
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-19 09:46:02 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3fc38b0c5b serial: drop non used at91rm9200 driver
we use atmel driver now

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-06 09:42:30 +01:00
Juergen Beisert b8560b2b2f MACH SAMSUNG/S3C: Unify the UART driver for the S3C family of CPUs
The UART is one of the units which differs only slightly inside the S3C family.
Prepare this driver to share it with more recent CPUs.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Juergen Beisert 4e7151d11c MACH SAMSUNG/S3C: Separate S3C24XX clock management
There are major differences in the clock tree of the S3C24xx family and the
more recent CPUs of the S3C family. Keep the S3C24XX clock routines separate to
avoid an ifdef hell. But also use generic function names to be able to
share drivers among the S3C family.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Juergen Beisert cbc08bfb42 MACH SAMSUNG/S3C: Make it more generic for future updates
Start with renaming files to share them in the S3C CPU family,

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-02 13:32:13 +01:00
Sascha Hauer 4b8750c956 uart drivers: use xzalloc instead of xmalloc
The flags in struct console_device have to be initialized
to zero. Otherwise the following can happen:

- console_register sets the initial baudrate of a new console
  before we set the global console init state to CONSOLE_INIT_FULL.
- In console_baudrate_set we test whether the current console is
  active which may be true because of unitialized flags.
- we then call getc() to wait for the user to accept the new settings
  and we are stuck because of the CONSOLE_UNINITIALIZED state
  we will never get anything from getc().

Looking back this explains some cases for me when barebox refused
to start and I really wonder why this did not become a more visible
problem before.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-23 11:15:44 +01:00
Marc Kleine-Budde 36c47ce426 arm/mach-pxa: Initial Intel/Marvell PXA support
The core support was brought by Marc and Sascha.
The cache choice was fixed by Luotao Fu.
Some gpio and devices addons were provided by Robert.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-05 09:30:27 +01:00
Juergen Beisert 6fa8c93a5e S3C24XX: Fix wrong RTS behaviour
Enabling AUTOSYNC means enabling the auto sync feature, not rising the RTS

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-27 12:16:55 +01:00
Sascha Hauer d01070c8af remove EARLY_INIT and EARLY_CONSOLE support
Bitrotted over time and nearly unused, so remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-27 10:27:18 +02:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Jean-Christophe PLAGNIOL-VILLARD a3edff8238 arm_dcc: fix missing switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-10 14:53:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD b9605d8a96 at91: swtich to clkdev
this will also fix the clock support as we now switch to allocated generic
device

as we can need to associate the clock and the device but the driver is probe
before the association

we also change the atmel serial name to "atmel_usart" to simplify sharing with
linux

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-10 14:53:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD 454f331bfe serial_ns16550: drop the non working check
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-04 09:04:25 +02:00
Jean-Christophe PLAGNIOL-VILLARD c71a77ab87 ns16550: switch to resource
use generic read/write depending on the memory size
if no reg_read/write defined

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-08-01 16:33:09 +08:00
Jean-Christophe PLAGNIOL-VILLARD 931c1cc5a6 ns16550: if not specific f_caps defined use default stdin, stdout, stderr
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-30 02:05:27 +08:00
Marc Kleine-Budde 9eaaf1b1ca ARM: add support for the i.MX53
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:10:38 +02:00
Sascha Hauer 784030e136 serial mpc5xxx: get rid of map_base
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 15:25:04 +02:00
Sascha Hauer 39a7d5ff9c serial stm: get rid of map_base
While at it, dynamically allocate private driver struct.
There might be only a single instance of this driver,
but don't be a bad example for others.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 15:21:24 +02:00
Sascha Hauer 36a16d6509 serial pl010: get rid of map_base
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 15:08:41 +02:00
Sascha Hauer f0c1332780 serial s3c: get rid of map_base
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 15:05:37 +02:00
Sascha Hauer 801b379c36 serial netx: get rid of map_base
While at it, switch to standard readl/writel accessors

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 15:04:50 +02:00
Franck Jullien 389f3ea067 nios2/altera_serial_jtag: Switch to resources
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-27 10:54:13 +02:00
Franck Jullien 2c628dbadd nios2/serial_altera: Switch to resources
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-27 10:54:13 +02:00
Antony Pavlov 5998165c1a DRIVER_SERIAL_LINUX_CONSOLE: fix misprint
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-25 11:25:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD 183b39dae4 amba-pl011: switch to dev_request_mem_region
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-20 08:25:45 +02:00
Jean-Christophe PLAGNIOL-VILLARD 5fa6f80f65 amba-pl011: fix missing switch to "struct resource"
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-20 08:25:44 +02:00
Jean-Christophe PLAGNIOL-VILLARD 358ab3eb84 atmel/drivers: switch to dev_request_mem_region
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-20 08:25:43 +02:00
Sascha Hauer f820d7e097 serial i.MX: convert to struct resource
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-19 00:12:50 +08:00
Jean-Christophe PLAGNIOL-VILLARD 0c96353957 amba-pl011: switch to "struct resource"
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-18 07:57:52 +08:00
Jean-Christophe PLAGNIOL-VILLARD 0898d1515a at91/serial: switch to "struct resource"
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-18 07:57:50 +08:00
Antony Pavlov f4f952faa4 serial_ns16550: remove legacy code copied from U-Boot v1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-17 17:42:21 +02:00
Franck Jullien 9d64e1f21d Add Altera JTAG UART driver
Add Altera JTAG UART driver

I removed the CONFIG_ALTERA_JTAG_UART_BYPASS.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-06-10 09:32:27 +02:00
Sascha Hauer a03277592f serial 16550: use xzalloc
No need to check for the result and increases the chance that we
build a binary without the rarely used calloc function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-11 12:36:08 +02:00
Franck JULLIEN 7834d07751 Nios2: Add Altera UART driver
This patch adds Altera UART driver. Kconfig and Makefile are
updated to include this new driver.

Signed-off-by: Franck JULLIEN <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-08 11:37:23 +02:00
Sascha Hauer e88d86a445 ARM: rename STM arch to mxs
We never supported the sigmatel stm chips and probably
never will. So do the first step and rename the architecture
to mxs just like in the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-20 10:43:24 +01:00
Krzysztof Halasa c5baa0edc4 Fix error handling with malloc, memalign etc. Introduce xmemalign().
The idea is to panic() when there is no memory available for normal
operation. Exception: code which can consume arbitrary amount of RAM
(example: files allocated in ramfs) must report error instead of panic().

This patch also fixes code which didn't check for NULL from malloc() etc.

Usage: malloc(), memalign() return NULL when out of RAM.
xmalloc(), xmemalign() always return non-NULL or panic().

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:21:22 +01:00
Juergen Beisert 8e46fc7238 STM378x: Adapt the serial driver to support i.MX23 and i.MX28
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-14 15:15:06 +01:00
Juergen Beisert e4f17bd394 STM378x: Do not configure any pin usage in the driver
Only the platform should configure pins to be used by the driver.
The driver must work independently from the settings.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-14 15:15:06 +01:00
Juergen Beisert 8dc537022e STM378x: Use Hz as the clock unit like in all other arch
i.MX23 currently uses kHz as the unit for its clock handling and calculation
to avoid overflows when calculation with the internal 480 MHz PLL and its
fractional divider. This patch changes all routines to accept Hz and deliver
Hz as the clock unit.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-14 15:15:06 +01:00
Marek Belisko c22da7e05d serial_s3c24x0: Add missing brackets.
Fucntion s3c24x0_serial_flush() could behave wrong
because of missing brackets. Correct condition logic.
Problem found by sparse.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-17 09:46:29 +01:00
Sascha Hauer ca5bfba40e i.MX serial: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:24 +02:00
Sascha Hauer 23e13992c8 Merge branch 'mx51' into next
Conflicts:
	arch/arm/Makefile

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-12 21:31:38 +02:00
Juergen Beisert c141e5bdd6 Add the driver for the i.MX23 debug UART
The i.MX23 comes with a special UART dedicated for debugging purposes. This one
is mostly used for the console the user can reach.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2010-10-11 15:42:19 +02:00
Sascha Hauer 082e56d6f2 imx_serial: Add mx51 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:22:14 +02:00
Jean-Christophe PLAGNIOL-VILLARD e85c6bb0a7 driver: use id as -1 for auto assigned id
before if you specify id = 0 the next available id will be taken
otherwise fail if already registered now as in linux we use -1

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-20 08:58:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c605668b4 amba-pl011: probe fail if we can't get the clock
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-20 08:56:42 +02:00
Jean-Christophe PLAGNIOL-VILLARD 907d7cb909 amba: add pl011
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Andrea GALLO <andrea.gallo@stericsson.com>
Cc: Gael SALLES <gael.salles@stericsson.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-06 19:09:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 873910050e at91: implement clock framework
this implementation is based on linux one (v2.6.35-rc5-76-gd0c6f62)
it will calculate all the clock dynamically instead of statictly
this will use also the new clock framework

it will also print the clock status after the console init

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-06 19:09:00 +02:00
Sascha Hauer 1996f64c4d i.MX serial: Use readl/writel instead of pointer deref
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-24 11:36:46 +02:00
Matthias Kaehlcke f13033d938 Add PrimeCell PL010 serial driver
Added driver for ARM PrimeCell PL010 UART

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-01-14 10:04:13 +01:00
Marc Kleine-Budde ca8ec6c9d5 Cleanup some more collateral damage from renaming
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-12-15 21:23:42 +01:00
Sascha Hauer 9491ec7800 Cleanup colleteral damage from renaming
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:19:08 +01:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Jean-Christophe PLAGNIOL-VILLARD 7aa3778f6d arm: add Debug Communications Channel serial driver support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-11-03 09:48:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD e988d5d990 [PPC] Move include/asm-ppc/arch-* to arch/ppc/*/include/mach
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-22 14:21:30 +02:00
Jean-Christophe PLAGNIOL-VILLARD b4521685bf [SANDBOX] Move include/asm-sandbox/arch-* to arch/sandbox/*/include/mach
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-22 14:21:29 +02:00
Jean-Christophe PLAGNIOL-VILLARD f6a579da9c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-22 14:21:25 +02:00
Jean-Christophe PLAGNIOL-VILLARD 81362c2b2a at91sam9: move to at91
this will allow to add at91rm9200 with the same api as done in the kernel

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-10-20 15:02:36 +02:00
Sascha Hauer d8863de370 imx serial: add mx25 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-08 12:42:55 +02:00