[Midnightbsd-cvs] mports [17554] trunk/sysutils/hal/files: add memcard patches
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 27 09:59:52 EDT 2014
Revision: 17554
http://svnweb.midnightbsd.org/mports/?rev=17554
Author: laffer1
Date: 2014-09-27 09:59:50 -0400 (Sat, 27 Sep 2014)
Log Message:
-----------
add memcard patches
Added Paths:
-----------
trunk/sysutils/hal/files/patch-hald_freebsd_Makefile.in
trunk/sysutils/hal/files/patch-hald_freebsd_hf-devtree.c
trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.c
trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.h
Added: trunk/sysutils/hal/files/patch-hald_freebsd_Makefile.in
===================================================================
--- trunk/sysutils/hal/files/patch-hald_freebsd_Makefile.in (rev 0)
+++ trunk/sysutils/hal/files/patch-hald_freebsd_Makefile.in 2014-09-27 13:59:50 UTC (rev 17554)
@@ -0,0 +1,36 @@
+--- ./hald/freebsd/Makefile.in.orig 2009-11-30 23:22:38.000000000 +0100
++++ ./hald/freebsd/Makefile.in 2013-10-22 02:07:00.268399458 +0200
+@@ -59,13 +59,14 @@
+ hf-pcmcia.c hf-pcmcia.h hf-scsi.c hf-scsi.h hf-serial.c \
+ hf-serial.h hf-sound.c hf-sound.h hf-storage.c hf-storage.h \
+ hf-usb.c hf-usb.h hf-util.c hf-util.h hf-volume.c hf-volume.h \
+- osspec.c hal-file-monitor.c hf-usb2.c hf-usb2.h
++ osspec.c hal-file-monitor.c hf-usb2.c hf-usb2.h \
++ hf-memcard.c hf-memcard.h
+ @HAVE_LIBUSB20_TRUE at am__objects_1 = hf-usb2.lo
+ am_libhald_freebsd_la_OBJECTS = hf-acpi.lo hf-ata.lo hf-block.lo \
+ hf-computer.lo hf-devd.lo hf-devtree.lo hf-drm.lo hf-net.lo \
+ hf-pci.lo hf-pcmcia.lo hf-scsi.lo hf-serial.lo hf-sound.lo \
+ hf-storage.lo hf-usb.lo hf-util.lo hf-volume.lo osspec.lo \
+- hal-file-monitor.lo $(am__objects_1)
++ hf-memcard.lo hal-file-monitor.lo $(am__objects_1)
+ libhald_freebsd_la_OBJECTS = $(am_libhald_freebsd_la_OBJECTS)
+ AM_V_lt = $(am__v_lt_$(V))
+ am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+@@ -325,7 +326,7 @@
+ hf-scsi.c hf-scsi.h hf-serial.c hf-serial.h hf-sound.c \
+ hf-sound.h hf-storage.c hf-storage.h hf-usb.c hf-usb.h \
+ hf-util.c hf-util.h hf-volume.c hf-volume.h osspec.c \
+- hal-file-monitor.c $(am__append_1)
++ hf-memcard.c hf-memcard.h hal-file-monitor.c $(am__append_1)
+ libhald_freebsd_la_LDFLAGS = -lcam $(am__append_2)
+ EXTRA_DIST = README TODO
+ all: all-recursive
+@@ -388,6 +389,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hf-devd.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hf-devtree.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hf-drm.Plo at am__quote@
++ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hf-memcard.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hf-net.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hf-pci.Plo at am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hf-pcmcia.Plo at am__quote@
Property changes on: trunk/sysutils/hal/files/patch-hald_freebsd_Makefile.in
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/sysutils/hal/files/patch-hald_freebsd_hf-devtree.c
===================================================================
--- trunk/sysutils/hal/files/patch-hald_freebsd_hf-devtree.c (rev 0)
+++ trunk/sysutils/hal/files/patch-hald_freebsd_hf-devtree.c 2014-09-27 13:59:50 UTC (rev 17554)
@@ -0,0 +1,21 @@
+--- ./hald/freebsd/hf-devtree.c.orig 2009-09-17 15:47:14.000000000 +0200
++++ ./hald/freebsd/hf-devtree.c 2013-10-22 02:16:42.548388644 +0200
+@@ -36,6 +36,7 @@
+ #include "hf-ata.h"
+ #include "hf-block.h"
+ #include "hf-drm.h"
++#include "hf-memcard.h"
+ #include "hf-pcmcia.h"
+ #include "hf-storage.h"
+ #include "hf-util.h"
+@@ -388,7 +389,9 @@
+ { "psm", hf_devtree_psm_set_properties },
+ { "sio", NULL },
+ { "speaker", NULL },
+- { "usbus", NULL }
++ { "usbus", NULL },
++ { "mmc", hf_mmc_host_set_properties },
++ { "mmcsd", hf_mmc_set_properties }
+ };
+
+ static void
Property changes on: trunk/sysutils/hal/files/patch-hald_freebsd_hf-devtree.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.c
===================================================================
--- trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.c (rev 0)
+++ trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.c 2014-09-27 13:59:50 UTC (rev 17554)
@@ -0,0 +1,109 @@
+--- ./hald/freebsd/hf-memcard.c.orig 2013-10-22 01:49:10.228430727 +0200
++++ ./hald/freebsd/hf-memcard.c 2013-10-22 01:48:06.869268391 +0200
+@@ -0,0 +1,106 @@
++/***************************************************************************
++ * CVSID: $Id$
++ *
++ * hf-memcard.c : memory card support
++ *
++ * Copyright (C) 2013 Alberto Villa <avilla at FreeBSD.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ **************************************************************************/
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <unistd.h>
++
++#include "../logger.h"
++
++#include "hf-memcard.h"
++#include "hf-block.h"
++#include "hf-devtree.h"
++#include "hf-storage.h"
++#include "hf-util.h"
++
++static HalDevice *
++hf_memcard_block_device_new (HalDevice *parent,
++ const char *driver,
++ int unit,
++ const char *drive_type)
++{
++ HalDevice *device;
++ char devname[16];
++
++ snprintf(devname, sizeof(devname), "%s%d", driver, unit);
++
++ g_return_val_if_fail(HAL_IS_DEVICE(parent), NULL);
++ g_return_val_if_fail(devname != NULL, NULL);
++
++ device = hf_device_new(parent);
++
++ hf_devtree_device_set_name(device, devname);
++ hf_block_device_enable(device, devname);
++
++ hf_storage_device_enable(device);
++
++ hal_device_copy_property(parent, "info.subsystem", device, "storage.bus");
++ hal_device_property_set_string(device, "storage.originating_device", hal_device_get_udi(parent));
++ hal_device_property_set_bool(device, "storage.removable", TRUE);
++ hal_device_property_set_bool(device, "storage.media_check_enabled", TRUE);
++ hal_device_property_set_bool(device, "storage.removable.support_async_notification", FALSE);
++ hal_device_property_set_bool(device, "storage.hotpluggable", TRUE);
++ if (drive_type)
++ {
++ hal_device_property_set_string(device, "storage.drive_type", drive_type);
++ }
++
++ if (hf_device_preprobe(device))
++ {
++ hf_block_device_complete(device, device, FALSE);
++ hf_device_add(device);
++ hf_storage_device_probe(device, FALSE);
++ }
++
++ return device;
++}
++
++void
++hf_mmc_host_set_properties (HalDevice *device)
++{
++ hal_device_property_set_string(device, "info.subsystem", "mmc_host");
++ hal_device_copy_property(device, "freebsd.unit", device, "mmc_host.host");
++}
++
++void
++hf_mmc_set_properties (HalDevice *device)
++{
++ HalDevice *block_device;
++
++ hal_device_property_set_string(device, "info.subsystem", "mmc");
++
++ hf_memcard_block_device_new(device,
++ hal_device_property_get_string(device, "freebsd.driver"),
++ hal_device_property_get_int(device, "freebsd.unit"),
++ "sd_mmc");
++
++ /* This information belongs to the block device. */
++ hal_device_property_remove(device, "freebsd.device_file");
++ hal_device_property_remove(device, "freebsd.driver");
++ hal_device_property_remove(device, "freebsd.unit");
++}
Property changes on: trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.h
===================================================================
--- trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.h (rev 0)
+++ trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.h 2014-09-27 13:59:50 UTC (rev 17554)
@@ -0,0 +1,39 @@
+--- ./hald/freebsd/hf-memcard.h.orig 2013-10-22 01:49:12.608421644 +0200
++++ ./hald/freebsd/hf-memcard.h 2013-10-22 01:41:55.228962237 +0200
+@@ -0,0 +1,36 @@
++/***************************************************************************
++ * CVSID: $Id$
++ *
++ * hf-memcard.h : memory card support
++ *
++ * Copyright (C) 2013 Alberto Villa <avilla at FreeBSD.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ **************************************************************************/
++
++#ifndef _HF_MEMCARD_H
++#define _HF_MEMCARD_H
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include "../device.h"
++
++void hf_mmc_host_set_properties (HalDevice *device);
++void hf_mmc_set_properties (HalDevice *device);
++
++#endif /* _HF_MEMCARD_H */
Property changes on: trunk/sysutils/hal/files/patch-hald_freebsd_hf-memcard.h
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list