linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Jochen Friedrich" <jochen@scram.de>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH resend 3/4] powerpc: Add EXPORT_SYMBOL for symbols required by fs_enet and cpm_uart
Date: Thu, 22 Nov 2007 10:18:26 -0700	[thread overview]
Message-ID: <fa686aa40711220918l2c7c021euf9ed1e29798e8bc3@mail.gmail.com> (raw)
In-Reply-To: <4745B42B.8050201@scram.de>

On 11/22/07, Jochen Friedrich <jochen@scram.de> wrote:
> fs_enet and cpm_uart need symbols from commproc.c (for CPM1) or
> cpm2_common.c. Add EXPORT_SYMBOL for cpmp, cpm_setbrg and cpm2_immr, so
> the drivers can be compiled as modules.
>
>   Building modules, stage 2.
>   MODPOST 5 modules
> ERROR: "cpm2_immr" [drivers/net/fs_enet/fs_enet.ko] undefined!
> ERROR: "cpmp" [drivers/net/fs_enet/fs_enet.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
>
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> Acked-by: Scott Wood <scottwood@freescale.com>
> ---
>  arch/powerpc/sysdev/commproc.c    |    3 +++
>  arch/powerpc/sysdev/cpm2_common.c |    3 +++
>  2 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
> index f6a6378..d5a0dcf 100644
> --- a/arch/powerpc/sysdev/commproc.c
> +++ b/arch/powerpc/sysdev/commproc.c
> @@ -51,6 +51,8 @@ static void m8xx_cpm_dpinit(void);
>  static uint host_buffer; /* One page of host buffer */
>  static uint host_end;    /* end + 1 */
>  cpm8xx_t __iomem *cpmp;  /* Pointer to comm processor space */
> +EXPORT_SYMBOL(cpmp);
> +

Is this really a good idea?  A globally accessable pointer to the region?

The driver should either have a copy of the pointer in its private
data or operations on the region should be performed by helpers (the
choice of course depends on how varied the operations on the region
are).  I know 8xx is old and crusty, but it is possible for a board to
have multiple CPMs (ie. a second 8xx with the ppc core disabled).

>  immap_t __iomem *mpc8xx_immr;
>  static cpic8xx_t __iomem *cpic_reg;
>
> @@ -302,6 +304,7 @@ cpm_setbrg(uint brg, uint rate)
>                 out_be32(bp, (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) |
>                              CPM_BRG_EN | CPM_BRG_DIV16);
>  }
> +EXPORT_SYMBOL(cpm_setbrg);

EXPORT_SYMBOL_GPL?

>
>  #ifndef CONFIG_PPC_CPM_NEW_BINDING
>  /*
> diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c
> index 859362f..4ed5df6 100644
> --- a/arch/powerpc/sysdev/cpm2_common.c
> +++ b/arch/powerpc/sysdev/cpm2_common.c
> @@ -51,11 +51,13 @@ static void cpm2_dpinit(void);
>  #endif
>
>  cpm_cpm2_t __iomem *cpmp; /* Pointer to comm processor space */
> +EXPORT_SYMBOL(cpmp);

ditto to first comment.

>
>  /* We allocate this here because it is used almost exclusively for
>   * the communication processor devices.
>   */
>  cpm2_map_t __iomem *cpm2_immr;
> +EXPORT_SYMBOL(cpm2_immr);

ditto

>
>  #define CPM_MAP_SIZE   (0x40000)       /* 256k - the PQ3 reserve this amount
>                                            of space for CPM as it is larger
> @@ -117,6 +119,7 @@ cpm_setbrg(uint brg, uint rate)
>
>         cpm2_unmap(bp);
>  }
> +EXPORT_SYMBOL(cpm_setbrg);
>
>  /* This function is used to set high speed synchronous baud rate
>   * clocks.
> --
> 1.5.3.4
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

  reply	other threads:[~2007-11-22 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-22 16:54 [PATCH resend 3/4] powerpc: Add EXPORT_SYMBOL for symbols required by fs_enet and cpm_uart Jochen Friedrich
2007-11-22 17:18 ` Grant Likely [this message]
2007-11-22 17:27   ` Jochen Friedrich
2007-11-23 23:46 ` Vitaly Bordug

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=fa686aa40711220918l2c7c021euf9ed1e29798e8bc3@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=jochen@scram.de \
    --cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).