From: Holger Schurig <hs4233-x6+DxXLjN1AJvtFkdXX2Hg4jNU5vUVPG@public.gmane.org>
To: linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [RFC] generic iMX-spi driver
Date: Fri, 20 Feb 2009 16:41:21 +0100 [thread overview]
Message-ID: <200902201641.21168.hs4233@mail.mn-solutions.de> (raw)
In-Reply-To: <20090220144126.GA9203-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> + int (*exit)(struct platform_device *pdev);
void (*exit)(struct platform_device *pdev);
> +struct spi_core_version {
> + u32 rxdata;
> + u32 txdata;
> + u32 ctrl;
> + u32 int_en;
> + u32 status;
> + u32 test;
> + u32 period;
> + u32 dma;
> + u32 reset;
> +
> + u32 int_te;
> + u32 int_th;
> + u32 int_ro;
> + u32 int_te_en;
> + u32 int_th_en;
> + u32 int_ro_en;
> + u32 xch;
> +
> + u8 bitcount_shift;
> + u8 sspol_shift;
> + u8 ssctl_shift;
> + u8 pha_shift;
> + u8 pol_shift;
> + u8 datarate_shift;
> + u8 reset_val;
> +
> + u32 max_divider;
> + u32 max_bitcount;
> + u32 default_ctrl;
> + u32 (*calc_datarate)(struct driver_data *drv_data, u32
> speed_hz, u32 *val);
> +};
A number of u8's in the middle of a structure where later
32 bit long entries are comming?
Move that to the end or change it to 32 (I yet have to verify if
the compiler creates stupid or good code when accessing u8 out of
a struct, but I assume that on ARM the code is more-or-less stupid).
> + /* Setup any GPIO active */
> + if (platform_info->init)
> + platform_info->init(pdev);
This function can fail, so you need to handle the error case.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
next prev parent reply other threads:[~2009-02-20 15:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-20 14:41 [RFC] generic iMX-spi driver Wolfram Sang
[not found] ` <20090220144126.GA9203-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-02-20 14:58 ` Wolfram Sang
2009-02-20 15:41 ` Holger Schurig [this message]
[not found] ` <200902201641.21168.hs4233-x6+DxXLjN1AJvtFkdXX2Hg4jNU5vUVPG@public.gmane.org>
2009-02-26 10:38 ` Wolfram Sang
[not found] ` <20090226103844.GB3058-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-02-26 23:26 ` Russell King - ARM Linux
[not found] ` <20090226232639.GF5811-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2009-02-27 10:38 ` Wolfram Sang
[not found] ` <20090227103840.GC3481-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-03-02 20:58 ` Russell King - ARM Linux
[not found] ` <20090302205826.GG25699-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2009-04-30 21:44 ` Guennadi Liakhovetski
2009-04-30 21:49 ` Russell King - ARM Linux
[not found] ` <Pine.LNX.4.64.0904302343470.9542-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2009-05-04 16:29 ` Sascha Hauer
2009-02-23 8:57 ` Paulius Zaleckas
[not found] ` <49A264DE.8080805-Ft0m5Q12RQ9xBelEqimL3w@public.gmane.org>
2009-02-26 9:58 ` Wolfram Sang
[not found] ` <20090226095825.GA3058-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-02-26 10:07 ` Paulius Zaleckas
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=200902201641.21168.hs4233@mail.mn-solutions.de \
--to=hs4233-x6+dxxljn1ajvtfkdxx2hg4jnu5vuvpg@public.gmane.org \
--cc=linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.