Re: [PATCH 1/3] omap-dma: Allow compile-testing omap1_camera driver

2014-09-11 Thread Russell King - ARM Linux
On Tue, Sep 09, 2014 at 12:36:54PM -0300, Mauro Carvalho Chehab wrote:
 Hmm... it seems that there are still several drivers still relying on
 the functions declared at: omap-dma.h:
 
 $ grep extern include/linux/omap-dma.h |perl -ne 'print $1\n if 
 (m/extern\s\S+\s(.*)\(/)' funcs  git grep -f funcs -l
 arch/arm/mach-omap1/pm.c
 arch/arm/mach-omap2/pm24xx.c
 arch/arm/plat-omap/dma.c
 drivers/dma/omap-dma.c
 drivers/media/platform/omap/omap_vout_vrfb.c
 drivers/media/platform/omap3isp/isphist.c
 drivers/media/platform/soc_camera/omap1_camera.c
 drivers/mtd/onenand/omap2.c
 drivers/usb/gadget/udc/omap_udc.c
 drivers/usb/musb/tusb6010_omap.c
 drivers/video/fbdev/omap/omapfb_main.c
 include/linux/omap-dma.h
 
 Perhaps we can remove the header and mark all the above as BROKEN.

Not quite.  You'll notice that drivers/dma/omap-dma.c appears in that
list.  That is because right now, the new code has to co-operate with
the old legacy code to ensure that both do not try and operate on the
same hardware channel simultaneously.

Right now, when anyone tries to use any of the drivers using the legacy
APIs, they will get a warning printed in their kernel message log.  This
is part of my attempt to try and find out:

(a) whether anyone is using these drivers
(b) whether we can delete these drivers

That warning has not been in the kernel long enough to be certain of
anything - it was merged during the last merge window (despite me
having it ready to go since the previous merge window, it would not
have been correct to introduce a new warning during the -rc period.)

What I recommend is that you just don't mark the OMAP drivers for
compile testing right now, especially as their future is rather
uncertain.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] omap-dma: Allow compile-testing omap1_camera driver

2014-09-10 Thread Tony Lindgren
* Mauro Carvalho Chehab mche...@infradead.org [140909 17:52]:
 Em Tue, 09 Sep 2014 12:36:54 -0300
 Mauro Carvalho Chehab m.che...@samsung.com escreveu:
 
  Em Tue, 9 Sep 2014 15:41:58 +0100
  Russell King - ARM Linux li...@arm.linux.org.uk escreveu:
  
   On Tue, Sep 09, 2014 at 11:38:17AM -0300, Mauro Carvalho Chehab wrote:
We want to be able to COMPILE_TEST the omap1_camera driver.
It compiles fine, but it fails linkediting:

ERROR: omap_stop_dma 
[drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
ERROR: omap_start_dma 
[drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
ERROR: omap_dma_link_lch 
[drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
ERROR: omap_set_dma_dest_burst_mode 
[drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
ERROR: omap_set_dma_src_params 
[drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
ERROR: omap_request_dma 
[drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
ERROR: omap_set_dma_transfer_params 
[drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
ERROR: omap_set_dma_dest_params 
[drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
ERROR: omap_free_dma 
[drivers/media/platform/soc_camera/omap1_camera.ko] undefined!

So, add some stub functions to avoid it.
   
   The real answer to this is to find someone who still uses it, and convert
   it to the DMA engine API.  If there's no users, the driver might as well
   be killed off.
  
  Hmm... it seems that there are still several drivers still relying on
  the functions declared at: omap-dma.h:
  
  $ grep extern include/linux/omap-dma.h |perl -ne 'print $1\n if 
  (m/extern\s\S+\s(.*)\(/)' funcs  git grep -f funcs -l
  arch/arm/mach-omap1/pm.c
  arch/arm/mach-omap2/pm24xx.c
  arch/arm/plat-omap/dma.c
  drivers/dma/omap-dma.c
  drivers/media/platform/omap/omap_vout_vrfb.c
  drivers/media/platform/omap3isp/isphist.c
  drivers/media/platform/soc_camera/omap1_camera.c
  drivers/mtd/onenand/omap2.c
  drivers/usb/gadget/udc/omap_udc.c
  drivers/usb/musb/tusb6010_omap.c
  drivers/video/fbdev/omap/omapfb_main.c
  include/linux/omap-dma.h
  
  Perhaps we can remove the header and mark all the above as BROKEN.

No, not quite yet. That would currently cause major issues for omap2
and omap3.
 
  If nobody fixes, we can strip all of them from the Kernel.
 
 Are all the functions declared at omap-dma.h part of the
 old DMA API that should be deprecated?

For the drivers yes. For the platform code, there are few functions
needed, that's at least omap_dma_global_context_save()
and omap_dma_global_context_restore(). But those can be in a local
header file in arch/arm/plat-omap/include/plat.
 
 If so, it seems that the OMAP2 and OMAP3 also depends on this 
 thing, as all the PM code for OMAP depends on the functions
 declared inside omap-dma.h, and marking them as BROKEN
 causes compilation to failure:
 
 arch/arm/mach-omap2/built-in.o: In function `omap3_save_scratchpad_contents':
 :(.text+0x798): undefined reference to `omap3_restore_3630'
 :(.text+0x7a8): undefined reference to `omap3_restore'
 :(.text+0x7ac): undefined reference to `omap3_restore_es3'
 arch/arm/mach-omap2/built-in.o: In function `omap3_sram_restore_context':
 :(.text+0x925c): undefined reference to `omap_push_sram_idle'
 arch/arm/mach-omap2/built-in.o: In function `option_set':
 :(.text+0xc15c): undefined reference to `omap3_pm_off_mode_enable'
 arch/arm/mach-omap2/built-in.o: In function `pwrdm_suspend_set':
 :(.text+0xc1a0): undefined reference to `omap3_pm_set_suspend_state'
 arch/arm/mach-omap2/built-in.o: In function `pwrdm_suspend_get':
 :(.text+0xc1e4): undefined reference to `omap3_pm_get_suspend_state'
 arch/arm/mach-omap2/built-in.o: In function `omap3_enter_idle_bm':
 :(.text+0xc7ec): undefined reference to `omap_sram_idle'
 :(.text+0xc848): undefined reference to `pm34xx_errata'
 arch/arm/mach-omap2/built-in.o: In function `omap2420_init_late':
 :(.init.text+0xf64): undefined reference to `omap2_pm_init'
 arch/arm/mach-omap2/built-in.o: In function `omap2430_init_late':
 :(.init.text+0x1024): undefined reference to `omap2_pm_init'
 arch/arm/mach-omap2/built-in.o: In function `omap3_init_late':
 :(.init.text+0x1248): undefined reference to `omap3_pm_init'
 arch/arm/mach-omap2/built-in.o: In function `omap3430_init_late':
 :(.init.text+0x1264): undefined reference to `omap3_pm_init'
 arch/arm/mach-omap2/built-in.o: In function `omap35xx_init_late':
 :(.init.text+0x1280): undefined reference to `omap3_pm_init'
 arch/arm/mach-omap2/built-in.o: In function `omap3630_init_late':
 :(.init.text+0x129c): undefined reference to `omap3_pm_init'
 arch/arm/mach-omap2/built-in.o: In function `am35xx_init_late':
 :(.init.text+0x12b8): undefined reference to `omap3_pm_init'
 arch/arm/mach-omap2/built-in.o::(.init.text+0x12d4): more undefined 
 references to `omap3_pm_init' follow
 
 This was 

Re: [PATCH 1/3] omap-dma: Allow compile-testing omap1_camera driver

2014-09-09 Thread Nishanth Menon
+linux-omap, tony
-Balaji

On 09/09/2014 09:38 AM, Mauro Carvalho Chehab wrote:
 We want to be able to COMPILE_TEST the omap1_camera driver.
 It compiles fine, but it fails linkediting:
 
 ERROR: omap_stop_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
 undefined!
 ERROR: omap_start_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
 undefined!
 ERROR: omap_dma_link_lch 
 [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
 ERROR: omap_set_dma_dest_burst_mode 
 [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
 ERROR: omap_set_dma_src_params 
 [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
 ERROR: omap_request_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
 undefined!
 ERROR: omap_set_dma_transfer_params 
 [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
 ERROR: omap_set_dma_dest_params 
 [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
 ERROR: omap_free_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
 undefined!
 
 So, add some stub functions to avoid it.
 
 Reported-by: Stephen Rothwell s...@canb.auug.org.au
 Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com
 
 diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
 index 6f06f8bc612c..7c8bfdd90a33 100644
 --- a/include/linux/omap-dma.h
 +++ b/include/linux/omap-dma.h
 @@ -294,43 +294,24 @@ struct omap_system_dma_plat_info {
  extern struct omap_system_dma_plat_info *omap_get_plat_info(void);
  
  extern void omap_set_dma_priority(int lch, int dst_port, int priority);
 -extern int omap_request_dma(int dev_id, const char *dev_name,
 - void (*callback)(int lch, u16 ch_status, void *data),
 - void *data, int *dma_ch);
  extern void omap_enable_dma_irq(int ch, u16 irq_bits);
  extern void omap_disable_dma_irq(int ch, u16 irq_bits);
 -extern void omap_free_dma(int ch);
 -extern void omap_start_dma(int lch);
 -extern void omap_stop_dma(int lch);
 -extern void omap_set_dma_transfer_params(int lch, int data_type,
 -  int elem_count, int frame_count,
 -  int sync_mode,
 -  int dma_trigger, int src_or_dst_synch);
  extern void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode,
   u32 color);
  extern void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode);
  extern void omap_set_dma_channel_mode(int lch, enum omap_dma_channel_mode 
 mode);
  
 -extern void omap_set_dma_src_params(int lch, int src_port, int src_amode,
 - unsigned long src_start,
 - int src_ei, int src_fi);
  extern void omap_set_dma_src_index(int lch, int eidx, int fidx);
  extern void omap_set_dma_src_data_pack(int lch, int enable);
  extern void omap_set_dma_src_burst_mode(int lch,
   enum omap_dma_burst_mode burst_mode);
  
 -extern void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode,
 -  unsigned long dest_start,
 -  int dst_ei, int dst_fi);
  extern void omap_set_dma_dest_index(int lch, int eidx, int fidx);
  extern void omap_set_dma_dest_data_pack(int lch, int enable);
 -extern void omap_set_dma_dest_burst_mode(int lch,
 -  enum omap_dma_burst_mode burst_mode);
  
  extern void omap_set_dma_params(int lch,
   struct omap_dma_channel_params *params);
  
 -extern void omap_dma_link_lch(int lch_head, int lch_queue);
  extern void omap_dma_unlink_lch(int lch_head, int lch_queue);
  
  extern int omap_set_dma_callback(int lch,
 @@ -356,18 +337,9 @@ extern void omap_dma_disable_irq(int lch);
  
  /* Chaining APIs */
  #ifndef CONFIG_ARCH_OMAP1
 -extern int omap_request_dma_chain(int dev_id, const char *dev_name,
 -   void (*callback) (int lch, u16 ch_status,
 - void *data),
 -   int *chain_id, int no_of_chans,
 -   int chain_mode,
 -   struct omap_dma_channel_params params);
 -extern int omap_free_dma_chain(int chain_id);
  extern int omap_dma_chain_a_transfer(int chain_id, int src_start,
int dest_start, int elem_count,
int frame_count, void *callbk_data);
 -extern int omap_start_dma_chain_transfers(int chain_id);
 -extern int omap_stop_dma_chain_transfers(int chain_id);
  extern int omap_get_dma_chain_index(int chain_id, int *ei, int *fi);
  extern int omap_get_dma_chain_dst_pos(int chain_id);
  extern int omap_get_dma_chain_src_pos(int chain_id);
 @@ -377,6 +349,87 @@ extern int omap_modify_dma_chain_params(int chain_id,
  extern int omap_dma_chain_status(int chain_id);
  #endif
  
 +#ifndef 

Re: [PATCH 1/3] omap-dma: Allow compile-testing omap1_camera driver

2014-09-09 Thread Tony Lindgren
* Nishanth Menon n...@ti.com [140909 07:40]:
 +linux-omap, tony
 -Balaji
 
 On 09/09/2014 09:38 AM, Mauro Carvalho Chehab wrote:
  We want to be able to COMPILE_TEST the omap1_camera driver.
  It compiles fine, but it fails linkediting:
  
  ERROR: omap_stop_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
  undefined!
  ERROR: omap_start_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
  undefined!
  ERROR: omap_dma_link_lch 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_set_dma_dest_burst_mode 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_set_dma_src_params 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_request_dma 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_set_dma_transfer_params 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_set_dma_dest_params 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_free_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
  undefined!
  
  So, add some stub functions to avoid it.

How about just remove that old driver? I doubt it works, and I'm
almost certain nobody has actually tried to use it for many
years. At least I'm not aware of any hardware supported in the
mainline kernel with it. And we're moving things to dma engine
API anyways.

Regards,

Tony


  Reported-by: Stephen Rothwell s...@canb.auug.org.au
  Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com
  
  diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
  index 6f06f8bc612c..7c8bfdd90a33 100644
  --- a/include/linux/omap-dma.h
  +++ b/include/linux/omap-dma.h
  @@ -294,43 +294,24 @@ struct omap_system_dma_plat_info {
   extern struct omap_system_dma_plat_info *omap_get_plat_info(void);
   
   extern void omap_set_dma_priority(int lch, int dst_port, int priority);
  -extern int omap_request_dma(int dev_id, const char *dev_name,
  -   void (*callback)(int lch, u16 ch_status, void *data),
  -   void *data, int *dma_ch);
   extern void omap_enable_dma_irq(int ch, u16 irq_bits);
   extern void omap_disable_dma_irq(int ch, u16 irq_bits);
  -extern void omap_free_dma(int ch);
  -extern void omap_start_dma(int lch);
  -extern void omap_stop_dma(int lch);
  -extern void omap_set_dma_transfer_params(int lch, int data_type,
  -int elem_count, int frame_count,
  -int sync_mode,
  -int dma_trigger, int src_or_dst_synch);
   extern void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode,
  u32 color);
   extern void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode 
  mode);
   extern void omap_set_dma_channel_mode(int lch, enum omap_dma_channel_mode 
  mode);
   
  -extern void omap_set_dma_src_params(int lch, int src_port, int src_amode,
  -   unsigned long src_start,
  -   int src_ei, int src_fi);
   extern void omap_set_dma_src_index(int lch, int eidx, int fidx);
   extern void omap_set_dma_src_data_pack(int lch, int enable);
   extern void omap_set_dma_src_burst_mode(int lch,
  enum omap_dma_burst_mode burst_mode);
   
  -extern void omap_set_dma_dest_params(int lch, int dest_port, int 
  dest_amode,
  -unsigned long dest_start,
  -int dst_ei, int dst_fi);
   extern void omap_set_dma_dest_index(int lch, int eidx, int fidx);
   extern void omap_set_dma_dest_data_pack(int lch, int enable);
  -extern void omap_set_dma_dest_burst_mode(int lch,
  -enum omap_dma_burst_mode burst_mode);
   
   extern void omap_set_dma_params(int lch,
  struct omap_dma_channel_params *params);
   
  -extern void omap_dma_link_lch(int lch_head, int lch_queue);
   extern void omap_dma_unlink_lch(int lch_head, int lch_queue);
   
   extern int omap_set_dma_callback(int lch,
  @@ -356,18 +337,9 @@ extern void omap_dma_disable_irq(int lch);
   
   /* Chaining APIs */
   #ifndef CONFIG_ARCH_OMAP1
  -extern int omap_request_dma_chain(int dev_id, const char *dev_name,
  - void (*callback) (int lch, u16 ch_status,
  -   void *data),
  - int *chain_id, int no_of_chans,
  - int chain_mode,
  - struct omap_dma_channel_params params);
  -extern int omap_free_dma_chain(int chain_id);
   extern int omap_dma_chain_a_transfer(int chain_id, int src_start,
   int dest_start, int elem_count,
   int frame_count, void *callbk_data);
  -extern int omap_start_dma_chain_transfers(int chain_id);
  -extern int 

Re: [PATCH 1/3] omap-dma: Allow compile-testing omap1_camera driver

2014-09-09 Thread Mauro Carvalho Chehab
Em Tue, 9 Sep 2014 15:41:58 +0100
Russell King - ARM Linux li...@arm.linux.org.uk escreveu:

 On Tue, Sep 09, 2014 at 11:38:17AM -0300, Mauro Carvalho Chehab wrote:
  We want to be able to COMPILE_TEST the omap1_camera driver.
  It compiles fine, but it fails linkediting:
  
  ERROR: omap_stop_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
  undefined!
  ERROR: omap_start_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
  undefined!
  ERROR: omap_dma_link_lch 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_set_dma_dest_burst_mode 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_set_dma_src_params 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_request_dma 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_set_dma_transfer_params 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_set_dma_dest_params 
  [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
  ERROR: omap_free_dma [drivers/media/platform/soc_camera/omap1_camera.ko] 
  undefined!
  
  So, add some stub functions to avoid it.
 
 The real answer to this is to find someone who still uses it, and convert
 it to the DMA engine API.  If there's no users, the driver might as well
 be killed off.

Hmm... it seems that there are still several drivers still relying on
the functions declared at: omap-dma.h:

$ grep extern include/linux/omap-dma.h |perl -ne 'print $1\n if 
(m/extern\s\S+\s(.*)\(/)' funcs  git grep -f funcs -l
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap2/pm24xx.c
arch/arm/plat-omap/dma.c
drivers/dma/omap-dma.c
drivers/media/platform/omap/omap_vout_vrfb.c
drivers/media/platform/omap3isp/isphist.c
drivers/media/platform/soc_camera/omap1_camera.c
drivers/mtd/onenand/omap2.c
drivers/usb/gadget/udc/omap_udc.c
drivers/usb/musb/tusb6010_omap.c
drivers/video/fbdev/omap/omapfb_main.c
include/linux/omap-dma.h

Perhaps we can remove the header and mark all the above as BROKEN.

If nobody fixes, we can strip all of them from the Kernel.

Regards,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] omap-dma: Allow compile-testing omap1_camera driver

2014-09-09 Thread Mauro Carvalho Chehab
Em Tue, 09 Sep 2014 12:36:54 -0300
Mauro Carvalho Chehab m.che...@samsung.com escreveu:

 Em Tue, 9 Sep 2014 15:41:58 +0100
 Russell King - ARM Linux li...@arm.linux.org.uk escreveu:
 
  On Tue, Sep 09, 2014 at 11:38:17AM -0300, Mauro Carvalho Chehab wrote:
   We want to be able to COMPILE_TEST the omap1_camera driver.
   It compiles fine, but it fails linkediting:
   
   ERROR: omap_stop_dma 
   [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
   ERROR: omap_start_dma 
   [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
   ERROR: omap_dma_link_lch 
   [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
   ERROR: omap_set_dma_dest_burst_mode 
   [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
   ERROR: omap_set_dma_src_params 
   [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
   ERROR: omap_request_dma 
   [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
   ERROR: omap_set_dma_transfer_params 
   [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
   ERROR: omap_set_dma_dest_params 
   [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
   ERROR: omap_free_dma 
   [drivers/media/platform/soc_camera/omap1_camera.ko] undefined!
   
   So, add some stub functions to avoid it.
  
  The real answer to this is to find someone who still uses it, and convert
  it to the DMA engine API.  If there's no users, the driver might as well
  be killed off.
 
 Hmm... it seems that there are still several drivers still relying on
 the functions declared at: omap-dma.h:
 
 $ grep extern include/linux/omap-dma.h |perl -ne 'print $1\n if 
 (m/extern\s\S+\s(.*)\(/)' funcs  git grep -f funcs -l
 arch/arm/mach-omap1/pm.c
 arch/arm/mach-omap2/pm24xx.c
 arch/arm/plat-omap/dma.c
 drivers/dma/omap-dma.c
 drivers/media/platform/omap/omap_vout_vrfb.c
 drivers/media/platform/omap3isp/isphist.c
 drivers/media/platform/soc_camera/omap1_camera.c
 drivers/mtd/onenand/omap2.c
 drivers/usb/gadget/udc/omap_udc.c
 drivers/usb/musb/tusb6010_omap.c
 drivers/video/fbdev/omap/omapfb_main.c
 include/linux/omap-dma.h
 
 Perhaps we can remove the header and mark all the above as BROKEN.
 
 If nobody fixes, we can strip all of them from the Kernel.

Are all the functions declared at omap-dma.h part of the
old DMA API that should be deprecated?

If so, it seems that the OMAP2 and OMAP3 also depends on this 
thing, as all the PM code for OMAP depends on the functions
declared inside omap-dma.h, and marking them as BROKEN
causes compilation to failure:

arch/arm/mach-omap2/built-in.o: In function `omap3_save_scratchpad_contents':
:(.text+0x798): undefined reference to `omap3_restore_3630'
:(.text+0x7a8): undefined reference to `omap3_restore'
:(.text+0x7ac): undefined reference to `omap3_restore_es3'
arch/arm/mach-omap2/built-in.o: In function `omap3_sram_restore_context':
:(.text+0x925c): undefined reference to `omap_push_sram_idle'
arch/arm/mach-omap2/built-in.o: In function `option_set':
:(.text+0xc15c): undefined reference to `omap3_pm_off_mode_enable'
arch/arm/mach-omap2/built-in.o: In function `pwrdm_suspend_set':
:(.text+0xc1a0): undefined reference to `omap3_pm_set_suspend_state'
arch/arm/mach-omap2/built-in.o: In function `pwrdm_suspend_get':
:(.text+0xc1e4): undefined reference to `omap3_pm_get_suspend_state'
arch/arm/mach-omap2/built-in.o: In function `omap3_enter_idle_bm':
:(.text+0xc7ec): undefined reference to `omap_sram_idle'
:(.text+0xc848): undefined reference to `pm34xx_errata'
arch/arm/mach-omap2/built-in.o: In function `omap2420_init_late':
:(.init.text+0xf64): undefined reference to `omap2_pm_init'
arch/arm/mach-omap2/built-in.o: In function `omap2430_init_late':
:(.init.text+0x1024): undefined reference to `omap2_pm_init'
arch/arm/mach-omap2/built-in.o: In function `omap3_init_late':
:(.init.text+0x1248): undefined reference to `omap3_pm_init'
arch/arm/mach-omap2/built-in.o: In function `omap3430_init_late':
:(.init.text+0x1264): undefined reference to `omap3_pm_init'
arch/arm/mach-omap2/built-in.o: In function `omap35xx_init_late':
:(.init.text+0x1280): undefined reference to `omap3_pm_init'
arch/arm/mach-omap2/built-in.o: In function `omap3630_init_late':
:(.init.text+0x129c): undefined reference to `omap3_pm_init'
arch/arm/mach-omap2/built-in.o: In function `am35xx_init_late':
:(.init.text+0x12b8): undefined reference to `omap3_pm_init'
arch/arm/mach-omap2/built-in.o::(.init.text+0x12d4): more undefined references 
to `omap3_pm_init' follow

This was compiled with allmodconfig on arm, with COMPILE_TEST
disabled (a few sub-archs disabled too), to avoid spurious
unrelated compilation issues).

Am I missing something?

BTW, CONFIG_PM is auto-selected by ARCH_OMAP3.

And those are the functions that the OMAP3 code uses from omap-dma.h:

arch/arm/mach-omap2/pm34xx.c:92:2: error: implicit declaration of function 
‘omap_dma_global_context_save’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/pm34xx.c:103:2: error: