public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] S5P: new spi gpio bitbang driver
Date: Tue, 14 Sep 2010 07:48:08 -0400	[thread overview]
Message-ID: <201009140748.10627.vapier@gentoo.org> (raw)
In-Reply-To: <1284449891-19678-1-git-send-email-dh09.lee@samsung.com>

On Tuesday, September 14, 2010 03:38:11 Donghwa Lee wrote:
> This patch adds basic support for spi mode 0~3 by control gpio bitbang in
> S5P. Original name of this patch was "support spi gpio driver by control
> gpio bitbang". But, it had arch-specific features, S5P, so changed to this
> name.

so why arent you implementing this with the common spi API ?  then any of the 
code in the tree would be able to use this spi driver without having to change 
to your arch-specific API.

> +++ b/arch/arm/include/asm/arch-s5pc1xx/spi.h
> @@ -0,0 +1,53 @@
> +
> +#ifndef __ASM_ARCH_SPI_H_
> +#define __ASM_ARCH_SPI_H_
> +
> +#ifndef __ASSEMBLY__
> +
> +
> +#define COMMAND_ONLY		0xFE
> +#define DATA_ONLY		0xFF

i dont see the point in the __ASSEMBLY__ protection.  this header isnt 
included by any header, and you dont actually define anything outside of the 
__ASSEMBLY__ which means including it from an assembly file doesnt make sense.

> +#define ACTIVE_LOW		0
> +#define ACTIVE_HIGH		1

considering you're already including spi.h, you might as well  re-use 
SPI_CS_HIGH instead of defining your own.

> +struct s5p_spi_platdata {
> +	struct s5p_gpio_bank *cs_bank;
> +	struct s5p_gpio_bank *clk_bank;
> +	struct s5p_gpio_bank *si_bank;
> +	struct s5p_gpio_bank *so_bank;

you need to include the header in this header which defines these structs.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100914/2e0a6e81/attachment.pgp 

  reply	other threads:[~2010-09-14 11:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14  7:38 [U-Boot] [PATCH] S5P: new spi gpio bitbang driver Donghwa Lee
2010-09-14 11:48 ` Mike Frysinger [this message]
2010-09-15  5:15   ` Donghwa Lee
2010-09-15 18:06     ` Mike Frysinger
2010-09-16  2:38       ` Donghwa Lee
2010-09-16  6:17         ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201009140748.10627.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox