public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Steven Scholz <steven.scholz@imc-berlin•de>
To: LinuxPPC <linuxppc-embedded@lists•linuxppc.org>
Subject: ide-m8xx as a MODULE
Date: Wed, 10 Apr 2002 15:21:09 +0200	[thread overview]
Message-ID: <3CB43C45.4263F1AA@imc-berlin.de> (raw)


Hi there,

I tried to make the MPC8xx IDE Driver loadable as a module (nevermind if
this is useful or not).

It is working - at least in my configuration.

BUT:

Apparently I am too stupid to understand all this Makefile stuff. That's
why I changed the drivers/ide/Makefile to look like this now:

===================================================================
RCS file: /home/cvsroot/linux-2.4.18/drivers/ide/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- drivers/ide/Makefile        2002/04/05 11:46:19     1.1.1.1
+++ drivers/ide/Makefile        2002/04/10 12:59:34
@@ -65,7 +65,15 @@
 ide-obj-$(CONFIG_BLK_DEV_TRM290)       += trm290.o
 ide-obj-$(CONFIG_BLK_DEV_UMC8672)      += umc8672.o
 ide-obj-$(CONFIG_BLK_DEV_VIA82CXXX)    += via82cxxx.o
-ide-obj-$(CONFIG_BLK_DEV_MPC8xx_IDE)   += ide-m8xx.o
+
+ifeq ($(CONFIG_BLK_DEV_MPC8xx_IDE),y)
+       ide-obj-$(CONFIG_BLK_DEV_MPC8xx_IDE)    += ide-m8xx.o
+endif
+
+ifeq ($(CONFIG_BLK_DEV_MPC8xx_IDE),m)
+       obj-$(CONFIG_BLK_DEV_MPC8xx_IDE)        += ide-m8xx.o
+endif
+

 # The virtualised raid layers MUST come after the ide itself or bad
stuff
 # will happen.
Otherwiser eihter there problems during compile or ide-m8xx.o is not
built at all.
I am pretty sure that there is a better i.e. correct way to do this. Any
hints?

Another points is:

When I unload the module and call ide_unregister(0) then the function
m8xx_ide_init_hwif_ports() is called again!
Should I released the region which is ioremaped the first time
m8xx_ide_init_hwif_ports() gets called?

	if (!ide_base) {
...
		ide_base=(unsigned long)ioremap(ide_phy_base,
						ide_phy_end-ide_phy_base);
...
	}


Thanks a million,

Steven

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

                 reply	other threads:[~2002-04-10 13:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3CB43C45.4263F1AA@imc-berlin.de \
    --to=steven.scholz@imc-berlin$(echo .)de \
    --cc=linuxppc-embedded@lists$(echo .)linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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